[Recorder][Non-ACR] Add GetDeviceState exception handling code 42/178242/1
authorHaesu Gwon <haesu.gwon@samsung.com>
Wed, 9 May 2018 02:34:04 +0000 (11:34 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Wed, 9 May 2018 02:34:04 +0000 (11:34 +0900)
Change-Id: Ice95df2d4355a85138d9a392c4595667a45d65a8
Signed-off-by: Haesu Gwon <haesu.gwon@samsung.com>
tct-suite-vs/Tizen.Recorder.Tests/testcase/TSRecorder.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 1373638..25794de
@@ -488,8 +488,15 @@ namespace Tizen.Multimedia.Tests
             RecorderDeviceState state = Recorder.GetDeviceState(RecorderType.Audio);
             Assert.AreEqual(state, RecorderDeviceState.Idle, "The device should be in idle state");
 
-            state = Recorder.GetDeviceState(RecorderType.Video);
-            Assert.AreEqual(state, RecorderDeviceState.Idle, "The device should be in idle state");
+            try
+            {
+                state = Recorder.GetDeviceState(RecorderType.Video);
+                Assert.AreEqual(state, RecorderDeviceState.Idle, "The device should be in idle state");
+            }
+            catch (NotSupportedException) when (FeatureChecker.IsSupported(Features.VideoRecorder) == false)
+            {
+                Log.Info("Tizen.Recorder.Tests", "Video recorder feature is not supported. We'll test with audio continuously.");
+            }
 
             AudioRecorder.Prepare();
             AudioRecorder.TimeLimit = 5;