1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Fix incorrect DI usage in some tournament screen tests

This commit is contained in:
Dean Herbert 2019-11-08 19:35:55 +09:00
parent c70c05c896
commit c280f1ab08
2 changed files with 4 additions and 6 deletions

View File

@ -3,7 +3,6 @@
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Tournament.Models; using osu.Game.Tournament.Models;
using osu.Game.Tournament.Screens.TeamIntro; using osu.Game.Tournament.Screens.TeamIntro;
@ -13,7 +12,7 @@ namespace osu.Game.Tournament.Tests.Screens
public class TestSceneTeamIntroScreen : LadderTestScene public class TestSceneTeamIntroScreen : LadderTestScene
{ {
[Cached] [Cached]
private readonly Bindable<TournamentMatch> currentMatch = new Bindable<TournamentMatch>(); private readonly LadderInfo ladder = new LadderInfo();
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
@ -22,7 +21,7 @@ namespace osu.Game.Tournament.Tests.Screens
match.Team1.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "USA"); match.Team1.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "USA");
match.Team2.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "JPN"); match.Team2.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "JPN");
match.Round.Value = Ladder.Rounds.FirstOrDefault(g => g.Name.Value == "Finals"); match.Round.Value = Ladder.Rounds.FirstOrDefault(g => g.Name.Value == "Finals");
currentMatch.Value = match; ladder.CurrentMatch.Value = match;
Add(new TeamIntroScreen Add(new TeamIntroScreen
{ {

View File

@ -3,7 +3,6 @@
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Tournament.Models; using osu.Game.Tournament.Models;
using osu.Game.Tournament.Screens.TeamWin; using osu.Game.Tournament.Screens.TeamWin;
@ -13,7 +12,7 @@ namespace osu.Game.Tournament.Tests.Screens
public class TestSceneTeamWinScreen : LadderTestScene public class TestSceneTeamWinScreen : LadderTestScene
{ {
[Cached] [Cached]
private readonly Bindable<TournamentMatch> currentMatch = new Bindable<TournamentMatch>(); private readonly LadderInfo ladder = new LadderInfo();
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
@ -22,7 +21,7 @@ namespace osu.Game.Tournament.Tests.Screens
match.Team1.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "USA"); match.Team1.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "USA");
match.Team2.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "JPN"); match.Team2.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "JPN");
match.Round.Value = Ladder.Rounds.FirstOrDefault(g => g.Name.Value == "Finals"); match.Round.Value = Ladder.Rounds.FirstOrDefault(g => g.Name.Value == "Finals");
currentMatch.Value = match; ladder.CurrentMatch.Value = match;
Add(new TeamWinScreen Add(new TeamWinScreen
{ {