public void ClassWithoutBuildUpWithDependencyMethod_Success() { var c = new Container(); c.RegisterType<EmptyClass>().AsSingleton(); var sampleClass = new SampleClassWithoutClassDependencyMethod(); Assert.IsNotNull(sampleClass); Assert.IsNull(sampleClass.EmptyClass); }
public void BuildUpClassWithoutDependencyMethod_Success() { var c = new Container(); c.RegisterType<EmptyClass>(); var sampleClass = new SampleClassWithoutClassDependencyMethod(); c.BuildUp(sampleClass, ResolveKind.PartialEmitFunction); Assert.IsNull(sampleClass.EmptyClass); }