Skip to content

Commit ac61758

Browse files
committed
Suppressing warnings in sample
1 parent d077e11 commit ac61758

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

sample/src/Startup.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
using Microsoft.Extensions.Configuration;
1010
using Microsoft.Extensions.DependencyInjection;
1111
using Microsoft.Extensions.Hosting;
12+
using System.Diagnostics.CodeAnalysis;
1213
using Egil.RazorComponents.Testing.SampleApp.Data;
1314

1415
namespace Egil.RazorComponents.Testing.SampleApp
1516
{
17+
[SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "<Pending>")]
1618
public class Startup
1719
{
1820
public Startup(IConfiguration configuration)
@@ -22,6 +24,7 @@ public Startup(IConfiguration configuration)
2224

2325
public IConfiguration Configuration { get; }
2426

27+
2528
// This method gets called by the runtime. Use this method to add services to the container.
2629
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
2730
public void ConfigureServices(IServiceCollection services)

sample/tests/GlobalSuppressions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This file is used by Code Analysis to maintain SuppressMessage
2+
// attributes that are applied to this project.
3+
// Project-level suppressions either have no target or are given
4+
// a specific target and scoped to a namespace, type, member, etc.
5+
6+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability", "CA2007:Consider calling ConfigureAwait on the awaited task", Justification = "<Pending>", Scope = "member", Target = "~M:Egil.RazorComponents.Testing.SampleApp.Tests.Components.AlertTest2.Test008~System.Threading.Tasks.Task")]

sample/tests/RazorTestComponents/Components/AlertRazorTest.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@inherits TestComponentBase
22

33
@code {
4-
MockJsRuntimeInvokeHandler MockJsRuntime { get; set; }
4+
MockJsRuntimeInvokeHandler MockJsRuntime { get; set; } = default!;
55

66
void Setup()
77
{

sample/tests/Tests/Components/AlertTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public void Test007()
208208
cut.MarkupMatches(string.Empty);
209209
}
210210

211-
[Fact(DisplayName = "Alert can be dismissed via Dismiss() mehod")]
211+
[Fact(DisplayName = "Alert can be dismissed via Dismiss() method")]
212212
public async Task Test008()
213213
{
214214
// Arrange

0 commit comments

Comments
 (0)