File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed
LinkDotNet.Blog.IntegrationTests Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 8
8
<ItemGroup >
9
9
<PackageReference Include =" bunit" Version =" 1.3.42" />
10
10
<PackageReference Include =" FluentAssertions" Version =" 6.2.0" />
11
+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.Testing" Version =" 6.0.0" />
11
12
<PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 6.0.0" />
12
13
<PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.1.0-preview-20211130-02" />
13
14
<PackageReference Include =" Moq" Version =" 4.16.1" />
Original file line number Diff line number Diff line change
1
+ using System . Threading . Tasks ;
2
+ using FluentAssertions ;
3
+ using LinkDotNet . Blog . Web ;
4
+ using Microsoft . AspNetCore . Mvc . Testing ;
5
+ using Xunit ;
6
+
7
+ namespace LinkDotNet . Blog . IntegrationTests
8
+ {
9
+ public class SmokeTest
10
+ {
11
+ [ Fact ]
12
+ public async Task ShouldBootUpApplication ( )
13
+ {
14
+ var application = new WebApplicationFactory < Program > ( ) . WithWebHostBuilder ( b => { } ) ;
15
+ var client = application . CreateClient ( ) ;
16
+
17
+ var result = await client . GetAsync ( "/" ) ;
18
+
19
+ result . IsSuccessStatusCode . Should ( ) . BeTrue ( ) ;
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change 36
36
<AdditionalFiles Include =" ..\stylecop.json" Link =" stylecop.json" />
37
37
</ItemGroup >
38
38
39
+ <ItemGroup >
40
+ <InternalsVisibleTo Include =" LinkDotNet.Blog.IntegrationTests" />
41
+ </ItemGroup >
42
+
39
43
<ItemGroup >
40
44
<None Update =" Shared\Giscus.razor.js" >
41
45
<DependentUpon >Giscus.razor</DependentUpon >
Original file line number Diff line number Diff line change 8
8
9
9
namespace LinkDotNet . Blog . Web ;
10
10
11
- public static class Program
11
+ public class Program
12
12
{
13
13
public static void Main ( string [ ] args )
14
14
{
You can’t perform that action at this time.
0 commit comments