public void EncodeDecode_Message_NoLossOfData(string message) { byte[] byteMessage = ByteConverter.StringToByteArray(message); Bitmap coverImage = new Bitmap(_stegoTest.Encode(_image, _standardSeed, byteMessage)); _stegoTest.Decode(coverImage, _standardSeed); string decodedMessage = ByteConverter.ByteArrayToString(byteMessage); Assert.AreEqual(message, decodedMessage); }
public void Decode_PlainImage_ResultIsEmpty(string seed) { try { byte[] byteMessage = _stegoTest.Decode(_image, seed); string message = ByteConverter.ByteArrayToString(byteMessage); } catch (NotifyUserException) { Assert.Pass(); } Assert.Fail(); }
public string EncodeDecode_String_AreEqual(string text) { byte[] byteArray = ByteConverter.StringToByteArray(text); return(ByteConverter.ByteArrayToString(byteArray)); }