public void TestBaseLengthMustBeEven() { Assert.ThrowsException <ArgumentException>(() => { var note = new PitchNote() { BaseLength = 3, }; }); }
public void Accept(PitchNote pitchNote) { var p = new Note(pitchNote.Pitch.ToString(), (int)pitchNote.Modifier, pitchNote.Octave, (MusicalSymbolDuration)pitchNote.BaseLength, NoteStemDirection.Up, NoteTieType.None, new List <NoteBeamType>() { NoteBeamType.Single }); p.NumberOfDots = (int)pitchNote.Dotts; Symbol = p; }
public void TestLengthWhenDotted() { var note = new PitchNote() { BaseLength = 1, Dotts = 0 }; Assert.AreEqual(1, note.Length); note.Dotts++; Assert.AreEqual(1.5, note.Length); note.Dotts++; Assert.AreEqual(1.75, note.Length); note.Dotts++; Assert.AreEqual(1.875, note.Length); note.Dotts++; Assert.AreEqual(1.9375, note.Length); note.Dotts++; Assert.AreEqual(1.96875, note.Length); note.Dotts++; Assert.AreEqual(1.984375, note.Length); }
void Accept(PitchNote pNote) { }