private void RepeatKey(MyEnigmaMachine machine, char p1, int p2) { for (int i = 0; i < p2; i++) { machine.PressKey(p1); } }
public void TestFullCycle() { var machine = new MyEnigmaMachine(); int count = 0; do { machine.PressKey('A'); count++; } while (machine.GetCurrentRotorRingLetters()[0] != 'A' || machine.GetCurrentRotorRingLetters()[1] != 'A' || machine.GetCurrentRotorRingLetters()[2] != 'A'); Assert.AreEqual(26 * 26 * 25, count); }