PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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