Skip to content

Commit

Permalink
Merge pull request #2134 from andy840119/separate-generate-logic
Browse files Browse the repository at this point in the history
Implement the change handler for able to generate properties from lyric.
  • Loading branch information
andy840119 authored Sep 27, 2023
2 parents be4fdc6 + 6f1ded2 commit 5c96bef
Show file tree
Hide file tree
Showing 34 changed files with 675 additions and 670 deletions.
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

0 comments on commit 5c96bef

Please sign in to comment.