public void Test2__100_Random_Tests() { var kata = new SimpleFun136Kata(); var passed = "<font size=2 color='#8FBC8F'><b>Test Passed!</b></font>"; for (int i = 0; i < 100; i++) { var ab = rndtest(); //var cd=rand(0,100000); Console.WriteLine("<font size=2 color='#CFB53B'>Testing for: " + "\narr = new int[]{" + string.Join(", ", ab) + "}" //"\nmsg = \""+ab+"\"" //+", numberOfDigits = "+ab[1] //+", loved = "+ab[2] //+", s = "+ab[3] + "</font>"); var answer = An(ab); Assert.AreEqual(answer, kata.MissingValues(ab)); Console.WriteLine("<font size=2 color='#8FBC8F'>" + "Pass Value = " + answer + "</font>\n"); Console.WriteLine(" "); } Console.WriteLine("<div style='width:360px;background-color:gray'><br><font size=2 color='#3300dd'><b>Happy Coding ^_^</b></font>"); Console.WriteLine("<br><font size=2 color='#5500ee'><b>Thanks for solve this kata,\nI'm waiting for your:<font color='993300'>\nfeedback, voting and ranking ;-)</b></font></div>"); }
public void Test1__Basic_Tests() { var kata = new SimpleFun136Kata(); var passed = "<font size=2 color='#8FBC8F'>Test Passed!</font>\n"; Assert.AreEqual(18, kata.MissingValues(new int[] { 1, 1, 1, 2, 2, 3 })); Console.WriteLine(passed); Assert.AreEqual(12096, kata.MissingValues(new int[] { 96, 56, 24, 46, 75, 46, 75, 21, 46, 21, 75, 96, 56, 96, 56 })); Console.WriteLine(passed); Assert.AreEqual(28431, kata.MissingValues(new int[] { 27, 65, 44, 39, 44, 21, 21, 44, 65, 39, 21, 65 })); Console.WriteLine(passed); Assert.AreEqual(18411, kata.MissingValues(new int[] { 66, 4, 80, 66, 4, 83, 97, 81, 19, 4, 80, 51, 83, 81, 83, 66, 51, 80, 97, 81, 97 })); Console.WriteLine(passed); Assert.AreEqual(249704, kata.MissingValues(new int[] { 60, 76, 86, 76, 86, 53, 60, 88, 71, 71, 71, 86, 88, 76, 88, 17, 60, 26, 17, 17, 26, 53, 98, 53 })); Console.WriteLine(passed); Assert.AreEqual(192375, kata.MissingValues(new int[] { 42, 23, 45, 33, 33, 19, 42, 79, 79, 23, 95, 95, 79, 19, 42, 33, 19, 23 })); Console.WriteLine(passed); Assert.AreEqual(5915, kata.MissingValues(new int[] { 4, 74, 41, 41, 41, 88, 63, 35, 35, 4, 88, 13, 63, 74, 63, 88, 4, 74 })); Console.WriteLine(passed); Console.WriteLine(" "); }