Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #111 from duffelhq/dependabot/nuget/NUnit-4.0.0
Browse files Browse the repository at this point in the history
Bump NUnit from 3.14.0 to 4.0.0
  • Loading branch information
SamHutchings authored Nov 27, 2023
2 parents 151b0c2 + a9a5769 commit 4f18c34
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions Duffel.ApiClient.Tests/ApiClientTests.cs
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)
);
}
}
}
}
2 changes: 1 addition & 1 deletion Duffel.ApiClient.Tests/Duffel.ApiClient.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NFluent" Version="3.0.1.352" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
</ItemGroup>
Expand Down

0 comments on commit 4f18c34

Please sign in to comment.