Skip to content

Commit

Permalink
Fix API approvals code.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartdesmet committed Sep 25, 2020
1 parent 7e796ca commit 3e5916e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Verify;
using VerifyTests;
using VerifyXunit;
using Xunit;
using Xunit.Abstractions;

namespace ReactiveTests.Tests.Api
{
public class ApiApprovalTests :
VerifyBase
{
VerifySettings verifySettings;
private readonly VerifySettings verifySettings;

public ApiApprovalTests(ITestOutputHelper output) :
base(output)
public ApiApprovalTests()
: base()
{
verifySettings = new VerifySettings();
verifySettings.UseExtension("cs");
Expand Down Expand Up @@ -64,6 +63,7 @@ private static string Filter(string text)
.Where(l => !l.StartsWith("[assembly: AssemblyFileVersion("))
.Where(l => !l.StartsWith("[assembly: AssemblyInformationalVersion("))
.Where(l => !l.StartsWith("[assembly: System.Reflection.AssemblyMetadata(\"CommitHash\""))
.Where(l => !l.StartsWith("[assembly: System.Reflection.AssemblyMetadata(\"RepositoryUrl\""))
.Where(l => !string.IsNullOrWhiteSpace(l))
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT License.
// See the LICENSE file in the project root for more information.

#nullable enable

using System;
using System.IO;
using System.Threading.Tasks;
Expand All @@ -13,9 +15,9 @@ namespace ReactiveTests.Tests
{
public static class DiffPlexReporter
{
public static async Task Report(string receivedFile, string verifiedFile)
public static Task Report(string receivedFile, string verifiedFile, string? message)
{
#if(!DEBUG)
#if (!DEBUG)
var receivedText = File.ReadAllText(receivedFile);
var verifiedText = File.ReadAllText(verifiedFile);
var diffBuilder = new InlineDiffBuilder(new Differ());
Expand All @@ -38,7 +40,9 @@ public static async Task Report(string receivedFile, string verifiedFile)

Console.WriteLine("{0}{1}", prefix, line.Text);
}
#endif
#endif

return Task.CompletedTask;
}
}
}

0 comments on commit 3e5916e

Please sign in to comment.