Skip to content

Commit 0a72572

Browse files
Fix test expectations post update
1 parent 128b71d commit 0a72572

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/ImageSharp.Web.Tests/Processors/AutoOrientWebProcessorTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public void AutoOrientWebProcessor_UpdatesOrientation()
2424
{ new(AutoOrientWebProcessor.AutoOrient, bool.TrueString) }
2525
};
2626

27-
const ushort tl = 1;
2827
const ushort br = 3;
2928
using Image<Rgba32> image = new(1, 1);
3029
image.Metadata.ExifProfile = new();
@@ -36,7 +35,7 @@ public void AutoOrientWebProcessor_UpdatesOrientation()
3635
using FormattedImage formatted = new(image, PngFormat.Instance);
3736
new AutoOrientWebProcessor().Process(formatted, null, commands, parser, culture);
3837

39-
Assert.True(image.Metadata.ExifProfile.TryGetValue(ExifTag.Orientation, out orientation));
40-
Assert.Equal(tl, orientation.Value);
38+
// Orientation will be removed from the image metadata after processing.
39+
Assert.False(image.Metadata.ExifProfile.TryGetValue(ExifTag.Orientation, out orientation));
4140
}
4241
}

tests/ImageSharp.Web.Tests/Processors/BackgroundColorWebProcessorTests.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ public void BackgroundColorWebProcessor_UpdatesColor()
2323
{ new(BackgroundColorWebProcessor.Color, nameof(Color.Orange)) }
2424
};
2525

26-
using var image = new Image<Rgba32>(1, 1);
27-
Assert.True(Color.Transparent.Equals(image[0, 0]));
26+
using Image<Rgba32> image = new(1, 1);
2827

29-
using var formatted = new FormattedImage(image, PngFormat.Instance);
28+
Assert.Equal(Color.Transparent.ToPixel<Rgba32>(), image[0, 0]);
29+
30+
using FormattedImage formatted = new(image, PngFormat.Instance);
3031
new BackgroundColorWebProcessor().Process(formatted, null, commands, parser, culture);
3132

32-
Assert.True(Color.Orange.Equals(image[0, 0]));
33+
Assert.Equal(Color.Orange.ToPixel<Rgba32>(), image[0, 0]);
3334
}
3435

3536
[Theory]

0 commit comments

Comments
 (0)