public void RegisterAndResolveTypeWithNestedDependency() { var container = new Container.Container(); container.Register <ICar>(c => new Car()); container.Register <IEngine>(c => new Engine(c.Resolve <ICar>())); var car = container.Resolve <ICar>(); var engine = container.Resolve <IEngine>(); }
public void RegisterAndResolveSimpleType() { var container = new Container.Container(); container.Register <ICar>(c => new Car()); var car = container.Resolve <ICar>(); Assert.IsTrue(car is Car); }