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

/Source/Bifrost.Specs/Execution/for_BindingConventionManager/when_initializing_with_convention_that_can_resolve.cs

#
C# | 23 lines | 20 code | 3 blank | 0 comment | 0 complexity | 0b83bd37f054d98b72bba376f028695a MD5 | raw file
 1using System;
 2using Bifrost.Execution;
 3using Machine.Specifications;
 4using Moq;
 5using It = Machine.Specifications.It;
 6
 7namespace Bifrost.Specs.Execution.for_BindingConventionManager
 8{
 9    public class when_initializing_with_one_convention : given.a_binding_convention_manager
10    {
11        static Type convention_type;
12        
13        Establish context = () =>
14                                {
15                                    var convention_mock = new Mock<IBindingConvention>();
16                                    convention_type = convention_mock.Object.GetType();
17                                    manager.Add(convention_type);
18                                };
19        Because of = () => manager.Initialize();
20
21        It should_get_an_instance_of_the_convention = () => container_mock.Verify(c => c.Get(convention_type), Times.Once());
22    }
23}