1
- using Microsoft . AspNetCore . Hosting ;
2
- using Microsoft . Extensions . Configuration ;
1
+ using Microsoft . Extensions . Configuration ;
3
2
using Microsoft . Extensions . DependencyInjection ;
3
+ using Microsoft . Extensions . Hosting ;
4
4
using Microsoft . Extensions . Logging ;
5
5
using Microsoft . Extensions . Options ;
6
6
using Moq ;
7
7
using Xunit ;
8
+ using IHostingEnvironment = Microsoft . AspNetCore . Hosting . IHostingEnvironment ;
8
9
9
10
namespace ICG . NetCore . Utilities . Email . SendGrid . Tests
10
11
{
@@ -46,8 +47,7 @@ public void ServiceCollection_ShouldRegisterSendGridService()
46
47
var configuration = new ConfigurationBuilder ( )
47
48
. AddJsonFile ( "appsettings.json" )
48
49
. Build ( ) ;
49
- collection . AddSingleton ( new Mock < Microsoft . Extensions . Hosting . IHostingEnvironment > ( ) . Object ) ;
50
- collection . AddSingleton ( new Mock < IHostingEnvironment > ( ) . Object ) ;
50
+ collection . AddSingleton ( new Mock < IHostEnvironment > ( ) . Object ) ;
51
51
collection . UseIcgNetCoreUtilitiesEmailSendGrid ( configuration ) ;
52
52
collection . AddLogging ( ) ;
53
53
var services = collection . BuildServiceProvider ( ) ;
@@ -69,8 +69,7 @@ public void ServiceCollection_ShouldRegisterSendMessageBuilder()
69
69
var configuration = new ConfigurationBuilder ( )
70
70
. AddJsonFile ( "appsettings.json" )
71
71
. Build ( ) ;
72
- collection . AddSingleton ( new Mock < Microsoft . Extensions . Hosting . IHostingEnvironment > ( ) . Object ) ;
73
- collection . AddSingleton ( new Mock < IHostingEnvironment > ( ) . Object ) ;
72
+ collection . AddSingleton ( new Mock < IHostEnvironment > ( ) . Object ) ;
74
73
collection . AddLogging ( ) ;
75
74
collection . UseIcgNetCoreUtilitiesEmailSendGrid ( configuration ) ;
76
75
var services = collection . BuildServiceProvider ( ) ;
@@ -91,8 +90,7 @@ public void ServiceCollection_ShouldRegisterSendGridSender()
91
90
var configuration = new ConfigurationBuilder ( )
92
91
. AddJsonFile ( "appsettings.json" )
93
92
. Build ( ) ;
94
- collection . AddSingleton ( new Mock < Microsoft . Extensions . Hosting . IHostingEnvironment > ( ) . Object ) ;
95
- collection . AddSingleton ( new Mock < IHostingEnvironment > ( ) . Object ) ;
93
+ collection . AddSingleton ( new Mock < IHostEnvironment > ( ) . Object ) ;
96
94
collection . UseIcgNetCoreUtilitiesEmailSendGrid ( configuration ) ;
97
95
var services = collection . BuildServiceProvider ( ) ;
98
96
0 commit comments