public void SetRotorsEnforcesReflector() { EnigmaI enigma = new EnigmaI(); EnigmaRotor[] rotors = new EnigmaRotor[4]; enigma.SetRotors(rotors); }
public void CanSetRotors() { EnigmaI enigma = new EnigmaI(); EnigmaRotor[] rotors = new EnigmaRotor[4]; rotors[0] = new EnigmaReflector(); enigma.SetRotors(rotors); }
public void SetRotorsEnforcesRotorCount() { EnigmaI enigma = new EnigmaI(); EnigmaRotor[] rotors = new EnigmaRotor[3]; rotors[0] = new EnigmaReflector(); enigma.SetRotors(rotors); }
public ISteckeredEnigma GetEnigmaI(Reflector reflector, Rotor[] rotors) { EnforceEnigmaIRotorConstraints(rotors); EnforceEnigmaIReflectorConstraints(reflector); EnigmaRotor[] allRotors = MergeReflectorIntoRotorArray(reflector, rotors); //allRotors[1] = _rotorFactory.GetRotor(rotors[0]); //allRotors[2] = _rotorFactory.GetRotor(rotors[1]); //allRotors[3] = _rotorFactory.GetRotor(rotors[2]); EnigmaI returnValue = new EnigmaI(); returnValue.SetRotors(allRotors); return(returnValue); }