public void DecryptedImageSaveTest()
        {
            Image  img       = ActivityProcessor.GetInstance().MakeScreenshot();
            string sessionId = (200 + TimingHelper.GetCurrentTimestamp()).ToString();

            CacheProcessor.SaveImage(img, "300", sessionId, false);
            string[] imgPaths = CacheProcessor.GetDecryptedImagePaths(sessionId);
            Assert.IsTrue(imgPaths.Length == 1);
            Assert.IsTrue(imgPaths[0].Contains("300.jpg"));
            CacheProcessor.DeleteAllSessions();
        }
        public void SaveDecryptedDataToFile()
        {
            IList <string> data      = PrepareData();
            string         sessionId = TimingHelper.GetCurrentTimestamp().ToString();

            CacheProcessor.SaveData(data, sessionId, false);
            Thread.Sleep(2000);
            CacheProcessor.SaveData(data, sessionId, false);
            Assert.IsTrue(File.Exists(CacheProcessor.GetDataDecryptedFilePath(sessionId)));
            CacheProcessor.DeleteAllSessions();
        }
        public void EncryptDecryptTextFromFile()
        {
            IList <string> data      = PrepareData();
            string         sessionId = (200 + TimingHelper.GetCurrentTimestamp()).ToString();

            CacheProcessor.SaveData(data, sessionId, false);
            CacheProcessor.EncryptData(sessionId);
            CacheProcessor.DeleteDecryptedData(sessionId);
            CacheProcessor.DecryptData(sessionId);
            CacheProcessor.DeleteEncryptedData(sessionId);
            IList <string> loadedData = CacheProcessor.LoadData(sessionId);

            Assert.IsTrue(loadedData.Count == data.Count);
            for (int i = 0; i < loadedData.Count; i++)
            {
                Assert.IsTrue(data[i].Equals(loadedData[i]));
            }

            CacheProcessor.DeleteAllSessions();
        }