예제 #1
0
        private void applyAudioBtn_Click(object sender, EventArgs e)
        {
            mobileOutBox.Clear();
            RadioButton checkedButton = audioAccessGrp.Controls.OfType <RadioButton>().FirstOrDefault(r => r.Checked);

            if (checkedButton != null)
            {
                formInOut.SelectedVariant = checkedButton.Tag.ToString();
            }
            simCorpMobile.SetAudioAccessory();
        }
예제 #2
0
        public void SetAudioAccessory()
        {
            fakeInOut.Selected  = 4;
            fakeInOut.FakeWrite = "";
            simCorpMobile.SetAudioAccessory();
            string expectedChoice = "Audio Accessory:";

            string[] expectedVariants = { nameof(HeadsetIPhone), nameof(NoNameHeadset), nameof(PortableSpeaker), nameof(SamsungHeadphones) };
            string   expectedOutput   = $"Selected {nameof(SamsungHeadphones)}" +
                                        $"{nameof(SamsungHeadphones)} sound" +
                                        $"Record function is not available\r\n";

            Assert.AreEqual(expectedChoice, fakeInOut.InputChoice);
            Assert.AreEqual(expectedVariants.ToString(), fakeInOut.InputVariants.ToString());
            Assert.AreEqual(expectedOutput, fakeInOut.FakeWrite);
        }