@@ -163,6 +163,7 @@ public async Task DisposeAsyncCore_Override_WithException_StillCallsDispose()
163163
164164 _ = component . MyService ;
165165
166+ await Assert . ThrowsAsync < InvalidOperationException > ( async ( ) =>
166167 await ( ( IAsyncDisposable ) component ) . DisposeAsync ( ) ) ;
167168
168169 Assert . True ( component . DisposingParameter ) ;
@@ -232,27 +233,6 @@ public async Task ComplexComponent_DisposesResourcesOnlyWhenDisposingIsTrue()
232233 Assert . Equal ( 1 , component . ManagedResourcesCleanedUpCount ) ;
233234 }
234235
235- [ Fact ]
236- public void ComplexComponent_WithDisposingFalse_SkipsManagedResourceCleanup ( )
237- {
238- var services = new ServiceCollection ( ) ;
239- services . AddSingleton < Counter > ( ) ;
240- services . AddTransient < MyService > ( ) ;
241- var serviceProvider = services . BuildServiceProvider ( ) ;
242-
243- var renderer = new TestRenderer ( serviceProvider ) ;
244- var component = ( ComplexComponent ) renderer . InstantiateComponent < ComplexComponent > ( ) ;
245-
246- _ = component . MyService ;
247-
248- component . TestDisposeWithFalse ( ) ;
249-
250- Assert . False ( component . TimerDisposed ) ;
251- Assert . False ( component . CancellationTokenSourceDisposed ) ;
252- Assert . False ( component . EventUnsubscribed ) ;
253- Assert . Equal ( 0 , component . ManagedResourcesCleanedUpCount ) ;
254- }
255-
256236 private class ComplexComponent : OwningComponentBase < MyService >
257237 {
258238 private readonly System . Threading . Timer _timer ;
@@ -272,8 +252,6 @@ public ComplexComponent()
272252 _eventSubscribed = true ;
273253 }
274254
275- public void TestDisposeWithFalse ( ) => Dispose ( disposing : false ) ;
276-
277255 protected override void Dispose ( bool disposing )
278256 {
279257 if ( disposing )
0 commit comments