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 88 <ItemGroup >
99 <PackageReference Include =" bunit" Version =" 1.3.42" />
1010 <PackageReference Include =" FluentAssertions" Version =" 6.2.0" />
11+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.Testing" Version =" 6.0.0" />
1112 <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 6.0.0" />
1213 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.1.0-preview-20211130-02" />
1314 <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 3636 <AdditionalFiles Include =" ..\stylecop.json" Link =" stylecop.json" />
3737 </ItemGroup >
3838
39+ <ItemGroup >
40+ <InternalsVisibleTo Include =" LinkDotNet.Blog.IntegrationTests" />
41+ </ItemGroup >
42+
3943 <ItemGroup >
4044 <None Update =" Shared\Giscus.razor.js" >
4145 <DependentUpon >Giscus.razor</DependentUpon >
Original file line number Diff line number Diff line change 88
99namespace LinkDotNet . Blog . Web ;
1010
11- public static class Program
11+ public class Program
1212{
1313 public static void Main ( string [ ] args )
1414 {
You can’t perform that action at this time.
0 commit comments