コード例 #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));
        }
コード例 #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());
        }
コード例 #3
0
 public EncryptingMachineTests()
 {
     machine = new EncryptingMachine();
 }