File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,19 @@ public void AddMetricPusherService_WithZeroTimeInterval_ThrowsArgumentOutOfRange
2626 act . Should ( ) . Throw < ArgumentOutOfRangeException > ( ) ;
2727 }
2828
29+ [ Fact ]
30+ public void AddMetricPusherService_WithDefaultInterval_AddsMetricPusherServiceInServiceCollection ( )
31+ {
32+ var servicesCollection = new ServiceCollection ( ) ;
33+ var metricPusher = Substitute . For < IMetricPusher > ( ) ;
34+
35+ servicesCollection . AddMetricPusherService ( metricPusher ) ;
36+ var provider = servicesCollection . BuildServiceProvider ( ) ;
37+ var service = provider . GetRequiredService < IHostedService > ( ) ;
38+
39+ service . Should ( ) . BeOfType < MetricPusherService > ( ) ;
40+ }
41+
2942 [ Fact ]
3043 public void AddMetricPusherService_WithValidParameterValues_AddsMetricPusherServiceInServiceCollection ( )
3144 {
You can’t perform that action at this time.
0 commit comments