public void Compare_provides_early_out_for_files_with_different_size()
{
const string FIRST_FILENAME = "testFile1.png";
const string SECOND_FILENAME = "testFile2.png";
try
{
using (var firstBitmap = new Bitmap(800, 600))
{
firstBitmap.Save(FIRST_FILENAME, ImageFormat.Png);
}
using (var secondBitnap = new Bitmap(400, 300))
{
secondBitnap.Save(SECOND_FILENAME, ImageFormat.Png);
}
Assert.IsFalse(ImageComparer.Compare(FIRST_FILENAME, SECOND_FILENAME));
}
finally
{
if (File.Exists(FIRST_FILENAME))
{
File.Delete(FIRST_FILENAME);
}
if (File.Exists(SECOND_FILENAME))
{
File.Delete(SECOND_FILENAME);
}
}
}