Exemple #1
0
 public void SampleTest()
 {
     Assert.AreEqual("no one likes this", WhoLikesIt.Likes(new string[0]));
     Assert.AreEqual("Peter likes this", WhoLikesIt.Likes(new string[] { "Peter" }));
     Assert.AreEqual("Jacob and Alex like this", WhoLikesIt.Likes(new string[] { "Jacob", "Alex" }));
     Assert.AreEqual("Max, John and Mark like this", WhoLikesIt.Likes(new string[] { "Max", "John", "Mark" }));
     Assert.AreEqual("Alex, Jacob and 2 others like this", WhoLikesIt.Likes(new string[] { "Alex", "Jacob", "Mark", "Max" }));
 }
Exemple #2
0
        public IActionResult WhoLikesIt(WhoLikesIt who)
        {
            ViewBag.Result = who.Likes();

            return(View());
        }
Exemple #3
0
 public void SampleTest(string expected, string[] input)
 {
     Assert.AreEqual(expected, WhoLikesIt.Run(input));
 }