Exemplo n.º 1
0
        public void TestSportsCarBuildler()
        {
            AutomobileBuilder  builder  = new SportsCarBuilder();
            AutomobileDirector director = new AutomobileDirector(builder);

            director.Construct();
            var parts = builder.GetResult().ShowParts();

            Assert.IsTrue(parts.Contains("Cool Curves"));
            Assert.IsTrue(parts.Contains("Fast Engine"));
        }
        public void TestTruckBuilder()
        {
            AutomobileBuilder  builder  = new TruckBuilder();
            AutomobileDirector director = new AutomobileDirector(builder);

            director.Construct();
            var parts = builder.GetResult().ShowParts();

            Assert.IsTrue(parts.Contains("Big Lift Kit"));
            Assert.IsTrue(parts.Contains("Big Loud Engine"));
        }