예제 #1
0
        public void GetStopsNeededToResupplyWithoutConsumablesValue_ShouldBeMinus1()
        {
            var starship = new Starship {
                Mglt = "75", Consumables = "months"
            };
            var stops = starship.GetStopsNeededToResupply(1000000);

            Assert.AreEqual(-1, stops);
        }
예제 #2
0
        public void GetStopsNeededToResupplyDistanceNegative_ShouldBeMinus1()
        {
            var starship = new Starship {
                Mglt = "75", Consumables = "2 months"
            };
            var stops = starship.GetStopsNeededToResupply(-10);

            Assert.AreEqual(-1, stops);
        }
예제 #3
0
        public void GetStopsNeededToResupplyMillenniumFalcon_ShouldBe9()
        {
            var starship = new Starship {
                Mglt = "75", Consumables = "2 months"
            };
            var stops = starship.GetStopsNeededToResupply(1000000);

            Assert.AreEqual(9, stops);
        }
예제 #4
0
        public void GetStopsNeededToResupplyDistanceZero_ShouldBeZero()
        {
            var starship = new Starship {
                Mglt = "75", Consumables = "2 months"
            };
            var stops = starship.GetStopsNeededToResupply(0);

            Assert.AreEqual(0, stops);
        }
예제 #5
0
        public void GetStopsNeededToResupplyYWing_ShouldBe74()
        {
            var starship = new Starship {
                Mglt = "80", Consumables = "1 week"
            };
            var stops = starship.GetStopsNeededToResupply(1000000);

            Assert.AreEqual(74, stops);
        }