Ejemplo n.º 1
0
        public void SettingsConstructorWithParamArrayArgsInAnyOrderMatchesExpectedValue()
        {
            Enigma.Configuration.Settings s = new Settings(
                MachineType.M4K,
                ReflectorType.B,
                RotorName.Beta, RotorName.II, RotorName.V, RotorName.I,
                "BI", "CQ", "DK", "EU", "FY", "JS", "LT", "NP", "RZ", "VX", 7, 19, 18, 8);

            Enigma.Configuration.Settings s2 = Enigma.Configuration.Settings.ParseSettingLine(M4K_SETTING_LINE);

            Assert.AreEqual(s.ToString(), s2.ToString());
        }
Ejemplo n.º 2
0
        public void SettingsConstructorWithFullSettingsMatchesExpectedValue()
        {
            Enigma.Configuration.Settings s = new Settings(
                MachineType.M4K,
                ReflectorType.B,
                new RotorName[] { RotorName.Beta, RotorName.II, RotorName.V, RotorName.I },
                new int[] { 7, 19, 18, 8 },
                new string[] { "BI", "CQ", "DK", "EU", "FY", "JS", "LT", "NP", "RZ", "VX" });

            Enigma.Configuration.Settings s2 = Enigma.Configuration.Settings.ParseSettingLine(M4K_SETTING_LINE);

            Assert.AreEqual(s.ToString(), s2.ToString());
        }