public void TestRotorOffsets() { var socket = new RotorSocket(Rotor.Create("I")); Assert.AreEqual('A', socket.CurrentRingLetter); socket.Advance(); Assert.AreEqual('B', socket.CurrentRingLetter); socket.Reset(); Assert.AreEqual('A', socket.CurrentRingLetter); for (int i = 0; i < 26; i++) { socket.Advance(); } Assert.AreEqual('A', socket.CurrentRingLetter); }
public void ResetRotors() { _fastRotor = _fastRotor.Reset(); _middleRotor = _middleRotor.Reset(); _slowRotor = _slowRotor.Reset(); }