-
-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed ExifProfile property to methods.
- Loading branch information
Showing
4 changed files
with
86 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
tests/Magick.NET.Tests/Profiles/8Bim/EightBimProfileTests/TheGetExifProfileMethod.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. | ||
// Licensed under the Apache License, Version 2.0. | ||
|
||
using ImageMagick; | ||
using Xunit; | ||
|
||
namespace Magick.NET.Tests; | ||
|
||
public partial class EightBimProfileTests | ||
{ | ||
public class TheGetExifProfileMethod | ||
{ | ||
[Fact] | ||
public void ShouldReturnNullWhenProfileHasNoIptcProfile() | ||
{ | ||
using var image = new MagickImage(Files.EightBimTIF); | ||
|
||
var profile = image.Get8BimProfile()!; | ||
|
||
Assert.Null(profile.GetExifProfile()); | ||
} | ||
|
||
[Fact] | ||
public void ShouldReturnValueWhenProfileHasIptcProfile() | ||
{ | ||
using var image = new MagickImage(Files.EightBimJPG); | ||
|
||
var profile = image.Get8BimProfile(); | ||
var exifProfile = profile.GetExifProfile(); | ||
|
||
Assert.NotNull(exifProfile); | ||
Assert.Equal(446, exifProfile.GetData().Length); | ||
Assert.Empty(exifProfile.Values); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters