Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
 public EncryptingMachineTests()
 {
     machine = new EncryptingMachine();
 }