public void testing1_encode_function() { Assert.AreEqual("000111111000111000000000000111111000000111000111000111111111111000000111", CodeWars.encode("hey")); Assert.AreEqual( "000111000111000111000000000111111000111000000000000111111000000111000111000000111000000000000000000111000111000000111111000111111000000111000111000111111000111111111000000111111111000000111111000111111000000111000111000111111000111000000111000000111000000000000000000111111111000111000000000111111000111111111111000111111000111111000000000111111000000111000000000000111000000000000000000111111000111111000111000111111000000111000111000000111000000000000000000111111111000111000000000111111000111000000000000111111000000000000111000111111111000111000000000000111000000000000000000111111000111000000111000000111000000000000000000111111000000000111111000111111000000000000111000111111000111111111000000000111000000000000000000111111000000111000000000111111000111111111111000000111000000000000000000111111111000111000000000111111000111000000000000111111000111000000111000111111111000000111111000000111000000000000000000111111000111000111111000111111000000000000111000111111111000111000000000111111000000000000111", CodeWars.encode("The Sensei told me that i can do this kata")); Assert.AreEqual( "000111000111000111000000000000111111000000111111000111111111000000111111000111111111000111000000", CodeWars.encode("T3st")); Assert.AreEqual( "000111000111000111000000000000111111111111111111000111111111000000111111000111111111000111000000000000111000000000000111000000111000000111000111", CodeWars.encode("T?st!%")); }
public void testing2_decode_function() { Assert.AreEqual("hey", CodeWars.decode("100111111000111001000010000111111000000111001111000111110110111000010111")); Assert.AreEqual("The Sensei told me that i can do this kata", CodeWars.decode( "000111000111000111000100000111111000111000001000000111111000000111000111000100111000000000000000000111000111000000111111000111111000000111000111000111111000111111111000000111111111000000111111000110111000010111000111000111111000111001000111000000111000000000000000000111111111000111000000000111111000111111111111000111111000111111000000000111111000000111000001000000111000000000001000000111111000111111000111000111111000000111000111000000111000000000000000000111111111000111000000000111111000111000000000000111111000000010000111000111111111000111000000000100111000000000000000000111111000111000000111000000111000000000000000000111111000000000111111000111111000000000000111000111111000111111111000000000111000000000000010000111111000000111000000000111111000111111110111000000111000000000000000000111111111000111000000000111111000111000000000000111111000111000000111000111111111000000111111000000111000000000000000000111111000111000111111000111111000000000000111000111111111000111000000000111111000000000000111")); Assert.AreEqual("T3st", CodeWars.decode( "000111000111000111000001000000111111000000111111000111111111000000111011000111111111000111000000")); Assert.AreEqual("T?st!%", CodeWars.decode( "000111000111000111000010000000111111111111011111000111111111000000111111000111101111000111000000000000111000000000000111000000111000000111000111")); }
public void BasicTests( [Values("s2324", "-234.4")] string input, [Values(false, true)] bool expectedResult) { Assert.IsTrue(CodeWars.IsDigit(input) == expectedResult); }
public void SimpleTest() { Assert.AreEqual("12345", CodeWars.crack("827ccb0eea8a706c4c34a16891f84e7b")); }
public void HarderTest() { Assert.AreEqual("00078", CodeWars.crack("86aa400b65433b608a9db30070ec60cd")); }