public void Get_A_Component_Dont_Exits() { Assert.Multiple(() => { Alis.Core.GameObject gameObject = new Alis.Core.GameObject("Player"); Assert.IsNull(gameObject.Get <Alis.Core.SFML.Sprite>()); }); }
public void Get_A_Component() { Assert.Multiple(() => { Alis.Core.SFML.Sprite sprite = new Alis.Core.SFML.Sprite(string.Empty); Alis.Core.GameObject gameObject = new Alis.Core.GameObject("Player", new Alis.Core.Transform(), sprite); Assert.AreEqual(sprite, gameObject.Get <Alis.Core.SFML.Sprite>()); }); }
public void Get_A_Component_With_Added_Previus() { Assert.Multiple(() => { Alis.Core.SFML.Sprite sprite = new Alis.Core.SFML.Sprite(string.Empty); Alis.Core.GameObject gameObject = new Alis.Core.GameObject("Player", new Alis.Core.Transform()); Assert.DoesNotThrow(() => gameObject.Add(sprite)); Assert.AreEqual(sprite, gameObject.Get <Alis.Core.SFML.Sprite>()); }); }