public void AutoCompleteMomentInMilisecondsWith2Pins()
        {
            var notes = new List <GuitarScoreNote>();

            {
                var note = new GuitarScoreNote("B3", 1, 0, 240, 1000);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("F#3", 2, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("G#3", 3, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 4, 0, 240, 4000);
                notes.Add(note);
            }


            var xmlScoreReader = new MockXmlScoreReader(notes);

            Assert.AreEqual(1000, xmlScoreReader.ScoreNotes[0].MomentInMiliseconds);
            Assert.AreEqual(2000, xmlScoreReader.ScoreNotes[1].MomentInMiliseconds); //auto completed
            Assert.AreEqual(3000, xmlScoreReader.ScoreNotes[2].MomentInMiliseconds); //auto completed
            Assert.AreEqual(4000, xmlScoreReader.ScoreNotes[3].MomentInMiliseconds);
        }
        public void AutoCompleteMomentInMilisecondsWithAllNull()
        {
            var notes = new List <GuitarScoreNote>();

            {
                var note = new GuitarScoreNote("B3", 1, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("F#3", 2, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("G#3", 3, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 4, 0, 240, null);
                notes.Add(note);
            }


            var xmlScoreReader = new MockXmlScoreReader(notes);

            Assert.IsNull(xmlScoreReader.ScoreNotes[0].MomentInMiliseconds);
            Assert.IsNull(xmlScoreReader.ScoreNotes[1].MomentInMiliseconds);
            Assert.IsNull(xmlScoreReader.ScoreNotes[2].MomentInMiliseconds);
            Assert.IsNull(xmlScoreReader.ScoreNotes[3].MomentInMiliseconds);
        }
        public void AutoCompleteMomentInMilisecondsWithNotesAtTheSameBeatTick()
        {
            var notes = new List <GuitarScoreNote>();

            {
                var note = new GuitarScoreNote("B3", 1, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("F#3", 2, 0, 240, 2000);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("C#4", 2, 0, 240, 2000);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("F#4", 2, 0, 240, 2000);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("G#3", 3, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("D#4", 3, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 4, 0, 240, 4000);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 5, 0, 240, null);
                notes.Add(note);
            }


            var xmlScoreReader = new MockXmlScoreReader(notes);

            Assert.AreEqual(1000, xmlScoreReader.ScoreNotes[0].MomentInMiliseconds); //auto completed
            Assert.AreEqual(2000, xmlScoreReader.ScoreNotes[1].MomentInMiliseconds);
            Assert.AreEqual(2000, xmlScoreReader.ScoreNotes[2].MomentInMiliseconds);
            Assert.AreEqual(2000, xmlScoreReader.ScoreNotes[3].MomentInMiliseconds);
            Assert.AreEqual(3000, xmlScoreReader.ScoreNotes[4].MomentInMiliseconds); //auto completed
            Assert.AreEqual(3000, xmlScoreReader.ScoreNotes[5].MomentInMiliseconds); //auto completed
            Assert.AreEqual(4000, xmlScoreReader.ScoreNotes[6].MomentInMiliseconds);
            Assert.AreEqual(5000, xmlScoreReader.ScoreNotes[7].MomentInMiliseconds); //auto completed
        }
        public void AutoCompleteMomentInMilisecondsWithVariableTime()
        {
            var notes = new List <GuitarScoreNote>();

            {
                var note = new GuitarScoreNote("B3", 1, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("F#3", 2, 0, 240, 2000);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("G#3", 3, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 4, 0, 240, 4000);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 5, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 6, 0, 240, 8000);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 7, 0, 240, null);
                notes.Add(note);
            }

            {
                var note = new GuitarScoreNote("E3", 8, 0, 240, null);
                notes.Add(note);
            }


            var xmlScoreReader = new MockXmlScoreReader(notes);

            Assert.AreEqual(1000, xmlScoreReader.ScoreNotes[0].MomentInMiliseconds);  //auto completed
            Assert.AreEqual(2000, xmlScoreReader.ScoreNotes[1].MomentInMiliseconds);
            Assert.AreEqual(3000, xmlScoreReader.ScoreNotes[2].MomentInMiliseconds);  //auto completed
            Assert.AreEqual(4000, xmlScoreReader.ScoreNotes[3].MomentInMiliseconds);
            Assert.AreEqual(6000, xmlScoreReader.ScoreNotes[4].MomentInMiliseconds);  //auto completed
            Assert.AreEqual(8000, xmlScoreReader.ScoreNotes[5].MomentInMiliseconds);
            Assert.AreEqual(10000, xmlScoreReader.ScoreNotes[6].MomentInMiliseconds); //auto completed
            Assert.AreEqual(12000, xmlScoreReader.ScoreNotes[7].MomentInMiliseconds); //auto completed
        }