public void DependencyContainer_DoesNotThrowIfFlagToNotThrowSet() { DependencyContainer container = this.GetNewContainer(); container.Register <IMockWithDependency, MockWithDependency>(); IMockWithDependency mockObject = container.Resolve <IMockWithDependency>(false); Assert.IsNotNull(mockObject); }
public void DependencyContainer_ResolvesRegisteredTypeWithDependencies() { DependencyContainer container = this.GetNewContainer(); container.Register <IMockInterfaceObject, MockObject>(); container.Register <IMockWithDependency, MockWithDependency>(); IMockWithDependency resolvedObjectWithDependency = container.Resolve <IMockWithDependency>(); Assert.IsNotNull(resolvedObjectWithDependency); Assert.IsNotNull(resolvedObjectWithDependency.MockInterfaceObject); }