Ejemplo n.º 1
0
 public void TestSimpleFactoryThrowsException()
 {
     Assert.That(() => CarFactory.BuildCar((CarFactory.Cars) 100), Throws.ArgumentException);
 }
Ejemplo n.º 2
0
        public void TestSimpleFactoryBuildsCar(CarFactory.Cars carName, Type carType)
        {
            var car = CarFactory.BuildCar(carName);

            Assert.That(car.GetType(), Is.EqualTo(carType));
        }