File tree Expand file tree Collapse file tree 7 files changed +18
-12
lines changed
Expand file tree Collapse file tree 7 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 33
44using ImageMagick ;
55using Xunit ;
6+ using Xunit . Sdk ;
67
78namespace Magick . NET . Tests ;
89
@@ -12,7 +13,7 @@ public partial class TheEpsCoder
1213 public void ShouldReadTwoImages ( )
1314 {
1415 if ( ! Ghostscript . IsAvailable )
15- return ;
16+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
1617
1718 using var images = new MagickImageCollection ( Files . Coders . SwedenHeartEPS ) ;
1819
@@ -31,7 +32,7 @@ public void ShouldReadTwoImages()
3132 public void ShouldReadMonoChromeImageWhenUseMonochromeIsTrue ( )
3233 {
3334 if ( ! Ghostscript . IsAvailable )
34- return ;
35+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
3536
3637 var settings = new MagickReadSettings
3738 {
@@ -52,7 +53,7 @@ public void ShouldReadMonoChromeImageWhenUseMonochromeIsTrue()
5253 public void ShouldReadClipPathsInTiffPreview ( )
5354 {
5455 if ( ! Ghostscript . IsAvailable )
55- return ;
56+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
5657
5758 using var images = new MagickImageCollection ( Files . Coders . SwedenHeartEPS ) ;
5859
Original file line number Diff line number Diff line change 44using System . Threading . Tasks ;
55using ImageMagick ;
66using Xunit ;
7+ using Xunit . Sdk ;
78
89namespace Magick . NET . Tests ;
910
@@ -13,7 +14,7 @@ public partial class ThePdfCoder
1314 public async Task ShouldReadFileMultithreadedCorrectly ( )
1415 {
1516 if ( ! Ghostscript . IsAvailable )
16- return ;
17+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
1718
1819 var results = new Task [ 3 ] ;
1920
@@ -40,7 +41,7 @@ public async Task ShouldReadFileMultithreadedCorrectly()
4041 public void ShouldReturnTheCorrectFormatForAiFile ( )
4142 {
4243 if ( ! Ghostscript . IsAvailable )
43- return ;
44+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
4445
4546 using var image = new MagickImage ( Files . Coders . CartoonNetworkStudiosLogoAI ) ;
4647
Original file line number Diff line number Diff line change 66using ImageMagick ;
77using ImageMagick . Formats ;
88using Xunit ;
9+ using Xunit . Sdk ;
910
1011namespace Magick . NET . Tests ;
1112
@@ -56,7 +57,7 @@ public void ShouldThrowExceptionWhenPasswordIsNull()
5657 public void ShouldThrowExceptionWhenFileIsPng ( )
5758 {
5859 if ( ! Ghostscript . IsAvailable )
59- return ;
60+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
6061
6162 MagickErrorException ? exception = null ;
6263
Original file line number Diff line number Diff line change 33
44using ImageMagick . Formats ;
55using Xunit ;
6+ using Xunit . Sdk ;
67
78namespace Magick . NET . Tests ;
89
@@ -14,7 +15,7 @@ public class ThePageCountProperty
1415 public void ShouldReturnTheNumberOfPages ( )
1516 {
1617 if ( ! Ghostscript . IsAvailable )
17- return ;
18+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
1819
1920 var pdfInfo = PdfInfo . Create ( Files . Coders . SamplePDF ) ;
2021 Assert . Equal ( 2U , pdfInfo . PageCount ) ;
@@ -24,7 +25,7 @@ public void ShouldReturnTheNumberOfPages()
2425 public void ShouldReturnTheNumberOfPagesForPasswordProtectedFile ( )
2526 {
2627 if ( ! Ghostscript . IsAvailable )
27- return ;
28+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
2829
2930 var pdfInfo = PdfInfo . Create ( Files . Coders . PdfExamplePasswordOriginalPDF , "test" ) ;
3031 Assert . Equal ( 4U , pdfInfo . PageCount ) ;
Original file line number Diff line number Diff line change 44using ImageMagick ;
55using ImageMagick . Formats ;
66using Xunit ;
7+ using Xunit . Sdk ;
78
89namespace Magick . NET . Tests ;
910
@@ -39,7 +40,7 @@ public void ShouldNotSetTheDefineWhenValueIsNotSet()
3940 public void ShouldLimitTheDimensions ( )
4041 {
4142 if ( ! Ghostscript . IsAvailable )
42- return ;
43+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
4344
4445 var settings = new MagickReadSettings
4546 {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public void ShouldNotSetTheDefineWhenValueIsNotSet()
4141 public void ShouldUseThePasswordToReadTheImage ( )
4242 {
4343 if ( ! Ghostscript . IsAvailable )
44- return ;
44+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
4545
4646 var settings = new MagickReadSettings
4747 {
@@ -62,7 +62,7 @@ public void ShouldUseThePasswordToReadTheImage()
6262 public void ShouldNotBeAbleToOpenFileWithNullPassword ( )
6363 {
6464 if ( ! Ghostscript . IsAvailable )
65- return ;
65+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
6666
6767 var settings = new MagickReadSettings
6868 {
Original file line number Diff line number Diff line change 66using System . Text ;
77using ImageMagick ;
88using Xunit ;
9+ using Xunit . Sdk ;
910
1011namespace Magick . NET . Tests ;
1112
@@ -487,7 +488,7 @@ public void ShouldNotUseBaseDirectoryOfCurrentAppDomainWhenFileNameIsTilde()
487488 public void ShouldReadAIFromNonSeekableStream ( )
488489 {
489490 if ( ! Ghostscript . IsAvailable )
490- return ;
491+ throw SkipException . ForSkip ( "Ghostscript is not available" ) ;
491492
492493 using var stream = new NonSeekableStream ( Files . Coders . CartoonNetworkStudiosLogoAI ) ;
493494 using var image = new MagickImage ( ) ;
You can’t perform that action at this time.
0 commit comments