public void TestDeletedBeatmapDisableReady() { OsuButton readyButton = null; AddAssert("ensure ready button enabled", () => { readyButton = button.ChildrenOfType <OsuButton>().Single(); return(readyButton.Enabled.Value); }); AddStep("delete beatmap", () => beatmaps.Delete(importedSet)); AddAssert("ready button disabled", () => !readyButton.Enabled.Value); AddStep("undelete beatmap", () => beatmaps.Undelete(importedSet)); AddAssert("ready button enabled back", () => readyButton.Enabled.Value); }
private void assertReadyButtonEnablement(bool shouldBeEnabled) => AddAssert($"ready button {(shouldBeEnabled ? "is" : "is not")} enabled", () => readyButton.ChildrenOfType <OsuButton>().Single().Enabled.Value == shouldBeEnabled);