File tree 2 files changed +30
-0
lines changed
LinkDotNet.Blog.IntegrationTests
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 8
8
<ItemGroup >
9
9
<PackageReference Include =" bunit" Version =" 1.2.49" />
10
10
<PackageReference Include =" FluentAssertions" Version =" 6.1.0" />
11
+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.Testing" Version =" 6.0.0-rc.1.21452.15" />
11
12
<PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 6.0.0-rc.1.21452.10" />
12
13
<PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.11.0" />
13
14
<PackageReference Include =" Moq" Version =" 4.16.1" />
Original file line number Diff line number Diff line change
1
+ using System . Net ;
2
+ using System . Threading . Tasks ;
3
+ using FluentAssertions ;
4
+ using LinkDotNet . Blog . Web ;
5
+ using Microsoft . AspNetCore . Mvc . Testing ;
6
+ using Xunit ;
7
+
8
+ namespace LinkDotNet . Blog . IntegrationTests
9
+ {
10
+ public class SmokeTests : IClassFixture < WebApplicationFactory < Startup > >
11
+ {
12
+ private readonly WebApplicationFactory < Startup > factory ;
13
+
14
+ public SmokeTests ( WebApplicationFactory < Startup > factory )
15
+ {
16
+ this . factory = factory ;
17
+ }
18
+
19
+ [ Fact ]
20
+ public async Task ShouldStart ( )
21
+ {
22
+ var client = factory . CreateClient ( ) ;
23
+
24
+ var response = await client . GetAsync ( "/" ) ;
25
+
26
+ response . StatusCode . Should ( ) . Be ( HttpStatusCode . OK ) ;
27
+ }
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments