@@ -18,31 +18,35 @@ public class ElmahIoNotificationMethodTest
18
18
public void SetUp ( )
19
19
{
20
20
var options = Substitute . For < IOptionsMonitor < HealthChecksSettings > > ( ) ;
21
- var settings = new HealthChecksSettings ( ) ;
22
- settings . Notification = new HealthChecksNotificationSettings
21
+ var settings = new HealthChecksSettings
23
22
{
24
- Enabled = true ,
25
- NotificationMethods = new Dictionary < string , HealthChecksNotificationMethodSettings >
23
+ Notification = new HealthChecksNotificationSettings
26
24
{
25
+ Enabled = true ,
26
+ NotificationMethods = new Dictionary < string , HealthChecksNotificationMethodSettings >
27
27
{
28
- "elmah.io" , new HealthChecksNotificationMethodSettings
29
28
{
30
- Verbosity = HealthCheckNotificationVerbosity . Summary ,
31
- Enabled = true ,
32
- Settings = new Dictionary < string , string >
29
+ "elmah.io" , new HealthChecksNotificationMethodSettings
33
30
{
34
- { "apiKey" , "API_KEY" } ,
35
- { "logId" , "LOG_ID" } ,
36
- { "heartbeatId" , "HEARTBEAT_ID" }
31
+ Verbosity = HealthCheckNotificationVerbosity . Summary ,
32
+ Enabled = true ,
33
+ Settings = new Dictionary < string , string >
34
+ {
35
+ { "apiKey" , "API_KEY" } ,
36
+ { "logId" , "LOG_ID" } ,
37
+ { "heartbeatId" , "HEARTBEAT_ID" }
38
+ }
37
39
}
38
40
}
39
41
}
40
42
}
41
43
} ;
42
44
options . CurrentValue . Returns ( settings ) ;
43
45
heartbeatsClient = Substitute . For < IHeartbeatsClient > ( ) ;
44
- sut = new ElmahIoNotificationMethod ( options ) ;
45
- sut . heartbeats = heartbeatsClient ;
46
+ sut = new ElmahIoNotificationMethod ( options )
47
+ {
48
+ heartbeats = heartbeatsClient
49
+ } ;
46
50
}
47
51
48
52
[ Test ]
@@ -88,7 +92,7 @@ public override Task<IEnumerable<HealthCheckStatus>> GetStatus()
88
92
{
89
93
return Task . FromResult < IEnumerable < HealthCheckStatus > > ( new List < HealthCheckStatus >
90
94
{
91
- new HealthCheckStatus ( "Oh no" )
95
+ new ( "Oh no" )
92
96
{
93
97
ResultType = StatusResultType . Error
94
98
}
0 commit comments