Beispiel #1
0
 public void BasicTests(long expected, long startingNumber, long reach, long target)
 {
     Assert.Equal(expected, Kata.Mormons(startingNumber, reach, target));
 }
 public void BasicTests()
 {
     Assert.Equal(new int[] { 1, 3, 2, 8, 5, 4 }, Kata.SortArray(new int[] { 5, 3, 2, 8, 1, 4 }));
     Assert.Equal(new int[] { 1, 3, 5, 8, 0 }, Kata.SortArray(new int[] { 5, 3, 1, 8, 0 }));
     Assert.Equal(new int[] { }, Kata.SortArray(new int[] { }));
 }
 public void Test2()
 {
     Assert.AreEqual("2a1d5e1g1h4i1j2m3n3o3s6t1u2w2y", Kata.StringLetterCount("The time you enjoy wasting is not wasted time."));
 }
 public void Test3()
 {
     Assert.AreEqual("", Kata.StringLetterCount("./4592#{}()"));
 }
 public void Test1()
 {
     Assert.AreEqual("1a1b1c1d3e1f1g2h1i1j1k1l1m1n4o1p1q2r1s2t2u1v1w1x1y1z", Kata.StringLetterCount("The quick brown fox jumps over the lazy dog."));
 }
Beispiel #6
0
 public void SampleTest()
 {
     Assert.AreEqual(new[] { "#48656c", "#6d7900", "#6e616d", "#697300", "#476172", "#616e64", "#490000", "#6c696b", "#636865" }, Kata.WordsToHex("Hello, my name is Gary and I like cheese."));
     Assert.AreEqual(new[] { "#303132" }, Kata.WordsToHex("0123456789"));
     Assert.AreEqual(new[] { "#546869" }, Kata.WordsToHex("ThisIsOneLongSentenceThatConsistsOfWords"));
     Assert.AreEqual(new[] { "#426c61", "#626c61", "#626c61", "#626c61" }, Kata.WordsToHex("Blah blah blah blaaaaaaaaaaaah"));
     Assert.AreEqual(new[] { "#262626", "#242424", "#5e5e5e", "#404040", "#282928" }, Kata.WordsToHex("&&&&& $$$$$ ^^^^^ @@@@@ ()()()()("));
 }
        public void TestSampleCases(int n, bool expected)
        {
            bool actual = Kata.Narcissistic(n);

            Assert.Equal(expected, actual);
        }
 public string Test(string s) => Kata.High(s);
        public void TestDuplicateEncode(string word, string expected)
        {
            string actual = Kata.DuplicateEncode(word);

            Assert.Equal(expected, actual);
        }