Skip to content

Commit

Permalink
Bump NUnit from 3.14.0 to 4.0.0 (#405)
Browse files Browse the repository at this point in the history
* Bump NUnit from 3.14.0 to 4.0.0

Bumps [NUnit](https://github.com/nunit/nunit) from 3.14.0 to 4.0.0.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/master/CHANGES.md)
- [Commits](nunit/nunit@v3.14.0...v4.0.0)

---
updated-dependencies:
- dependency-name: NUnit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix tests

- Fix tests broken by NUnit 4 upgrade.
- Use collection expressions.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: martincostello <[email protected]>
  • Loading branch information
dependabot[bot] and martincostello authored Nov 27, 2023
1 parent 6360ec8 commit 10bbb24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.16" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="NUnit" Version="4.0.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="StructureMap" Version="4.7.1" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,17 @@ private TableDescriptionSource SetupPagingTest()
_firstPage = new ListTablesResponse
{
LastEvaluatedTableName = firstTableName,
TableNames = new List<string>
{
firstTableName
}
TableNames = [firstTableName]
};
var secondTableName = "Table-2";
_secondPage = new ListTablesResponse
{
LastEvaluatedTableName = secondTableName,
TableNames = new List<string>
{
secondTableName
}
TableNames = [secondTableName]
};
_thirdPage = new ListTablesResponse
{
TableNames = new List<string>
{
"Table-3"
}
TableNames = ["Table-3"]
};

var describeSecondTableResponse = new DescribeTableResponse
Expand Down Expand Up @@ -112,7 +103,7 @@ public async Task GetResourcesAsync_EmptyResult_EmptyListReturned()
// arrange
var test = SetupPagingTest();
_firstPage.LastEvaluatedTableName = null;
_firstPage.TableNames = new List<string>();
_firstPage.TableNames = [];

// act
var result = await test.GetResourceNamesAsync();
Expand Down Expand Up @@ -140,7 +131,7 @@ public async Task GetResouceAsync_ReturnsCorrectResource()
public async Task GetResourceAsync_ReturnsNullIfNotInList()
{
var result = await SetupPagingTest().GetResourceAsync("does-not-exist");
Assert.Null(result);
Assert.That(result, Is.Null);
}

[Test]
Expand All @@ -154,7 +145,7 @@ public async Task GetResourceAsync_ReturnsNullIfSdkThrowsNotFound()
)
.Returns(new ListTablesResponse()
{
TableNames = new List<string>() { "banana" }
TableNames = ["banana"]
});

dynamoDbFake
Expand All @@ -168,7 +159,7 @@ await dynamoDbFake
.Received()
.DescribeTableAsync("banana", Arg.Any<CancellationToken>());

Assert.Null(result);
Assert.That(result, Is.Null);
}
}
}

0 comments on commit 10bbb24

Please sign in to comment.