Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        public void GetDifficultiesTest()
        {
            IEnumerable <SelectListItem> difficulties = DifficultiesHelper.GetDifficulties();

            Assert.IsTrue(Enum.GetNames(typeof(Difficulty)).Length == difficulties.Count());
        }