Esempio n. 1
0
        public void MorseCodePhraseInput_ReturnsCorrectPhrase()
        {
            // Arrange
            var input            = ".... --- .--  -. --- .--  -... .-. --- .-- -.  -.-. --- .--";
            var morseCodeDecoder = new MorseCode();

            // Act
            var item = morseCodeDecoder.Decoder(input);

            // Assert
            Assert.AreEqual("HOW NOW BROWN COW", item);
        }
Esempio n. 2
0
        public void MorseCodeWordInput_ReturnsCorrectString()
        {
            // Arrange
            var input            = "-... . .- ..- - .. ..-. ..- .-..";
            var morseCodeDecoder = new MorseCode();

            // Act
            var item = morseCodeDecoder.Decoder(input);

            // Assert
            Assert.AreEqual("BEAUTIFUL", item);
        }
Esempio n. 3
0
        public void MorseCodeLetterInput_ReturnsCorrectLetter()
        {
            // Arrange
            var input            = ".-..";
            var morseCodeDecoder = new MorseCode();

            // Act
            var item = morseCodeDecoder.Decoder(input);

            // Assert
            Assert.AreEqual("L", item);
        }