public void CasearTest() { var pluginInstance = TestHelpers.GetPluginInstance("Caesar"); var scenario = new PluginTestScenario(pluginInstance, new[] { "ShiftKey", "InputAlphabet", "InputString", ".CaseSensitive" }, new[] { "OutputString" }); //Test 1: if (!scenario.Test(new object[] { 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "Franz jagt im komplett verwahrlosten Taxi quer durch Bayern", false }, new[] { "Dpylx hyer gk imknjcrr tcpuyfpjmqrcl Ryvg oscp bspaf Zywcpl".ToUpper() })) { TestHelpers.TestFail(1); } //Test 2: if (!scenario.Test(new object[] { 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", "Franz jagt im komplett verwahrlosten Taxi quer durch Bayern", true }, new[] { "dPyLX HyER GK IMKNJCRR TCPUyFPJMQRCL ryVG OSCP BSPAF ZyWCPL" })) { TestHelpers.TestFail(2); } }
public void ADFGVXTest() { var pluginInstance = TestHelpers.GetPluginInstance("ADFGVX"); var scenario = new PluginTestScenario(pluginInstance, new[] { ".CipherType", ".SubstitutionPass", ".TranspositionPass", "InputString" }, new[] { "OutputString" }); //Test 1: if (!scenario.Test(new [] { (object)Cryptool.ADFGVX.ADFGVXSettings.CipherTypeEnum.ADFGX, "WIKPEDAZYXVUTSRQONMLHGFCB", "BEOBACHTUNGSLISTE", "Munitionierung beschleunigen Punkt Soweit nicht eingesehen auch bei Tag" }, new[] { "GXGGADDDGDXXAFADDFAAXAFDFFXFDGDXGAGGAAXFAGADFAAADGFAXXADADFFFDDADFGAXGXAFXGXFXDAFAGFXXFAXGFDXFFDFAGXXGXXADGXGFXDFFDGAXXFFFFGDX" })) { TestHelpers.TestFail(1); } }