mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Make test case add test drawings file.
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Game.Screens.Tournament;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -13,6 +16,29 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
public override string Name => @"Drawings";
|
||||
public override string Description => "Tournament drawings";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(Storage storage)
|
||||
{
|
||||
string[] testTeams =
|
||||
{
|
||||
"GB:United Kingdom:UK",
|
||||
"FR:France:FRA",
|
||||
"CN:China:CHN",
|
||||
"AU:Australia:AUS",
|
||||
"JP:Japan:JPN",
|
||||
"RO:Romania",
|
||||
"IT:Italy",
|
||||
"VE:Venezuela:VNZ"
|
||||
};
|
||||
|
||||
using (Stream stream = storage.GetStream(Drawings.TEAMS_FILENAME, FileAccess.Write, FileMode.Create))
|
||||
using (StreamWriter sw = new StreamWriter(stream))
|
||||
{
|
||||
foreach (string line in testTeams)
|
||||
sw.WriteLine(line);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
Reference in New Issue
Block a user