Ejemplo n.º 1
0
        public static void Run()
        {
            Console.WriteLine($"{Environment.NewLine}*** TEMPLATE PATTERN ***{Environment.NewLine}");

            // Make a mountain bike workshop to build some mountain bikes
            MountainBikeShop mountainBikesRUS = new MountainBikeShop();

            mountainBikesRUS.BuildBike();

            // Make a Road bike shop to build some road bikes
            RoadBikeShop weLikeRoadBikes = new RoadBikeShop();

            weLikeRoadBikes.BuildBike();
            weLikeRoadBikes.BuildBike();
        }
Ejemplo n.º 2
0
        public void RoadBikeTemplate_AllValidInput_ReturnsInstanceOfRoadBikeShop()
        {
            // Arrange
            BaseBikeShop shop = new RoadBikeShop();

            // Act
            shop.BuildBike();

            // Assert
            Assert.IsInstanceOfType(shop, typeof(RoadBikeShop));
        }