示例#1
0
        public void PressKeyWithOneRotorReturnsCorrectLetter()
        {
            Rotor[] rotors = new Rotor[1];

            rotors[0] = new Rotor();

            Enigma enigma = new Enigma(rotors);

            Assert.AreEqual('Z', enigma.PressKey('A'));
            Assert.AreEqual('Y', enigma.PressKey('B'));
            Assert.AreEqual('X', enigma.PressKey('C'));
            Assert.AreEqual('W', enigma.PressKey('D'));
            Assert.AreEqual('V', enigma.PressKey('E'));
            Assert.AreEqual('U', enigma.PressKey('F'));
        }