new[] { "[1000,3000]", "[6000,8000]", "[4000,12000]" })] // todo : second lyric start time should be 6000 but can be ignored now. public void TestApplyLayoutTime(string[] lyricTexts, string[] actualTimes) { var lyrics = TestCaseTagHelper.ParseLyrics(lyricTexts); var generator = new LayoutGenerator(generatorConfig()); generator.ApplyLayout(lyrics); Assert.AreEqual(lyrics.Select(x => $"[{x.StartTime},{x.EndTime}]").ToArray(), actualTimes); }
[TestCase(new[] { "[0,0]:か", "[0,0]:ら", "[0,0]:お", "[0,0]:け" }, "か\nら\nお\nけ")] // multi lyric. public void TestEncodeBeatmapToPureText(string[] lyrics, string actual) { var encoder = new LyricTextEncoder(); var beatmap = new KaraokeBeatmap { HitObjects = TestCaseTagHelper.ParseLyrics(lyrics).OfType <KaraokeHitObject>().ToList() }; var result = encoder.Encode(beatmap); Assert.AreEqual(result, actual); }