Exemplo n.º 1
0
 public void Test3()
 {
     int[] peopleInProgram = new int[] { 25, 50 };
     Assert.AreEqual("YES", Kata.Tickets(peopleInProgram));
 }
Exemplo n.º 2
0
 public void Test4()
 {
     int[] peopleInProgram = new int[] { 50, 25, 100 };
     Assert.AreEqual("NO", Kata.Tickets(peopleInProgram));
 }
Exemplo n.º 3
0
 public void Given123And456Returns579()
 {
     Assert.AreEqual("579", Book.sumStrings("123", "456"));
     Assert.AreEqual("9984312157800830105371", Book.sumStrings("1234567891112343", "9984310923232938993028"));
     Assert.AreEqual("11111111110", Kata.SumStrings("123456789", "10987654321"));
 }
Exemplo n.º 4
0
 public void KataTests()
 {
     Assert.AreEqual("theStealthWarrior", Kata.ToCamelCase("the_stealth_warrior"), "Kata.ToCamelCase('the_stealth_warrior') did not return correct value");
     Assert.AreEqual("TheStealthWarrior", Kata.ToCamelCase("The-Stealth-Warrior"), "Kata.ToCamelCase('The-Stealth-Warrior') did not return correct value");
     Assert.AreEqual("", Kata.ToCamelCase(""));
 }
Exemplo n.º 5
0
 public void SampleTest()
 {
     Assert.AreEqual("Thi1s is2 3a T4est", Kata.Order("is2 Thi1s T4est 3a"));
     Assert.AreEqual("Fo1r the2 g3ood 4of th5e pe6ople", Kata.Order("4of Fo1r pe6ople g3ood th5e the2"));
     Assert.AreEqual("", Kata.Order(""));
 }
Exemplo n.º 6
0
 public void ToUnderscoreTests()
 {
     Assert.AreEqual("test_controller", Kata.ToUnderscore("TestController"));
     Assert.AreEqual("this_is_beautiful_day", Kata.ToUnderscore("ThisIsBeautifulDay"));
     Assert.AreEqual("am7_days", Kata.ToUnderscore("Am7Days"));
     Assert.AreEqual("my3_code_is4_times_better", Kata.ToUnderscore("My3CodeIs4TimesBetter"));
     Assert.AreEqual("arbitrarily_sending_different_types_to_functions_makes_katas_cool", Kata.ToUnderscore("ArbitrarilySendingDifferentTypesToFunctionsMakesKatasCool"));
     Assert.AreEqual("1", Kata.ToUnderscore(1), "Numbers should be turned to strings!");
 }
Exemplo n.º 7
0
 public string[] BasicTest(string s)
 {
     return(Kata.GetUserIds(s));
 }
Exemplo n.º 8
0
 public string TestChange(string input) => Kata.Change(input);
Exemplo n.º 9
0
 public void Test12(string input, bool expected)
 {
     Assert.AreEqual(expected, Kata.Check(input));
 }
Exemplo n.º 10
0
 public void SumNullArray()
 {
     Assert.AreEqual(null, Kata.Sum(null));
 }
Exemplo n.º 11
0
 public static void Tes11()
 {
     int[] exampleTest3 = { int.MaxValue, 0, 1 };
     Assert.IsTrue(0 == Kata.Find(exampleTest3));
 }
Exemplo n.º 12
0
 public static void Test10()
 {
     int[] exampleTest2 = { 206847684, 1056521, 7, 17, 1901, 21104421, 7, 1, 35521, 1, 7781 };
     Assert.IsTrue(206847684 == Kata.Find(exampleTest2));
 }
Exemplo n.º 13
0
 public static void Test9()
 {
     int[] exampleTest1 = { 2, 6, 8, -10, 3 };
     Assert.IsTrue(3 == Kata.Find(exampleTest1));
 }
Exemplo n.º 14
0
 private static void Tester(List <int> argument, List <int> expectedResult)
 {
     CollectionAssert.AreEqual(expectedResult, Kata.RemoveSmallest(argument));
 }
Exemplo n.º 15
0
 public string Test(string s) => Kata.High(s);