2019-01-24 16:43:03 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-07-11 15:30:33 +08:00
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
2019-03-13 11:57:01 +08:00
|
|
|
using osu.Game.Online.API;
|
2018-07-11 15:30:33 +08:00
|
|
|
using osu.Game.Screens.Menu;
|
2019-03-13 11:57:01 +08:00
|
|
|
using osu.Game.Users;
|
2018-07-11 15:30:33 +08:00
|
|
|
|
2019-03-25 00:02:36 +08:00
|
|
|
namespace osu.Game.Tests.Visual.Menus
|
2018-07-11 15:30:33 +08:00
|
|
|
{
|
2019-02-15 16:01:06 +08:00
|
|
|
public class TestCaseDisclaimer : ScreenTestCase
|
2018-07-11 15:30:33 +08:00
|
|
|
{
|
2019-03-13 11:57:01 +08:00
|
|
|
[Cached(typeof(IAPIProvider))]
|
|
|
|
private readonly DummyAPIAccess api = new DummyAPIAccess();
|
|
|
|
|
2018-07-11 15:30:33 +08:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
2019-03-22 10:55:35 +08:00
|
|
|
Add(api);
|
|
|
|
|
2019-03-13 11:57:01 +08:00
|
|
|
AddStep("load disclaimer", () => LoadScreen(new Disclaimer()));
|
|
|
|
|
|
|
|
AddStep("toggle support", () =>
|
|
|
|
{
|
|
|
|
api.LocalUser.Value = new User
|
|
|
|
{
|
|
|
|
Username = api.LocalUser.Value.Username,
|
|
|
|
Id = api.LocalUser.Value.Id,
|
|
|
|
IsSupporter = !api.LocalUser.Value.IsSupporter,
|
|
|
|
};
|
|
|
|
});
|
2018-07-11 15:30:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|