示例#1
0
        public void AtbashTestTwo()
        {
            Laba_2_CSharp.Properties.Settings.Default.Language = "Russian";

            string ExpectedText = "- Сойдись со мной в поединке! - Сначала со своими сапогами сойдись... Недомерок...";
            string TestedText   = "- мпфьхмд мп српф э опщьхрущ! - мряжятя мп мэпхсх мяопъясх мпфьхмд... рщьпсщнпу...";


            Laba_2_CSharp.Code.Atbash AB = new Laba_2_CSharp.Code.Atbash();
            Assert.AreEqual(ExpectedText.ToLower(), AB.Encode(TestedText, null));
        }
示例#2
0
        public void AtbashTestOne()
        {
            Laba_2_CSharp.Properties.Settings.Default.Language = "English";

            string TestedText   = "«What's the matter...? Are you simply going to watch? Are you forsaking him to save yourself? Death awaits him if you do nothing. Was your previous decision a mistake then?  Very well... I have heeded your resolve. Vow to me. I am thou, thou art I... Thou who art willing to perform all sacrilegious acts for thine own justice! Call upon my name, and release thy rage! Show the strength of thy will to ascertain all on thine own, though thou be chained to Hell itself!»";
            string ExpectedText = "«Dszg'h gsv nzggvi...? Ziv blf hrnkob tlrmt gl dzgxs? Ziv blf ulihzprmt srn gl hzev blfihvou? Wvzgs zdzrgh srn ru blf wl mlgsrmt. Dzh blfi kiverlfh wvxrhrlm z nrhgzpv gsvm?  Evib dvoo... R szev svvwvw blfi ivhloev. Eld gl nv. R zn gslf, gslf zig R... Gslf dsl zig droormt gl kviulin zoo hzxirovtrlfh zxgh uli gsrmv ldm qfhgrxv! Xzoo fklm nb mznv, zmw ivovzhv gsb iztv! Hsld gsv hgivmtgs lu gsb droo gl zhxvigzrm zoo lm gsrmv ldm, gslfts gslf yv xszrmvw gl Svoo rghvou!»";


            Laba_2_CSharp.Code.Atbash AB = new Laba_2_CSharp.Code.Atbash();
            Assert.AreEqual(ExpectedText.ToLower(), AB.Encode(TestedText, null));
        }