Skip to content

Commit

Permalink
Update TUnit to 0.4.1 (#769)
Browse files Browse the repository at this point in the history
* Update TUnit to 0.4.1

* Fix

---------

Co-authored-by: Renovate Bot <[email protected]>
  • Loading branch information
thomhurst and renovate-bot authored Nov 28, 2024
1 parent 1b32c70 commit 5986e47
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
<PackageVersion Include="TUnit" Version="0.3.31" />
<PackageVersion Include="TUnit.Assertions" Version="0.3.31" />
<PackageVersion Include="TUnit.Core" Version="0.3.31" />
<PackageVersion Include="TUnit" Version="0.4.1" />
<PackageVersion Include="TUnit.Assertions" Version="0.4.1" />
<PackageVersion Include="TUnit.Core" Version="0.4.1" />
<PackageVersion Include="vertical-spectreconsolelogger" Version="0.10.1-dev.20241117.32" />
<PackageVersion Include="YamlDotNet" Version="16.2.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task Can_Parse_EnumValueAttribute(Number number, string expected)
CommandOptionsObjectArgumentParser.AddArgumentsFromOptionsObject(list, options);
await Assert.That(list).Contains("--number");
await Assert.That(list).Contains(expected);
await Assert.That(list).IsEquivalentCollectionTo(["--number", expected]);
await Assert.That(list).IsEquivalentTo(["--number", expected]);
}

public enum Number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public async Task ToToolOptions_SingleArg()
using (Assert.Multiple())
{
await Assert.That(commandLineOptions.Tool).IsEqualTo("mytool");
await Assert.That(commandLineOptions.Arguments!).IsEquivalentCollectionTo(["arg1"]);
await Assert.That(commandLineOptions.Arguments!).IsEquivalentTo(["arg1"]);
}
}

Expand All @@ -27,7 +27,7 @@ public async Task ToToolOptions_MultipleArgs()
using (Assert.Multiple())
{
await Assert.That(commandLineOptions.Tool).IsEqualTo("mytool");
await Assert.That(commandLineOptions.Arguments!).IsEquivalentCollectionTo(["arg1", "arg2"]);
await Assert.That(commandLineOptions.Arguments!).IsEquivalentTo(["arg1", "arg2"]);
}
}

Expand All @@ -40,7 +40,7 @@ public async Task ToToolOptions_MultipleArgs_IEnumerable()
using (Assert.Multiple())
{
await Assert.That(commandLineOptions.Tool).IsEqualTo("mytool");
await Assert.That(commandLineOptions.Arguments!).IsEquivalentCollectionTo(["arg1", "arg2"]);
await Assert.That(commandLineOptions.Arguments!).IsEquivalentTo(["arg1", "arg2"]);
}
}

Expand All @@ -54,7 +54,7 @@ public async Task WithArguments_AddsToExisting()
using (Assert.Multiple())
{
await Assert.That(commandLineOptions.Tool).IsEqualTo("mytool");
await Assert.That(commandLineOptions.Arguments!).IsEquivalentCollectionTo(["arg1", "arg2", "arg3", "arg4", "arg5"]);
await Assert.That(commandLineOptions.Arguments!).IsEquivalentTo(["arg1", "arg2", "arg3", "arg4", "arg5"]);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public async Task EnumerablePaths()
var paths = files.AsPaths();
await Assert.That(paths).IsAssignableTo(typeof(IEnumerable<string>));
await Assert.That(paths).IsNotAssignableTo(typeof(List<string>));
await Assert.That(paths).IsEquivalentCollectionTo(new List<string>
await Assert.That(paths).IsEquivalentTo(new List<string>
{
Path.Combine(TestContext.WorkingDirectory, "File1.txt"),
Path.Combine(TestContext.WorkingDirectory, "File2.txt"),
Expand All @@ -38,7 +38,7 @@ public async Task ListPaths()
var paths = files.AsPaths();
await Assert.That(paths).IsAssignableTo(typeof(IEnumerable<string>));
await Assert.That(paths).IsAssignableTo(typeof(List<string>));
await Assert.That(paths).IsEquivalentCollectionTo([
await Assert.That(paths).IsEquivalentTo([
Path.Combine(TestContext.WorkingDirectory, "File1.txt"),
Path.Combine(TestContext.WorkingDirectory, "File2.txt")
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public async Task EnumerablePaths()
var paths = folders.AsPaths();
await Assert.That(paths).IsAssignableTo(typeof(IEnumerable<string>))
.And.IsNotAssignableTo(typeof(List<string>))
.And.IsEquivalentCollectionTo(new List<string>
.And.IsEquivalentTo(new List<string>
{
Path.Combine(TestContext.WorkingDirectory, "Folder1"),
Path.Combine(TestContext.WorkingDirectory, "Folder2"),
Expand All @@ -38,7 +38,7 @@ public async Task ListPaths()
await Assert.That(paths).IsAssignableTo(typeof(IEnumerable));
await Assert.That(paths).IsAssignableTo(typeof(IEnumerable<string>));
await Assert.That(paths).IsAssignableTo(typeof(List<string>));
await Assert.That(paths).IsEquivalentCollectionTo([
await Assert.That(paths).IsEquivalentTo([
Path.Combine(TestContext.WorkingDirectory, "Folder1"),
Path.Combine(TestContext.WorkingDirectory, "Folder2")
]);
Expand Down
6 changes: 3 additions & 3 deletions test/ModularPipelines.UnitTests/SubModuleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public async Task Submodule_With_Progress()
using (Assert.Multiple())
{
await Assert.That(results.ModuleResultType).IsEqualTo(ModuleResultType.Success);
await Assert.That(results.Value).IsEquivalentCollectionTo(new List<string> { "1", "2", "3" });
await Assert.That(results.Value).IsEquivalentTo(new List<string> { "1", "2", "3" });
await Assert.That(module.SubModuleRunCount).IsEqualTo(3);
}
}
Expand All @@ -257,7 +257,7 @@ public async Task Submodule_With_Return_Type_Does_Not_Fail_And_Runs_Once()
using (Assert.Multiple())
{
await Assert.That(results.ModuleResultType).IsEqualTo(ModuleResultType.Success);
await Assert.That(results.Value).IsEquivalentCollectionTo(new List<string> { "1", "2", "3" });
await Assert.That(results.Value).IsEquivalentTo(new List<string> { "1", "2", "3" });
await Assert.That(module.SubModuleRunCount).IsEqualTo(3);
}
}
Expand Down Expand Up @@ -287,7 +287,7 @@ public async Task Submodule_With_Return_Type_Does_Not_Fail_Synchronous_And_Runs_
using (Assert.Multiple())
{
await Assert.That(results.ModuleResultType).IsEqualTo(ModuleResultType.Success);
await Assert.That(results.Value!).IsEquivalentCollectionTo(new List<string> { "1", "2", "3" });
await Assert.That(results.Value!).IsEquivalentTo(new List<string> { "1", "2", "3" });
await Assert.That(module.SubModuleRunCount).IsEqualTo(3);
}
}
Expand Down

0 comments on commit 5986e47

Please sign in to comment.