Esempio n. 1
0
        public void ChoralMusicSelection_MethodSetInstrumentParts()
        {
            //Arrange
            Contributor          composer = new Contributor(new Name("David", "", "Hass"), "Composer");
            ChoralMusicSelection myChoralMusicSelection
                = new ChoralMusicSelection("507f191e810c19729de860ea", "Blest Are They", composer, true);
            List <ChoralInstrumentPart> expectedInstrumentParts =
                new List <ChoralInstrumentPart>()
            {
                new ChoralInstrumentPart("Trombone", 2, true),
                new ChoralInstrumentPart("Flute", 3, true)
            };

            //Act
            List <ChoralInstrumentPart> instrumentParts =
                new List <ChoralInstrumentPart>()
            {
                new ChoralInstrumentPart("Trombone", 2, true),
                new ChoralInstrumentPart("Flute", 3, true)
            };

            myChoralMusicSelection.setInstrumentParts(instrumentParts);

            //Assert
            CollectionAssert.AreEqual(expectedInstrumentParts, myChoralMusicSelection.getInstrumentParts());
        }
Esempio n. 2
0
        public void ChoralMusicSelection_MethodSetInstrumentParts_ArgumentIsNull_ThrowsArgumentNullException()
        {
            //Arrange
            Contributor          composer = new Contributor(new Name("David", "", "Hass"), "Composer");
            ChoralMusicSelection myChoralMusicSelection
                = new ChoralMusicSelection("507f191e810c19729de860ea", "Blest Are They", composer, true);

            //Act
            myChoralMusicSelection.setInstrumentParts(null);
        }
Esempio n. 3
0
        public void ChoralMusicSelection_MethodRemoveInstrumentPart_ArgumentIsNotInTheList_ThrowsArgumentException()
        {
            //Arrange
            Contributor          composer = new Contributor(new Name("David", "", "Hass"), "Composer");
            ChoralMusicSelection myChoralMusicSelection
                = new ChoralMusicSelection("507f191e810c19729de860ea", "Blest Are They", composer, true);
            ChoralInstrumentPart myInstrumentPart = new ChoralInstrumentPart("Flute", 2, false);

            //Act
            myChoralMusicSelection.removeInstrumentPart(myInstrumentPart);
        }
Esempio n. 4
0
        public void ChoralMusicSelection_Constructor_IsSacredSetCorrectly()
        {
            //Arrange
            Contributor          composer = new Contributor(new Name("David", "", "Hass"), "Composer");
            ChoralMusicSelection myChoralMusicSelection;

            //Act
            myChoralMusicSelection = new ChoralMusicSelection("507f191e810c19729de860ea", "Blest Are They", composer, true);

            //Assert
            Assert.AreEqual(true, myChoralMusicSelection.IsSacred);
        }
Esempio n. 5
0
        public void ChoralMusicSelection_MethodSetAccompaniment_LowerCase()
        {
            //Arrange
            Contributor          composer = new Contributor(new Name("David", "", "Hass"), "Composer");
            ChoralMusicSelection myChoralMusicSelection
                = new ChoralMusicSelection("507f191e810c19729de860ea", "Blest Are They", composer, true);

            //Act
            myChoralMusicSelection.setAccompaniment(" Organ and Brass ");

            //Assert
            Assert.AreEqual("organ and brass", myChoralMusicSelection.Accompaniment_LowerCase);
        }
Esempio n. 6
0
        public void ChoralMusicSelection_MethodSetVoicing_LowerCase()
        {
            //Arrange
            Contributor          composer = new Contributor(new Name("David", "", "Hass"), "Composer");
            ChoralMusicSelection myChoralMusicSelection
                = new ChoralMusicSelection("507f191e810c19729de860ea", "Blest Are They", composer, true);

            //Act
            myChoralMusicSelection.setVoicing("SSA");

            //Assert
            Assert.AreEqual("ssa", myChoralMusicSelection.Voicing_LowerCase);
        }
Esempio n. 7
0
        public void ChoralMusicSelection_MethodAddInstrumentPart()
        {
            //Arrange
            Contributor          composer = new Contributor(new Name("David", "", "Hass"), "Composer");
            ChoralMusicSelection myChoralMusicSelection
                = new ChoralMusicSelection("507f191e810c19729de860ea", "Blest Are They", composer, true);
            ChoralInstrumentPart        myInstrumentPart  = new ChoralInstrumentPart("Flute", 2, false);
            ChoralInstrumentPart        myInstrumentPart2 = new ChoralInstrumentPart("Oboe", 2, false);
            List <ChoralInstrumentPart> expectedValue     = new List <ChoralInstrumentPart>()
            {
                myInstrumentPart, myInstrumentPart2
            };

            //Act
            myChoralMusicSelection.addInstrumentPart(myInstrumentPart);
            myChoralMusicSelection.addInstrumentPart(myInstrumentPart2);

            //Assert
            CollectionAssert.AreEqual(expectedValue, myChoralMusicSelection.getInstrumentParts());
        }