mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Country
-> CountryCode
This commit is contained in:
@ -55,7 +55,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Id = 3103765,
|
||||
IsOnline = true,
|
||||
Statistics = new UserStatistics { GlobalRank = 1111 },
|
||||
Country = Country.JP,
|
||||
CountryCode = CountryCode.JP,
|
||||
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
|
||||
},
|
||||
new APIUser
|
||||
@ -64,7 +64,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Id = 2,
|
||||
IsOnline = false,
|
||||
Statistics = new UserStatistics { GlobalRank = 2222 },
|
||||
Country = Country.AU,
|
||||
CountryCode = CountryCode.AU,
|
||||
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
||||
IsSupporter = true,
|
||||
SupportLevel = 3,
|
||||
@ -73,7 +73,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Username = "Evast",
|
||||
Id = 8195163,
|
||||
Country = Country.BY,
|
||||
CountryCode = CountryCode.BY,
|
||||
CoverUrl = "https://assets.ppy.sh/user-profile-covers/8195163/4a8e2ad5a02a2642b631438cfa6c6bd7e2f9db289be881cb27df18331f64144c.jpeg",
|
||||
IsOnline = false,
|
||||
LastVisit = DateTimeOffset.Now
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
public TestSceneRankingsCountryFilter()
|
||||
{
|
||||
var countryBindable = new Bindable<Country>();
|
||||
var countryBindable = new Bindable<CountryCode>();
|
||||
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
@ -56,8 +56,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
}
|
||||
});
|
||||
|
||||
const Country country = Country.BY;
|
||||
const Country unknown_country = Country.CK;
|
||||
const CountryCode country = CountryCode.BY;
|
||||
const CountryCode unknown_country = CountryCode.CK;
|
||||
|
||||
AddStep("Set country", () => countryBindable.Value = country);
|
||||
AddStep("Set default country", () => countryBindable.Value = default);
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
public TestSceneRankingsHeader()
|
||||
{
|
||||
var countryBindable = new Bindable<Country>();
|
||||
var countryBindable = new Bindable<CountryCode>();
|
||||
var ruleset = new Bindable<RulesetInfo>();
|
||||
var scope = new Bindable<RankingsScope>();
|
||||
|
||||
@ -30,8 +30,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Ruleset = { BindTarget = ruleset }
|
||||
});
|
||||
|
||||
const Country country = Country.BY;
|
||||
const Country unknown_country = Country.CK;
|
||||
const CountryCode country = CountryCode.BY;
|
||||
const CountryCode unknown_country = CountryCode.CK;
|
||||
|
||||
AddStep("Set country", () => countryBindable.Value = country);
|
||||
AddStep("Set scope to Score", () => scope.Value = RankingsScope.Score);
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
private TestRankingsOverlay rankingsOverlay;
|
||||
|
||||
private readonly Bindable<Country> countryBindable = new Bindable<Country>();
|
||||
private readonly Bindable<CountryCode> countryBindable = new Bindable<CountryCode>();
|
||||
private readonly Bindable<RankingsScope> scope = new Bindable<RankingsScope>();
|
||||
|
||||
[SetUp]
|
||||
@ -49,14 +49,14 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
AddStep("Set scope to Score", () => scope.Value = RankingsScope.Score);
|
||||
AddAssert("Check country is default", () => countryBindable.Value == default);
|
||||
AddStep("Set country", () => countryBindable.Value = Country.US);
|
||||
AddStep("Set country", () => countryBindable.Value = CountryCode.US);
|
||||
AddAssert("Check scope is Performance", () => scope.Value == RankingsScope.Performance);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestShowCountry()
|
||||
{
|
||||
AddStep("Show US", () => rankingsOverlay.ShowCountry(Country.US));
|
||||
AddStep("Show US", () => rankingsOverlay.ShowCountry(CountryCode.US));
|
||||
}
|
||||
|
||||
private void loadRankingsOverlay()
|
||||
@ -71,7 +71,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
private class TestRankingsOverlay : RankingsOverlay
|
||||
{
|
||||
public new Bindable<Country> Country => base.Country;
|
||||
public new Bindable<CountryCode> Country => base.Country;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
new CountryStatistics
|
||||
{
|
||||
Country = Country.US,
|
||||
Code = CountryCode.US,
|
||||
ActiveUsers = 2_972_623,
|
||||
PlayCount = 3_086_515_743,
|
||||
RankedScore = 449_407_643_332_546,
|
||||
@ -65,7 +65,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
},
|
||||
new CountryStatistics
|
||||
{
|
||||
Country = Country.RU,
|
||||
Code = CountryCode.RU,
|
||||
ActiveUsers = 1_609_989,
|
||||
PlayCount = 1_637_052_841,
|
||||
RankedScore = 221_660_827_473_004,
|
||||
@ -84,7 +84,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
User = new APIUser
|
||||
{
|
||||
Username = "first active user",
|
||||
Country = Country.JP,
|
||||
CountryCode = CountryCode.JP,
|
||||
Active = true,
|
||||
},
|
||||
Accuracy = 0.9972,
|
||||
@ -104,7 +104,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
User = new APIUser
|
||||
{
|
||||
Username = "inactive user",
|
||||
Country = Country.AU,
|
||||
CountryCode = CountryCode.AU,
|
||||
Active = false,
|
||||
},
|
||||
Accuracy = 0.9831,
|
||||
@ -124,7 +124,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
User = new APIUser
|
||||
{
|
||||
Username = "second active user",
|
||||
Country = Country.PL,
|
||||
CountryCode = CountryCode.PL,
|
||||
Active = true,
|
||||
},
|
||||
Accuracy = 0.9584,
|
||||
|
@ -157,7 +157,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Id = 6602580,
|
||||
Username = @"waaiiru",
|
||||
Country = Country.ES,
|
||||
CountryCode = CountryCode.ES,
|
||||
},
|
||||
Mods = new[]
|
||||
{
|
||||
@ -180,7 +180,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Id = 4608074,
|
||||
Username = @"Skycries",
|
||||
Country = Country.BR,
|
||||
CountryCode = CountryCode.BR,
|
||||
},
|
||||
Mods = new[]
|
||||
{
|
||||
@ -202,7 +202,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Id = 1014222,
|
||||
Username = @"eLy",
|
||||
Country = Country.JP,
|
||||
CountryCode = CountryCode.JP,
|
||||
},
|
||||
Mods = new[]
|
||||
{
|
||||
@ -223,7 +223,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Id = 1541390,
|
||||
Username = @"Toukai",
|
||||
Country = Country.CA,
|
||||
CountryCode = CountryCode.CA,
|
||||
},
|
||||
Mods = new[]
|
||||
{
|
||||
@ -243,7 +243,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Id = 7151382,
|
||||
Username = @"Mayuri Hana",
|
||||
Country = Country.TH,
|
||||
CountryCode = CountryCode.TH,
|
||||
},
|
||||
Rank = ScoreRank.D,
|
||||
PP = 160,
|
||||
@ -282,7 +282,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Id = 7151382,
|
||||
Username = @"Mayuri Hana",
|
||||
Country = Country.TH,
|
||||
CountryCode = CountryCode.TH,
|
||||
},
|
||||
Rank = ScoreRank.D,
|
||||
PP = 160,
|
||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Username = @"flyte",
|
||||
Id = 3103765,
|
||||
Country = Country.JP,
|
||||
CountryCode = CountryCode.JP,
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c6.jpg",
|
||||
Status = { Value = new UserStatusOnline() }
|
||||
}) { Width = 300 },
|
||||
@ -68,7 +68,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Username = @"peppy",
|
||||
Id = 2,
|
||||
Country = Country.AU,
|
||||
CountryCode = CountryCode.AU,
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
||||
IsSupporter = true,
|
||||
SupportLevel = 3,
|
||||
@ -77,7 +77,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Username = @"Evast",
|
||||
Id = 8195163,
|
||||
Country = Country.BY,
|
||||
CountryCode = CountryCode.BY,
|
||||
CoverUrl = @"https://assets.ppy.sh/user-profile-covers/8195163/4a8e2ad5a02a2642b631438cfa6c6bd7e2f9db289be881cb27df18331f64144c.jpeg",
|
||||
IsOnline = false,
|
||||
LastVisit = DateTimeOffset.Now
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Username = @"Somebody",
|
||||
Id = 1,
|
||||
Country = Country.XX,
|
||||
CountryCode = CountryCode.XX,
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c1.jpg",
|
||||
JoinDate = DateTimeOffset.Now.AddDays(-1),
|
||||
LastVisit = DateTimeOffset.Now,
|
||||
@ -82,7 +82,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Username = @"peppy",
|
||||
Id = 2,
|
||||
IsSupporter = true,
|
||||
Country = Country.AU,
|
||||
CountryCode = CountryCode.AU,
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg"
|
||||
}));
|
||||
|
||||
@ -90,7 +90,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
Username = @"flyte",
|
||||
Id = 3103765,
|
||||
Country = Country.JP,
|
||||
CountryCode = CountryCode.JP,
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
|
||||
}));
|
||||
|
||||
@ -99,7 +99,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Username = @"BanchoBot",
|
||||
Id = 3,
|
||||
IsBot = true,
|
||||
Country = Country.SH,
|
||||
CountryCode = CountryCode.SH,
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c4.jpg"
|
||||
}));
|
||||
|
||||
|
Reference in New Issue
Block a user