Skip to content

Commit 1de9c2c

Browse files
committed
File-scoped namespace for SmokeTest
1 parent 931b8a3 commit 1de9c2c

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

LinkDotNet.Blog.IntegrationTests/SmokeTest.cs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,27 @@
44
using Microsoft.AspNetCore.Mvc.Testing;
55
using Xunit;
66

7-
namespace LinkDotNet.Blog.IntegrationTests
7+
namespace LinkDotNet.Blog.IntegrationTests;
8+
9+
public class SmokeTest : IClassFixture<WebApplicationFactory<Program>>
810
{
9-
public class SmokeTest : IClassFixture<WebApplicationFactory<Program>>
10-
{
11-
private readonly WebApplicationFactory<Program> factory;
11+
private readonly WebApplicationFactory<Program> factory;
1212

13-
public SmokeTest(WebApplicationFactory<Program> factory)
13+
public SmokeTest(WebApplicationFactory<Program> factory)
14+
{
15+
this.factory = factory.WithWebHostBuilder(builder =>
1416
{
15-
this.factory = factory.WithWebHostBuilder(builder =>
16-
{
17-
builder.UseSetting("PersistenceProvider", "InMemory");
18-
});
19-
}
17+
builder.UseSetting("PersistenceProvider", "InMemory");
18+
});
19+
}
2020

21-
[Fact]
22-
public async Task ShouldBootUpApplication()
23-
{
24-
var client = factory.CreateClient();
21+
[Fact]
22+
public async Task ShouldBootUpApplication()
23+
{
24+
var client = factory.CreateClient();
2525

26-
var result = await client.GetAsync("/");
26+
var result = await client.GetAsync("/");
2727

28-
result.IsSuccessStatusCode.Should().BeTrue();
29-
}
28+
result.IsSuccessStatusCode.Should().BeTrue();
3029
}
31-
}
30+
}

0 commit comments

Comments
 (0)