Make TriggerSuccess(filename) protected and expose in test instead

This commit is contained in:
Salman Ahmed 2021-01-17 22:08:28 +03:00
parent ccef50e2a2
commit b6a37c1c15
2 changed files with 2 additions and 1 deletions

View File

@ -166,6 +166,7 @@ namespace osu.Game.Tests.Online
private class TestDownloadRequest : ArchiveDownloadRequest<BeatmapSetInfo>
{
public new void SetProgress(float progress) => base.SetProgress(progress);
public new void TriggerSuccess(string filename) => base.TriggerSuccess(filename);
public TestDownloadRequest(BeatmapSetInfo model)
: base(model)

View File

@ -29,7 +29,7 @@ namespace osu.Game.Online.API
private void request_Progress(long current, long total) => API.Schedule(() => Progressed?.Invoke(current, total));
internal void TriggerSuccess(string filename)
protected void TriggerSuccess(string filename)
{
if (this.filename != null)
throw new InvalidOperationException("Attempted to trigger success more than once");