File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
LinkDotNet.Blog.IntegrationTests/Web Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ using FluentAssertions ;
2
+ using LinkDotNet . Blog . Web ;
3
+ using LinkDotNet . Blog . Web . Pages . Admin ;
4
+ using LinkDotNet . Blog . Web . Shared ;
5
+ using LinkDotNet . Domain ;
6
+ using LinkDotNet . Infrastructure . Persistence ;
7
+ using Microsoft . AspNetCore ;
8
+ using Microsoft . AspNetCore . Hosting ;
9
+ using Microsoft . Extensions . DependencyInjection ;
10
+ using Xunit ;
11
+
12
+ namespace LinkDotNet . Blog . IntegrationTests . Web
13
+ {
14
+ public class StartupTests
15
+ {
16
+ [ Fact ]
17
+ public void ShouldSetServices ( )
18
+ {
19
+ var host = WebHost . CreateDefaultBuilder ( ) . UseStartup < Startup > ( ) . Build ( ) ;
20
+
21
+ host . Services . GetRequiredService < IRepository < BlogPost > > ( ) . Should ( ) . NotBeNull ( ) ;
22
+ host . Services . GetRequiredService < ISortOrderCalculator > ( ) . Should ( ) . NotBeNull ( ) ;
23
+ host . Services . GetRequiredService < IDashboardService > ( ) . Should ( ) . NotBeNull ( ) ;
24
+ host . Services . GetRequiredService < IUserRecordService > ( ) . Should ( ) . NotBeNull ( ) ;
25
+ host . Services . GetRequiredService < AppConfiguration > ( ) . Should ( ) . NotBeNull ( ) ;
26
+ }
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments