private void ResizeBeetleSuccess(MediaDimension resizeBy, int size, ImageSaveFormat format) { ImageResizeProcessor processor = GetProcessor(resizeBy, size, format, false); processor.Init(RunInfo); ProcessingResult result = processor.Process(GetTestFile("beetle.jpg"), MatchResultType.Yes, new string[0], new FileInfo[0], ProcessInput.OriginalFile, CancellationToken.None); processor.Cleanup(); Assert.AreEqual(ProcessingResultType.Success, result.Type); Assert.AreEqual(1, result.OutputFiles.Length); }
public void ResizeBeetleOverwriteTrueSuccess() { ImageResizeProcessor processor = GetProcessor(MediaDimension.Width, 100, ImageSaveFormat.Jpeg, true); string outPath = (string)processor.GetParameter("NewPath"); File.WriteAllBytes(outPath, new byte[0]); processor.Init(RunInfo); ProcessingResult result = processor.Process(GetTestFile("beetle.jpg"), MatchResultType.Yes, new string[0], new FileInfo[0], ProcessInput.OriginalFile, CancellationToken.None); processor.Cleanup(); Assert.AreEqual(ProcessingResultType.Success, result.Type); Assert.AreEqual(1, result.OutputFiles.Length); }