public void TestMethodCreateStarship() { StarShip ship = new StarShip(); ship.CreateStarShip(12000, "TestShip", 20); Assert.IsNotNull(ship); }
/// <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); }
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)); }