osu.Framework.Tests/Visual/UserInterface/TestSceneScreenStack.cs
/// <summary>
/// Make sure that all bindables are returned before OnResuming is called for the next screen.
/// </summary>
Make sure that all bindables are returned before OnResuming is called for the next screen.
Make sure that all bindables are returned before OnResuming is called for the next screen .
[Test]
        public void TestReturnBindsBeforeResume()
        {
            TestScreen screen1 = null, screen2 = null;
            pushAndEnsureCurrent(() => screen1 = new TestScreen());
            pushAndEnsureCurrent(() => screen2 = new TestScreen(true), () => screen1);
            AddStep("Exit screen", () => screen2.Exit());
            AddUntilStep("Wait until base is current", () => screen1.IsCurrentScreen());
            AddAssert("Bindables have been returned by new screen", () => !screen2.DummyBindable.Disabled && !screen2.LeasedCopy.Disabled);
        }
[ Test ] public void TestReturnBindsBeforeResume ( ) { TestScreen screen1 = null , screen2 = null ; pushAndEnsureCurrent ( ( ) => screen1 = new TestScreen ( ) ) ; pushAndEnsureCurrent ( ( ) => screen2 = new TestScreen ( true ) , ( ) => screen1 ) ; AddStep ( " " , ( ) => screen2 . Exit ( ) ) ; AddUntilStep ( " " , ( ) => screen1 . IsCurrentScreen ( ) ) ; AddAssert ( " " , ( ) => ! screen2 . DummyBindable . Disabled && ! screen2 . LeasedCopy . Disabled ) ; }
Make sure that all bindables are returned before OnResuming is called for the next screen.
Make sure that all bindables are returned before OnResuming is called for the next screen .