public void ObjectsFromSceneReceiveLateInits() { var go = MakeGameObject(); var behaviour = go.AddComponent <SimpleBehaviour>(); _context.Declare <SimpleService>(); _context.DeclareMonoBehavioursFromScene <SimpleBehaviour>(); _context.Resolve(); Assert.AreSame(_context.Get <SimpleService>(), behaviour.SimpleService); }
public void TestConstruction() { // setup _context.Declare <House>(); _context.Declare <Door>(); // when _context.Resolve(); var house = _context.Get <House>(); // then Assert.NotNull(house); Assert.NotNull(house.Door); Assert.IsTrue(house.Door.Locked); }