Ejemplo n.º 1
0
        public void EmptyCuesheetTracksValidationTest()
        {
            var testHelper = new TestHelper();
            var cuesheet   = new Cuesheet();

            Assert.AreEqual(cuesheet.Tracks.Count, 0);
            var validationErrorTracks = cuesheet.GetValidationErrorsFiltered(String.Format("{0}.{1}", nameof(Cuesheet), nameof(Cuesheet.Tracks))).FirstOrDefault();

            Assert.IsNotNull(validationErrorTracks);
            cuesheet.AddTrack(new Track(), testHelper.ApplicationOptions);
            validationErrorTracks = cuesheet.GetValidationErrorsFiltered(nameof(Cuesheet.Tracks)).FirstOrDefault();
            Assert.IsNull(validationErrorTracks);
        }
Ejemplo n.º 2
0
        public void CuesheetTest()
        {
            var testHelper = new TestHelper();
            var cuesheet   = new Cuesheet();

            Assert.IsNull(cuesheet.Audiofile);
            var validationErrorAudioFile = cuesheet.GetValidationErrorsFiltered(String.Format("{0}.{1}", nameof(Cuesheet), nameof(Cuesheet.Audiofile))).FirstOrDefault();

            Assert.IsNotNull(validationErrorAudioFile);
            cuesheet.Audiofile       = new Audiofile("AudioFile01.ogg");
            validationErrorAudioFile = cuesheet.GetValidationErrorsFiltered(nameof(Cuesheet.Audiofile)).FirstOrDefault();
            Assert.IsNull(validationErrorAudioFile);
        }