public void EqualityTest() { Duration duration = new Duration(2, 4); IEnumerable <Note> notes1 = new List <Note>() { new Note(new Duration(1, 8)), new Note(new Duration(1, 8)), new Note(new Duration(1, 4)) }; IEnumerable <Beat> beats1 = new List <Beat>() { new Beat(duration, notes1) }; IEnumerable <Note> notes2 = new List <Note>() { new Note(new Duration(1, 4)), new Note(new Duration(1, 4)) }; IEnumerable <Beat> beats2 = new List <Beat>() { new Beat(duration, notes2) }; Sheet sheet1 = new Sheet(beats1, duration); Sheet sheet2 = new Sheet(beats1, duration); Sheet sheet3 = new Sheet(beats2, duration); EqualityTests.TestEqualObjects(sheet1, sheet2); EqualityTests.TestUnequalObjects(sheet1, sheet3); EqualityTests.TestAgainstNull(sheet1); }
public void EqualityTest() { Duration duration1 = new Duration(2, 4); Duration duration2 = new Duration(2, 4); Duration duration3 = new Duration(3, 4); EqualityTests.TestEqualObjects(duration1, duration2); EqualityTests.TestUnequalObjects(duration1, duration3); EqualityTests.TestAgainstNull(duration1); }
public void EqualityTest() { Fraction fraction1 = new Fraction(2, 4); Fraction fraction2 = new Fraction(2, 4); Fraction fraction3 = new Fraction(3, 4); EqualityTests.TestEqualObjects(fraction1, fraction2); EqualityTests.TestUnequalObjects(fraction1, fraction3); EqualityTests.TestAgainstNull(fraction1); }
public void EqualityTest() { Note note1 = new Note(new Duration(1, 8)); Note note2 = new Note(new Duration(1, 8)); Note note3 = new Note(new Duration(1, 4)); EqualityTests.TestEqualObjects(note1, note2); EqualityTests.TestUnequalObjects(note1, note3); EqualityTests.TestAgainstNull(note1); }
public void EqualityTest() { List <Note> notes1 = new List <Note>() { new Note(new Duration(1, 4)), new Note(new Duration(1, 4)), new Note(new Duration(1, 4)) }; Duration duration1 = new Duration(3, 4); Beat beat1 = new Beat(duration1, notes1); Beat beat2 = new Beat(duration1, notes1); List <Note> notes3 = new List <Note>() { new Note(new Duration(1, 4)), new Note(new Duration(1, 4)), new Note(new Duration(2, 4)) }; Duration duration3 = new Duration(4, 4); Beat beat3 = new Beat(duration3, notes3); EqualityTests.TestEqualObjects(beat1, beat2); EqualityTests.TestUnequalObjects(beat1, beat3); EqualityTests.TestAgainstNull(beat1); }