コード例 #1
0
        public void DecryptLine_WordKey_ReturnPredefined()
        {
            CezarLib.CezarEncryptor toTest = new CezarEncryptor();
            toTest.SetKeyWord("A", KeywordType.Word);

            var res = toTest.DecryptLine("BCÇEA");

            Assert.AreEqual("ABCDZ", res);
        }
コード例 #2
0
        public void DecryptLine_EmptyText_ReturnNotEnrypted()
        {
            CezarLib.CezarEncryptor toTest = new CezarEncryptor();
            toTest.SetKeyWord("1", KeywordType.Number);

            var res = toTest.DecryptLine("!     ");

            Assert.AreEqual("!     ", res);
        }
コード例 #3
0
        public void DecryptLine_NumberKey_SkipWhitespace()
        {
            CezarLib.CezarEncryptor toTest = new CezarEncryptor();
            toTest.SetKeyWord("42", KeywordType.Number);

            var res = toTest.DecryptLine("OVÖG ÜCOKRNHŞM");

            Assert.AreEqual("KULE SAKİNLERİ", res);
        }