Example #1
0
        public void TestMethodCreateStarship()
        {
            StarShip ship = new StarShip();

            ship.CreateStarShip(12000, "TestShip", 20);
            Assert.IsNotNull(ship);
        }
Example #2
0
        /// <summary>
        /// StarShip entity created with parameters needed to perform requested calculations
        /// </summary>
        /// <param name="starShip"></param>
        /// <returns></returns>
        private static StarShip ResolveStarship(JToken starShip)
        {
            StarShip ship = new StarShip();

            ship.CreateStarShip(ResolveConsumables(starShip.SelectToken("consumables").ToString()), starShip.SelectToken("name").ToString(), ResolveMGLT(starShip.SelectToken("MGLT").ToString()));

            return(ship);
        }
Example #3
0
        public void TestMethodCalculateStops()
        {
            int      distance = 10000000;
            StarShip ship     = new StarShip();

            ship.CreateStarShip(12000, "TestShip", 20);
            int stops = ship.CalculateStops(distance);

            Assert.IsTrue(41 == ship.CalculateStops(distance));
        }