public void DecryptTestEncoding() { string passed = directory + pathTest5; string result = directory + pathTest4res; EncryptingMachine machine = new EncryptingMachine() { Key = "скорпион" }; TextLoader textLoader = new TextLoader(passed, CodePagesEncodingProvider.Instance.GetEncoding(1251)); textLoader.Decrypt(machine); string expected = File.ReadAllText(result); Assert.Equal(expected, textLoader.Print().Substring(0, expected.Length)); }
public void DecryptTest(string passed, string result) { passed = directory + passed; result = directory + result; EncryptingMachine machine = new EncryptingMachine() { Key = "скорпион" }; TextLoader textLoader = new TextLoader(passed, Encoding.UTF8); textLoader.Decrypt(machine); string expected = File.ReadAllText(result); Assert.Equal(expected, textLoader.Print()); }
public EncryptingMachineTests() { machine = new EncryptingMachine(); }