Skip to content

Commit

Permalink
Fixed unit test due to changes in ImageMagick.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Dec 15, 2022
1 parent 1a8b5b5 commit 3380429
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions tests/Magick.NET.Tests/MagickImageTests/TheGetIptcProfileMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public void ShouldReturnTheIptcProfile()
Assert.NotNull(profile);
}
}

[Fact]
public void ShouldReturnNullWhenProfileEmpty()
{
using (var image = new MagickImage(Files.PictureJPG))
{
var profile = image.GetIptcProfile();
Assert.Null(profile);
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void ShouldRemoveTheSpecifiedColorProfile()
[Fact]
public void ShouldRemoveTheSpecifiedIptcProfile()
{
using (var image = new MagickImage(Files.PictureJPG))
using (var image = new MagickImage(Files.FujiFilmFinePixS1ProJPG))
{
var profile = image.GetIptcProfile();
Assert.NotNull(profile);
Expand Down
4 changes: 2 additions & 2 deletions tests/Magick.NET.Tests/MagickImageTests/TheToBase64Method.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public void ShouldReturnBase64EncodedString()
{
var base64 = image.ToBase64();
Assert.NotNull(base64);
Assert.Equal(11776, base64.Length);
Assert.Equal(11752, base64.Length);

var bytes = Convert.FromBase64String(base64);
Assert.NotNull(bytes);
Assert.Equal(8830, bytes.Length);
Assert.Equal(8814, bytes.Length);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class TheLosslessCompressMethod : PngOptimizerTests
public void ShouldCompressLossless()
{
var result = AssertLosslessCompressSmaller(Files.SnakewarePNG);
Assert.Equal(8700, result);
Assert.Equal(8684, result);
}

[Fact]
Expand Down

0 comments on commit 3380429

Please sign in to comment.