Пример #1
0
        public ActionResult AllergiesResult()
        {
            AllergiesScore myScore     = new AllergiesScore(int.Parse(Request.Form["score"]));
            List <string>  myAllergies = myScore.ReadBinary();

            return(View(myAllergies));
        }
Пример #2
0
        public void ReadBinary_ReturnAllergyStringBasedOnInputScore_List()
        {
            //Arrange
            AllergiesScore testScore = new AllergiesScore(31);
            List <string>  expected  = new List <string> {
                "tomatoes", "strawberries", "shellfish", "peanuts", "eggs"
            };
            //Act
            List <string> actual = testScore.ReadBinary();

            //Assert
            CollectionAssert.AreEqual(expected, actual);
        }