diff --git a/Runtime/Reporters/JUnitXmlReporter.cs b/Runtime/Reporters/JUnitXmlReporter.cs index 2fc783d..01b79c3 100644 --- a/Runtime/Reporters/JUnitXmlReporter.cs +++ b/Runtime/Reporters/JUnitXmlReporter.cs @@ -70,7 +70,10 @@ public override async UniTask PostReportAsync(string message, string stackTrace, internal static string GetOutputPath(string outputPathField, Arguments args = null) { - args ??= new Arguments(); + if (args==null) + { + args = new Arguments(); + } string path; if (args.JUnitReportPath.IsCaptured()) diff --git a/Tests/Runtime/Reporters/JUnitXmlReporterTest.cs b/Tests/Runtime/Reporters/JUnitXmlReporterTest.cs index 9b0de6f..d1bf13e 100644 --- a/Tests/Runtime/Reporters/JUnitXmlReporterTest.cs +++ b/Tests/Runtime/Reporters/JUnitXmlReporterTest.cs @@ -279,7 +279,7 @@ public async Task PostReportAsync_Error() await sut.PostReportAsync("MESSAGE", "STACK TRACE", ExitCode.UnCatchExceptions); Assert.That(outputPath, Does.Exist); - var actual = await File.ReadAllTextAsync(outputPath); + var actual = File.ReadAllText(outputPath); var expected = @"