Skip to content

update FluentAssertions to 6.12.0 #446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
2 changes: 1 addition & 1 deletion Algorithms.Tests/Algorithms.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
Expand Down
3 changes: 1 addition & 2 deletions Algorithms.Tests/Graph/FloydWarshallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public void CorrectMatrixTest()
};

var floydWarshaller = new FloydWarshall<int>();

floydWarshaller.Run(graph).Should().Equal(actualDistances);
floydWarshaller.Run(graph).Should().BeEquivalentTo(actualDistances);
}
}
26 changes: 13 additions & 13 deletions Algorithms.Tests/Knapsack/BranchAndBoundKnapsackSolverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public static class BranchAndBoundKnapsackSolverTests
public static void BranchAndBoundTest_Example1_Success()
{
// Arrange
var items = new[] {'A', 'B', 'C', 'D'};
var values = new[] {18, 20, 14, 18};
var weights = new[] {2, 4, 6, 9};
var items = new[] { 'A', 'B', 'C', 'D' };
var values = new[] { 18, 20, 14, 18 };
var weights = new[] { 2, 4, 6, 9 };

var capacity = 15;

Expand All @@ -25,16 +25,16 @@ public static void BranchAndBoundTest_Example1_Success()
var actualResult = solver.Solve(items, capacity, weightSelector, valueSelector);

// Assert
actualResult.Should().BeEquivalentTo('A', 'B', 'D');
actualResult.Should().BeEquivalentTo(new[] { 'A', 'B', 'D' });
}

[Test]
public static void BranchAndBoundTest_Example2_Success()
{
// Arrange
var items = new[] {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'};
var items = new[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J' };
var values = new[] { 505, 352, 458, 220, 354, 414, 498, 545, 473, 543 };
var weights = new[] {23, 26, 20, 18, 32, 27, 29, 26, 30, 27};
var weights = new[] { 23, 26, 20, 18, 32, 27, 29, 26, 30, 27 };

var capacity = 67;

Expand All @@ -46,16 +46,16 @@ public static void BranchAndBoundTest_Example2_Success()
var actualResult = solver.Solve(items, capacity, weightSelector, valueSelector);

// Assert
actualResult.Should().BeEquivalentTo('H', 'D', 'A');
actualResult.Should().BeEquivalentTo(new[] { 'H', 'D', 'A' });
}

[Test]
public static void BranchAndBoundTest_CapacityIsZero_NothingTaken()
{
// Arrange
var items = new[] {'A', 'B', 'C', 'D'};
var values = new[] {18, 20, 14, 18};
var weights = new[] {2, 4, 6, 9};
var items = new[] { 'A', 'B', 'C', 'D' };
var values = new[] { 18, 20, 14, 18 };
var weights = new[] { 2, 4, 6, 9 };

var capacity = 0;

Expand All @@ -74,9 +74,9 @@ public static void BranchAndBoundTest_CapacityIsZero_NothingTaken()
public static void BranchAndBoundTest_PlentyCapacity_EverythingIsTaken()
{
// Arrange
var items = new[] {'A', 'B', 'C', 'D'};
var values = new[] {18, 20, 14, 18};
var weights = new[] {2, 4, 6, 9};
var items = new[] { 'A', 'B', 'C', 'D' };
var values = new[] { 18, 20, 14, 18 };
var weights = new[] { 2, 4, 6, 9 };

var capacity = 1000;

Expand Down
2 changes: 1 addition & 1 deletion DataStructures.Tests/DataStructures.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
Expand Down
6 changes: 3 additions & 3 deletions Utilities.Tests/Extensions/DictionaryExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public void AddMany_ShouldAddAllKeyValuePairs()

dictionary.Should().HaveCount(3);

dictionary.Should().ContainKey("one").WhichValue.Should().Be(1);
dictionary.Should().ContainKey("two").WhichValue.Should().Be(2);
dictionary.Should().ContainKey("three").WhichValue.Should().Be(3);
dictionary.Should().ContainKey("one").WhoseValue.Should().Be(1);
dictionary.Should().ContainKey("two").WhoseValue.Should().Be(2);
dictionary.Should().ContainKey("three").WhoseValue.Should().Be(3);
}
}
2 changes: 1 addition & 1 deletion Utilities.Tests/Utilities.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
Expand Down