public void RegisterIndexIsSetProperty(int regIndex)
        {
            // --- Arrange
            var spectrum = new SpectrumSoundTestMachine();
            var soundDev = new SoundDevice();

            soundDev.OnAttachedToVm(spectrum);

            // --- Act
            soundDev.SetRegisterIndex((byte)regIndex);

            // --- Assert
            soundDev.LastRegisterIndex.ShouldBe((byte)regIndex);
        }
        public void DeviceIsInitializedProperty()
        {
            // --- Arrange
            var spectrum = new SpectrumSoundTestMachine();

            // --- Act
            var soundDev = new SoundDevice();

            soundDev.OnAttachedToVm(spectrum);

            // --- Assert
            soundDev.LastRegisterIndex.ShouldBe((byte)0);
            for (var i = 0; i <= 0x0F; i++)
            {
                soundDev.PsgState[i].ShouldBe((byte)0);
            }
            soundDev.FrameCount.ShouldBe(0);
            soundDev.LastSampleTact.ShouldBe(0);
            soundDev.AudioSamples.Length.ShouldBe(1108);
        }