public void ChoralInstrumentPart_Constructor_IntArgumentNumberOfCopiesLessThanZero_ThrowsArgumentException() { //Arrange ChoralInstrumentPart myChoralInstrumentPart; //Act myChoralInstrumentPart = new ChoralInstrumentPart("Flute", -1, true); }
public void ChoralInstrumentPart_Constructor_StringArgumentInstrumentNameIsWhiteSpace_ThrowsArgumentException() { //Arrange ChoralInstrumentPart myChoralInstrumentPart; //Act myChoralInstrumentPart = new ChoralInstrumentPart(" ", 1, true); }
public void ChoralInstrumentPart_Constructor_StringArgumentInstrumentNameIsNull_ThrowsArgumentNullException() { //Arrange ChoralInstrumentPart myChoralInstrumentPart; //Act myChoralInstrumentPart = new ChoralInstrumentPart(null, 1, true); }
public void ChoralInstrumentPart_Constructor_ClassFieldIsChoralCorrectlySet() { //Arrange ChoralInstrumentPart myChoralInstrumentPart; //Act myChoralInstrumentPart = new ChoralInstrumentPart("Flute", 8, true); //Assert Assert.AreEqual(true, myChoralInstrumentPart.IsInChoralScore); }
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); }
public void TestChoralInstrumentPartConstructor_InitialzesFieldIsIncludedInChoralScoreCorrectly() { //act ChoralInstrumentPart myChoralInstrument; Instrument myInstrument = new Instrument("Flute", true); //arrange myChoralInstrument = new ChoralInstrumentPart(myInstrument, 10, true); //assert Assert.AreEqual(true, myChoralInstrument.IsIncludedInChoralScore); }
public void ChoralInstrumentPart_GetHashCode_InstancesAreEqual() { //Arrange ChoralInstrumentPart myChoralInstrumentPart; ChoralInstrumentPart myChoralInstrumentPart2; //Act myChoralInstrumentPart = new ChoralInstrumentPart("Flute", 8, true); myChoralInstrumentPart2 = new ChoralInstrumentPart("Flute", 8, true); //Assert Assert.AreEqual(myChoralInstrumentPart.GetHashCode(), myChoralInstrumentPart2.GetHashCode()); }
public void ChoralInstrumentPart_Equals_ArgumentIsNotEqual() { //Arrange ChoralInstrumentPart myChoralInstrumentPart; ChoralInstrumentPart myChoralInstrumentPart2; //Act myChoralInstrumentPart = new ChoralInstrumentPart("Flute", 8, true); myChoralInstrumentPart2 = new ChoralInstrumentPart("Flute", 8, false); //Assert Assert.AreNotEqual(true, myChoralInstrumentPart.Equals(myChoralInstrumentPart2)); }
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()); }