Exemple #1
0
        public void GetPriceStrategy_RideTypeEqualsSharedRide_ReturnsSharedRidePriceStrategy()
        {
            var factory = new PriceStrategyFactory();

            var strategy = factory.GetPriceStrategy(RideType.SharedRide);

            Assert.That(strategy.GetType(), Is.EqualTo(typeof(SharedRideStrategy)));
        }
Exemple #2
0
        public void GetPriceStrategy_RideTypeIsInvalid_ThrowsException()
        {
            var factory = new PriceStrategyFactory();

            Assert.Throws <Exception>(() => factory.GetPriceStrategy((RideType)999));
        }