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); } }
public void MorseCodeDecoderComplexTest_2() { try { string input = " . . "; string expected = "E E"; 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 HEY_JUDE() { var input = ".... . -.-- .--- ..- -.. ."; Assert.AreEqual("HEY JUDE", MorseCodeDecoder.Decode(input)); }
public void EH() { var input = ". ...."; Assert.AreEqual("EH", MorseCodeDecoder.Decode(input)); }