Exemple #1
0
        public static void WhenGivenAValidCodedMessageWithSpacesReturnTheDecryptedVersion()
        {
            ICodeReader reader   = new DefaultCodeReader(new DefaultSplitter(), new DefaultTranslator());
            var         input    = ".... . .-.. .-.. ---   .-- --- .-. .-.. -..";
            var         expected = "HELLO WORLD";

            var actual = reader.DecryptMessage(input);

            Assert.Equal(expected, actual);
        }
Exemple #2
0
        public static void WhenGivenAnEmptyMessageReturnNothing()
        {
            ICodeReader reader   = new DefaultCodeReader(new DefaultSplitter(), new DefaultTranslator());
            var         input    = "";
            var         expected = "";

            var actual = reader.DecryptMessage(input);

            Assert.Equal(expected, actual);
        }