public ActionResult Index() { try { ViewBag.Ponies = PoniesHelper.GetPonies(); ViewBag.Difficulties = DifficultiesHelper.GetDifficulties(); } catch (Exception ex) { HttpResponseException exception = CreateResponseException(HttpStatusCode.InternalServerError, ex.Message); throw exception; } return(View()); }
public void GetDifficultiesTest() { IEnumerable <SelectListItem> difficulties = DifficultiesHelper.GetDifficulties(); Assert.IsTrue(Enum.GetNames(typeof(Difficulty)).Length == difficulties.Count()); }