Пример #1
0
 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>());
     });
 }
Пример #2
0
 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>());
     });
 }
Пример #3
0
 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>());
     });
 }