Пример #1
0
        public void TestSamsungHeadsetPlayCustom()
        {
            SamsungHeadset samsungHeadset = new SamsungHeadset(samsungVolume, new TestOutput(this));

            samsungHeadset.Play();
            Assert.AreEqual(samsungResultExpectations, Result);
        }
 private void RadioButton2CheckedChanged(object sender, EventArgs e)
 {
     if (radioButton2.Checked)
     {
         SamsungHeadset.Play();
     }
 }
Пример #3
0
        public void TestOutput_PlaySamsungHeadset()
        {
            FakeOutput     Output  = new FakeOutput();
            SamsungHeadset headset = new SamsungHeadset(Output);

            headset.Play(null);
            Assert.AreEqual(Output.OutputString, "SamsungHeadset sound");
        }
Пример #4
0
        public void TestSamsungHeadsetPlay()
        {
            SamsungHeadset samsungHeadset = new SamsungHeadset(samsungVolume, new TestOutput(this));

            samsungHeadset.Play();
            string expectations = samsungHeadset.ToString();

            Assert.AreEqual(expectations, Result);
        }
        public void PlayValidOutputText()
        {
            var output  = new FakeOutput();
            var plug    = new AudioPlug(200, 100, 3.5f);
            var headset = new SamsungHeadset(output, plug);
            var data    = new object();

            headset.Play(data);

            Assert.AreEqual("SamsungHeadset sound\n", output.OutputResult);
        }
        public void SamsungHeadset_IsPlay()
        {
            // Arrange / Act
            IOutput   output   = new OutputMock();
            IPlayback playback = new SamsungHeadset(output);

            playback.Play(output);

            //Assert
            Assert.IsTrue(output.Output.ToString().Contains("SamsungHeadset"));
        }
Пример #7
0
        public void SamsungHeadsetWithoutOutput()
        {
            //Arrange
            var headset = new SamsungHeadset(null);
            var expect  = "No Output!";

            //Act
            var actual = headset.Play(new object());

            //Assert
            Assert.AreEqual(expect, actual);
        }
Пример #8
0
        public void SamsungHeadsetIsPlaying()
        {
            //Arrange
            IOutput output  = new FakeOutput();
            var     headset = new SamsungHeadset(output);
            var     expect  = "Test Output is running";

            //Act
            var actual = headset.Play(new object());

            //Assert
            Assert.AreEqual(expect, actual);
        }
        public void Play_SamsungHeadsetSelected_GetSamsungHeadset()
        {
            // Arrange
            var output         = new FakeOutput();
            var samsungheadset = new SamsungHeadset(output);

            // Act
            samsungheadset.Play(samsungheadset);
            var result = output.GetText();

            // Assert
            Assert.AreEqual("SamsungHeadset", result);
        }
Пример #10
0
        public void CheckInputAndOutputSamsungHeadsetValue()
        {
            var            output         = new TestableOutput();
            SamsungHeadset samsungHeadset = new SamsungHeadset(output);

            string inputValue = "Madonna Song";

            samsungHeadset.Play(inputValue);

            string outputValue   = output.WritenLineText;
            string expectedValue = $"{nameof(SamsungHeadset)} play {inputValue}";

            Assert.AreEqual(expectedValue, outputValue);
        }
Пример #11
0
        public void PlayTest()
        {
            //-- Arrange
            var output      = new OutputControl();
            var soundDevice = new SamsungHeadset(output);
            var expected    = "SamsungHeadset sound\r\n";

            //-- Act;
            soundDevice.Play(new object());
            var actual = output.TextOutput;

            //-- Assert
            Assert.AreEqual(expected, actual);
        }
        public void TestSamsungHeadset()
        {
            //Arrange
            Init();
            SamsungHeadset samsung = new SamsungHeadset(_testoutput);

            //Act
            samsung.Play(null);

            //Assert
            string expected = "SamsungHeadset sound";

            Assert.AreEqual(_testoutput.CapturedOutput, expected);
        }
Пример #13
0
        public void SamsungHeadsetPlay()
        {
            // Arrange
            string           actualOutput   = "";
            OutputForTesting VariableOutput = new OutputForTesting(actualOutput);
            SamsungHeadset   SamsungHeadset = new SamsungHeadset(VariableOutput);

            string expectedOutput = $"{nameof(SamsungHeadset)} sound";

            // Act
            SamsungHeadset.Play(new Object());
            actualOutput = VariableOutput.OutputVariable;

            // Assert
            Assert.AreEqual(expectedOutput, actualOutput);
        }