Skip to content

Commit

Permalink
Improved test to also check if the file has decreased in size
Browse files Browse the repository at this point in the history
  • Loading branch information
devedse committed Jul 25, 2017
1 parent 60c5d82 commit e55f470
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DeveImageOptimizer.Tests/ImageOptimizerWorks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ public async void CorrectlyOptimizesImage()

Assert.True(worked);

var fileOptimized = new FileInfo(image1temppath);
var fileUnoptimized = new FileInfo(image1path);

//Verify that the new file is actually smaller
Assert.True(fileOptimized.Length < fileUnoptimized.Length);

File.Delete(image1temppath);
Directory.Delete(tempfortestdir);
Expand Down

0 comments on commit e55f470

Please sign in to comment.