PageRenderTime 560ms CodeModel.GetById 6ms RepoModel.GetById 0ms 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
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using Bifrost.Execution;
  3. using Machine.Specifications;
  4. using Moq;
  5. using It = Machine.Specifications.It;
  6. namespace Bifrost.Specs.Execution.for_BindingConventionManager
  7. {
  8. public class when_initializing_with_one_convention : given.a_binding_convention_manager
  9. {
  10. static Type convention_type;
  11. Establish context = () =>
  12. {
  13. var convention_mock = new Mock<IBindingConvention>();
  14. convention_type = convention_mock.Object.GetType();
  15. manager.Add(convention_type);
  16. };
  17. Because of = () => manager.Initialize();
  18. It should_get_an_instance_of_the_convention = () => container_mock.Verify(c => c.Get(convention_type), Times.Once());
  19. }
  20. }