You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ All notable changes to **bUnit** will be documented in this file. The project ad
9
9
### Added
10
10
11
11
- Add `ComponentFactories` extensions method that makes it easy to register an instance of a replacement component. By [@egil](https://github.com/egil).
12
+
- Add ability to pass `ServiceProviderOptions` to `TestServiceProvider` through property to allow users to customize the service provider. By [@rodolfograve](https://github.com/rodolfograve).
@@ -25,6 +32,16 @@ private class DummyComponentWhichRequiresDummyService : ComponentBase
25
32
[Inject]publicDummyServiceService{get;set;}
26
33
}
27
34
35
+
privatesealedclassDisposableService:IDisposable
36
+
{
37
+
publicboolIsDisposed{get;privateset;}
38
+
39
+
publicvoidDispose()
40
+
{
41
+
IsDisposed=true;
42
+
}
43
+
}
44
+
28
45
[Fact(DisplayName="Provider initialized without a service collection has zero services by default")]
29
46
publicvoidTest001()
30
47
{
@@ -240,13 +257,48 @@ public void Test033()
240
257
disposable.IsDisposed.ShouldBeTrue();
241
258
}
242
259
243
-
privatesealedclassDisposableService:IDisposable
260
+
[Fact(DisplayName="Validates that all dependencies can be created when the first service is requested, if ServiceProviderOptions.ValidateOnBuild is true")]
action.ShouldThrow<AggregateException>("Some services are not able to be constructed (Error while validating the service descriptor");
274
+
}
246
275
247
-
publicvoidDispose()
276
+
[Fact(DisplayName="Does not validate all dependencies can be created when the first service is requested, if ServiceProviderOptions.ValidateOnBuild is false")]
[Fact(DisplayName="Does not validate all dependencies can be created when the first service is requested, if no ServiceProviderOptions is provided (backwards compatibility)")]
0 commit comments