Esempio n. 1
0
        [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);
        }
Esempio n. 2
0
        public void ExportToText()
        {
            var exportStorage = storage.GetStorageForDirectory("text");

            using (var outputStream = exportStorage.GetStream($"{beatmap.Name}.txt", FileAccess.Write, FileMode.Create))
                using (var sw = new StreamWriter(outputStream))
                {
                    var encoder = new LyricTextEncoder();
                    sw.WriteLine(encoder.Encode(new Beatmap
                    {
                        HitObjects = beatmap.HitObjects.ToList()
                    }));
                }

            exportStorage.OpenInNativeExplorer();
        }