Skip to content

Commit

Permalink
test: move verified files to dedicated folder to reduce clutter. Also…
Browse files Browse the repository at this point in the history
… fix missing namespace for shim and suppress S3236.
  • Loading branch information
skwasjer committed Oct 1, 2024
1 parent 64cd9c3 commit 40b5a10
Show file tree
Hide file tree
Showing 16 changed files with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/MockHttp.Testing/Specs/PublicApiSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,23 @@ public Task Api_has_not_changed()

string targetFramework = sut.GetCustomAttribute<TargetFrameworkAttribute>()?.FrameworkDisplayName?.Replace(' ', '_')
?? throw new InvalidOperationException("Framework display name is required.");
settings.UseMethodName(nameof(Api_has_not_changed) + targetFramework);
settings.UseFileName(targetFramework);
settings.UseDirectory("PublicApi");

// Act
string publicApi = sut.GeneratePublicApi(_options);

// Assert
// ReSharper disable once ExplicitCallerInfoArgument
#pragma warning disable S3236
return Verify(publicApi, settings, _sourceFile!);
#pragma warning restore S3236
}
}
#else
// Stub for unsupported frameworks
namespace MockHttp.Specs;

// Empty shim for when verification is disabled.
public abstract class PublicApiSpec
{
// ReSharper disable once UnusedParameter.Local
Expand Down

0 comments on commit 40b5a10

Please sign in to comment.