mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Split out tests
This commit is contained in:
@ -26,15 +26,22 @@ namespace osu.Game.Tests.Online
|
|||||||
beatmaps.PostNotification = n => recentNotification = n as ProgressNotification;
|
beatmaps.PostNotification = n => recentNotification = n as ProgressNotification;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase(true)]
|
[Test]
|
||||||
[TestCase(false)]
|
public void TestCancelDownloadFromRequest()
|
||||||
public void TestCancelDownloadRequest(bool closeFromRequest)
|
|
||||||
{
|
{
|
||||||
AddStep("download beatmap", () => beatmaps.Download(test_model));
|
AddStep("download beatmap", () => beatmaps.Download(test_model));
|
||||||
|
|
||||||
if (closeFromRequest)
|
|
||||||
AddStep("cancel download from request", () => beatmaps.GetExistingDownload(test_model).Cancel());
|
AddStep("cancel download from request", () => beatmaps.GetExistingDownload(test_model).Cancel());
|
||||||
else
|
|
||||||
|
AddUntilStep("is removed from download list", () => beatmaps.GetExistingDownload(test_model) == null);
|
||||||
|
AddAssert("is notification cancelled", () => recentNotification.State == ProgressNotificationState.Cancelled);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestCancelDownloadFromNotification()
|
||||||
|
{
|
||||||
|
AddStep("download beatmap", () => beatmaps.Download(test_model));
|
||||||
|
|
||||||
AddStep("cancel download from notification", () => recentNotification.Close());
|
AddStep("cancel download from notification", () => recentNotification.Close());
|
||||||
|
|
||||||
AddUntilStep("is removed from download list", () => beatmaps.GetExistingDownload(test_model) == null);
|
AddUntilStep("is removed from download list", () => beatmaps.GetExistingDownload(test_model) == null);
|
||||||
|
Reference in New Issue
Block a user