public void AddWrongTypeSampleToTrack() { Track t = new Track(8, "guitar", 0); Sample s = new Sample("./GuitarG.wav", "guitarChord", "banjo"); t.AddSample(3, s); Assert.AreNotEqual(s, t.samples[3]); }
public void CompareTracksDifferentLengths() { Track t1 = new Track(8, "guitar", 0); Track t2 = new Track(10, "guitar", 4); Sample s = new Sample("./GuitarG.wav", "guitarChord", "guitar"); t1.AddSample(3, s); t2.AddSample(3, s); Assert.IsFalse(CompareTracks(t1, t2)); }
public void CompareTracksDifferentTypes() { Track t1 = new Track(8, "guitar", 0); Track t2 = new Track(8, "drums", 4); Sample s = new Sample("./GuitarG.wav", "guitarChord", "guitar"); t1.AddSample(3, s); //Sample won't be added as it is a different type t2.AddSample(5, s); Assert.IsFalse(CompareTracks(t1, t2)); }
public void SwapSample() { Track t1 = new Track(8, "guitar", 0); Sample s1 = new Sample("./GuitarG.wav", "guitarChord", "guitar"); Sample s2 = new Sample("./GuitarD.wav", "guitarD", "guitar"); t1.AddSample(5, s1); t1.AddSample(2, s2); t1.SwapSamples(5, 2); Assert.AreEqual(s1, t1.samples[2]); }
public void RemoveSample() { Track t1 = new Track(8, "guitar", 0); Sample s1 = new Sample("./GuitarG.wav", "guitarChord", "guitar"); Sample s2 = new Sample("./GuitarD.wav", "guitarD", "guitar"); t1.AddSample(5, s1); t1.RemoveSample(5); Assert.AreNotEqual(s1, t1.samples[5]); }
public void MoveSample() { Track t1 = new Track(8, "guitar", 0); Sample s = new Sample("./GuitarG.wav", "guitarChord", "guitar"); t1.AddSample(5, s); t1.MoveSample(5, 2); Assert.AreEqual(s, t1.samples[2]); }