1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Rename references

This commit is contained in:
Craftplacer 2020-02-03 22:19:55 +01:00
parent 79f47fe7d7
commit 176e1e7ec2

View File

@ -26,11 +26,11 @@ namespace osu.Game.Tests.Visual.Online
{ {
friend = new User { Id = 0, Username = "Friend" }; friend = new User { Id = 0, Username = "Friend" };
publicChannel = new Channel { Id = 1, Name = "osu" }; publicChannel = new Channel { Id = 1, Name = "osu" };
privateMesssageChannel = new Channel(friend) { Id = 2, Name = friend.Username, Type = ChannelType.PM }; privateMessageChannel = new Channel(friend) { Id = 2, Name = friend.Username, Type = ChannelType.PM };
Schedule(() => Schedule(() =>
{ {
Child = testContainer = new TestContainer(new[] { publicChannel, privateMesssageChannel }) Child = testContainer = new TestContainer(new[] { publicChannel, privateMessageChannel })
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}; };
@ -42,7 +42,7 @@ namespace osu.Game.Tests.Visual.Online
[Test] [Test]
public void TestPublicChannelMention() public void TestPublicChannelMention()
{ {
AddStep("Switch to PMs", () => testContainer.ChannelManager.CurrentChannel.Value = privateMesssageChannel); AddStep("Switch to PMs", () => testContainer.ChannelManager.CurrentChannel.Value = privateMessageChannel);
AddStep("Send regular message", () => publicChannel.AddNewMessages(new Message(messageIdCounter++) { Content = "Hello everyone!", Sender = friend, ChannelId = publicChannel.Id })); AddStep("Send regular message", () => publicChannel.AddNewMessages(new Message(messageIdCounter++) { Content = "Hello everyone!", Sender = friend, ChannelId = publicChannel.Id }));
AddAssert("Expect no notifications", () => testContainer.NotificationOverlay.UnreadCount.Value == 0); AddAssert("Expect no notifications", () => testContainer.NotificationOverlay.UnreadCount.Value == 0);
@ -54,7 +54,7 @@ namespace osu.Game.Tests.Visual.Online
[Test] [Test]
public void TestPrivateMessageNotification() public void TestPrivateMessageNotification()
{ {
AddStep("Send PM", () => privateMesssageChannel.AddNewMessages(new Message(messageIdCounter++) { Content = $"Hello {API.LocalUser.Value.Username}!", Sender = friend, ChannelId = privateMesssageChannel.Id })); AddStep("Send PM", () => privateMessageChannel.AddNewMessages(new Message(messageIdCounter++) { Content = $"Hello {API.LocalUser.Value.Username}!", Sender = friend, ChannelId = privateMessageChannel.Id }));
AddAssert("Expect 1 notification", () => testContainer.NotificationOverlay.UnreadCount.Value == 1); AddAssert("Expect 1 notification", () => testContainer.NotificationOverlay.UnreadCount.Value == 1);
} }