public void Translate_HelloWorld() { ITranslator translator = new MorseToAlphabetTranslator(); var expected = "HELLO WORLD"; var actual = translator.Translate(".... . .-.. .-.. --- / .-- --- .-. .-.. -.. "); Assert.AreEqual(expected, actual); }
public void Translate_Mix() { ITranslator translator = new MorseToAlphabetTranslator(); var expected = "ABC~DEF"; var actual = translator.Translate(".- -... -.-. ~ -.. . ..-. "); Assert.AreEqual(expected, actual); }
public void Translate_SingleCharacter_NotInDictionary() { ITranslator translator = new MorseToAlphabetTranslator(); var expected = ".-.--.-.-.-.-.-.--."; var actual = translator.Translate(".-.--.-.-.-.-.-.--."); Assert.AreEqual(expected, actual); }