public void ChangeFlagToFree()
        {
            var MultiThreadResizer = new MultiThreadResizerWorker(CountOfThreads, CountOfImage);
            Assert.AreEqual(GetFakeShortSummary(0, 0, 0, 0, 0, 0), MultiThreadResizer.ShortStateSummary);
            MultiThreadResizer.SetFolderWithImages(Path);

            Assert.AreEqual(GetFakeShortSummary(CountFiles,
                CountFiles * MultiThreadResizer.ListOfResizeSettings.Count,
                CountFiles * MultiThreadResizer.ListOfResizeSettings.Count,
                0, 0, 0), MultiThreadResizer.ShortStateSummary);
            var result = MultiThreadResizer.TakeImagesForThread();

            Assert.AreEqual(GetFakeShortSummary(CountFiles,
                CountFiles * MultiThreadResizer.ListOfResizeSettings.Count,
                CountFiles * MultiThreadResizer.ListOfResizeSettings.Count - CountOfThreads * CountOfImage,
                CountOfThreads * CountOfImage, 0, 0), MultiThreadResizer.ShortStateSummary);

            MultiThreadResizer.ChangeFlagToFree(result);

            Assert.AreEqual(GetFakeShortSummary(CountFiles,
                CountFiles * MultiThreadResizer.ListOfResizeSettings.Count,
                CountFiles * MultiThreadResizer.ListOfResizeSettings.Count,
                0, 0, 0), MultiThreadResizer.ShortStateSummary);
        }
        public void ResizeImages()
        {
            var MultiThreadResizer = new MultiThreadResizerWorker(CountOfThreads, CountOfImage);
            MultiThreadResizer.NameSubFolderForNewFiles = @"\NewImages\ResizeImages";
            MultiThreadResizer.SetFolderWithImages(Path);
            var images = MultiThreadResizer.TakeImagesForThread();
            MultiThreadResizer.ResizeImages(images);
            Assert.AreEqual(string.Concat("Sized =", images.Count, " Successfully =", images.Count, " with errors=", 0), MultiThreadResizer.GetLogMessage());
            Assert.AreEqual(images.Count, images.Where(f => MultiThreadResizer.ListOfFileAndCustomResizeSettings[f].Status == 3).Count());

            var images2 = MultiThreadResizer.TakeImagesForThread();
            MultiThreadResizer.ResizeImages(images2);
            Assert.AreEqual(string.Concat("Sized =", images2.Count, " Successfully =", images2.Count, " with errors=", 0), MultiThreadResizer.GetLogMessage());
            Assert.AreEqual(images2.Count, images2.Where(f => MultiThreadResizer.ListOfFileAndCustomResizeSettings[f].Status == 3).Count());
            Assert.AreEqual(CountOfImage, MultiThreadResizer.ListOfFileAndCustomResizeSettings.Where(f => f.Value.Status == 3).Count());
        }
        public void TakeImagesForThread()
        {
            var MultiThreadResizer = new MultiThreadResizerWorker(CountOfThreads, CountOfImage);
            MultiThreadResizer.SetFolderWithImages(Path);

            var result = MultiThreadResizer.TakeImagesForThread();

            Assert.AreEqual(CountOfImage, result.Count);
            Assert.AreEqual(CountOfImage,
                result.Where(f=> MultiThreadResizer.ListOfFileAndCustomResizeSettings[f].Status==2).Count());
            result = MultiThreadResizer.TakeImagesForThread();

            Assert.AreEqual(0, result.Count);
            Assert.AreEqual(0,
                result.Where(f => MultiThreadResizer.ListOfFileAndCustomResizeSettings[f].Status == 2).Count());
        }