File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
tests/Magick.NET.Tests/Coders Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -10,22 +10,28 @@ namespace Magick.NET.Tests;
1010
1111public partial class TheTiffCoder
1212{
13+ private static readonly string _tag = "32934" ;
14+
1315 [ Fact ]
14- public void ShouldIgnoreTheSpecifiedTags ( )
16+ public void ShouldThrowExceptionWhenImageContainsInvalidTag ( )
1517 {
16- var tag = "32934" ;
1718 using var image = new MagickImage ( ) ;
1819
1920 var exception = Assert . Throws < MagickCoderErrorException > ( ( ) => image . Read ( Files . Coders . IgnoreTagTIF ) ) ;
2021
21- Assert . Contains ( tag , exception . Message ) ;
22+ Assert . Contains ( @$ "Null count for ""Tag { _tag } """, exception.Message);
23+ }
2224
23- image . Settings . SetDefine ( MagickFormat . Tiff , "ignore-tags" , tag ) ;
25+ [Fact]
26+ public void ShouldIgnoreTheSpecifiedTags()
27+ {
28+ using var image = new MagickImage ( ) ;
29+ image. Settings . SetDefine ( MagickFormat . Tiff , "ignore-tags" , _tag ) ;
2430 image . Read ( Files . Coders . IgnoreTagTIF ) ;
2531
2632 var settings = new MagickReadSettings ( new TiffReadDefines
2733 {
28- IgnoreTags = new string [ ] { tag } ,
34+ IgnoreTags = new string [ ] { _tag } ,
2935 } ) ;
3036
3137 image . Settings . RemoveDefine ( MagickFormat . Tiff , "ignore-tags" ) ;
You can’t perform that action at this time.
0 commit comments