public void OnlyAllowKingOrQueenBossEnemies()
        {
            EnemyFactory sut = new EnemyFactory();
            //Assert.Throws<ArgumentNullException>(()=>sut.Create(null));
            EnemyCreationException ex = Assert.Throws <EnemyCreationException>(() => sut.Create("Zombie", true));

            Assert.StartsWith("Zombie", ex.Message);
        }
Esempio n. 2
0
        public void OnlyAllowkingOrQueenBossEnemies()
        {
            EnemyFactory sut = new EnemyFactory();

            EnemyCreationException ex = Assert.Throws <EnemyCreationException>(() => sut.Create("Zombie", true));

            Assert.Equal("Zombie", ex.RequestedEnemyName);
        }
        public void IsThathBossName()
        {
            EnemyFactory sut = new EnemyFactory();

            EnemyCreationException ex = Assert.Throws <EnemyCreationException>(() => sut.Create("Zombie", true));

            Assert.Equal("Zombie", ex.RequestedEnemyName);
        }
Esempio n. 4
0
        public void OnlyAllowKingOrQueenBossEnimies()
        {
            var systemUnderTest = new EnemyFactory();

            EnemyCreationException ex =
                Assert.ThrowsException <EnemyCreationException>(
                    () => systemUnderTest.Create("Zombie", true));

            Assert.AreEqual("Zombie", ex.RequestedEnemyName);
        }
Esempio n. 5
0
        public void NombresPermitidosBoss()
        {
            var enemy = new EnemyFactory();

            //Assert.ThrowsException<EnemyCreationException>(() => enemy.Create("david",true));
            EnemyCreationException ex = Assert.ThrowsException <EnemyCreationException>(() => enemy.Create("david", true));

            //verificar si se puede usar un nombre;
            Assert.AreEqual("david", ex.RequestedEnemyName);
        }
        public void OnlyAllowKingOrQueenBossEnemies()
        {
            //System Under Test
            EnemyFactory sut = new EnemyFactory();

            // Assert.ThrowsException<EnemyCreationException>((() => sut.Create("Super", true)));

            EnemyCreationException ex = Assert.ThrowsException <EnemyCreationException>((() => sut.Create("Super", true)));

            Assert.AreEqual("Super", ex.RequestedEnemyName);
        }
        public void OnlyAllowKingOrQueenBossEnemies()
        {
            // Act
            EnemyFactory sut = new EnemyFactory();
            // Arrange

            // Asset
            EnemyCreationException ex = Assert.ThrowsException <EnemyCreationException>(() => sut.Create("Cadet", true));

            Assert.AreEqual("Cadet", ex.RequestedEnemyName);
        }
        private void ValidBossName()
        {
            //arrange

            //act

            //assert
            EnemyCreationException ex =
                Assert.Throws <EnemyCreationException>(() => _sut.Create("Zombie", true));

            Assert.Equal("Zombie", ex.RequestedEnemyName);
        }
        public void OnlyAllowKingOrQueenEnemies()
        {
            //Arrange
            EnemyFactory sut = new EnemyFactory();

            //Act

            //Assert
            EnemyCreationException ex =
                Assert.Throws <EnemyCreationException>(() => sut.Create("Zombiew", true));

            Assert.Equal("Zombiew", ex.RequestedEnemyName);
        }
Esempio n. 10
0
        public void OnlyAllowKingOrQueenBossEnemies()
        {
            // Arrange
            EnemyFactory sut = new EnemyFactory();

            // Act

            // Assert
            // Exception because not ends with King or Queen like "Zombie King"
            EnemyCreationException ex = Assert.Throws <EnemyCreationException>(() => sut.Create("Zombie", true));

            Assert.Equal("Zombie", ex.RequestedEnemyName);
        }
Esempio n. 11
0
        public void OnlyAllowKingOrQueenBossEnemies()
        {
            EnemyCreationException enemyCreationException = Assert.ThrowsException <EnemyCreationException>(() => enemyFactory.Create("Zombie", true));

            Assert.AreEqual("Zombie", enemyCreationException.RequestedEnemyName);
        }
        public void OnlyAllowKingOrQueenBossEnemies()
        {
            EnemyCreationException ex = Assert.Throws <EnemyCreationException>(() => _enemy.Create("Zombie", true));

            Assert.Equal("Zombie", ex.RequestedEnemyName);
        }
Esempio n. 13
0
 public void Should_Not_Allowed_BossEnemy_With_Name_Not_Ending_With_King_Or_Queen()
 {
     EnemyCreationException ex =
         Assert.Throws <EnemyCreationException>(() => _sut.Create("Zombie", true));
 }