public void InterfaceWithoutBuildUpWithDependencyMethod_Success() { var c = new Container(); c.RegisterType<IEmptyClass, EmptyClass>().AsSingleton(); ISampleClassWithInterfaceMethod sampleClass = new SampleClassWithoutInterfaceDependencyMethod(); Assert.IsNotNull(sampleClass); Assert.IsNull(sampleClass.EmptyClass); }
public void BuildUpInterfaceWithoutDependencyMethod_Success() { var c = new Container(); c.RegisterType<IEmptyClass, EmptyClass>(); ISampleClassWithInterfaceMethod sampleClass = new SampleClassWithoutInterfaceDependencyMethod(); c.BuildUp(sampleClass, ResolveKind.PartialEmitFunction); Assert.IsNull(sampleClass.EmptyClass); }