예제 #1
0
        public void SpeedCamelAnswerTest()
        {
            var magicCarpet     = new MagicCarpet();
            var mortar          = new Mortar();
            var broom           = new Broom();
            var camel           = new BactrianCamel();
            var speedCamel      = new SpeedCamel();
            var centaur         = new Centaur();
            var allTerrainBoots = new AllTerrainBoots();

            var vehicles = new List <Vehicle>
            {
                magicCarpet,
                mortar,
                broom,
                camel,
                speedCamel,
                centaur,
                allTerrainBoots
            };

            var race   = new Race <Vehicle>(1000, vehicles);
            var winner = race.RunRace();

            Assert.AreEqual("SpeedCamel", winner.GetType().Name);
        }
예제 #2
0
        public void Test1()
        {
            Bactrian         camel1      = new Bactrian();
            Centavr          cent        = new Centavr();
            SuperBoots       runner      = new SuperBoots();
            SpeedCamel       camel2      = new SpeedCamel();
            List <Transport> Allmembers1 = new List <Transport>();

            Allmembers1.Add(camel1);
            Allmembers1.Add(cent);
            Allmembers1.Add(runner);
            Allmembers1.Add(camel2);

            TypeRace newRace1      = new TypeRace();
            var      StartNewRace1 = newRace1.StartRace(Allmembers1, 4000);
            var      Allwinner1    = newRace1.SpotLand(StartNewRace1, Allmembers1);

            Assert.AreEqual(175.5, Allwinner1.Item2);
        }