1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 22:27:25 +08:00
This commit is contained in:
Andrei Zavatski 2020-02-27 01:42:55 +03:00
parent ddb494efb3
commit 02fd85d485

View File

@ -11,6 +11,7 @@ using osu.Game.Overlays;
using osu.Framework.Allocation;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Users;
using JetBrains.Annotations;
namespace osu.Game.Tests.Visual.Online
{
@ -44,13 +45,6 @@ namespace osu.Game.Tests.Visual.Online
});
});
[Test]
public void TestLocalCommentBundle()
{
AddStep("Add comment bundle", () => comments.ShowComments(getCommentBundle()));
AddStep("Add empty comment bundle", () => comments.ShowComments(getEmptyCommentBundle()));
}
[Test]
public void TestAppendDuplicatedComment()
{
@ -60,6 +54,13 @@ namespace osu.Game.Tests.Visual.Online
AddAssert("Dictionary length is 10", () => comments.DictionaryLength == 10);
}
[Test]
public void TestLocalCommentBundle()
{
AddStep("Add comment bundle", () => comments.ShowComments(getCommentBundle()));
AddStep("Add empty comment bundle", () => comments.ShowComments(getEmptyCommentBundle()));
}
private CommentBundle getEmptyCommentBundle() => new CommentBundle
{
Comments = new List<Comment>(),
@ -191,9 +192,9 @@ namespace osu.Game.Tests.Visual.Online
private class TestCommentsContainer : CommentsContainer
{
public int DictionaryLength => CommentDictionary.Count;
public new void AppendComments([NotNull] CommentBundle bundle) => base.AppendComments(bundle);
public new void AppendComments(CommentBundle bundle) => base.AppendComments(bundle);
public int DictionaryLength => CommentDictionary.Count;
public void ShowComments(CommentBundle bundle)
{