public static void test1() { Assert.AreEqual("aehrsty", TwoToOne.Longest("aretheyhere", "yestheyarehere")); Assert.AreEqual("abcdefghilnoprstu", TwoToOne.Longest("loopingisfunbutdangerous", "lessdangerousthancoding")); Assert.AreEqual("acefghilmnoprstuy", TwoToOne.Longest("inmanylanguages", "theresapairoffunctions")); }
public static void TwoToOne_Longest_Test1() { Assert.AreEqual("aehrsty", TwoToOne.Longest("aretheyhere", "yestheyarehere")); Assert.AreEqual("abcdefghilnoprstu", TwoToOne.Longest("loopingisfunbutdangerous", "lessdangerousthancoding")); Assert.AreEqual("acefghilmnoprstuy", TwoToOne.Longest("inmanylanguages", "theresapairoffunctions")); Assert.AreEqual("adefghklmnorstu", TwoToOne.Longest("lordsofthefallen", "gamekult")); Assert.AreEqual("acdeorsw", TwoToOne.Longest("codewars", "codewars")); Assert.AreEqual("acdefghilmnorstuw", TwoToOne.Longest("agenerationmustconfrontthelooming", "codewarrs")); }
public static void TwoToOne_Longest_RandomTest() { Console.WriteLine("200 Random Tests"); for (int i = 0; i < 200; i++) { string s1 = DoEx(rnd.Next(1, 10)); string s2 = DoEx(rnd.Next(1, 8)); Assert.AreEqual(LongestSol(s1, s2), TwoToOne.Longest(s1, s2)); } }
public void LongestShouldReturnCorrectString() { AssertThatStringsAreEqual(TwoToOne.Longest("", ""), ""); AssertThatStringsAreEqual(TwoToOne.Longest("a", ""), "a"); AssertThatStringsAreEqual(TwoToOne.Longest("ba", ""), "ab"); AssertThatStringsAreEqual(TwoToOne.Longest("ba", "c"), "abc"); AssertThatStringsAreEqual(TwoToOne.Longest("ba", "b"), "ab"); AssertThatStringsAreEqual(TwoToOne.Longest("aretheyhere", "yestheyarehere"), "aehrsty"); AssertThatStringsAreEqual(TwoToOne.Longest("loopingisfunbutdangerous", "lessdangerousthancoding"), "abcdefghilnoprstu"); AssertThatStringsAreEqual(TwoToOne.Longest("inmanylanguages", "theresapairoffunctions"), "acefghilmnoprstuy"); }
public void ShouldReturnTheOrderedDistinctCharactersOfBothStrings(string strOne, string strTwo, string expected) { Assert.Equal(expected, TwoToOne.Longest(strOne, strTwo)); }
public void IsDistinct() { Assert.AreEqual("abcdx", TwoToOne.sortLetter("bbac", "xxcdd")); }
public void TestMethod1() { Assert.AreEqual("abc", TwoToOne.sortLetter("abc", "abc")); }
public void IsTwoToOne_NotEqual_ReturnFalsee(string actual, string testA, string testB) { Assert.NotEqual(actual, TwoToOne.Solution(testA, testB)); }
public void IsTwoToOne_(string actual, string testA, string testB) { Assert.Equal(actual, TwoToOne.Solution(testA, testB)); }