示例#1
0
        public void AddSecretToBmpTest(string path, byte[] secret)
        {
            var BeforeAdding = Encoding.Unicode.GetString(File.ReadAllBytes(path)).Contains(message);

            Assert.IsFalse(BeforeAdding);
            BMPEditor.AddSecretToBmp(path, secret);
            var AfterAdding = Encoding.Unicode.GetString(File.ReadAllBytes(path)).Contains(message);

            Assert.IsTrue(AfterAdding);
            Assert.IsNotNull(new BitmapImage(new System.Uri(path, System.UriKind.Relative)));
        }
示例#2
0
        public void ReadSecretFromBmpTest(string path)
        {
            var _message = BMPEditor.ReadSecretFromBmp(path);

            Assert.AreEqual(message, Encoding.Unicode.GetString(_message));
        }