public ActionResult DisplayNextPrime(PrimeRequest p)
 {
     if (ModelState.IsValid)
     {
         var f = new FindNextPrime();
         var model = new NextPrimeResult();
         model.NextPrime = f.NextPrime(p.Number);
         return View(model);
     }
     return View("NextPrimeQuery",p);
 }
Пример #2
0
 public void CheckPrimeLogic()
 {
     var f=new FindNextPrime();
     var actual = f.NextPrime(13);
     Assert.AreEqual(17,actual);
 }