mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 09:42:57 +08:00
Add dummy data in test case.
This commit is contained in:
parent
bfa275ad1c
commit
cad594018f
@ -1,6 +1,8 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
@ -17,6 +19,31 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
var profile = new UserProfileOverlay();
|
var profile = new UserProfileOverlay();
|
||||||
Add(profile);
|
Add(profile);
|
||||||
|
|
||||||
|
AddStep("Show offline dummy", () => profile.ShowUser(new User
|
||||||
|
{
|
||||||
|
Username = @"Somebody",
|
||||||
|
Id = 1,
|
||||||
|
Country = new Country { FullName = @"Alien" },
|
||||||
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c1.jpg",
|
||||||
|
JoinDate = DateTimeOffset.Now.AddDays(-1),
|
||||||
|
LastVisit = DateTimeOffset.Now,
|
||||||
|
Age = 1,
|
||||||
|
ProfileOrder = new[] { "me" },
|
||||||
|
CountryRank = 1,
|
||||||
|
Statistics = new UserStatistics
|
||||||
|
{
|
||||||
|
Rank = 2148,
|
||||||
|
PP = 4567.89m
|
||||||
|
},
|
||||||
|
AllRankHistories = new User.RankHistories
|
||||||
|
{
|
||||||
|
Osu = new User.RankHistory
|
||||||
|
{
|
||||||
|
Mode = @"osu",
|
||||||
|
Data = Enumerable.Range(2345,45).Concat(Enumerable.Range(2109,40)).ToArray()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, false));
|
||||||
AddStep("Show ppy", () => profile.ShowUser(new User
|
AddStep("Show ppy", () => profile.ShowUser(new User
|
||||||
{
|
{
|
||||||
Username = @"peppy",
|
Username = @"peppy",
|
||||||
|
@ -124,5 +124,32 @@ namespace osu.Game.Users
|
|||||||
|
|
||||||
[JsonProperty(@"defaultStatistics")]
|
[JsonProperty(@"defaultStatistics")]
|
||||||
public UserStatistics Statistics;
|
public UserStatistics Statistics;
|
||||||
|
|
||||||
|
public class RankHistories
|
||||||
|
{
|
||||||
|
[JsonProperty(@"osu")]
|
||||||
|
public RankHistory Osu;
|
||||||
|
|
||||||
|
[JsonProperty(@"taiko")]
|
||||||
|
public RankHistory Taiko;
|
||||||
|
|
||||||
|
[JsonProperty(@"fruits")]
|
||||||
|
public RankHistory Fruits;
|
||||||
|
|
||||||
|
[JsonProperty(@"mania")]
|
||||||
|
public RankHistory Mania;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class RankHistory
|
||||||
|
{
|
||||||
|
[JsonProperty(@"mode")]
|
||||||
|
public string Mode;
|
||||||
|
|
||||||
|
[JsonProperty(@"data")]
|
||||||
|
public int[] Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty(@"allRankHistories")]
|
||||||
|
public RankHistories AllRankHistories;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user