public void ShouldReturnArmoredCar()
        {
            var baseCar = new BaseCar();
            var car     = new ArmoredCar(baseCar);

            Assert.AreEqual(80, car.Drive());
            Assert.AreEqual(100, car.Attack());
            Assert.AreEqual(140, car.Defend());
        }
示例#2
0
        public void ArmoredCar_ArmoredTest()
        {
            // Arrange
            ICar car      = new ArmoredCar(new BaseCar());
            var  expected = 100;

            // Action
            var actual = car.Attack();

            // Arrange
            Assert.AreEqual(expected, actual);
        }