Esempio n. 1
0
        public IActionResult Results()
        {
            int numberOfDays     = int.Parse(Request.Form["NumOfDays"]);
            int numberOfTasks    = int.Parse(Request.Form["NumOfTasks"]);
            var newMissionPlan   = new MissionPlanner();
            int astronautsNeeded = newMissionPlan.GetAstronautsNeeded(numberOfDays, numberOfTasks);

            return(View(astronautsNeeded));
        }
Esempio n. 2
0
        public void TestAstronautsNeeded()
        {
            var mission = new MissionPlanner();

            var days            = 3;
            var tasksToComplete = 1200;

            var result = mission.GetAstronautsNeeded(days, tasksToComplete);

            Assert.AreEqual(2, result);
        }