From: Lee Sanghoon Date: Wed, 29 Aug 2018 07:38:51 +0000 (+0000) Subject: Revert "[Tizen.Camera.Test][Non-ACR] Add await Task.Delay & remove static keyword... X-Git-Tag: tct5.0_m2~96^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F90%2F187890%2F1;p=test%2Ftct%2Fcsharp%2Fapi.git Revert "[Tizen.Camera.Test][Non-ACR] Add await Task.Delay & remove static keyword on TCs" This reverts commit dc584b76d8507dc954efacf605668597b77d6f9b. Change-Id: I4158feb1aa05ae15b0f284970a1cf657f86bad1a --- diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCamera.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCamera.cs index 7a04ec8..d5a791a 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCamera.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCamera.cs @@ -28,7 +28,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "Vivek ellur, vivek.ellur@samsung.com")] - public void Camera_Rear_INIT() + public static void Camera_Rear_INIT() { Assert.IsInstanceOf(TestCamera, "Should return camera instance"); } @@ -40,7 +40,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "Vivek ellur, vivek.ellur@samsung.com")] - public void Camera_front_INIT() + public static void Camera_front_INIT() { // Some profiles don't support secondary camera. if (IsSupportedSecondaryCamera() == false) @@ -62,7 +62,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MAE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task GetDeviceState_ENUM_ALL() + public static async Task GetDeviceState_ENUM_ALL() { // Check NotOpened State for secondary camera. if (IsSupportedSecondaryCamera()) @@ -82,7 +82,7 @@ namespace Tizen.Multimedia.Tests TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + await eventWaiter.IsRaisedAsync(); // Check Working State. @@ -97,7 +97,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MEX")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void GetDeviceState_THROWS_IF_PARAM_IS_INVALID() + public static void GetDeviceState_THROWS_IF_PARAM_IS_INVALID() { Assert.Throws(() => Camera.GetDeviceState(_invalidDevideNumber)); } @@ -109,7 +109,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MCST")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ChangeDevice_ENUM_DEVICE_REAR() + public static void ChangeDevice_ENUM_DEVICE_REAR() { if (IsSupportedSecondaryCamera() == false) { @@ -130,7 +130,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MCST")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ChangeDevice_ENUM_DEVICE_FRONT() + public static void ChangeDevice_ENUM_DEVICE_FRONT() { if (IsSupportedSecondaryCamera() == false) { @@ -150,7 +150,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MEX")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void ChangeDevice_THROWS_IF_PARAM_IS_INVALID() + public static void ChangeDevice_THROWS_IF_PARAM_IS_INVALID() { Assert.Throws(() => TestCamera.ChangeDevice(_invalidDevideNumber)); } @@ -162,14 +162,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MCST")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task StopPreview_CHECK_STATE() + public static async Task StopPreview_CHECK_STATE() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + await eventWaiter.IsRaisedAsync(); } @@ -185,7 +185,7 @@ namespace Tizen.Multimedia.Tests [Property("CRITERIA", "MCST")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] [Property("COVPARAM", "int, int, CancellationToken")] - public async Task StartCapture_CHANGE_STATUS() + public static async Task StartCapture_CHANGE_STATUS() { TestCamera.StartPreview(); @@ -234,10 +234,10 @@ namespace Tizen.Multimedia.Tests [Property("CRITERIA", "MEX")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] [Property("COVPARAM", "int, int, CancellationToken")] - public async Task StartCapture_INVALID_OP_EXCEPTION() + public static async Task StartCapture_INVALID_OP_EXCEPTION() { TestCamera.StartPreview(); - await Task.Delay(500); + using (var tokenSource = new CancellationTokenSource()) { try @@ -286,10 +286,10 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task StopFaceDetection_NO_EXCEPTION() + public static void StopFaceDetection_NO_EXCEPTION() { TestCamera.StartPreview(); - await Task.Delay(500); + try { TestCamera.StartFaceDetection(); @@ -320,7 +320,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task StopFocusing_NO_EXCEPTION() + public static void StopFocusing_NO_EXCEPTION() { bool isAfModeSupported = false; IList afModes = TestCamera.Capabilities.SupportedAutoFocusModes.ToList(); @@ -335,7 +335,7 @@ namespace Tizen.Multimedia.Tests } TestCamera.StartPreview(); - await Task.Delay(500); + try { TestCamera.StartFocusing(true); @@ -366,12 +366,11 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task State_GET_ENUM_ALL() + public static async Task State_GET_ENUM_ALL() { Assert.That(TestCamera.State, Is.EqualTo(CameraState.Created)); TestCamera.StartPreview(); - await Task.Delay(500); Assert.That(TestCamera.State, Is.EqualTo(CameraState.Preview)); using (var eventWaiter = EventAwaiter.Create()) @@ -379,7 +378,7 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += eventWaiter; TestCamera.StartCapture(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); } } @@ -391,14 +390,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task DisplayReuseHint_PROPERTY_READ_WRITE() + public static async Task DisplayReuseHint_PROPERTY_READ_WRITE() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + await eventWaiter.IsRaisedAsync(); } @@ -414,7 +413,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void Display_PROPERTY_READ_ONLY() + public static void Display_PROPERTY_READ_ONLY() { /* TESTCODE * Test Surface Display Type. @@ -441,7 +440,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Settings_PROPERTY_READ_ONLY() + public static void Settings_PROPERTY_READ_ONLY() { var result = TestCamera.Settings; Assert.IsNotNull(result, "setting should not be null"); @@ -455,7 +454,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Capabilities_PROPERTY_READ_ONLY() + public static void Capabilities_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities; Assert.IsNotNull(result, "feature should not be null"); @@ -469,7 +468,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void DisplaySettings_PROPERTY_READ_ONLY() + public static void DisplaySettings_PROPERTY_READ_ONLY() { var result = TestCamera.DisplaySettings; Assert.IsNotNull(result, "DisplaySettings should not be null"); @@ -483,7 +482,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Direction_PROPERTY_READ_ONLY() + public static void Direction_PROPERTY_READ_ONLY() { CameraFacingDirection direction = TestCamera.Direction; Assert.IsNotNull(direction, "Camera direction should not be null."); @@ -497,7 +496,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void GetFlashState_NO_EXCEPTION() + public static void GetFlashState_NO_EXCEPTION() { try { @@ -518,7 +517,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void CameraCount_PROPERTY_READ_ONLY() + public static void CameraCount_PROPERTY_READ_ONLY() { var result = TestCamera.CameraCount; Assert.IsInstanceOf(result, "The value should be of type int."); @@ -532,7 +531,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task HdrCaptureProgress_CHECK_EVENT() + public static async Task HdrCaptureProgress_CHECK_EVENT() { if (TestCamera.Capabilities.IsHdrCaptureSupported == false) { @@ -548,9 +547,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Percent, Is.GreaterThan(0), "HDR progress should be bigger than 0."); @@ -565,7 +563,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Capturing_CHECK_EVENT() + public static async Task Capturing_CHECK_EVENT() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -577,9 +575,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); await completeWaiter.IsRaisedAsync(); @@ -593,7 +590,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task CaptureCompleted_CHECK_EVENT() + public static async Task CaptureCompleted_CHECK_EVENT() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -605,9 +602,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); await completeWaiter.IsRaisedAsync(); @@ -621,14 +617,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task StateChanged_CHECK_EVENT() + public static async Task StateChanged_CHECK_EVENT() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.StateChanged += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); } } @@ -640,14 +636,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task DeviceStateChanged_CHECK_EVENT() + public static async Task DeviceStateChanged_CHECK_EVENT() { using (var eventWaiter = EventAwaiter.Create()) { Camera.DeviceStateChanged += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); } } @@ -659,7 +655,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void Interrupted_CHECK_EVENT() + public static void Interrupted_CHECK_EVENT() { using (var eventWaiter = EventAwaiter.Create()) { @@ -681,7 +677,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void InterruptStarted_CHECK_EVENT() + public static void InterruptStarted_CHECK_EVENT() { using (var eventWaiter = EventAwaiter.Create()) { @@ -703,7 +699,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void ErrorOccurred_CHECK_EVENT() + public static void ErrorOccurred_CHECK_EVENT() { using (var eventWaiter = EventAwaiter.Create()) { @@ -725,14 +721,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Preview_CHECK_EVENT() + public static async Task Preview_CHECK_EVENT() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); } } @@ -744,7 +740,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task MediaPacketPreview_CHECK_EVENT() + public static async Task MediaPacketPreview_CHECK_EVENT() { if (TestCamera.Capabilities.IsMediaPacketPreviewCallbackSupported == false) { @@ -756,7 +752,7 @@ namespace Tizen.Multimedia.Tests TestCamera.MediaPacketPreview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsNotNull(eventArgs.Packet); @@ -770,7 +766,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void Handle_PROPERTY_READ_ONLY() + public static void Handle_PROPERTY_READ_ONLY() { Assert.IsNotNull(TestCamera.Handle, "Failed to get Camera Handle."); } @@ -782,7 +778,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MEX")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void Dispose_CHECK_STATE() + public static void Dispose_CHECK_STATE() { TestCamera.Dispose(); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraCapabilities.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraCapabilities.cs index d7b6679..dbb1d47 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraCapabilities.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraCapabilities.cs @@ -23,7 +23,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsContinuousCaptureSupported_PROPERTY_READ_ONLY() + public static void IsContinuousCaptureSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsContinuousCaptureSupported; Assert.IsNotNull(result, "The IsContinuousCaptureSupported value should not be null."); @@ -37,7 +37,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void IsExposureSupported_PROPERTY_READ_ONLY() + public static void IsExposureSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsExposureSupported; Assert.IsNotNull(result, "The IsExposureSupported value should not be null."); @@ -51,7 +51,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsFaceDetectionSupported_PROPERTY_READ_ONLY() + public static void IsFaceDetectionSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsFaceDetectionSupported; Assert.IsNotNull(result, "The IsFaceDetectionSupported value should not be null."); @@ -65,7 +65,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsZeroShutterLagSupported_PROPERTY_READ_ONLY() + public static void IsZeroShutterLagSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsZeroShutterLagSupported; Assert.IsNotNull(result, "The IsZeroShutterLagSupported value should not be null."); @@ -79,7 +79,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsZoomSupported_PROPERTY_READ_ONLY() + public static void IsZoomSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsZoomSupported; Assert.IsNotNull(result, "The IsZoomSupported value should not be null."); @@ -93,7 +93,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsMediaPacketPreviewCallbackSupported_PROPERTY_READ_ONLY() + public static void IsMediaPacketPreviewCallbackSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsMediaPacketPreviewCallbackSupported; Assert.IsNotNull(result, "The IsMediaPacketPreviewCallbackSupported value should not be null."); @@ -107,7 +107,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void IsPanSupported_PROPERTY_READ_ONLY() + public static void IsPanSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsPanSupported; Assert.IsNotNull(result, "The IsPanSupported value should not be null."); @@ -121,7 +121,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void IsTiltSupported_PROPERTY_READ_ONLY() + public static void IsTiltSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsTiltSupported; Assert.IsNotNull(result, "The IsTiltSupported value should not be null."); @@ -135,7 +135,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsHdrCaptureSupported_PROPERTY_READ_ONLY() + public static void IsHdrCaptureSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsHdrCaptureSupported; Assert.IsNotNull(result, "The IsHdrCaptureSupported value should not be null."); @@ -149,7 +149,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsAntiShakeSupported_PROPERTY_READ_ONLY() + public static void IsAntiShakeSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsAntiShakeSupported; Assert.IsNotNull(result, "The IsAntiShakeSupported value should not be null."); @@ -163,7 +163,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsVideoStabilizationSupported_PROPERTY_READ_ONLY() + public static void IsVideoStabilizationSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsVideoStabilizationSupported; Assert.IsNotNull(result, "The IsVideoStabilizationSupported value should not be null."); @@ -177,7 +177,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsAutoContrastSupported_PROPERTY_READ_ONLY() + public static void IsAutoContrastSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsAutoContrastSupported; Assert.IsNotNull(result, "The IsAutoContrastSupported value should not be null."); @@ -191,7 +191,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void IsBrigtnessSupported_PROPERTY_READ_ONLY() + public static void IsBrigtnessSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsBrigtnessSupported; Assert.IsNotNull(result, "The IsBrigtnessSupported value should not be null."); @@ -205,7 +205,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void IsHueSupported_PROPERTY_READ_ONLY() + public static void IsHueSupported_PROPERTY_READ_ONLY() { var result = TestCamera.Capabilities.IsHueSupported; Assert.IsNotNull(result, "The IsHueSupported value should not be null."); @@ -219,7 +219,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedPreviewResolutions_PROPERTY_READ_ONLY() + public static void SupportedPreviewResolutions_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedPreviewResolutions.ToList(); Assert.IsNotNull(result, "The preview resolutions should not be null."); @@ -234,7 +234,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedCaptureResolutions_PROPERTY_READ_ONLY() + public static void SupportedCaptureResolutions_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedCaptureResolutions.ToList(); Assert.IsNotNull(result, "The capture resolutions should not be null."); @@ -249,7 +249,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedCapturePixelFormats_PROPERTY_READ_ONLY() + public static void SupportedCapturePixelFormats_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedCapturePixelFormats.ToList(); Assert.IsNotNull(result, "The CaptureFormats should not be null."); @@ -264,7 +264,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedPreviewPixelFormats_PROPERTY_READ_ONLY() + public static void SupportedPreviewPixelFormats_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedPreviewPixelFormats.ToList(); Assert.IsNotNull(result, "The PreviewFormats should not be null."); @@ -279,7 +279,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedPreviewFps_PROPERTY_READ_ONLY() + public static void SupportedPreviewFps_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedPreviewFps.ToList(); Assert.IsNotNull(result, "The Fps should not be null."); @@ -295,7 +295,7 @@ namespace Tizen.Multimedia.Tests [Property("CRITERIA", "MR")] [Property("COVPARAM", "int, int")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void GetSupportedPreviewFpsByResolution_INT_RETURN_TYPE() + public static void GetSupportedPreviewFpsByResolution_INT_RETURN_TYPE() { IList result = TestCamera.Capabilities.SupportedPreviewResolutions.ToList(); Assert.IsNotNull(result, "The FpsByResolution should not be null."); @@ -311,7 +311,7 @@ namespace Tizen.Multimedia.Tests [Property("CRITERIA", "MR")] [Property("COVPARAM", "Size")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void GetSupportedPreviewFpsByResolution_SIZE_RETURN_TYPE() + public static void GetSupportedPreviewFpsByResolution_SIZE_RETURN_TYPE() { Size res = TestCamera.Settings.RecommendedPreviewResolution; IList result = TestCamera.Capabilities.GetSupportedPreviewFpsByResolution(res).ToList(); @@ -328,7 +328,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedAutoFocusModes_PROPERTY_READ_ONLY() + public static void SupportedAutoFocusModes_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedAutoFocusModes.ToList(); Assert.IsNotNull(result, "The AfMode should not be null."); @@ -343,7 +343,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedExposureModes_PROPERTY_READ_ONLY() + public static void SupportedExposureModes_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedExposureModes.ToList(); Assert.IsNotNull(result, "The ExposureMode should not be null."); @@ -358,7 +358,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedIsoLevels_PROPERTY_READ_ONLY() + public static void SupportedIsoLevels_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedIsoLevels.ToList(); Assert.IsNotNull(result, "The IsoLevel should not be null."); @@ -373,7 +373,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedTheaterModes_PROPERTY_READ_ONLY() + public static void SupportedTheaterModes_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedTheaterModes.ToList(); Assert.IsNotNull(result, "The TheaterMode should not be null."); @@ -388,7 +388,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedWhiteBalances_PROPERTY_READ_ONLY() + public static void SupportedWhiteBalances_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedWhiteBalances.ToList(); Assert.IsNotNull(result, "The Whitebalance should not be null."); @@ -403,7 +403,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedFlashModes_PROPERTY_READ_ONLY() + public static void SupportedFlashModes_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedFlashModes.ToList(); Assert.IsNotNull(result, "The FlashMode should not be null."); @@ -418,7 +418,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedSceneModes_PROPERTY_READ_ONLY() + public static void SupportedSceneModes_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedSceneModes.ToList(); Assert.IsNotNull(result, "The SceneMode should not be null."); @@ -433,7 +433,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedEffects_PROPERTY_READ_ONLY() + public static void SupportedEffects_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedEffects.ToList(); Assert.IsNotNull(result, "The Effect should not be null."); @@ -448,7 +448,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedStreamRotations_PROPERTY_READ_ONLY() + public static void SupportedStreamRotations_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedStreamRotations.ToList(); Assert.IsNotNull(result, "The StreamRotation should not be null."); @@ -463,7 +463,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedStreamFlips_PROPERTY_READ_ONLY() + public static void SupportedStreamFlips_PROPERTY_READ_ONLY() { IList result = TestCamera.Capabilities.SupportedStreamFlips.ToList(); Assert.IsNotNull(result, "The StreamFlip should not be null."); @@ -478,7 +478,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SupportedPtzTypes_PROPERTY_READ_ONLY() + public static void SupportedPtzTypes_PROPERTY_READ_ONLY() { if (TestCamera.Capabilities.IsPanSupported == false) { diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraCapturingEventArgs.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraCapturingEventArgs.cs index f338308..efe25a1 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraCapturingEventArgs.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraCapturingEventArgs.cs @@ -16,7 +16,7 @@ namespace Tizen.Multimedia.Tests public class CameraCapturingEventArgsTests : TestBase { [SetUp] - public void SetUp() + public static void SetUp() { TestCamera.Settings.ImageQuality = 100; TestCamera.Settings.CapturePixelFormat = CameraPixelFormat.Jpeg; @@ -30,7 +30,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task MainImage_PROPERTY_READ_ONLY() + public static async Task MainImage_PROPERTY_READ_ONLY() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -39,9 +39,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.MainImage.Data.Length, Is.GreaterThan(0)); @@ -56,7 +55,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task PostView_PROPERTY_READ_ONLY() + public static async Task PostView_PROPERTY_READ_ONLY() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -65,9 +64,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); await completeWaiter.IsRaisedAsync(); @@ -81,7 +79,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Thumbnail_PROPERTY_READ_ONLY() + public static async Task Thumbnail_PROPERTY_READ_ONLY() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -90,9 +88,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); await completeWaiter.IsRaisedAsync(); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraDeviceStateChangedEventArgs.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraDeviceStateChangedEventArgs.cs index 49bb5a1..037f4ec 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraDeviceStateChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraDeviceStateChangedEventArgs.cs @@ -15,7 +15,7 @@ namespace Tizen.Multimedia.Tests [Description("Tests Tizen.Multimedia.CameraDeviceStateChangedEventArgs class")] public class CameraDeviceStateChangedEventArgsTests : TestBase { - public void DeviceStateChangedCallback(object sender, CameraDeviceStateChangedEventArgs e) { } + public static void DeviceStateChangedCallback(object sender, CameraDeviceStateChangedEventArgs e) { } [Test] [Category("P1")] @@ -24,7 +24,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Device_READ_ONLY() + public static async Task Device_READ_ONLY() { Camera.DeviceStateChanged += DeviceStateChangedCallback; @@ -34,7 +34,7 @@ namespace Tizen.Multimedia.Tests Camera.DeviceStateChanged -= DeviceStateChangedCallback; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Device, Is.EqualTo(CameraDevice.Rear)); } @@ -47,14 +47,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task State_READ_ONLY() + public static async Task State_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { Camera.DeviceStateChanged += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + Assert.That(await eventWaiter.IsRaisedAsync()); } } diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraDisplaySettings.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraDisplaySettings.cs index 14c2940..6d0f2f4 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraDisplaySettings.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraDisplaySettings.cs @@ -22,7 +22,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Rotation_PROPERTY_ENUM_ALL() + public static void Rotation_PROPERTY_ENUM_ALL() { foreach (Rotation rotation in Enum.GetValues(typeof(Rotation))) { @@ -39,7 +39,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Flip_PROPERTY_ENUM_ALL() + public static void Flip_PROPERTY_ENUM_ALL() { foreach (Flips flip in Enum.GetValues(typeof(Flips))) { @@ -56,7 +56,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Mode_PROPERTY_ENUM_ALL() + public static void Mode_PROPERTY_ENUM_ALL() { foreach (CameraDisplayMode mode in Enum.GetValues(typeof(CameraDisplayMode))) { @@ -72,7 +72,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Visible_PROPERTY_READ_WRITE() + public static void Visible_PROPERTY_READ_WRITE() { TestCamera.DisplaySettings.Visible = true; Assert.IsTrue(TestCamera.DisplaySettings.Visible, "display visible is not same as set value."); @@ -85,7 +85,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void RoiArea_PROPERTY_READ_WRITE() + public static void RoiArea_PROPERTY_READ_WRITE() { TestCamera.DisplaySettings.Mode = CameraDisplayMode.CustomROI; Rectangle area = new Rectangle(100, 100, 360, 480); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraSettings.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraSettings.cs index 8279bec..c403b9d 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraSettings.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraSettings.cs @@ -25,7 +25,7 @@ namespace Tizen.Multimedia.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] [Property("COVPARAM", "int, int")] - public void SetAutoFocusArea_INT_NO_EXCEPTION() + public static void SetAutoFocusArea_INT_NO_EXCEPTION() { bool isAutoFocusModeSupported = false; IList afModes = TestCamera.Capabilities.SupportedAutoFocusModes.ToList(); @@ -65,7 +65,7 @@ namespace Tizen.Multimedia.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] [Property("COVPARAM", "Point")] - public void SetAutoFocusArea_POINT_NO_EXCEPTION() + public static void SetAutoFocusArea_POINT_NO_EXCEPTION() { bool isAutoFocusModeSupported = false; IList afModes = TestCamera.Capabilities.SupportedAutoFocusModes.ToList(); @@ -105,7 +105,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ClearFocusArea_NO_EXCEPTION() + public static void ClearFocusArea_NO_EXCEPTION() { bool isAutoFocusModeSupported = false; IList afModes = TestCamera.Capabilities.SupportedAutoFocusModes.ToList(); @@ -153,7 +153,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MAE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SetPan_ENUM_ALL() + public static void SetPan_ENUM_ALL() { try { @@ -185,7 +185,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void GetPan_RETURN_TYPE() + public static void GetPan_RETURN_TYPE() { try { @@ -210,7 +210,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MAE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SetTilt_ENUM_ALL() + public static void SetTilt_ENUM_ALL() { try { @@ -236,7 +236,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void GetTilt_RETURN_TYPE() + public static void GetTilt_RETURN_TYPE() { try { @@ -261,7 +261,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void RemoveGeoTag_NO_EXCEPTION() + public static void RemoveGeoTag_NO_EXCEPTION() { Location loc = new Location(1, 1, 1); TestCamera.Settings.GeoTag = loc; @@ -284,7 +284,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void DisableShutterSound_NO_EXCEPTION() + public static void DisableShutterSound_NO_EXCEPTION() { try { @@ -303,7 +303,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void PreviewFps_PROPERTY_READ_WRITE() + public static void PreviewFps_PROPERTY_READ_WRITE() { IList supportedFps = TestCamera.Capabilities.SupportedPreviewFps.ToList(); foreach (CameraFps fps in supportedFps) @@ -321,7 +321,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ImageQuality_PROPERTY_READ_WRITE() + public static void ImageQuality_PROPERTY_READ_WRITE() { int quality = 98; @@ -338,7 +338,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PBM")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ImageQuality_PROPERTY_BELOW_MIN() + public static void ImageQuality_PROPERTY_BELOW_MIN() { try { @@ -357,7 +357,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PAM")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ImageQuality_PROPERTY_ABOVE_MAX() + public static void ImageQuality_PROPERTY_ABOVE_MAX() { try { @@ -376,7 +376,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void EncodedPreviewBitrate_PROPERTY_READ_WRITE() + public static void EncodedPreviewBitrate_PROPERTY_READ_WRITE() { int val = 16; bool encodedPreviewSupport = false; @@ -409,7 +409,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void EncodedPreviewGopInterval_PROPERTY_READ_WRITE() + public static void EncodedPreviewGopInterval_PROPERTY_READ_WRITE() { int gop = 4; bool encodedPreviewSupport = false; @@ -442,7 +442,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ZoomLevel_PROPERTY_READ_WRITE() + public static void ZoomLevel_PROPERTY_READ_WRITE() { int level = 0; try @@ -468,7 +468,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ZoomRange_PROPERTY_READ_ONLY() + public static void ZoomRange_PROPERTY_READ_ONLY() { try { @@ -489,7 +489,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ExposureRange_PROPERTY_READ_ONLY() + public static void ExposureRange_PROPERTY_READ_ONLY() { try { @@ -510,7 +510,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void BrightnessRange_PROPERTY_READ_ONLY() + public static void BrightnessRange_PROPERTY_READ_ONLY() { try { @@ -531,7 +531,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ContrastRange_PROPERTY_READ_ONLY() + public static void ContrastRange_PROPERTY_READ_ONLY() { try { @@ -552,7 +552,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void HueRange_PROPERTY_READ_ONLY() + public static void HueRange_PROPERTY_READ_ONLY() { var result = TestCamera.Settings.HueRange; @@ -574,7 +574,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void PanRange_PROPERTY_READ_ONLY() + public static void PanRange_PROPERTY_READ_ONLY() { try { @@ -595,7 +595,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void TiltRange_PROPERTY_READ_ONLY() + public static void TiltRange_PROPERTY_READ_ONLY() { try { @@ -616,7 +616,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void AutoFocusMode_PROPERTY_READ_WRITE() + public static void AutoFocusMode_PROPERTY_READ_WRITE() { IList supportedModes = TestCamera.Capabilities.SupportedAutoFocusModes.ToList(); foreach (CameraAutoFocusMode mode in supportedModes) @@ -634,7 +634,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ExposureMode_PROPERTY_READ_WRITE() + public static void ExposureMode_PROPERTY_READ_WRITE() { IList supportedModes = TestCamera.Capabilities.SupportedExposureModes.ToList(); foreach (CameraExposureMode mode in supportedModes) @@ -652,7 +652,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Exposure_PROPERTY_READ_WRITE() + public static void Exposure_PROPERTY_READ_WRITE() { try { @@ -675,7 +675,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void IsoLevel_PROPERTY_READ_WRITE() + public static void IsoLevel_PROPERTY_READ_WRITE() { IList supportedIso = TestCamera.Capabilities.SupportedIsoLevels.ToList(); foreach (CameraIsoLevel iso in supportedIso) @@ -693,7 +693,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void TheaterMode_PROPERTY_READ_WRITE() + public static void TheaterMode_PROPERTY_READ_WRITE() { IList supportedModes = TestCamera.Capabilities.SupportedTheaterModes.ToList(); foreach (CameraTheaterMode mode in supportedModes) @@ -711,7 +711,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Brightness_PROPERTY_READ_WRITE() + public static void Brightness_PROPERTY_READ_WRITE() { try { @@ -734,7 +734,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Contrast_PROPERTY_READ_WRITE() + public static void Contrast_PROPERTY_READ_WRITE() { try { @@ -757,7 +757,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void Hue_PROPERTY_READ_WRITE() + public static void Hue_PROPERTY_READ_WRITE() { if (TestCamera.Capabilities.IsHueSupported) { @@ -780,7 +780,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void WhiteBalance_PROPERTY_GET_ENUM_CAMERAWHITEBALANCE_NONE() + public static void WhiteBalance_PROPERTY_GET_ENUM_CAMERAWHITEBALANCE_NONE() { IList supportedWhitebalance = TestCamera.Capabilities.SupportedWhiteBalances.ToList(); foreach (CameraWhiteBalance val in supportedWhitebalance) @@ -798,7 +798,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Effect_PROPERTY_READ_WRITE() + public static void Effect_PROPERTY_READ_WRITE() { IList effectModes = TestCamera.Capabilities.SupportedEffects.ToList(); foreach (CameraEffectMode mode in effectModes) @@ -816,7 +816,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SceneMode__PROPERTY_READ_WRITE() + public static void SceneMode__PROPERTY_READ_WRITE() { IList supportedModes = TestCamera.Capabilities.SupportedSceneModes.ToList(); foreach (CameraSceneMode mode in supportedModes) @@ -834,7 +834,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void EnableTag_PROPERTY_READ_WRITE() + public static void EnableTag_PROPERTY_READ_WRITE() { // Enable tag. TestCamera.Settings.EnableTag = true; @@ -852,7 +852,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void ImageDescriptionTag_PROPERTY_READ_WRITE() + public static void ImageDescriptionTag_PROPERTY_READ_WRITE() { string des = "Photo"; TestCamera.Settings.ImageDescriptionTag = des; @@ -867,7 +867,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void SoftwareTag_PROPERTY_READ_WRITE() + public static void SoftwareTag_PROPERTY_READ_WRITE() { string des = "Photo"; TestCamera.Settings.SoftwareTag = des; @@ -882,7 +882,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void GeoTag_PROPERTY_READ_WRITE() + public static void GeoTag_PROPERTY_READ_WRITE() { double latitude = 1.0; double longitude = 1.0; @@ -904,7 +904,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void OrientationTag_PROPERTY_READ_WRITE() + public static void OrientationTag_PROPERTY_READ_WRITE() { TestCamera.Settings.OrientationTag = CameraTagOrientation.TopLeft; Assert.IsNotNull(TestCamera.Settings.OrientationTag, "Tag orientation should not be null."); @@ -918,7 +918,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void FlashMode_PROPERTY_READ_WRITE() + public static void FlashMode_PROPERTY_READ_WRITE() { IList supportedModes = TestCamera.Capabilities.SupportedFlashModes.ToList(); foreach (CameraFlashMode mode in supportedModes) @@ -943,7 +943,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void LensOrientation_PROPERTY_READ_ONLY() + public static void LensOrientation_PROPERTY_READ_ONLY() { var result = TestCamera.Settings.LensOrientation; Assert.IsNotNull(result, "Orientation should not be null."); @@ -957,7 +957,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void StreamRotation_PROPERTY_READ_WRITE() + public static void StreamRotation_PROPERTY_READ_WRITE() { foreach (var rotation in TestCamera.Capabilities.SupportedStreamRotations) { @@ -974,7 +974,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void StreamFlip__PROPERTY_READ_WRITE() + public static void StreamFlip__PROPERTY_READ_WRITE() { foreach (var flip in TestCamera.Capabilities.SupportedStreamFlips) { @@ -991,7 +991,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void HdrMode__PROPERTY_READ_WRITE() + public static void HdrMode__PROPERTY_READ_WRITE() { if (TestCamera.Capabilities.IsHdrCaptureSupported) { @@ -1012,7 +1012,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void AntiShake_PROPERTY_READ_WRITE() + public static void AntiShake_PROPERTY_READ_WRITE() { if (TestCamera.Capabilities.IsAntiShakeSupported) { @@ -1041,7 +1041,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void VideoStabilization_PROPERTY_READ_WRITE() + public static void VideoStabilization_PROPERTY_READ_WRITE() { if (TestCamera.Capabilities.IsVideoStabilizationSupported) { @@ -1070,7 +1070,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void AutoContrast_PROPERTY_READ_WRITE() + public static void AutoContrast_PROPERTY_READ_WRITE() { if (TestCamera.Capabilities.IsAutoContrastSupported) { @@ -1099,7 +1099,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void PtzType_PROPERTY_SET_ENUM_ALL() + public static void PtzType_PROPERTY_SET_ENUM_ALL() { try { @@ -1127,7 +1127,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void CapturePixelFormat_PROPERTY_READ_WRITE() + public static void CapturePixelFormat_PROPERTY_READ_WRITE() { CameraPixelFormat test; IList supportedFormats = TestCamera.Capabilities.SupportedCapturePixelFormats.ToList(); @@ -1147,7 +1147,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void PreviewPixelFormat_PROPERTY_READ_WRITE() + public static void PreviewPixelFormat_PROPERTY_READ_WRITE() { CameraPixelFormat test; IList supportedFormats = TestCamera.Capabilities.SupportedPreviewPixelFormats.ToList(); @@ -1167,7 +1167,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void PreviewResolution_PROPERTY_READ_WRITE() + public static void PreviewResolution_PROPERTY_READ_WRITE() { Size res = new Size(640, 480); TestCamera.Settings.PreviewResolution = res; @@ -1185,7 +1185,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PBM")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public void PreviewResolution_THROWS_EXCEPTION_IF_PARAM_IS_INVALID() + public static void PreviewResolution_THROWS_EXCEPTION_IF_PARAM_IS_INVALID() { // Param is out of range. Assert.Throws(() => TestCamera.Settings.PreviewResolution = new Size(-1, -1)); @@ -1201,7 +1201,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void RecommendedPreviewResolution_PROPERTY_READ_ONLY() + public static void RecommendedPreviewResolution_PROPERTY_READ_ONLY() { var result = TestCamera.Settings.RecommendedPreviewResolution; Assert.IsNotNull(result, "Recommended preview resolution should not be null"); @@ -1215,7 +1215,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void CaptureResolution_PROPERTY_READ_WRITE() + public static void CaptureResolution_PROPERTY_READ_WRITE() { Size res = new Size(640, 480); TestCamera.Settings.CaptureResolution = res; diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraStateChangedEventArgs.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraStateChangedEventArgs.cs index 3523357..7a2a73f 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraStateChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSCameraStateChangedEventArgs.cs @@ -22,14 +22,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Previous_PROPERTY_SET_ENUM_CAMERASTATE_CREATED() + public static async Task Previous_PROPERTY_SET_ENUM_CAMERASTATE_CREATED() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.StateChanged += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Previous, Is.EqualTo(CameraState.Created)); } @@ -42,14 +42,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Current_PROPERTY_SET_ENUM_CAMERASTATE_PREVIEW() + public static async Task Current_PROPERTY_SET_ENUM_CAMERASTATE_PREVIEW() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.StateChanged += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Current, Is.EqualTo(CameraState.Preview)); } @@ -62,14 +62,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task ByPolicy_PROPERTY_READ_ONLY() + public static async Task ByPolicy_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.StateChanged += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.ByPolicy, Is.False); } diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSDoublePlane.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSDoublePlane.cs index ceffdfa..9011d05 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSDoublePlane.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSDoublePlane.cs @@ -16,10 +16,10 @@ namespace Tizen.Multimedia.Tests [Description("Tests Tizen.Multimedia.DoublePlane class")] public class DoublePlaneTests : TestBase { - public bool _isSupportDoublePlane; + public static bool _isSupportDoublePlane; [SetUp] - public void SetUp() + public static void SetUp() { _isSupportDoublePlane = TestCamera.Capabilities.SupportedPreviewPixelFormats .Contains(CameraPixelFormat.Nv12); @@ -38,14 +38,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Y_PROPERTY_READ_ONLY() + public static async Task Y_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsInstanceOf(eventArgs.Preview.Plane); Assert.That((eventArgs.Preview.Plane as DoublePlane).Y.Length, Is.GreaterThan(0)); @@ -59,14 +59,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task UV_PROPERTY_READ_ONLY() + public static async Task UV_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsInstanceOf(eventArgs.Preview.Plane); Assert.That((eventArgs.Preview.Plane as DoublePlane).UV.Length, Is.GreaterThan(0)); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSEncodedPlane.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSEncodedPlane.cs index e5d592f..358a7ec 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSEncodedPlane.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSEncodedPlane.cs @@ -16,10 +16,10 @@ namespace Tizen.Multimedia.Tests [Description("Tests Tizen.Multimedia.EncodedPlane class")] public class EncodedPlaneTests : TestBase { - public bool _isSupportEncodedPlane; + public static bool _isSupportEncodedPlane; [SetUp] - public void SetUp() + public static void SetUp() { _isSupportEncodedPlane = TestCamera.Capabilities.SupportedPreviewPixelFormats .Contains(CameraPixelFormat.H264); @@ -38,14 +38,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Data_PROPERTY_READ_ONLY() + public static async Task Data_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsInstanceOf(eventArgs.Preview.Plane); Assert.That((eventArgs.Preview.Plane as EncodedPlane).Data.Length, Is.GreaterThan(0)); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSHdrCaptureProgressEventArgs.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSHdrCaptureProgressEventArgs.cs index eb9528b..b03ea69 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSHdrCaptureProgressEventArgs.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSHdrCaptureProgressEventArgs.cs @@ -16,7 +16,7 @@ namespace Tizen.Multimedia.Tests public class HdrCaptureProgressEventArgsTests : TestBase { [SetUp] - public void SetUp() + public static void SetUp() { if (TestCamera.Capabilities.IsHdrCaptureSupported == false) { @@ -31,7 +31,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Percent_PROPERTY_READ_ONLY() + public static async Task Percent_PROPERTY_READ_ONLY() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -40,9 +40,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Percent, Is.GreaterThan(0)); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSLocation.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSLocation.cs index 7c5d60e..a8bb2f5 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSLocation.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSLocation.cs @@ -15,13 +15,13 @@ namespace Tizen.Multimedia.Tests [Description("Tests Tizen.Multimedia.Location class")] public class LocationTests : TestBase { - private Location _location = null; + private static Location _location = null; private const double _latitude = 100.50; private const double _longitude = 100.50; private const double _altitude = 100.50; [SetUp] - public void SetUp() + public static void SetUp() { try { @@ -40,7 +40,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Location_INIT() + public static void Location_INIT() { var obj = new Location(_latitude, _longitude, _altitude); Assert.IsNotNull(obj, "Object should not be null after construction"); @@ -54,7 +54,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Latitude_PROPERTY_READ_ONLY() + public static void Latitude_PROPERTY_READ_ONLY() { Assert.IsNotNull(_location.Latitude, "The latitude value should not be null."); Assert.AreEqual(_latitude, _location.Latitude, "The latitude is not same as set value."); @@ -67,7 +67,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Longitude_PROPERTY_READ_ONLY() + public static void Longitude_PROPERTY_READ_ONLY() { Assert.IsNotNull(_location.Longitude, "The longitude value should not be null."); Assert.AreEqual(_longitude, _location.Longitude, "The longitude is not same as set value."); @@ -80,7 +80,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public void Altitude_PROPERTY_READ_ONLY() + public static void Altitude_PROPERTY_READ_ONLY() { Assert.IsNotNull(_location.Altitude, "The altitude value should not be null."); Assert.AreEqual(_altitude, _location.Altitude, "The altitude is not same as set value."); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSMediaPacketPreviewEventArgs.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSMediaPacketPreviewEventArgs.cs index 6c2debd..d8bf0bf 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSMediaPacketPreviewEventArgs.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSMediaPacketPreviewEventArgs.cs @@ -22,7 +22,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Packet_PROPERTY_READ_ONLY() + public static async Task Packet_PROPERTY_READ_ONLY() { if (TestCamera.Capabilities.IsMediaPacketPreviewCallbackSupported == false) { @@ -34,7 +34,7 @@ namespace Tizen.Multimedia.Tests TestCamera.MediaPacketPreview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsNotNull(eventArgs.Packet); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSPreviewEventArgs.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSPreviewEventArgs.cs index e227c1c..210aace 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSPreviewEventArgs.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSPreviewEventArgs.cs @@ -22,14 +22,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Preview_PROPERTY_READ_ONLY() + public static async Task Preview_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsNotNull(eventArgs.Preview); } diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSPreviewFrame.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSPreviewFrame.cs index 5e271bd..ff6f7e9 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSPreviewFrame.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSPreviewFrame.cs @@ -31,7 +31,7 @@ namespace Tizen.Multimedia.Tests TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Preview.Format, Is.EqualTo(TestCamera.Settings.PreviewPixelFormat)); } @@ -44,14 +44,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Resolution_PROPERTY_READ_ONLY() + public static async Task Resolution_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Preview.Resolution.Width, Is.GreaterThan(0)); Assert.That(eventArgs.Preview.Resolution.Height, Is.GreaterThan(0)); @@ -65,14 +65,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task TimeStamp_PROPERTY_READ_ONLY() + public static async Task TimeStamp_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Preview.TimeStamp, Is.GreaterThan(0)); } @@ -85,14 +85,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Plane_PROPERTY_READ_ONLY() + public static async Task Plane_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsNotNull(eventArgs.Preview.Plane); } @@ -105,7 +105,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task PlaneType_PROPERTY_GET_ENUM_PLANETYPE_SINGLEPLANE() + public static async Task PlaneType_PROPERTY_GET_ENUM_PLANETYPE_SINGLEPLANE() { bool isSupportSinglePlane = TestCamera.Capabilities.SupportedPreviewPixelFormats .Contains(CameraPixelFormat.Yuyv); @@ -121,7 +121,7 @@ namespace Tizen.Multimedia.Tests TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Preview.PlaneType, Is.EqualTo(PlaneType.SinglePlane)); } @@ -134,7 +134,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task PlaneType_PROPERTY_GET_ENUM_PLANETYPE_DOUBLEPLANE() + public static async Task PlaneType_PROPERTY_GET_ENUM_PLANETYPE_DOUBLEPLANE() { bool isSupportDoublePlane = TestCamera.Capabilities.SupportedPreviewPixelFormats .Contains(CameraPixelFormat.Nv12); @@ -150,7 +150,7 @@ namespace Tizen.Multimedia.Tests TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Preview.PlaneType, Is.EqualTo(PlaneType.DoublePlane)); } @@ -163,7 +163,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task PlaneType_PROPERTY_GET_ENUM_PLANETYPE_TRIPLEPLANE() + public static async Task PlaneType_PROPERTY_GET_ENUM_PLANETYPE_TRIPLEPLANE() { bool isSupportTriplePlane = TestCamera.Capabilities.SupportedPreviewPixelFormats .Contains(CameraPixelFormat.I420); @@ -179,7 +179,7 @@ namespace Tizen.Multimedia.Tests TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Preview.PlaneType, Is.EqualTo(PlaneType.TriplePlane)); } @@ -192,7 +192,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRE")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task PlaneType_PROPERTY_GET_ENUM_PLANETYPE_ENCODEDPLANE() + public static async Task PlaneType_PROPERTY_GET_ENUM_PLANETYPE_ENCODEDPLANE() { bool isSupportEncodedPlane = TestCamera.Capabilities.SupportedPreviewPixelFormats .Contains(CameraPixelFormat.H264); @@ -208,7 +208,7 @@ namespace Tizen.Multimedia.Tests TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.Preview.PlaneType, Is.EqualTo(PlaneType.EncodedPlane)); } diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSSinglePlane.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSSinglePlane.cs index cbaaa3c..b39eedf 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSSinglePlane.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSSinglePlane.cs @@ -16,10 +16,10 @@ namespace Tizen.Multimedia.Tests [Description("Tests Tizen.Multimedia.SinglePlane class")] public class SinglePlaneTests : TestBase { - public bool _isSupportSinglePlane; + public static bool _isSupportSinglePlane; [SetUp] - public void SetUp() + public static void SetUp() { _isSupportSinglePlane = TestCamera.Capabilities.SupportedPreviewPixelFormats .Contains(CameraPixelFormat.Yuyv); @@ -38,14 +38,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Data_PROPERTY_READ_ONLY() + public static async Task Data_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsInstanceOf(eventArgs.Preview.Plane); Assert.That((eventArgs.Preview.Plane as SinglePlane).Data.Length, Is.GreaterThan(0)); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSStillImage.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSStillImage.cs index e1c2cc6..4d27807 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSStillImage.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSStillImage.cs @@ -16,7 +16,7 @@ namespace Tizen.Multimedia.Tests public class StillImageTests : TestBase { [SetUp] - public void SetUp() + public static void SetUp() { TestCamera.Settings.CapturePixelFormat = CameraPixelFormat.Jpeg; } @@ -28,7 +28,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Data_PROPERTY_READ_ONLY() + public static async Task Data_PROPERTY_READ_ONLY() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -37,9 +37,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsNotNull(eventArgs.MainImage.Data); @@ -54,7 +53,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Resolution_PROPERTY_READ_ONLY() + public static async Task Resolution_PROPERTY_READ_ONLY() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -63,9 +62,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.MainImage.Resolution.Width, Is.GreaterThan(0)); Assert.That(eventArgs.MainImage.Resolution.Height, Is.GreaterThan(0)); @@ -81,7 +79,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Format_PROPERTY_READ_ONLY() + public static async Task Format_PROPERTY_READ_ONLY() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -90,9 +88,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.That(eventArgs.MainImage.Format, Is.EqualTo(CameraPixelFormat.Jpeg)); @@ -107,7 +104,7 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - public async Task Exif_PROPERTY_READ_ONLY() + public static async Task Exif_PROPERTY_READ_ONLY() { using (var completeWaiter = EventAwaiter.Create()) using (var eventWaiter = EventAwaiter.Create()) @@ -116,9 +113,8 @@ namespace Tizen.Multimedia.Tests TestCamera.CaptureCompleted += completeWaiter; TestCamera.StartPreview(); - await Task.Delay(500); TestCamera.StartCapture(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsNotNull(eventArgs.MainImage.Exif); diff --git a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSTriplePlane.cs b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSTriplePlane.cs index 184bd64..d4aa6f3 100755 --- a/tct-suite-vs/Tizen.Camera.Tests/testcase/TSTriplePlane.cs +++ b/tct-suite-vs/Tizen.Camera.Tests/testcase/TSTriplePlane.cs @@ -18,10 +18,10 @@ namespace Tizen.Multimedia.Tests [Description("Tests Tizen.Multimedia.TriplePlane class")] public class TriplePlaneTests : TestBase { - public bool _isSupportTriplePlane; + public static bool _isSupportTriplePlane; [SetUp] - public void SetUp() + public static void SetUp() { _isSupportTriplePlane = TestCamera.Capabilities.SupportedPreviewPixelFormats .Contains(CameraPixelFormat.I420); @@ -40,14 +40,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Y_PROPERTY_READ_ONLY() + public static async Task Y_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsInstanceOf(eventArgs.Preview.Plane); Assert.That((eventArgs.Preview.Plane as TriplePlane).Y.Length, Is.GreaterThan(0)); @@ -61,14 +61,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task U_PROPERTY_READ_ONLY() + public static async Task U_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsInstanceOf(eventArgs.Preview.Plane); Assert.That((eventArgs.Preview.Plane as TriplePlane).U.Length, Is.GreaterThan(0)); @@ -82,14 +82,14 @@ namespace Tizen.Multimedia.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task V_PROPERTY_READ_ONLY() + public static async Task V_PROPERTY_READ_ONLY() { using (var eventWaiter = EventAwaiter.Create()) { TestCamera.Preview += eventWaiter; TestCamera.StartPreview(); - await Task.Delay(500); + var eventArgs = await eventWaiter.GetResultAsync(); Assert.IsInstanceOf(eventArgs.Preview.Plane); Assert.That((eventArgs.Preview.Plane as TriplePlane).V.Length, Is.GreaterThan(0));