This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from duffelhq/dependabot/nuget/NUnit-4.0.0
Bump NUnit from 3.14.0 to 4.0.0
- Loading branch information
Showing
2 changed files
with
12 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
using NFluent; | ||
using NUnit.Framework; | ||
|
||
namespace Duffel.ApiClient.Tests | ||
{ | ||
using System; | ||
using NUnit.Framework; | ||
|
||
public class DuffelApiClientTests | ||
{ | ||
[Test] | ||
public void ThrowsArgumentExceptionIfAccessTokenIsEmpty() | ||
{ | ||
var exception = Assert.Catch<ArgumentException>(() => new DuffelApiClient(String.Empty)); | ||
Assert.AreEqual("No access token provided. To create an access token, head to your dashboard at https://app.duffel.com/duffel/tokens and generate a token. (Parameter 'accessToken')", exception?.Message); | ||
var exception = Assert.Catch<ArgumentException>(() => new DuffelApiClient(string.Empty)); | ||
Assert.That( | ||
"No access token provided. To create an access token, head to your dashboard at https://app.duffel.com/duffel/tokens and generate a token. (Parameter 'accessToken')", | ||
Is.EqualTo(exception?.Message) | ||
); | ||
} | ||
|
||
[Test] | ||
public void ThrowsArgumentExceptionIfAccessTokenIsNull() | ||
{ | ||
var exception = Assert.Catch<ArgumentException>(() => new DuffelApiClient(null)); | ||
Assert.AreEqual("No access token provided. To create an access token, head to your dashboard at https://app.duffel.com/duffel/tokens and generate a token. (Parameter 'accessToken')", exception?.Message); | ||
Assert.That( | ||
"No access token provided. To create an access token, head to your dashboard at https://app.duffel.com/duffel/tokens and generate a token. (Parameter 'accessToken')", | ||
Is.EqualTo(exception?.Message) | ||
); | ||
} | ||
} | ||
} | ||
} |
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