static void Main(string[] args) { // for (int i = 'A'; i <= 'Z'; i++) // { // System.Console.WriteLine(@"{"",'" + (char)i + @"'},"); // } Console.WriteLine(MorseCodeDecoder.Decode("...---... -.-.-- - .... . --.- ..- .. -.-. -.- -... .-. --- .-- -. ..-. --- -..- .--- ..- -- .--. ... --- ...- . .-. - .... . .-.. .- --.. -.-- -.. --- --. .-.-.- ")); }
public void Decode_RegularString_CorrectResult() { string input = ".... . -.-- .--- ..- -.. ."; string expected = "HEY JUDE"; string actual = MorseCodeDecoder.Decode(input); Assert.AreEqual(expected, actual); }
public void Test1() { string input = ".... . -.-- .--- ..- -.. ."; string expected = "[L][L][L] [L][L][L][L]"; string actual = MorseCodeDecoder.Decode(input); Assert.AreEqual(expected, actual); }
public void MorseCodeDecoderBasicTest_1() { try { string input = ".... . -.-- .--- ..- -.. ."; string expected = "HEY JUDE"; string actual = MorseCodeDecoder.Decode(input); Assert.AreEqual(expected, actual); } catch (Exception ex) { Assert.Fail("There seems to be an error somewhere in your code. Exception message reads as follows: " + ex.Message); } }
public void MorseCodeDecoderComplexTest_3() { try { string input = " ...---... -.-.-- - .... . --.- ..- .. -.-. -.- -... .-. --- .-- -. ..-. --- -..- .--- ..- -- .--. ... --- ...- . .-. - .... . .-.. .- --.. -.-- -.. --- --. .-.-.- "; string expected = "SOS! THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."; string actual = MorseCodeDecoder.Decode(input); Assert.AreEqual(expected, actual); } catch (Exception ex) { Assert.Fail("There seems to be an error somewhere in your code. Exception message reads as follows: " + ex.Message); } }
static void Main(string[] args) { Console.WriteLine(MorseCodeDecoder.Decode("...---...")); }
public void MorseCodeTest() { Assert.AreEqual("HEY JUDE", MorseCodeDecoder.Decode(".... . -.-- .--- ..- -.. .")); }
public void Decode_SOSCodeTester(string input, string expected) { var actual = MorseCodeDecoder.Decode(input); Assert.AreEqual(expected, actual); }
public void OriginalTest() { _test.Decode(".... . -.-- .--- ..- -.. .").ShouldBe("HEY JUDE"); }