public void SetTimeAndLength_ZeroTime_ZeroLength() { var tempoMap = TempoMap.Default; var note = NoteMethods.Create(1000, 2000); var changedNote = note.SetTimeAndLength(new MetricTimeSpan(), new MusicalTimeSpan(), tempoMap); Assert.AreSame(note, changedNote, "Changed note is not the original one."); Assert.AreEqual(0, changedNote.Time, "Time is not zero."); Assert.AreEqual(0, changedNote.Length, "Length is not zero."); }
public void ResizeNotes_ZeroLength() { ResizeNotes( new[] { NoteMethods.Create(0, 0), null, null, NoteMethods.Create(10, 0), NoteMethods.Create(100, 0) }, new[] { new TimeAndLength((MidiTimeSpan)0, (MidiTimeSpan)0), new TimeAndLength((MidiTimeSpan)100, (MidiTimeSpan)0), new TimeAndLength((MidiTimeSpan)1000, (MidiTimeSpan)0) }, (MidiTimeSpan)1000, TimeSpanType.Midi, TempoMap); }