Exemplo n.º 1
0
        public void MergeTest()
        {
            // Instance
            var instance = new CryptoImage(new FileInfo("sample/square.bmp"));

            // Test Modul
            instance.Merge(StringMock.StringItem);
            string expected = StringMock.StringItem;
            string actual   = instance.String;

            // Test Condination
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void SaveTest()
        {
            // Instance
            var instance = new CryptoImage(new FileInfo("sample/square.bmp"));

            // Test Modul
            instance.Merge(StringMock.StringItem);
            string expected = StringMock.StringItem;
            string actual   = instance.String;

            // Test Condination
            Assert.AreEqual(expected, actual);

            // Thread SAFE
            System.Threading.Thread.Sleep(20);
            instance.Save(new FileInfo("sample/merged/square.text." + DateTime.Now.Ticks + ".bmp"));
        }