Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public async Task When_Running_Execute_MultiPassFilter_Toggle_Should_Differ_At_M
// This is "okay" because the sort isn't 100% stable and it's a tradeoff between performance and stability.
await Assert.That(linesWithoutMultiPass).IsNotEmpty();
await Assert.That(linesWithMultiPass).IsNotEmpty();
await Assert.That(linesWithoutMultiPass.Except(linesWithMultiPass)).HasCount().LessThanOrEqualTo(5);
await Assert.That(linesWithMultiPass.Except(linesWithoutMultiPass)).HasCount().LessThanOrEqualTo(5);
await Assert.That(linesWithoutMultiPass.Except(linesWithMultiPass).Count()).IsLessThanOrEqualTo(5);
await Assert.That(linesWithMultiPass.Except(linesWithoutMultiPass).Count()).IsLessThanOrEqualTo(5);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="TUnit" Version="0.67.19" />
<PackageReference Include="TUnit" Version="0.71.4" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/HostsParser.Tests/CollectionUtilitiesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async Task FilterGrouped_Should_Not_Contain_SubDomains()
CollectionUtilities.FilterGrouped(dnsCollection);

// Assert
await Assert.That(dnsCollection).HasCount().EqualTo(expected.Count)
await Assert.That<IEnumerable<string>>(dnsCollection).HasCount().EqualTo(expected.Count)
.And.ContainsOnly(s => expected.Contains(s));
}
}
8 changes: 4 additions & 4 deletions tests/HostsParser.Tests/HostUtilitiesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ await HostUtilities.ProcessHostsBased(dnsCollection,
decoder);

// Assert
await Assert.That(dnsCollection).HasCount().EqualTo(expected.Count).And
await Assert.That<IEnumerable<string>>(dnsCollection).HasCount().EqualTo(expected.Count).And
.ContainsOnly(s => expected.Contains(s));
}

Expand Down Expand Up @@ -118,10 +118,10 @@ public async Task ProcessAdBlockBased_Should_Only_Return_Dns_Entries()
await HostUtilities.ProcessAdBlockBased(dnsCollection, allowedOverrides, overrideAllowedHosts, memoryStream, decoder);

// Assert
await Assert.That(dnsCollection).HasCount().EqualTo(expectedBlocked.Count).And
await Assert.That<IEnumerable<string>>(dnsCollection).HasCount().EqualTo(expectedBlocked.Count).And
.ContainsOnly(s => expectedBlocked.Contains(s));

await Assert.That(allowedOverrides).HasCount().EqualTo(expectedAllowed.Count).And
await Assert.That<IEnumerable<string>>(allowedOverrides).HasCount().EqualTo(expectedAllowed.Count).And
.ContainsOnly(s => expectedAllowed.Contains(s));
}

Expand All @@ -145,7 +145,7 @@ public async Task RemoveKnownBadHosts_Should_Remove_All_SubDomain_Entries_Of_Kno
dnsCollection = HostUtilities.RemoveKnownBadHosts(knownBadHosts, dnsCollection);

// Assert
await Assert.That(dnsCollection).HasCount().EqualTo(expected.Count).And
await Assert.That<IEnumerable<string>>(dnsCollection).HasCount().EqualTo(expected.Count).And
.ContainsOnly(s => expected.Contains(s));
}

Expand Down
2 changes: 1 addition & 1 deletion tests/HostsParser.Tests/HostsParser.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="TUnit" Version="0.67.19" />
<PackageReference Include="TUnit" Version="0.71.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading