Пример #1
0
        public void Encrypt_StartPosition0EncryptOOT_TRS()
        {
            var          machine = new RotorMachine(0);
            const string text    = "OOT";

            const string expected = "TRS";

            var actual = machine.Encrypt(text);

            Assert.Equal(expected, actual);
        }
Пример #2
0
        public void Encrypt_StartPosition4EncryptPOSTTOTOPOOPSSORRYSTOPROTOR_TRRYSSPRYRYROYTOPTOPTSPSPRS()
        {
            var          machine = new RotorMachine(4);
            const string text    = "POSTTOTOPOOPSSORRYSTOPROTOR";

            const string expected = "TRRYSSPRYRYROYTOPTOPTSPSPRS";

            var actual = machine.Encrypt(text);

            Assert.Equal(expected, actual);
        }