示例#1
0
        public void TestCheckIsStartTimeInvalid(string lyricText, string[] timeTags, bool actual)
        {
            var lyric = TestCaseTagHelper.ParseLyric(lyricText);

            lyric.TimeTags = TestCaseTagHelper.ParseTimeTags(timeTags);
            Assert.AreEqual(LyricUtils.CheckIsStartTimeInvalid(lyric), actual);
        }
示例#2
0
        private TimeInvalid[] checkInvalidLyricTime(Lyric lyric)
        {
            var result = new List <TimeInvalid>();

            if (LyricUtils.CheckIsTimeOverlapping(lyric))
            {
                result.Add(TimeInvalid.Overlapping);
            }

            if (LyricUtils.CheckIsStartTimeInvalid(lyric))
            {
                result.Add(TimeInvalid.StartTimeInvalid);
            }

            if (LyricUtils.CheckIsEndTimeInvalid(lyric))
            {
                result.Add(TimeInvalid.EndTimeInvalid);
            }

            return(result.ToArray());
        }