PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Source/Bifrost.Specs/Resources/for_ResourceConvention/when_resolving_a_resource_implementation.cs

#
C# | 17 lines | 13 code | 4 blank | 0 comment | 0 complexity | 000d51ed7885d1dd5f1830c137264c52 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using Machine.Specifications;
  3. namespace Bifrost.Specs.Resources.for_ResourceConvention
  4. {
  5. [Subject(Subjects.resolving)]
  6. public class when_resolving_a_resource_implementation : given.a_resource_convention
  7. {
  8. static MyResources resources_instance;
  9. Establish context = () => container_mock.Setup(c => c.Bind(typeof (MyResources), Moq.It.IsAny<object>())).Callback((Type type, object instance)=>resources_instance = instance as MyResources);
  10. Because of = () => convention.Resolve(container_mock.Object, typeof(MyResources));
  11. It should_bind_to_the_container = () => resources_instance.ShouldNotBeNull();
  12. }
  13. }