public void NullTraitTest() { TraitStub trait = new TraitStub(); ISchedule schedule = new ScheduleStub(); GameObject gameObject = new GameObject(); TraitStub? retrievedTrait = gameObject.As <TraitStub>(); Assert.IsNull(retrievedTrait); }
public void AddTraitTest() { TraitStub trait = new TraitStub(); ISchedule schedule = new ScheduleStub(); GameObject gameObject = new GameObject(); gameObject.AddTrait(trait); TraitStub?retrievedTrait = gameObject.As <TraitStub>(); Assert.AreEqual(trait, retrievedTrait); }