Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Console.WriteLine(MorseCodeDecoder.DecodeBits("1100110011001100000011000000111111001100111111001111110000000000000011001111110011111100111111000000110011001111110000001111110011001100000011"));

            Console.WriteLine(MorseCodeDecoder.DecodeMorse(MorseCodeDecoder.DecodeBits("01110")));

            Console.ReadLine();
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
 public void TestExampleFromDescription()
 {
     Assert.AreEqual("HEY JUDE", MorseCodeDecoder.DecodeMorse(MorseCodeDecoder.DecodeBits("1100110011001100000011000000111111001100111111001111110000000000000011001111110011111100111111000000110011001111110000001111110011001100000011")));
 }