public void EnamyInteractionTest() { //organization Ufo testedUfo = new Ufo(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(1, 1)); Asteroid someAsteroid = new Asteroid(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(1, 1)); Ufo someUfo = new Ufo(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(1, 1)); //activity List <AEntity> asteroidInteraction = testedUfo.Interaction(someAsteroid); List <AEntity> ufoInteraction = testedUfo.Interaction(someUfo); //assertion Assert.AreEqual(asteroidInteraction, null); Assert.AreEqual(ufoInteraction, null); }
public void BulletInteractionTest() { //organization Ufo firstUfo = new Ufo(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(1, 1)); Ufo secondUfo = new Ufo(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(1, 1)); AEntity laserBullet = new LaserBullet(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(1, 1)); GunBullet gunBullet = new GunBullet(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(1, 1)); List <AEntity> bigAsteroidIntResult = new List <AEntity>(); bigAsteroidIntResult.Add(new Asteroid(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(2, 1), 1)); bigAsteroidIntResult.Add(new Asteroid(new CoupleDouble(1, 1), new CoupleDouble(1, 1), new CoupleDouble(0, 1), 1)); //activity List <AEntity> laserSmalInteraction = firstUfo.Interaction(laserBullet); List <AEntity> gunSmalInteraction = secondUfo.Interaction(gunBullet); //assertion Assert.AreEqual(laserSmalInteraction, null); Assert.AreEqual(gunSmalInteraction, null); Assert.IsTrue(firstUfo.WasKilled); Assert.IsTrue(secondUfo.WasKilled); }