[Test]
[Category("P1")]
+ [Description("Check whether Volume property is readable and writeable")]
+ [Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.Volume A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Volume_PROPERTY_READ_WRITE()
+ {
+ if (_isMicrophoneAvail == false)
+ return;
+
+ AssertHelper.PropertyReadWrite<AudioCaptureBase>(nameof(AudioCaptureBase.Volume));
+
+ using (var audioCapture = new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le))
+ {
+ Assert.IsInstanceOf<double>(audioCapture.Volume);
+
+ double volume = 1.1;
+ audioCapture.Volume = volume;
+ Assert.AreEqual(audioCapture.Volume, volume, "Should be same value.");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether Volume property is readable and writeable")]
+ [Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.Volume A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PDV")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Volume_CHECK_DEFAULT_VALUE()
+ {
+ if (_isMicrophoneAvail == false)
+ return;
+
+ using (var audioCapture = new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le))
+ {
+ Assert.AreEqual(audioCapture.Volume, 1.0, "Default value of Volume property should be 1.0.");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check Volume property's lower limit.")]
+ [Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.Volume A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PMIN")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Volume_CHECK_MIN_VALUE()
+ {
+ if (_isMicrophoneAvail == false)
+ return;
+
+ using (var audioCapture = new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le))
+ {
+ audioCapture.Volume = -1.0;
+ Assert.AreEqual(audioCapture.Volume, 0.0, "MIN value of Volume property should be 0.0.");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check Volume property's upper limit.")]
+ [Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.Volume A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PMAX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Volume_CHECK_MAX_VALUE()
+ {
+ if (_isMicrophoneAvail == false)
+ return;
+
+ using (var audioCapture = new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le))
+ {
+ audioCapture.Volume = 3.0;
+ Assert.AreEqual(audioCapture.Volume, 2.0, "MAX value of Volume property should be 2.0.");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether Volume property throw proper exception.")]
+ [Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.Volume A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Volume_CHECK_EXCEPTION()
+ {
+ if (_isMicrophoneAvail == false)
+ return;
+
+ var audioCapture = new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le);
+ audioCapture.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => audioCapture.Volume = 1.0,
+ "Volume property should throw ObjectDisposedException.");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Check whether ApplyStremPolicy can be invoked without exception")]
[Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]