Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
totollygeek committed Apr 7, 2024
1 parent e834aba commit 1f5fa25
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
26 changes: 13 additions & 13 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,20 @@ public static int Main() => Execute<Build>(

DotNetTest(_ => _
.SetConfiguration(Configuration)
.SetNoBuild(SucceededTargets.Contains(Compile))
.ResetVerbosity()
.SetResultsDirectory(TestResultDirectory)
.When(IsServerBuild, _ => _
.EnableCollectCoverage()
.SetCoverletOutputFormat(CoverletOutputFormat.cobertura)
.SetExcludeByFile("*.Generated.cs")
.SetCoverletOutputFormat(
$"\\\"{CoverletOutputFormat.cobertura},{CoverletOutputFormat.json}\\\"")
.EnableUseSourceLink())
.CombineWith(TestProjects, (_, p) => _
.SetFilter("TestCategory!=failing")
.SetNoBuild(SucceededTargets.Contains(Compile))
.ResetVerbosity()
.SetResultsDirectory(TestResultDirectory)
.When(IsServerBuild, _ => _
.EnableCollectCoverage()
.SetCoverletOutputFormat(CoverletOutputFormat.cobertura)
.SetExcludeByFile("*.Generated.cs")
.SetCoverletOutputFormat(
$"\\\"{CoverletOutputFormat.cobertura},{CoverletOutputFormat.json}\\\"")
.EnableUseSourceLink())
.CombineWith(TestProjects, (_, p) => _
.SetProjectFile(p)
.AddLoggers($"{logger};LogFileName={p.Name}.{logger}")),
completeOnFailure: true);
.AddLoggers($"{logger};LogFileName={p.Name}.{logger}")), completeOnFailure: true);
}
finally
{
Expand Down
Binary file added images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions tests/awesome.tests/FluentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ public void TestEvenNumbersArray()
{
var numbers = new[] { 2, 4, 6, 8, 10 };

numbers.Should().Satisfy(n => int.IsEvenInteger(n));
numbers.Should().AllSatisfy(n => int.IsEvenInteger(n));
}

[TestMethod]
[TestCategory("failing")]
public void TestWhichIsFailingForArray()
{
var numbers = new[] { 1, 2, 3, 4, 5 };
Expand All @@ -34,6 +35,7 @@ public void TestWhichIsFailingForArray()
}

[TestMethod]
[TestCategory("failing")]
public void TestWithoutAScope()
{
var numbers = new[] { 2, 4, 6, 8, 10 };
Expand All @@ -45,6 +47,7 @@ public void TestWithoutAScope()
}

[TestMethod]
[TestCategory("failing")]
public void TestInAScope()
{
var numbers = new[] { 2, 4, 6, 8, 10 };
Expand Down Expand Up @@ -121,7 +124,7 @@ public void TestExceptionThrowing()
// Directly
player.Invoking(p => p.Attack())
.Should().Throw<NotImplementedException>()
.WithMessage("The attack move is still not ready for production");
.WithMessage("The synchronous attack move is too slow for production");
}

[TestMethod]
Expand Down Expand Up @@ -153,6 +156,7 @@ public void TestClassStructure()
}

[TestMethod]
[TestCategory("failing")]
public void TestCustomAssertionFail()
{
var player = new Player
Expand Down

0 comments on commit 1f5fa25

Please sign in to comment.