Revert changes to basic implementation and remove redundant stuff

This commit is contained in:
Andrei Zavatski
2020-03-06 02:12:30 +03:00
parent c08e16d97f
commit 1318f242c1
5 changed files with 28 additions and 126 deletions

View File

@ -11,7 +11,6 @@ using osu.Game.Beatmaps;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
using osu.Game.Overlays.BeatmapListing;
using osu.Game.Online.API.Requests;
using osuTK;
namespace osu.Game.Tests.Visual.UserInterface
@ -57,14 +56,11 @@ namespace osu.Game.Tests.Visual.UserInterface
}
});
section.SearchParameters.BindValueChanged(parameters =>
{
query.Text = $"Query: {parameters.NewValue.Query}";
ruleset.Text = $"Ruleset: {parameters.NewValue.Ruleset}";
category.Text = $"Category: {parameters.NewValue.Category}";
genre.Text = $"Genre: {parameters.NewValue.Genre}";
language.Text = $"Language: {parameters.NewValue.Language}";
}, true);
section.Query.BindValueChanged(q => query.Text = $"Query: {q.NewValue}", true);
section.Ruleset.BindValueChanged(r => ruleset.Text = $"Ruleset: {r.NewValue}", true);
section.Category.BindValueChanged(c => category.Text = $"Category: {c.NewValue}", true);
section.Genre.BindValueChanged(g => genre.Text = $"Genre: {g.NewValue}", true);
section.Language.BindValueChanged(l => language.Text = $"Language: {l.NewValue}", true);
}
[Test]
@ -75,17 +71,6 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("Set null beatmap", () => section.BeatmapSet = null);
}
[Test]
public void TestParametersSet()
{
AddStep("Set big black tag", () => section.SetTag("big black"));
AddAssert("Check query is big black", () => section.SearchParameters.Value.Query == "big black");
AddStep("Set anime genre", () => section.SetGenre(BeatmapSearchGenre.Anime));
AddAssert("Check genre is anime", () => section.SearchParameters.Value.Genre == BeatmapSearchGenre.Anime);
AddStep("Set japanese language", () => section.SetLanguage(BeatmapSearchLanguage.Japanese));
AddAssert("Check language is japanese", () => section.SearchParameters.Value.Language == BeatmapSearchLanguage.Japanese);
}
private static readonly BeatmapSetInfo beatmap_set = new BeatmapSetInfo
{
OnlineInfo = new BeatmapSetOnlineInfo