public void Create_DifferentImageSizes_Throws() { var options = new ImgDiffOptions { LeftFile = Path.Combine("Samples", "Sample_1_A.jpg"), RightFile = Path.Combine("Samples", "Sample_7_B.jpg"), ProgressObserver = _progressObserver }; Assert.Throws <NotSupportedException>(() => ImgDiffCalculator.Create(options)); }
public void Calculate_Call() { var options = new ImgDiffOptions { LeftFile = Path.Combine("Samples", "Sample_1_A.jpg"), RightFile = Path.Combine("Samples", "Sample_1_B.jpg"), ProgressObserver = _progressObserver }; using var diff = ImgDiffCalculator.Create(options); using var img = diff.Calculate(25); img.Save("test.jpg"); }
static void Main(string[] args) { using var options = new ImgDiffOptions { LeftFile = Path.Combine("Samples", "Sample_1_A.jpg"), RightFile = Path.Combine("Samples", "Sample_1_B.jpg"), ProgressObserver = new ProgressObserver("Sample_1") }; using var calculator = ImgDiffCalculator.Create(options); using var diffImg = calculator.Calculate(30); diffImg.Save("test.jpg"); }
public void Create_NullOptions_Throws() { Assert.Throws <NullReferenceException>(() => ImgDiffCalculator.Create(null)); }
public void Create_EmptyOptions_Throws() { Assert.Throws <FileNotFoundException>(() => ImgDiffCalculator.Create(new ImgDiffOptions())); }