public void GetSingleRotorConfigurationTest_Advanced() { string expected = "B"; NestedRotor Rotor_I = CreateSingleRotorEnigmaMachine(); Rotor_I.Advance(); string actual = Rotor_I.CurrentConfiguration; Assert.AreEqual(expected, actual); }
public void GetMultiRotorConfigurationTest_MultiStepped_RightNotch() { NestedRotor Rotor_I = CreateMultiRotorEnigmaMachine("AAU"); string expected = "AAV"; Rotor_I.Advance(); string actual = Rotor_I.CurrentConfiguration; Assert.AreEqual(expected, actual); }
public void GetMultiRotorConfigurationTest_MultiStepped_ThirdRotorAdvances() { NestedRotor Rotor_I = CreateMultiRotorEnigmaMachine("AEV"); string expected = "BFW"; Rotor_I.Advance(); string actual = Rotor_I.CurrentConfiguration; Assert.AreEqual(expected, actual); }
public void NestedRotor_MapsLettersWithOffset27() { char expected = 'J'; NestedRotor Rotor_I = CreateRotorI(); Rotor_I.Advance(27); char actual = Rotor_I.Convert('A'); Assert.AreEqual(expected, actual); }
public void NestedRotor_ReverseMapsLettersWithOffsetOne() { char expected = 'D'; NestedRotor Rotor_I = CreateRotorI(); Rotor_I.Advance(); char actual = Rotor_I.ReverseConvert('K'); Assert.AreEqual(expected, actual); }
public void Advance(int positions = 1) { _rotors.Advance(positions); }