Exemplo n.º 1
0
        public void GetIntervalsFromRootNote()
        {
            var chord     = new Chord(NoteName.A, NoteName.ASharp, NoteName.D, NoteName.D);
            var intervals = chord.GetIntervalsFromRootNote();

            CollectionAssert.AreEqual(
                new[] { Interval.FromHalfSteps(1), Interval.FromHalfSteps(5), Interval.FromHalfSteps(17) },
                intervals,
                "Intervals are invalid.");
        }
Exemplo n.º 2
0
        public void GetIntervalsFromRootNote_OutOfRange()
        {
            var chord = new Chord(NoteName.A, NoteName.A, NoteName.A, NoteName.A, NoteName.A, NoteName.A, NoteName.A, NoteName.A, NoteName.A, NoteName.A, NoteName.A, NoteName.A);

            Assert.Throws <InvalidOperationException>(() => chord.GetIntervalsFromRootNote());
        }