/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
- using System;
- using Bifrost.Execution;
- using Machine.Specifications;
- using Moq;
- using It = Machine.Specifications.It;
-
- namespace Bifrost.Specs.Execution.for_BindingConventionManager
- {
- public class when_initializing_with_one_convention : given.a_binding_convention_manager
- {
- static Type convention_type;
-
- Establish context = () =>
- {
- var convention_mock = new Mock<IBindingConvention>();
- convention_type = convention_mock.Object.GetType();
- manager.Add(convention_type);
- };
- Because of = () => manager.Initialize();
-
- It should_get_an_instance_of_the_convention = () => container_mock.Verify(c => c.Get(convention_type), Times.Once());
- }
- }