PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 2ms 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
 1using System;
 2using Machine.Specifications;
 3
 4namespace Bifrost.Specs.Resources.for_ResourceConvention
 5{
 6	[Subject(Subjects.resolving)]
 7	public class when_resolving_a_resource_implementation : given.a_resource_convention
 8	{
 9	    static MyResources resources_instance;
10
11        Establish context = () => container_mock.Setup(c => c.Bind(typeof (MyResources), Moq.It.IsAny<object>())).Callback((Type type, object instance)=>resources_instance = instance as MyResources);
12
13		Because of = () => convention.Resolve(container_mock.Object, typeof(MyResources));
14
15	    It should_bind_to_the_container = () => resources_instance.ShouldNotBeNull();
16	}
17}