public void Activation_For_View_Fetcher_Should_Support_Windows() { using (UnitTestApplication.Start(TestServices.MockWindowingPlatform)) { var window = new TestWindowWithWhenActivated(); Assert.False(window.Active); window.Show(); Assert.True(window.Active); window.Close(); Assert.False(window.Active); } }
public void Activation_For_View_Fetcher_Should_Support_Windows() { Locator.CurrentMutable.RegisterConstant( new AvaloniaActivationForViewFetcher(), typeof(IActivationForViewFetcher)); using (var application = UnitTestApplication.Start(TestServices.MockWindowingPlatform)) { var window = new TestWindowWithWhenActivated(); Assert.False(window.Active); window.Show(); Assert.True(window.Active); window.Close(); Assert.False(window.Active); } }