public void build_an_object_def_for_the_type() { var def = _wrapper.As <IContainerModel>().ToInstance().As <IConfiguredInstance>(); def.Dependencies.Count().ShouldBe(0); def.PluggedType.ShouldBe(typeof(NulloBehavior)); }
public void build_an_object_def_for_the_type() { var def = _wrapper.As <IContainerModel>().ToObjectDef(); def.Dependencies.Count().ShouldEqual(0); def.Type.ShouldEqual(typeof(NulloBehavior)); }
public void creating_an_object_def_for_no_tracing() { var node = new Wrapper(typeof(SimpleBehavior)); node.As <IContainerModel>().ToInstance() .ReturnedType.ShouldBe(typeof(SimpleBehavior)); }
public void creating_an_object_def_for_no_tracing() { var node = new Wrapper(typeof(SimpleBehavior)); node.As <IContainerModel>().ToObjectDef(DiagnosticLevel.None) .Type.ShouldEqual(typeof(SimpleBehavior)); }
private IActionBehavior behavior() { var objectDef = theNode.As <IContainerModel>().ToObjectDef(); var instance = new ObjectDefInstance(objectDef); return(theContainer.GetInstance <IActionBehavior>(instance)); }
public void creating_an_object_def_for_full_tracing_should_wrap_with_a_behavior_tracer() { var node = new Wrapper(typeof (SimpleBehavior)); var objectDef = node.As<IContainerModel>().ToObjectDef(DiagnosticLevel.FullRequestTracing); objectDef.Type.ShouldEqual(typeof (BehaviorTracer)); objectDef.DependencyFor<IActionBehavior>().As<ConfiguredDependency>() .Definition.Type.ShouldEqual(typeof (SimpleBehavior)); }
public void creating_an_object_def_for_full_tracing_should_wrap_with_a_behavior_tracer() { var node = new Wrapper(typeof(SimpleBehavior)); var objectDef = node.As <IContainerModel>().ToObjectDef(DiagnosticLevel.FullRequestTracing); objectDef.Type.ShouldEqual(typeof(BehaviorTracer)); objectDef.DependencyFor <IActionBehavior>().As <ConfiguredDependency>() .Definition.Type.ShouldEqual(typeof(SimpleBehavior)); }
public void creating_an_object_def_for_no_tracing() { var node = new Wrapper(typeof (SimpleBehavior)); node.As<IContainerModel>().ToObjectDef(DiagnosticLevel.None) .Type.ShouldEqual(typeof (SimpleBehavior)); }
public void creating_an_object_def_for_no_tracing() { var node = new Wrapper(typeof (SimpleBehavior)); node.As<IContainerModel>().ToInstance() .ReturnedType.ShouldBe(typeof (SimpleBehavior)); }