From: Haesu Gwon Date: Wed, 9 May 2018 02:34:04 +0000 (+0900) Subject: [Recorder][Non-ACR] Add GetDeviceState exception handling code X-Git-Tag: public_m1_final~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be49cc4927876d2b5f8dc672c89b2aa11fad01c8;p=test%2Ftct%2Fcsharp%2Fapi.git [Recorder][Non-ACR] Add GetDeviceState exception handling code Change-Id: Ice95df2d4355a85138d9a392c4595667a45d65a8 Signed-off-by: Haesu Gwon --- diff --git a/tct-suite-vs/Tizen.Recorder.Tests/testcase/TSRecorder.cs b/tct-suite-vs/Tizen.Recorder.Tests/testcase/TSRecorder.cs old mode 100755 new mode 100644 index 1373638..25794de --- a/tct-suite-vs/Tizen.Recorder.Tests/testcase/TSRecorder.cs +++ b/tct-suite-vs/Tizen.Recorder.Tests/testcase/TSRecorder.cs @@ -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;