File tree Expand file tree Collapse file tree
Avalonia.Controls.UnitTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -336,7 +336,6 @@ internal void Close(bool ignoreCancel)
336336 if ( close )
337337 {
338338 PlatformImpl ? . Dispose ( ) ;
339- HandleClosed ( ) ;
340339 }
341340 }
342341 }
Original file line number Diff line number Diff line change @@ -228,8 +228,7 @@ public void Calling_Show_On_Closed_Window_Should_Throw()
228228 {
229229 using ( UnitTestApplication . Start ( TestServices . StyledWindow ) )
230230 {
231- var windowImpl = Mock . Of < IWindowImpl > ( x => x . Scaling == 1 ) ;
232- var target = new Window ( windowImpl ) ;
231+ var target = new Window ( ) ;
233232
234233 target . Show ( ) ;
235234 target . Close ( ) ;
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ public static Mock<IWindowImpl> CreateWindowMock(Func<IPopupImpl> popupImpl = nu
2828 return CreatePopupMock ( ) . Object ;
2929
3030 } ) ;
31+ mock . Setup ( x => x . Dispose ( ) ) . Callback ( ( ) =>
32+ {
33+ mock . Object . Closed ? . Invoke ( ) ;
34+ } ) ;
3135 PixelPoint pos = default ;
3236 mock . SetupGet ( x => x . Position ) . Returns ( ( ) => pos ) ;
3337 mock . Setup ( x => x . Move ( It . IsAny < PixelPoint > ( ) ) ) . Callback ( new Action < PixelPoint > ( np => pos = np ) ) ;
You can’t perform that action at this time.
0 commit comments