mirror of https://github.com/ppy/osu
Simplify status assignment in the test scene
This commit is contained in:
parent
67dbfc1e5e
commit
9f44a7b2ce
|
@ -25,6 +25,7 @@ public class TestSceneUserPanel : OsuTestScene
|
|||
};
|
||||
|
||||
private readonly Bindable<UserActivity> activity = new Bindable<UserActivity>();
|
||||
private readonly Bindable<UserStatus> status = new Bindable<UserStatus>();
|
||||
|
||||
private UserGridPanel peppy;
|
||||
private UserListPanel evast;
|
||||
|
@ -76,20 +77,20 @@ public void SetUp() => Schedule(() =>
|
|||
|
||||
flyte.Status.Value = new UserStatusOnline();
|
||||
|
||||
peppy.Status.Value = null;
|
||||
peppy.Status.BindTo(status);
|
||||
peppy.Activity.BindTo(activity);
|
||||
|
||||
evast.Status.Value = null;
|
||||
evast.Status.BindTo(status);
|
||||
evast.Activity.BindTo(activity);
|
||||
});
|
||||
|
||||
[Test]
|
||||
public void TestUserStatus()
|
||||
{
|
||||
AddStep("online", () => peppy.Status.Value = evast.Status.Value = new UserStatusOnline());
|
||||
AddStep("do not disturb", () => peppy.Status.Value = evast.Status.Value = new UserStatusDoNotDisturb());
|
||||
AddStep("offline", () => peppy.Status.Value = evast.Status.Value = new UserStatusOffline());
|
||||
AddStep("null status", () => peppy.Status.Value = evast.Status.Value = null);
|
||||
AddStep("online", () => status.Value = new UserStatusOnline());
|
||||
AddStep("do not disturb", () => status.Value = new UserStatusDoNotDisturb());
|
||||
AddStep("offline", () => status.Value = new UserStatusOffline());
|
||||
AddStep("null status", () => status.Value = null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Reference in New Issue