Пример #1
0
        public void TestStopPlaying()
        {
            i = new InstrumentTestClass();

            i.StopPlaying();

            Assert.AreEqual(false, i.IsPlaying);
        }
Пример #2
0
        public void TestPlay() //finish?
        {
            i = new InstrumentTestClass();

            i.Play();

            Assert.AreEqual(true, i.IsPlaying);
            //test makesound ?
        }
Пример #3
0
        public void TestGetSound()
        {
            i = new InstrumentTestClass();

            int OriginalSoundCount = i.SoundCount;

            i.GetSound();
            int NewSoundCount = i.SoundCount;

            Assert.AreEqual(NewSoundCount, OriginalSoundCount + 1);
            Assert.AreEqual(i.Sound, i.GetSound());
        }
Пример #4
0
 public void TestGetIsPlayingString() //finish
 {
     i = new InstrumentTestClass();
 }
Пример #5
0
 public void TestMakeSound(int HowManyTimes) //finish
 {
     i = new InstrumentTestClass();
 }
Пример #6
0
        public void TestMakeSound()
        {
            i = new InstrumentTestClass();

            Assert.AreEqual(i.MakeSound(3), i.MakeSound());
        }
Пример #7
0
        public virtual void TestConstructor()
        {
            i = new InstrumentTestClass();

            Assert.AreEqual(false, i.IsPlaying);
        }
Пример #8
0
        public virtual void TestAbout()
        {
            i = new InstrumentTestClass();

            Assert.AreEqual($"This {i.Material} {i} costs ${i.Cost} and makes a {i.Sound} sound. \n{i.GetIsPlayingString()}", i.About());
        }