Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the change handler for able to generate properties from lyric. #2134

Merged
merged 4 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,6 @@ namespace osu.Game.Rulesets.Karaoke.Tests.Editor.ChangeHandlers.Lyrics;

public partial class LyricLanguageChangeHandlerTest : LyricPropertyChangeHandlerTest<LyricLanguageChangeHandler>
{
protected override bool IncludeAutoGenerator => true;

#region Auto-Generate

[Test]
public void TestDetectLanguage()
{
PrepareHitObject(() => new Lyric
{
Text = "カラオケ",
});

TriggerHandlerChanged(c => c.AutoGenerate());

AssertSelectedHitObject(h =>
{
Assert.AreEqual(new CultureInfo("ja"), h.Language);
});
}

[Test]
public void TestDetectLanguageWithNonSupportedLyric()
{
PrepareHitObject(() => new Lyric
{
Text = "???",
});

TriggerHandlerChanged(c => c.AutoGenerate());

AssertSelectedHitObject(h =>
{
Assert.IsNull(h.Language);
});
}

#endregion

[Test]
public void TestSetLanguageToJapanese()
{
Expand Down

This file was deleted.

Loading