/Source/Bifrost.Specs/Events/for_ProcessMethodInvoker/when_invoking_on_an_instance_that_can_not_handle_a_given_event.cs

# · C# · 24 lines · 19 code · 5 blank · 0 comment · 0 complexity · 6f5fa9028f975714c000e2cd19e08cfd MD5 · raw file

  1. using System;
  2. using Bifrost.Fakes.Events;
  3. using Machine.Specifications;
  4. namespace Bifrost.Specs.Events.for_ProcessMethodInvoker
  5. {
  6. public class when_invoking_on_an_instance_that_can_not_handle_a_given_event : given.a_process_method_invoker
  7. {
  8. static object instance;
  9. static SimpleEvent @event;
  10. static bool result;
  11. Establish context = () =>
  12. {
  13. instance = new object();
  14. @event = new SimpleEvent(Guid.NewGuid());
  15. };
  16. Because of = () => result = invoker.TryProcess(instance, @event);
  17. It should_result_in_false = () => result.ShouldBeFalse();
  18. }
  19. }