Ejemplo n.º 1
0
        public void WhenScaleNotesMethodIsCalledWithRootArgumentContainingSharpAndSingleSearchTerm_ThenMatchingScaleDataIsReturned()
        {
            // Arrange
            var controller = new ChordDataController(this.chordData, this.loggerMock.Object);

            // Act
            var scalesObject = controller.ScaleNotes("G#", "Min");

            // Assert
            Assert.IsNotNull(scalesObject);
            var scalesArray = scalesObject as ScaleInstance[] ?? scalesObject.ToArray();

            Assert.AreEqual(8, scalesArray.Length);
            Assert.IsInstanceOfType(scalesArray.First(), typeof(ScaleInstance));
            Assert.AreEqual("G#/Ab Minor (Natural)", scalesArray.First().DisplayName);
            Assert.AreEqual("G#/Ab Diminished Whole", scalesArray.Last().DisplayName);
        }
Ejemplo n.º 2
0
        public void WhenScaleNotesMethodIsCalledWithRootArgumentContainingSharpAndMultipleSearchTerms_ThenMatchingScaleDataIsReturned()
        {
            // Arrange
            var controller = new ChordDataController(this.chordData, this.loggerMock.Object);

            // Act
            var scalesObject = controller.ScaleNotes("G#", "lyd flat");

            // Assert
            Assert.IsNotNull(scalesObject);
            var scalesArray = scalesObject as ScaleInstance[] ?? scalesObject.ToArray();

            Assert.AreEqual(3, scalesArray.Length);
            Assert.IsInstanceOfType(scalesArray.First(), typeof(ScaleInstance));
            Assert.AreEqual("G#/Ab Mixolydian Flattened 9th Sharpened 9th", scalesArray.First().DisplayName);
            Assert.AreEqual("G#/Ab Lydian Flattened 7th", scalesArray.Last().DisplayName);
        }
Ejemplo n.º 3
0
        public void WhenScaleNotesMethodIsCalledWithRootArgumentContainingSharp_ThenMatchingScaleDataIsReturned()
        {
            // Arrange
            var controller = new ChordDataController(this.chordData, this.loggerMock.Object);

            // Act
            var scalesObject = controller.ScaleNotes("G#");

            // Assert
            Assert.IsNotNull(scalesObject);
            var scalesArray = scalesObject as ScaleInstance[] ?? scalesObject.ToArray();

            Assert.AreEqual(2, scalesArray.Length);
            Assert.IsInstanceOfType(scalesArray.First(), typeof(ScaleInstance));
            Assert.AreEqual("G#/Ab Major", scalesArray.First().DisplayName);
            Assert.AreEqual("G#/Ab Pentatonic Major", scalesArray.Last().DisplayName);
        }