[Postcondition(1, "NA")]
public async Task StartPreview_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(StartPreview_CHANGE_STATUS)))
+ if (await CheckCameraSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartPreview_THROWS_IF_STATE_IS_INVALID()
{
- if (await CheckCameraSupported(nameof(StartPreview_THROWS_IF_STATE_IS_INVALID)))
+ if (await CheckCameraSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartCapture_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(StartCapture_CHANGE_STATUS)))
+ if (await CheckCameraSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartCapture_THROWS_IF_INVALID_OPERATION()
{
- if (await CheckCameraSupported(nameof(StartCapture_THROWS_IF_INVALID_OPERATION)))
+ if (await CheckCameraSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartCapture_CONTINUOUSLY_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(StartCapture_CONTINUOUSLY_CHANGE_STATUS)) ||
- await CheckContinuousCaptureSupported(nameof(StartCapture_CONTINUOUSLY_CHANGE_STATUS)))
+ if (await CheckCameraSupported() || await CheckContinuousCaptureSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartCapture_CONTINUOUSLY_THROWS_IF_INVALID_OPERATION()
{
- if (await CheckCameraSupported(nameof(StartCapture_CONTINUOUSLY_THROWS_IF_INVALID_OPERATION)) ||
- await CheckContinuousCaptureSupported(nameof(StartCapture_CONTINUOUSLY_THROWS_IF_INVALID_OPERATION)))
+ if (await CheckCameraSupported() || await CheckContinuousCaptureSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartFaceDetection_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(StartFaceDetection_CHANGE_STATUS)) ||
- await CheckFDSupported(nameof(StartFaceDetection_CHANGE_STATUS)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartFaceDetection_THROWS_IF_INVALID_OPERATION()
{
- if (await CheckCameraSupported(nameof(StartFaceDetection_THROWS_IF_INVALID_OPERATION)) ||
- await CheckFDSupported(nameof(StartFaceDetection_THROWS_IF_INVALID_OPERATION)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartFocusing_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(StartFocusing_CHANGE_STATUS)) ||
- await CheckAutoFocusSupported(nameof(StartFocusing_CHANGE_STATUS)))
+ if (await CheckCameraSupported() || await CheckAutoFocusSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task StartFocusing_THROWS_IF_STATE_IS_INVALID()
{
- if (await CheckCameraSupported(nameof(StartFocusing_THROWS_IF_STATE_IS_INVALID)) ||
- await CheckAutoFocusSupported(nameof(StartFocusing_THROWS_IF_STATE_IS_INVALID)))
+ if (await CheckCameraSupported() || await CheckAutoFocusSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task FaceDetected_CHECK_EVENT()
{
- if (await CheckCameraSupported(nameof(FaceDetected_CHECK_EVENT)) ||
- await CheckFDSupported(nameof(FaceDetected_CHECK_EVENT)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Step(6, "If camera is able to focus, test will be passed.")]
public async Task FocusStateChanged_CHECK_EVENT()
{
- if (await CheckCameraSupported(nameof(FocusStateChanged_CHECK_EVENT)) ||
- await CheckAutoFocusSupported(nameof(FocusStateChanged_CHECK_EVENT)))
+ if (await CheckCameraSupported() || await CheckAutoFocusSupported())
{
return;
}
[Step(6, "If camera is able to focus, test will be passed.")]
public async Task State_PROPERTY_READ_ONLY()
{
- if (await CheckCameraSupported(nameof(State_PROPERTY_READ_ONLY)) ||
- await CheckAutoFocusSupported(nameof(State_PROPERTY_READ_ONLY)))
+ if (await CheckCameraSupported() || await CheckAutoFocusSupported())
{
return;
}
[Step(5, "If face is detected, test will be passed.")]
public async Task Faces_PROPERTY_READ_ONLY()
{
- if (await CheckCameraSupported(nameof(Faces_PROPERTY_READ_ONLY)) ||
- await CheckFDSupported(nameof(Faces_PROPERTY_READ_ONLY)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Step(5, "If face is detected, test will be passed.")]
public async Task Id_PROPERTY_READ_ONLY()
{
- if (await CheckCameraSupported(nameof(Id_PROPERTY_READ_ONLY)) ||
- await CheckFDSupported(nameof(Id_PROPERTY_READ_ONLY)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Step(5, "If face is detected, test will be passed.")]
public async Task Score_PROPERTY_READ_ONLY()
{
- if (await CheckCameraSupported(nameof(Score_PROPERTY_READ_ONLY)) ||
- await CheckFDSupported(nameof(Score_PROPERTY_READ_ONLY)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Step(5, "If face is detected, test will be passed.")]
public async Task X_PROPERTY_READ_ONLY()
{
- if (await CheckCameraSupported(nameof(X_PROPERTY_READ_ONLY)) ||
- await CheckFDSupported(nameof(X_PROPERTY_READ_ONLY)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Step(5, "If face is detected, test will be passed.")]
public async Task Y_PROPERTY_READ_ONLY()
{
- if (await CheckCameraSupported(nameof(Y_PROPERTY_READ_ONLY)) ||
- await CheckFDSupported(nameof(Y_PROPERTY_READ_ONLY)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Step(5, "If face is detected, test will be passed.")]
public async Task Width_PROPERTY_READ_ONLY()
{
- if (await CheckCameraSupported(nameof(Width_PROPERTY_READ_ONLY)) ||
- await CheckFDSupported(nameof(Width_PROPERTY_READ_ONLY)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
[Step(5, "If face is detected, test will be passed.")]
public async Task Height_PROPERTY_READ_ONLY()
{
- if (await CheckCameraSupported(nameof(Height_PROPERTY_READ_ONLY)) ||
- await CheckFDSupported(nameof(Height_PROPERTY_READ_ONLY)))
+ if (await CheckCameraSupported() || await CheckFDSupported())
{
return;
}
{
if (IsAudioJackAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Audio-Jack");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Audio-Jack");
return;
}
{
if (_isBluetoothAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Bluetooth");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Bluetooth");
return;
}
{
if (IsAudioJackAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Audio-Jack");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Audio-Jack");
return;
}
{
if (IsAudioJackAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Audio-Jack");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Audio-Jack");
return;
}
{
if (IsAudioJackAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Audio-Jack");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Audio-Jack");
return;
}
{
if (IsAudioJackAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Audio-Jack");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Audio-Jack");
return;
}
{
if (IsAudioJackAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Audio-Jack");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Audio-Jack");
return;
}
{
if (IsAudioJackAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Audio-Jack");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Audio-Jack");
return;
}
{
if (IsAudioJackAvailable == false)
{
- TSMultimediaHelper.DisplayNotsupportedWarning("Audio-Jack");
- await ManualTest.WaitForConfirm();
+ await NotSupportedHelper.DisplayNotSupportedLabel("Audio-Jack");
return;
}
{
if (_isRadioSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(nameof(Start_MANUAL_TEST_CHECK_STATUS));
+ await NotSupportedHelper.DisplayNotSupportedLabel("Radio");
return;
}
{
if (_isRadioSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(nameof(Stop_MANUAL_CHECK_STATUS));
+ await NotSupportedHelper.DisplayNotSupportedLabel("Radio");
return;
}
{
if (_isRadioSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(nameof(SeekUpAsync_MANUAL_TEST_CHECK_STATUS));
+ await NotSupportedHelper.DisplayNotSupportedLabel("Radio");
return;
}
{
if (_isRadioSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(nameof(SeekUpAsync_MANUAL_TEST_CHECK_STATUS));
+ await NotSupportedHelper.DisplayNotSupportedLabel("Radio");
return;
}
{
if (_isRadioSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(nameof(SeekUpAsync_MANUAL_TEST_CHECK_STATUS));
+ await NotSupportedHelper.DisplayNotSupportedLabel("Radio");
return;
}
{
if (_isRadioSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(nameof(SeekUpAsync_MANUAL_TEST_CHECK_STATUS));
+ await NotSupportedHelper.DisplayNotSupportedLabel("Radio");
return;
}
private string _filePath;
protected bool _isVideoRecordingSupported = true;
- private async Task<bool> CheckVideoRecordingSupported(string msg)
+ private async Task<bool> CheckVideoRecordingSupported()
{
if (_isVideoRecordingSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(msg);
+ await NotSupportedHelper.DisplayNotSupportedLabel("Video recording");
return true;
}
[Postcondition(1, "NA")]
public async Task Start_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(Start_CHANGE_STATUS)) ||
- await CheckVideoRecordingSupported(nameof(Start_CHANGE_STATUS)))
+ if (await CheckCameraSupported() || await CheckVideoRecordingSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task Pause_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(Start_CHANGE_STATUS)) ||
- await CheckVideoRecordingSupported(nameof(Start_CHANGE_STATUS)))
+ if (await CheckCameraSupported() || await CheckVideoRecordingSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task Commit_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(Start_CHANGE_STATUS)) ||
- await CheckVideoRecordingSupported(nameof(Start_CHANGE_STATUS)))
+ if (await CheckCameraSupported() || await CheckVideoRecordingSupported())
{
return;
}
[Postcondition(1, "NA")]
public async Task Cancel_CHANGE_STATUS()
{
- if (await CheckCameraSupported(nameof(Start_CHANGE_STATUS)) ||
- await CheckVideoRecordingSupported(nameof(Start_CHANGE_STATUS)))
+ if (await CheckCameraSupported() || await CheckVideoRecordingSupported())
{
return;
}
public async Task ConnectAsync_CHANGE_STATE()
{
Log.Debug(LogTag, "Start ConnectAsync_CHANGE_STATE");
- if (await CheckScreenMirroringSupported(nameof(ConnectAsync_CHANGE_STATE)))
- {
- return;
- }
-
- if (await CheckWifiDirectSupported(nameof(ConnectAsync_CHANGE_STATE)))
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
{
return;
}
public async Task Codec_GET_NEGOTIATED_PROPERTY()
{
Log.Debug(LogTag, "Test Start Codec_GET_NEGOTIATED_PROPERTY");
- if (await CheckScreenMirroringSupported(nameof(Codec_GET_NEGOTIATED_PROPERTY)))
- {
- return;
- }
-
- if (await CheckWifiDirectSupported(nameof(Codec_GET_NEGOTIATED_PROPERTY)))
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
{
return;
}
public async Task Channel_GET_NEGOTIATED_PROPERTY()
{
Log.Debug(LogTag, "Test Start Channel_GET_NEGOTIATED_PROPERTY");
- if (await CheckScreenMirroringSupported(nameof(Channel_GET_NEGOTIATED_PROPERTY)))
- {
- return;
- }
-
- if (await CheckWifiDirectSupported(nameof(Channel_GET_NEGOTIATED_PROPERTY)))
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
{
return;
}
public async Task BitWidth_GET_NEGOTIATED_PROPERTY()
{
Log.Debug(LogTag, "Test Start BitWidth_GET_NEGOTIATED_PROPERTY");
- if (await CheckScreenMirroringSupported(nameof(BitWidth_GET_NEGOTIATED_PROPERTY)))
- {
- return;
- }
-
- if (await CheckWifiDirectSupported(nameof(BitWidth_GET_NEGOTIATED_PROPERTY)))
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
{
return;
}
public async Task SampleRate_GET_NEGOTIATED_PROPERTY()
{
Log.Debug(LogTag, "Test Start SampleRate_GET_NEGOTIATED_PROPERTY");
- if (await CheckScreenMirroringSupported(nameof(SampleRate_GET_NEGOTIATED_PROPERTY)))
- {
- return;
- }
-
- if (await CheckWifiDirectSupported(nameof(SampleRate_GET_NEGOTIATED_PROPERTY)))
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
{
return;
}
public async Task Codec_GET_NEGOTIATED_PROPERTY()
{
Log.Debug(LogTag, "Test Start Codec_GET_NEGOTIATED_PROPERTY");
- if (await CheckScreenMirroringSupported(nameof(Codec_GET_NEGOTIATED_PROPERTY)))
- {
- return;
- }
-
- if (await CheckWifiDirectSupported(nameof(Codec_GET_NEGOTIATED_PROPERTY)))
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
{
return;
}
public async Task FrameRate_GET_NEGOTIATED_PROPERTY()
{
Log.Debug(LogTag, "Test Start FrameRate_GET_NEGOTIATED_PROPERTY");
- if (await CheckScreenMirroringSupported(nameof(FrameRate_GET_NEGOTIATED_PROPERTY)))
- {
- return;
- }
-
- if (await CheckWifiDirectSupported(nameof(FrameRate_GET_NEGOTIATED_PROPERTY)))
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
{
return;
}
public async Task Resolution_GET_NEGOTIATED_PROPERTY()
{
Log.Debug(LogTag, "Test Start Resolution_GET_NEGOTIATED_PROPERTY");
- if (await CheckScreenMirroringSupported(nameof(Resolution_GET_NEGOTIATED_PROPERTY)))
- {
- return;
- }
-
- if (await CheckWifiDirectSupported(nameof(Resolution_GET_NEGOTIATED_PROPERTY)))
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
{
return;
}
+++ /dev/null
-using NUnit.Framework;
-using Xamarin.Forms;
-
-namespace Tizen.Multimedia.Tests
-{
- internal class TSMultimediaHelper
- {
- // below object is using with unsupported message.
- private static readonly TestPage _testPage = TestPage.GetInstance();
- private static Label _label;
-
- // Create message method.
- internal static void DisplayNotsupportedWarning(string notSupportedFeature)
- {
-
- _label = new Label()
- {
- FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
- VerticalOptions = LayoutOptions.CenterAndExpand,
- HorizontalOptions = LayoutOptions.CenterAndExpand,
- Text = notSupportedFeature + " is not supported.\n"
- + "Please press \'Pass\' .\n",
- TextColor = Color.FromHex("#1E90FF"),
- };
-
- var layout = new StackLayout()
- {
- HorizontalOptions = LayoutOptions.FillAndExpand,
- VerticalOptions = LayoutOptions.FillAndExpand,
- MinimumHeightRequest = 120,
- Children = {
- _label,
- },
- Padding = new Thickness()
- {
- Top = 0,
- },
- };
-
- _testPage.ExecuteTC(layout);
- }
- }
-}
-
-
_button1 = _button2 = _button3 = null;
}
- protected async Task<bool> CheckCameraSupported(string msg)
+ protected async Task<bool> CheckCameraSupported()
{
if (_isCameraSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(msg);
+ await NotSupportedHelper.DisplayNotSupportedLabel("Camera");
return true;
}
return false;
}
- protected async Task<bool> CheckContinuousCaptureSupported(string msg)
+ protected async Task<bool> CheckContinuousCaptureSupported()
{
if (TestCamera.Capabilities.IsContinuousCaptureSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(msg);
+ await NotSupportedHelper.DisplayNotSupportedLabel("Continuous capture");
return true;
}
return false;
}
- protected async Task<bool> CheckFDSupported(string msg)
+ protected async Task<bool> CheckFDSupported()
{
if (TestCamera.Capabilities.IsFaceDetectionSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(msg);
+ await NotSupportedHelper.DisplayNotSupportedLabel("FD");
return true;
}
return false;
}
- protected async Task<bool> CheckAutoFocusSupported(string msg)
+ protected async Task<bool> CheckAutoFocusSupported()
{
CameraAutoFocusMode supportedAutoFocusMode = CameraAutoFocusMode.None;
if (supportedAutoFocusMode == CameraAutoFocusMode.None)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(msg);
+ await NotSupportedHelper.DisplayNotSupportedLabel("Auto focus");
return true;
}
ScreenMirroring?.Dispose();
}
- protected async Task<bool> CheckScreenMirroringSupported(string msg)
+ protected async Task<bool> CheckScreenMirroringSupported()
{
if (_isScreenMirroringSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(msg);
+ await NotSupportedHelper.DisplayNotSupportedLabel("ScreenMirroring");
return true;
}
return false;
}
- protected async Task<bool> CheckWifiDirectSupported(string msg)
+ protected async Task<bool> CheckWifiDirectSupported()
{
if (_isWifiDirectSupported == false)
{
- await NotSupportedHelper.DisplayNotSupportedLabel(msg);
+ await NotSupportedHelper.DisplayNotSupportedLabel("Wifi direct");
return true;
}