File tree Expand file tree Collapse file tree
test/FluentEmail.Core.Tests/ThirdParty Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public class AzureEmailSenderTests
2121
2222 public AzureEmailSenderTests ( )
2323 {
24- Sender = new AzureEmailSender ( _connectionString ) ;
24+ if ( ! string . IsNullOrEmpty ( _connectionString ) ) Sender = new AzureEmailSender ( _connectionString ) ;
2525 }
2626
2727 [ Fact ]
Original file line number Diff line number Diff line change @@ -277,27 +277,31 @@ public async Task SimpleMailFromCodeWithHeaders()
277277 [ Fact ]
278278 public void SenderNullServerToken ( )
279279 {
280+ Assert . SkipWhen ( string . IsNullOrEmpty ( _apiKey ) , "No Postmark Credentials" ) ;
280281 Func < PostmarkSender > fn = ( ) => new PostmarkSender ( ( string ) null ! ) ;
281282 fn . Should ( ) . Throw < ArgumentNullException > ( ) ;
282283 }
283284
284285 [ Fact ]
285286 public void OptionsNullServerToken ( )
286287 {
288+ Assert . SkipWhen ( string . IsNullOrEmpty ( _apiKey ) , "No Postmark Credentials" ) ;
287289 Func < PostmarkSenderOptions > fn = ( ) => new PostmarkSenderOptions ( null ! ) ;
288290 fn . Should ( ) . Throw < ArgumentNullException > ( ) ;
289291 }
290292
291293 [ Fact ]
292294 public void NullOptions ( )
293295 {
296+ Assert . SkipWhen ( string . IsNullOrEmpty ( _apiKey ) , "No Postmark Credentials" ) ;
294297 Func < PostmarkSender > fn = ( ) => new PostmarkSender ( ( PostmarkSenderOptions ) null ! ) ;
295298 fn . Should ( ) . Throw < ArgumentNullException > ( ) ;
296299 }
297300
298301 [ Fact ]
299302 public void SendNull ( )
300303 {
304+ Assert . SkipWhen ( string . IsNullOrEmpty ( _apiKey ) , "No Postmark Credentials" ) ;
301305 var sender = new PostmarkSender ( _apiKey ) ;
302306 Func < Task > fn = async ( ) => await sender . SendAsync ( null ! ) . ConfigureAwait ( false ) ;
303307 fn . Should ( ) . ThrowAsync < ArgumentNullException > ( ) ;
You can’t perform that action at this time.
0 commit comments