2 using System.Threading;
3 using System.Threading.Tasks;
4 using Tizen.NUI.Components;
6 // /opt/usr/data/settings/Ringtones/ringtone_sdk.mp3
7 namespace SystemSettingsUnitTest
10 public static class SystemSettingsTestInput
14 private const int nStringDataSize = 100;
25 static string[,] string_data = new string[5, 100];
27 public static void InitStringValue()
29 string[,] init_data = new string[,] {
31 "/opt/usr/data/settings/Ringtones/ringtone_sdk.mp3",
32 "/opt/usr/data/settings/Wallpapers/home_003.png",
33 "/opt/usr/data/settings/Wallpapers/home_003.png",
36 "/opt/usr/data/settings/Ringtones/Ringtone.ogg",
37 "/opt/usr/data/settings/Wallpaper/BG_preview_02.png",
38 "/opt/usr/data/settings/Wallpaper/BG_preview_02.png",
41 "/opt/usr/data/settings/Ringtones/ringtone_sdk.mp3",
42 "/opt/usr/data/settings/Wallpapers/home_003.png",
43 "/opt/usr/data/settings/Wallpapers/home_003.png",
46 "/opt/usr/data/settings/Ringtones/ringtone_sdk.mp3",
47 "/opt/usr/data/settings/Wallpapers/home_003.png",
48 "/opt/usr/data/settings/Wallpapers/home_003.png",
52 for (int i = 0; i < 4; i++)
54 for (int j = 0; j < 3; j++)
56 string_data[i, j] = init_data[i, j];
60 string_data[(int)eProfileValue.PROFILE_MOBILE, (int)Tizen.System.SystemSettingsKeys.SoundNotification] = "/opt/usr/data/settings/Alerts/General notification_sdk.wav";
61 string_data[(int)eProfileValue.PROFILE_WEARABLE, (int)Tizen.System.SystemSettingsKeys.SoundNotification] = "/opt/usr/data/settings/Alerts/Notification.ogg";
62 string_data[(int)eProfileValue.PROFILE_TV, (int)Tizen.System.SystemSettingsKeys.SoundNotification] = "/opt/usr/data/settings/Alerts/General notification_sdk.wav";
63 string_data[(int)eProfileValue.PROFILE_COMMON, (int)Tizen.System.SystemSettingsKeys.SoundNotification] = "/opt/usr/data/settings/Alerts/General notification_sdk.wav";
65 string_data[(int)eProfileValue.PROFILE_MOBILE, (int)Tizen.System.SystemSettingsKeys.EmailAlertRingtone] = "/opt/usr/data/settings/Alerts/General notification_sdk.wav";
66 string_data[(int)eProfileValue.PROFILE_WEARABLE, (int)Tizen.System.SystemSettingsKeys.EmailAlertRingtone] = "/opt/usr/data/settings/Alerts/Notification.ogg";
67 string_data[(int)eProfileValue.PROFILE_TV, (int)Tizen.System.SystemSettingsKeys.EmailAlertRingtone] = "/opt/usr/data/settings/Alerts/General notification_sdk.wav";
68 string_data[(int)eProfileValue.PROFILE_COMMON, (int)Tizen.System.SystemSettingsKeys.EmailAlertRingtone] = "/opt/usr/data/settings/Alerts/General notification_sdk.wav";
71 static bool isStarted = false;
73 public static string GetStringValue(int enum_val)
82 eProfileValue profile_val = eProfileValue.PROFILE_MOBILE;
83 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
84 if (string.Compare(strProfile, "mobile") == 0)
86 profile_val = eProfileValue.PROFILE_MOBILE;
88 else if (string.Compare(strProfile, "wearable") == 0)
90 profile_val = eProfileValue.PROFILE_WEARABLE;
92 else if (string.Compare(strProfile, "tv") == 0)
94 profile_val = eProfileValue.PROFILE_TV;
96 else if (string.Compare(strProfile, "common") == 0)
98 profile_val = eProfileValue.PROFILE_COMMON;
100 return string_data[(int)profile_val, enum_val];
106 //[Description("Tizen.System.SystemSettings Tests")]
107 public static class SystemSettingsTests
110 public static void Init()
112 //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
116 public static void Destroy()
118 //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST");
125 // IncomingCallRingtone
128 //[Description("Test if set/get for SystemSettings:IncomingCallRingtone is working properly")]
129 //[Property("SPEC", "Tizen.System.SystemSettings.IncomingCallRingtone A")]
130 //[Property("SPEC_URL", "-")]
131 //[Property("CRITERIA", "PRW")]
132 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
133 public static void IncomingCallRingtone_READ_WRITE()
137 LogUtils.StartTest();
139 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.IncomingCallRingtone, "IncomingCallRingtone_READ_WRITE: IncomingCallRingtone not an instance of string");
140 string preValue = Tizen.System.SystemSettings.IncomingCallRingtone;
141 var setValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.IncomingCallRingtone);
143 Tizen.System.SystemSettings.IncomingCallRingtone = setValue;
144 var getValue = Tizen.System.SystemSettings.IncomingCallRingtone;
145 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "IncomingCallRingtone_READ_WRITE: Set value and get value of the property should be same.");
146 Tizen.System.SystemSettings.IncomingCallRingtone = preValue;
149 catch (NotSupportedException)
151 bool isSupport = true;
152 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.incoming_call", out isSupport);
153 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
154 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.incoming_call)");
155 LogUtils.NotSupport();
159 private static bool s_incomingCallRingtoneCallbackCalled = false;
160 private static TaskCompletionSource<bool> s_tcsIncomingCallRingtone;
161 private static readonly string s_incomingCallRingtoneValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.IncomingCallRingtone);
164 //[Description("Check if callback to SystemSettings:IncomingCallRingtoneChanged event is called")]
165 //[Property("SPEC", "Tizen.System.SystemSettings.IncomingCallRingtoneChanged E")]
166 //[Property("SPEC_URL", "-")]
167 //[Property("CRITERIA", "EVL")]
168 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
169 public static async Task IncomingCallRingtoneChanged_CHECK_EVENT()
173 s_tcsIncomingCallRingtone = new TaskCompletionSource<bool>();
174 LogUtils.StartTest();
176 Tizen.System.SystemSettings.IncomingCallRingtoneChanged += OnIncomingCallRingtoneChanged;
177 string preValue = Tizen.System.SystemSettings.IncomingCallRingtone;
178 Tizen.System.SystemSettings.IncomingCallRingtone = s_incomingCallRingtoneValue;
179 await s_tcsIncomingCallRingtone.Task;
180 Assert.IsTrue(s_incomingCallRingtoneCallbackCalled, "IncomingCallRingtoneChanged_CHECK_EVENT: EventHandler added. Not getting called");
181 s_incomingCallRingtoneCallbackCalled = false;
182 Tizen.System.SystemSettings.IncomingCallRingtoneChanged -= OnIncomingCallRingtoneChanged;
183 Tizen.System.SystemSettings.IncomingCallRingtone = s_incomingCallRingtoneValue;
184 await Task.Delay(100);
185 Assert.IsFalse(s_incomingCallRingtoneCallbackCalled, "IncomingCallRingtoneChanged_CHECK_EVENT: EventHandler removed. Still getting called");
186 Tizen.System.SystemSettings.IncomingCallRingtone = preValue;
189 catch (NotSupportedException)
191 bool isSupport = true;
192 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.incoming_call", out isSupport);
193 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
194 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.incoming_call)");
195 LogUtils.NotSupport();
198 private static void OnIncomingCallRingtoneChanged(object sender, Tizen.System.IncomingCallRingtoneChangedEventArgs e)
200 s_tcsIncomingCallRingtone.SetResult(true);
201 s_incomingCallRingtoneCallbackCalled = true;
202 Assert.IsInstanceOf<string>(e.Value, "OnIncomingCallRingtoneChanged: IncomingCallRingtone not an instance of string");
203 Assert.IsTrue(s_incomingCallRingtoneValue.CompareTo(e.Value) == 0, "OnIncomingCallRingtoneChanged: The callback should receive the latest value for the property.");
206 // WallpaperHomeScreen
209 //[Description("Test if set/get for SystemSettings:WallpaperHomeScreen is working properly")]
210 //[Property("SPEC", "Tizen.System.SystemSettings.WallpaperHomeScreen A")]
211 //[Property("SPEC_URL", "-")]
212 //[Property("CRITERIA", "PRW")]
213 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
214 public static void WallpaperHomeScreen_READ_WRITE()
218 LogUtils.StartTest();
220 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.WallpaperHomeScreen, "WallpaperHomeScreen_READ_WRITE: WallpaperHomeScreen not an instance of string");
221 string preValue = Tizen.System.SystemSettings.WallpaperHomeScreen;
222 var setValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.WallpaperHomeScreen);
224 Tizen.System.SystemSettings.WallpaperHomeScreen = setValue;
225 var getValue = Tizen.System.SystemSettings.WallpaperHomeScreen;
226 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "WallpaperHomeScreen_READ_WRITE: Set value and get value of the property should be same.");
229 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
230 if (string.Compare(strProfile, "mobile") == 0)
231 Tizen.System.SystemSettings.WallpaperHomeScreen = preValue;
235 catch (NotSupportedException)
237 bool isSupport = true;
238 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.home_screen", out isSupport);
239 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
240 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.home_screen)");
241 LogUtils.NotSupport();
245 private static bool s_wallpaperHomeScreenCallbackCalled = false;
246 private static TaskCompletionSource<bool> s_tcsWallpaperHomeScreen;
247 private static readonly string s_wallpaperHomeScreenValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.WallpaperHomeScreen);
250 //[Description("Check if callback to SystemSettings:WallpaperHomeScreenChanged event is called")]
251 //[Property("SPEC", "Tizen.System.SystemSettings.WallpaperHomeScreenChanged E")]
252 //[Property("SPEC_URL", "-")]
253 //[Property("CRITERIA", "EVL")]
254 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
255 public static async Task WallpaperHomeScreenChanged_CHECK_EVENT()
259 LogUtils.StartTest();
260 s_tcsWallpaperHomeScreen = new TaskCompletionSource<bool>();
262 Tizen.System.SystemSettings.WallpaperHomeScreenChanged += OnWallpaperHomeScreenChanged;
263 string preValue = Tizen.System.SystemSettings.WallpaperHomeScreen;
264 Tizen.System.SystemSettings.WallpaperHomeScreen = s_wallpaperHomeScreenValue;
265 await s_tcsWallpaperHomeScreen.Task;
266 Assert.IsTrue(s_wallpaperHomeScreenCallbackCalled, "WallpaperHomeScreenChanged_CHECK_EVENT: EventHandler added. Not getting called");
267 s_wallpaperHomeScreenCallbackCalled = false;
268 Tizen.System.SystemSettings.WallpaperHomeScreenChanged -= OnWallpaperHomeScreenChanged;
269 Tizen.System.SystemSettings.WallpaperHomeScreen = s_wallpaperHomeScreenValue;
270 await Task.Delay(100);
271 Assert.IsFalse(s_wallpaperHomeScreenCallbackCalled, "WallpaperHomeScreenChanged_CHECK_EVENT: EventHandler removed. Still getting called");
274 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
275 if (string.Compare(strProfile, "mobile") == 0)
276 Tizen.System.SystemSettings.WallpaperHomeScreen = preValue;
279 catch (NotSupportedException)
281 bool isSupport = true;
282 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.home_screen", out isSupport);
283 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
284 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.home_screen)");
285 LogUtils.NotSupport();
288 private static void OnWallpaperHomeScreenChanged(object sender, Tizen.System.WallpaperHomeScreenChangedEventArgs e)
290 s_tcsWallpaperHomeScreen.SetResult(true);
291 s_wallpaperHomeScreenCallbackCalled = true;
292 Assert.IsInstanceOf<string>(e.Value, "OnWallpaperHomeScreenChanged: WallpaperHomeScreen not an instance of string");
293 Assert.IsTrue(s_wallpaperHomeScreenValue.CompareTo(e.Value) == 0, "OnWallpaperHomeScreenChanged: The callback should receive the latest value for the property.");
296 //WallpaperLockScreen
299 //[Description("Test if set/get for SystemSettings:WallpaperLockScreen is working properly")]
300 //[Property("SPEC", "Tizen.System.SystemSettings.WallpaperLockScreen A")]
301 //[Property("SPEC_URL", "-")]
302 //[Property("CRITERIA", "PRW")]
303 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
304 public static void WallpaperLockScreen_READ_WRITE()
308 LogUtils.StartTest();
310 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.WallpaperLockScreen, "WallpaperLockScreen_READ_WRITE: WallpaperLockScreen not an instance of string");
311 string preValue = Tizen.System.SystemSettings.WallpaperLockScreen;
312 var setValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.WallpaperLockScreen);
313 Tizen.System.SystemSettings.WallpaperLockScreen = setValue;
314 var getValue = Tizen.System.SystemSettings.WallpaperLockScreen;
315 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "WallpaperLockScreen_READ_WRITE: Set value and get value of the property should be same.");
318 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
319 if (string.Compare(strProfile, "mobile") == 0)
320 Tizen.System.SystemSettings.WallpaperLockScreen = preValue;
325 catch (NotSupportedException)
327 bool isSupport = true;
328 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.lock_screen", out isSupport);
329 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
330 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.lock_screen)");
331 LogUtils.NotSupport();
335 private static bool s_wallpaperLockScreenCallbackCalled = false;
336 private static TaskCompletionSource<bool> s_tcsWallpaperLockScreen;
337 private static readonly string s_wallpaperLockScreenValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.WallpaperLockScreen);
339 //[Description("Check if callback to SystemSettings:WallpaperLockScreenChanged event is called")]
340 //[Property("SPEC", "Tizen.System.SystemSettings.WallpaperLockScreenChanged E")]
341 //[Property("SPEC_URL", "-")]
342 //[Property("CRITERIA", "EVL")]
343 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
344 public static async Task WallpaperLockScreenChanged_CHECK_EVENT()
348 LogUtils.StartTest();
349 s_tcsWallpaperLockScreen = new TaskCompletionSource<bool>();
351 Tizen.System.SystemSettings.WallpaperLockScreenChanged += OnWallpaperLockScreenChanged;
352 string preValue = Tizen.System.SystemSettings.WallpaperLockScreen;
353 Tizen.System.SystemSettings.WallpaperLockScreen = s_wallpaperLockScreenValue;
354 await s_tcsWallpaperLockScreen.Task;
355 Assert.IsTrue(s_wallpaperLockScreenCallbackCalled, "WallpaperLockScreenChanged_CHECK_EVENT: EventHandler added. Not getting called");
356 s_wallpaperLockScreenCallbackCalled = false;
357 Tizen.System.SystemSettings.WallpaperLockScreenChanged -= OnWallpaperLockScreenChanged;
358 Tizen.System.SystemSettings.WallpaperLockScreen = s_wallpaperLockScreenValue;
359 await Task.Delay(100);
360 Assert.IsFalse(s_wallpaperLockScreenCallbackCalled, "WallpaperLockScreenChanged_CHECK_EVENT: EventHandler removed. Still getting called");
363 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
364 if (string.Compare(strProfile, "mobile") == 0)
365 Tizen.System.SystemSettings.WallpaperLockScreen = preValue;
369 catch (NotSupportedException)
371 bool isSupport = true;
372 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.lock_screen", out isSupport);
373 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
374 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.lock_screen)");
375 LogUtils.NotSupport();
378 private static void OnWallpaperLockScreenChanged(object sender, Tizen.System.WallpaperLockScreenChangedEventArgs e)
380 s_tcsWallpaperLockScreen.SetResult(true);
381 s_wallpaperLockScreenCallbackCalled = true;
382 Assert.IsInstanceOf<string>(e.Value, "OnWallpaperLockScreenChanged: WallpaperLockScreen not an instance of string");
383 Assert.IsTrue(s_wallpaperLockScreenValue.CompareTo(e.Value) == 0, "OnWallpaperLockScreenChanged: The callback should receive the latest value for the property.");
389 //[Description("Test if set/get for SystemSettings:FontSize is working properly")]
390 //[Property("SPEC", "Tizen.System.SystemSettings.FontSize A")]
391 //[Property("SPEC_URL", "-")]
392 //[Property("CRITERIA", "PRE")]
393 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
394 public static void FontSize_READ_WRITE_ALL()
396 LogUtils.StartTest();
398 Assert.IsInstanceOf<Tizen.System.SystemSettingsFontSize>(Tizen.System.SystemSettings.FontSize, "FontSize_READ_WRITE_ALL: FontSize not an instance of SystemSettingsFontSize");
400 SystemSettingsFontSize preValue = Tizen.System.SystemSettings.FontSize;
401 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Small;
402 var getValue = Tizen.System.SystemSettings.FontSize;
403 Assert.IsTrue(getValue == Tizen.System.SystemSettingsFontSize.Small, "FontSize_READ_WRITE_ALL: Set value and get value of the property should be same.");
406 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Normal;
407 getValue = Tizen.System.SystemSettings.FontSize;
408 Assert.IsTrue(getValue == Tizen.System.SystemSettingsFontSize.Normal, "FontSize_READ_WRITE_ALL: Set value and get value of the property should be same.");
411 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Large;
412 getValue = Tizen.System.SystemSettings.FontSize;
413 Assert.IsTrue(getValue == Tizen.System.SystemSettingsFontSize.Large, "FontSize_READ_WRITE_ALL: Set value and get value of the property should be same.");
416 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Huge;
417 getValue = Tizen.System.SystemSettings.FontSize;
418 Assert.IsTrue(getValue == Tizen.System.SystemSettingsFontSize.Huge, "FontSize_READ_WRITE_ALL: Set value and get value of the property should be same.");
421 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Giant;
422 getValue = Tizen.System.SystemSettings.FontSize;
423 Assert.IsTrue(getValue == Tizen.System.SystemSettingsFontSize.Giant, "FontSize_READ_WRITE_ALL: Set value and get value of the property should be same.");
424 Tizen.System.SystemSettings.FontSize = preValue;
428 private static bool s_fontSizeSmallCallbackCalled = false;
429 private static TaskCompletionSource<bool> s_tcsFontSizeSmall;
430 private static SystemSettingsFontSize preFontValue;
433 //[Description("Check if callback to SystemSettings:FontSizeChanged event is called")]
434 //[Property("SPEC", "Tizen.System.SystemSettings.FontSizeChanged E")]
435 //[Property("SPEC_URL", "-")]
436 //[Property("CRITERIA", "EVL")]
437 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
438 public static async Task FontSizeChanged_CHECK_EVENT_SMALL()
440 LogUtils.StartTest();
441 s_tcsFontSizeSmall = new TaskCompletionSource<bool>();
443 Tizen.System.SystemSettings.FontSizeChanged += OnFontSizeChangedSmall;
444 //SystemSettingsFontSize preValue = Tizen.System.SystemSettings.FontSize;
445 preFontValue = Tizen.System.SystemSettings.FontSize;
446 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Small;
447 await s_tcsFontSizeSmall.Task;
448 Tizen.System.SystemSettings.FontSizeChanged -= OnFontSizeChangedSmall;
449 Assert.IsTrue(s_fontSizeSmallCallbackCalled, "FontSizeChanged_CHECK_EVENT_SMALL: EventHandler added. Not getting called");
450 s_fontSizeSmallCallbackCalled = false;
451 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Small;
452 await Task.Delay(2000);
453 Assert.IsFalse(s_fontSizeSmallCallbackCalled, "FontSizeChanged_CHECK_EVENT_SMALL: EventHandler removed. Still getting called");
454 //Tizen.System.SystemSettings.FontSize = preValue;
457 private static void OnFontSizeChangedSmall(object sender, Tizen.System.FontSizeChangedEventArgs e)
459 s_tcsFontSizeSmall.SetResult(true);
460 s_fontSizeSmallCallbackCalled = true;
461 Assert.IsInstanceOf<Tizen.System.SystemSettingsFontSize>(e.Value, "OnFontSizeChangedSmall: FontSize not an instance of SystemSettingsFontSize");
462 Assert.IsTrue(e.Value == Tizen.System.SystemSettingsFontSize.Small, "OnFontSizeChangedSmall: The callback should receive the latest value for the property.");
465 private static bool s_fontSizeNormalCallbackCalled = false;
466 private static TaskCompletionSource<bool> s_tcsFontSizeNormal;
469 //[Description("Check if callback to SystemSettings:FontSizeChanged event is called")]
470 //[Property("SPEC", "Tizen.System.SystemSettings.FontSizeChanged E")]
471 //[Property("SPEC_URL", "-")]
472 //[Property("CRITERIA", "EVL")]
473 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
474 public static async Task FontSizeChanged_CHECK_EVENT_NORMAL()
476 LogUtils.StartTest();
477 s_tcsFontSizeNormal = new TaskCompletionSource<bool>();
479 Tizen.System.SystemSettings.FontSizeChanged += OnFontSizeChangedNormal;
480 //SystemSettingsFontSize preValue = Tizen.System.SystemSettings.FontSize;
481 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Normal;
482 await s_tcsFontSizeNormal.Task;
483 Tizen.System.SystemSettings.FontSizeChanged -= OnFontSizeChangedNormal;
484 await Task.Delay(100);
485 Assert.IsTrue(s_fontSizeNormalCallbackCalled, "FontSizeChanged_CHECK_EVENT_NORMAL: EventHandler added. Not getting called");
486 s_fontSizeNormalCallbackCalled = false;
487 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Normal;
488 await Task.Delay(2000);
489 Assert.IsFalse(s_fontSizeNormalCallbackCalled, "FontSizeChanged_CHECK_EVENT_NORMAL: EventHandler removed. Still getting called");
490 //Tizen.System.SystemSettings.FontSize = preValue;
493 private static void OnFontSizeChangedNormal(object sender, Tizen.System.FontSizeChangedEventArgs e)
495 s_fontSizeNormalCallbackCalled = true;
496 s_tcsFontSizeNormal.SetResult(true);
497 // string format = string.Format("Current Tizen.System.SystemSettings.FontSize : {0} , actual value {1}", Tizen.System.SystemSettings.FontSize, e.Value);
498 // Tizen.Log.Debug("CS-SYSTEM-SETTINGS", format);
500 Assert.IsInstanceOf<Tizen.System.SystemSettingsFontSize>(e.Value, "OnFontSizeChangedNormal: FontSize not an instance of SystemSettingsFontSize");
501 Assert.IsTrue(e.Value == Tizen.System.SystemSettingsFontSize.Normal, "OnFontSizeChangedNormal: The callback should receive the latest value for the property.");
504 private static bool s_fontSizeLargeCallbackCalled = false;
505 private static TaskCompletionSource<bool> s_tcsFontSizeLarge;
508 //[Description("Check if callback to SystemSettings:FontSizeChanged event is called")]
509 //[Property("SPEC", "Tizen.System.SystemSettings.FontSizeChanged E")]
510 //[Property("SPEC_URL", "-")]
511 //[Property("CRITERIA", "EVL")]
512 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
513 public static async Task FontSizeChanged_CHECK_EVENT_LARGE()
515 LogUtils.StartTest();
516 s_tcsFontSizeLarge = new TaskCompletionSource<bool>();
518 Tizen.System.SystemSettings.FontSizeChanged += OnFontSizeChangedLarge;
519 //SystemSettingsFontSize preValue = Tizen.System.SystemSettings.FontSize;
520 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Large;
521 await s_tcsFontSizeLarge.Task;
522 Tizen.System.SystemSettings.FontSizeChanged -= OnFontSizeChangedLarge;
523 await Task.Delay(100);
524 Assert.IsTrue(s_fontSizeLargeCallbackCalled, "FontSizeChanged_CHECK_EVENT_LARGE: EventHandler added. Not getting called");
525 s_fontSizeLargeCallbackCalled = false;
526 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Large;
527 await Task.Delay(2000);
528 Assert.IsFalse(s_fontSizeLargeCallbackCalled, "FontSizeChanged_CHECK_EVENT_LARGE: EventHandler removed. Still getting called");
529 //Tizen.System.SystemSettings.FontSize = preValue;
532 private static void OnFontSizeChangedLarge(object sender, Tizen.System.FontSizeChangedEventArgs e)
534 s_tcsFontSizeLarge.SetResult(true);
535 s_fontSizeLargeCallbackCalled = true;
536 //string format = string.Format("Current Tizen.System.SystemSettings.FontSize : {0} , actual value {1}", Tizen.System.SystemSettings.FontSize, e.Value);
537 //Tizen.Log.Debug("CS-SYSTEM-SETTINGS", format);
539 Assert.IsInstanceOf<Tizen.System.SystemSettingsFontSize>(e.Value, "OnFontSizeChangedLarge: FontSizeChanged not an instance of SystemSettingsFontSize");
540 Assert.IsTrue(e.Value == Tizen.System.SystemSettingsFontSize.Large, "OnFontSizeChangedLarge: The callback should receive the latest value for the property.");
543 private static TaskCompletionSource<bool> s_tcsFontSizeHuge;
544 private static bool s_fontSizeHugeCallbackCalled = false;
547 //[Description("Check if callback to SystemSettings:FontSizeChanged event is called")]
548 //[Property("SPEC", "Tizen.System.SystemSettings.FontSizeChanged E")]
549 //[Property("SPEC_URL", "-")]
550 //[Property("CRITERIA", "EVL")]
551 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
552 public static async Task FontSizeChanged_CHECK_EVENT_HUGE()
554 LogUtils.StartTest();
555 s_tcsFontSizeHuge = new TaskCompletionSource<bool>();
557 Tizen.System.SystemSettings.FontSizeChanged += OnFontSizeChangedHuge;
558 //SystemSettingsFontSize preValue = Tizen.System.SystemSettings.FontSize;
559 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Huge;
560 await s_tcsFontSizeHuge.Task;
561 Tizen.System.SystemSettings.FontSizeChanged -= OnFontSizeChangedHuge;
562 await Task.Delay(100);
563 Assert.IsTrue(s_fontSizeHugeCallbackCalled, "FontSizeChanged_CHECK_EVENT_HUGE: EventHandler added. Not getting called");
564 s_fontSizeHugeCallbackCalled = false;
565 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Huge;
566 await Task.Delay(2000);
567 Assert.IsFalse(s_fontSizeHugeCallbackCalled, "FontSizeChanged_CHECK_EVENT_HUGE: EventHandler removed. Still getting called");
568 //Tizen.System.SystemSettings.FontSize = preValue;
571 private static void OnFontSizeChangedHuge(object sender, Tizen.System.FontSizeChangedEventArgs e)
573 s_tcsFontSizeHuge.SetResult(true);
574 s_fontSizeHugeCallbackCalled = true;
575 //string format = string.Format("Current Tizen.System.SystemSettings.FontSize : {0} , actual value {1}", Tizen.System.SystemSettings.FontSize, e.Value);
576 //Tizen.Log.Debug("CS-SYSTEM-SETTINSG", format);
578 Assert.IsInstanceOf<Tizen.System.SystemSettingsFontSize>(e.Value, "OnFontSizeChangedHuge: FontSize not an instance of SystemSettingsFontSize");
579 Assert.IsTrue(e.Value == Tizen.System.SystemSettingsFontSize.Huge, "OnFontSizeChangedHuge: The callback should receive the latest value for the property.");
582 private static TaskCompletionSource<bool> s_tcsFontSizeGiant;
583 private static bool s_fontSizeGiantCallbackCalled = false;
586 //[Description("Check if callback to SystemSettings:FontSizeChanged event is called")]
587 //[Property("SPEC", "Tizen.System.SystemSettings.FontSizeChanged E")]
588 //[Property("SPEC_URL", "-")]
589 //[Property("CRITERIA", "EVL")]
590 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
591 public static async Task FontSizeChanged_CHECK_EVENT_GIANT()
593 s_tcsFontSizeGiant = new TaskCompletionSource<bool>();
594 LogUtils.StartTest();
596 Tizen.System.SystemSettings.FontSizeChanged += OnFontSizeChangedGiant;
597 //SystemSettingsFontSize preValue = Tizen.System.SystemSettings.FontSize;
598 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Giant;
599 await s_tcsFontSizeGiant.Task;
600 Tizen.System.SystemSettings.FontSizeChanged -= OnFontSizeChangedGiant;
601 await Task.Delay(100);
602 Assert.IsTrue(s_fontSizeGiantCallbackCalled, "FontSizeChanged_CHECK_EVENT_GIANT: EventHandler added. Not getting called");
603 s_fontSizeGiantCallbackCalled = false;
604 Tizen.System.SystemSettings.FontSize = Tizen.System.SystemSettingsFontSize.Giant;
605 await Task.Delay(2000);
606 Assert.IsFalse(s_fontSizeGiantCallbackCalled, "FontSizeChanged_CHECK_EVENT_GIANT: EventHandler removed. Still getting called");
607 //Tizen.System.SystemSettings.FontSize = preValue;
608 Tizen.System.SystemSettings.FontSize = preFontValue;
611 private static void OnFontSizeChangedGiant(object sender, Tizen.System.FontSizeChangedEventArgs e)
613 s_tcsFontSizeGiant.SetResult(true);
614 s_fontSizeGiantCallbackCalled = true;
615 //string format = string.Format("Current Tizen.System.SystemSettings.FontSize : {0} , actual value {1}", Tizen.System.SystemSettings.FontSize, e.Value);
616 //Tizen.Log.Debug("CS-SYSTEM-SETTINGS", format);
618 Assert.IsInstanceOf<Tizen.System.SystemSettingsFontSize>(e.Value, "OnFontSizeChangedGiant: FontSize not an instance of SystemSettingsFontSize");
619 Assert.IsTrue(e.Value == Tizen.System.SystemSettingsFontSize.Giant, "OnFontSizeChangedGiant: The callback should receive the latest value for the property.");
625 //[Description("Test if set/get for SystemSettings:FontType is working properly")]
626 //[Property("SPEC", "Tizen.System.SystemSettings.FontType A")]
627 //[Property("SPEC_URL", "-")]
628 //[Property("CRITERIA", "PRW")]
629 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
630 public static async Task FontType_READ_WRITE()
632 LogUtils.StartTest();
634 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.FontType, "FontType_READ_WRITE: FontType not an instance of string");
635 string setValue = "BreezeSans";
636 string preValue = Tizen.System.SystemSettings.FontType;
638 Tizen.System.SystemSettings.FontType = setValue;
639 var getValue = Tizen.System.SystemSettings.FontType;
640 Assert.IsTrue(getValue.CompareTo(setValue) == 0, "FontType_READ_WRITE: Set value and get value of the property should be same.");
641 await Task.Delay(2000);
646 private static bool s_fontTypeCallbackCalled = false;
647 private static readonly string s_fontTypeValue = "BreezeSans";
648 private static TaskCompletionSource<bool> s_tcsFontType;
651 //[Description("Check if callback to SystemSettings:FontTypeChanged event is called")]
652 //[Property("SPEC", "Tizen.System.SystemSettings.FontTypeChanged E")]
653 //[Property("SPEC_URL", "-")]
654 //[Property("CRITERIA", "EVL")]
655 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
656 public static async Task FontTypeChanged_CHECK_EVENT()
658 s_tcsFontType = new TaskCompletionSource<bool>();
659 LogUtils.StartTest();
661 Tizen.System.SystemSettings.FontTypeChanged += OnFontTypeChanged;
662 string preValue = Tizen.System.SystemSettings.FontType;
663 Tizen.System.SystemSettings.FontType = s_fontTypeValue;
664 await s_tcsFontSizeNormal.Task;
665 Assert.IsTrue(s_fontTypeCallbackCalled, "FontTypeChanged_CHECK_EVENT: EventHandler added. Not getting called");
666 s_fontTypeCallbackCalled = false;
667 Tizen.System.SystemSettings.FontTypeChanged -= OnFontTypeChanged;
668 Tizen.System.SystemSettings.FontType = s_fontTypeValue;
669 await Task.Delay(100);
670 Assert.IsFalse(s_fontTypeCallbackCalled, "FontTypeChanged_CHECK_EVENT: EventHandler removed. Still getting called");
671 Tizen.System.SystemSettings.FontType = preValue;
674 private static void OnFontTypeChanged(object sender, Tizen.System.FontTypeChangedEventArgs e)
676 s_tcsFontType.SetResult(true);
677 s_fontTypeCallbackCalled = true;
678 Assert.IsInstanceOf<string>(e.Value, "OnFontTypeChanged: FontType not an instance of string");
679 Assert.IsTrue(s_fontTypeValue.CompareTo(e.Value) == 0, "OnFontTypeChanged: The callback should receive the latest value for the property.");
685 //[Description("Test if set/get for SystemSettings:MotionActivationEnabled is working properly")]
686 //[Property("SPEC", "Tizen.System.SystemSettings.MotionActivationEnabled A")]
687 //[Property("SPEC_URL", "-")]
688 //[Property("CRITERIA", "PRW")]
689 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
690 public static void MotionActivationEnabled_READ_WRITE()
692 LogUtils.StartTest();
694 bool preValue = Tizen.System.SystemSettings.MotionActivationEnabled;
695 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.MotionActivationEnabled, "MotionActivationEnabled_READ_WRITE: MotionActivationEnabled not an instance of bool");
696 Tizen.System.SystemSettings.MotionActivationEnabled = true;
697 Assert.IsTrue(Tizen.System.SystemSettings.MotionActivationEnabled, "MotionActivation_READ_WRITE: Set value and get value of the property should be same.");
698 Tizen.System.SystemSettings.MotionActivationEnabled = false;
699 Assert.IsFalse(Tizen.System.SystemSettings.MotionActivationEnabled, "MotionActivation_READ_WRITE: Set value and get value of the property should be same.");
700 Tizen.System.SystemSettings.MotionActivationEnabled = preValue;
704 private static bool s_motionActivationCallbackCalled = false;
705 private static TaskCompletionSource<bool> s_tcsMotionActivation;
706 private static bool s_motionActivationValue = !Tizen.System.SystemSettings.MotionActivationEnabled;
709 //[Description("Check if callback to SystemSettings:MotionActivationSettingChanged event is called")]
710 //[Property("SPEC", "Tizen.System.SystemSettings.MotionActivationSettingChanged E")]
711 //[Property("SPEC_URL", "-")]
712 //[Property("CRITERIA", "EVL")]
713 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
714 public static async Task MotionActivationSettingChanged_CHECK_EVENT()
716 LogUtils.StartTest();
717 s_tcsMotionActivation = new TaskCompletionSource<bool>();
719 Tizen.System.SystemSettings.MotionActivationSettingChanged += OnMotionActivationChanged;
720 bool preValue = Tizen.System.SystemSettings.MotionActivationEnabled;
721 Tizen.System.SystemSettings.MotionActivationEnabled = s_motionActivationValue;
722 await s_tcsMotionActivation.Task;
724 s_tcsMotionActivation = new TaskCompletionSource<bool>();
725 Assert.IsTrue(s_motionActivationCallbackCalled, "MotionActivationSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
726 s_motionActivationCallbackCalled = false;
727 s_motionActivationValue = !s_motionActivationValue;
728 Tizen.System.SystemSettings.MotionActivationEnabled = s_motionActivationValue;
729 await s_tcsMotionActivation.Task;
730 Assert.IsTrue(s_motionActivationCallbackCalled, "MotionActivationSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
731 s_motionActivationCallbackCalled = false;
733 Tizen.System.SystemSettings.MotionActivationSettingChanged -= OnMotionActivationChanged;
734 Tizen.System.SystemSettings.MotionActivationEnabled = s_motionActivationValue;
735 await Task.Delay(100);
736 Assert.IsFalse(s_motionActivationCallbackCalled, "MotionActivationSettingChanged_CHECK_EVENT: EventHandler removed. Still getting called");
737 Tizen.System.SystemSettings.MotionActivationEnabled = preValue;
740 private static void OnMotionActivationChanged(object sender, Tizen.System.MotionActivationSettingChangedEventArgs e)
742 s_tcsMotionActivation.SetResult(true);
743 s_motionActivationCallbackCalled = true;
744 Assert.IsInstanceOf<bool>(e.Value, "OnMotionActivationChanged: MotionActivationEnabled not an instance of bool");
745 Assert.IsTrue(e.Value == s_motionActivationValue, "OnMotionActivationChanged: The callback should receive the latest value for the property.");
748 // EmailAlertRingtone
751 //[Description("Test if set/get for SystemSettings:EmailAlertRingtone is working properly")]
752 //[Property("SPEC", "Tizen.System.SystemSettings.EmailAlertRingtone A")]
753 //[Property("SPEC_URL", "-")]
754 //[Property("CRITERIA", "PRW")]
755 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
756 public static void EmailAlertRingtone_READ_WRITE()
760 LogUtils.StartTest();
762 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.EmailAlertRingtone, "EmailAlertRingtone_READ_WRITE: EmailAlertRingtone not an instance of string");
763 var setValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.EmailAlertRingtone);
764 string preValue = Tizen.System.SystemSettings.EmailAlertRingtone;
765 Tizen.System.SystemSettings.EmailAlertRingtone = setValue;
766 var getValue = Tizen.System.SystemSettings.EmailAlertRingtone;
767 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "EmailAlertRingtone_READ_WRITE: Set value and get value of the property should be same.");
768 Tizen.System.SystemSettings.EmailAlertRingtone = preValue;
771 catch (NotSupportedException)
773 bool isSupport = true;
774 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.notification_email", out isSupport);
775 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
776 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.notification_email)");
777 LogUtils.NotSupport();
782 private static TaskCompletionSource<bool> s_tcsEmailAlertRingtone;
783 private static bool s_emailAlertRingtoneCallbackCalled = false;
784 private static readonly string s_emailAlertRingtoneValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.EmailAlertRingtone);
787 //[Description("Check if callback to SystemSettings:EmailAlertRingtoneChanged event is called")]
788 //[Property("SPEC", "Tizen.System.SystemSettings.EmailAlertRingtoneChanged E")]
789 //[Property("SPEC_URL", "-")]
790 //[Property("CRITERIA", "EVL")]
791 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
792 public static async Task EmailAlertRingtoneChanged_CHECK_EVENT()
796 s_tcsEmailAlertRingtone = new TaskCompletionSource<bool>();
797 LogUtils.StartTest();
799 Tizen.System.SystemSettings.EmailAlertRingtoneChanged += OnEmailAlertRingtoneChanged;
800 string preValue = Tizen.System.SystemSettings.EmailAlertRingtone;
801 Tizen.System.SystemSettings.EmailAlertRingtone = s_emailAlertRingtoneValue;
802 await s_tcsEmailAlertRingtone.Task;
803 Assert.IsTrue(s_emailAlertRingtoneCallbackCalled, "EmailAlertRingtoneChanged_CHECK_EVENT: EventHandler added. Not getting called");
804 s_emailAlertRingtoneCallbackCalled = false;
805 Tizen.System.SystemSettings.EmailAlertRingtoneChanged -= OnEmailAlertRingtoneChanged;
806 Tizen.System.SystemSettings.EmailAlertRingtone = s_emailAlertRingtoneValue;
807 await Task.Delay(100);
808 Assert.IsFalse(s_emailAlertRingtoneCallbackCalled, "EmailAlertRingtoneChanged_CHECK_EVENT: EventHandler removed. Still getting called");
809 Tizen.System.SystemSettings.EmailAlertRingtone = preValue;
812 catch (NotSupportedException)
814 bool isSupport = true;
815 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.notification_email", out isSupport);
816 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
817 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.notification_email)");
818 LogUtils.NotSupport();
821 private static void OnEmailAlertRingtoneChanged(object sender, Tizen.System.EmailAlertRingtoneChangedEventArgs e)
823 s_tcsEmailAlertRingtone.SetResult(true);
824 s_emailAlertRingtoneCallbackCalled = true;
825 Assert.IsInstanceOf<string>(e.Value, "OnEmailAlertRingtoneChanged: EmailAlertRingtone not an instance of string");
826 Assert.IsTrue(s_emailAlertRingtoneValue.CompareTo(e.Value) == 0, "OnEmailAlertRingtoneChanged: The callback should receive the latest value for the property.");
829 // Data3GNetworkEnabled
832 //[Description("Test if set/get for SystemSettings:Data3GNetworkEnabled is working properly")]
833 //[Property("SPEC", "Tizen.System.SystemSettings.Data3GNetworkEnabled A")]
834 //[Property("SPEC_URL", "-")]
835 //[Property("CRITERIA", "PRW")]
836 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
837 public static void Data3GNetworkEnabled_READ_WRITE()
839 LogUtils.StartTest();
841 bool preValue = Tizen.System.SystemSettings.Data3GNetworkEnabled;
842 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.Data3GNetworkEnabled, "Data3GNetworkEnabled_READ_WRITE: Data3GNetworkEnabled not an instance of bool");
843 Tizen.System.SystemSettings.Data3GNetworkEnabled = true;
844 Assert.IsTrue(Tizen.System.SystemSettings.Data3GNetworkEnabled, "Data3GNetworkEnabled_READ_WRITE: Set value and get value of the property should be same");
845 Tizen.System.SystemSettings.Data3GNetworkEnabled = false;
846 Assert.IsFalse(Tizen.System.SystemSettings.Data3GNetworkEnabled, "Data3GNetworkEnabled_READ_WRITE: Set value and get value of the property should be same");
847 Tizen.System.SystemSettings.Data3GNetworkEnabled = preValue;
851 private static TaskCompletionSource<bool> s_tcsData3GNetwork;
852 private static bool s_data3GNetworkCallbackCalled = false;
853 private static bool s_data3GNetworkSettingValue = !Tizen.System.SystemSettings.Data3GNetworkEnabled;
856 //[Description("Check if callback to SystemSettings:Data3GNetworkSettingChanged event is called")]
857 //[Property("SPEC", "Tizen.System.SystemSettings.Data3GNetworkSettingChanged E")]
858 //[Property("SPEC_URL", "-")]
859 //[Property("CRITERIA", "EVL")]
860 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
861 public static async Task Data3GNetworkSettingChanged_CHECK_EVENT()
863 LogUtils.StartTest();
864 s_tcsData3GNetwork = new TaskCompletionSource<bool>();
866 Tizen.System.SystemSettings.Data3GNetworkSettingChanged += OnData3GNetworkSettingChanged;
867 bool preValue = Tizen.System.SystemSettings.Data3GNetworkEnabled;
868 Tizen.System.SystemSettings.Data3GNetworkEnabled = s_data3GNetworkSettingValue;
869 await s_tcsData3GNetwork.Task;
870 s_tcsData3GNetwork = new TaskCompletionSource<bool>();
871 Assert.IsTrue(s_data3GNetworkCallbackCalled, "Data3GNetworkSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
873 s_data3GNetworkSettingValue = !s_data3GNetworkSettingValue;
874 s_data3GNetworkCallbackCalled = false;
875 Tizen.System.SystemSettings.Data3GNetworkEnabled = s_data3GNetworkSettingValue;
876 await s_tcsData3GNetwork.Task;
877 Assert.IsTrue(s_data3GNetworkCallbackCalled, "Data3GNetworkSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
878 s_data3GNetworkCallbackCalled = false;
880 Tizen.System.SystemSettings.Data3GNetworkSettingChanged -= OnData3GNetworkSettingChanged;
881 Tizen.System.SystemSettings.Data3GNetworkEnabled = s_data3GNetworkSettingValue;
882 await Task.Delay(100);
883 Assert.IsFalse(s_data3GNetworkCallbackCalled, "Data3GNetworkSettingChanged_CHECK_EVENT: EventHandler removed. Still getting called");
884 Tizen.System.SystemSettings.Data3GNetworkEnabled = preValue;
887 private static void OnData3GNetworkSettingChanged(object sender, Tizen.System.Data3GNetworkSettingChangedEventArgs e)
889 s_tcsData3GNetwork.SetResult(true);
890 s_data3GNetworkCallbackCalled = true;
891 Assert.IsInstanceOf<bool>(e.Value, "OnData3GNetworkSettingChanged: Data3GNetworkEnabled not an instance of bool");
892 Assert.IsTrue(e.Value == s_data3GNetworkSettingValue, "OnData3GNetworkSettingChanged: The callback should receive the latest value for the property.");
898 //[Description("Test if set/get for SystemSettings:LockscreenApp is working properly")]
899 //[Property("SPEC", "Tizen.System.SystemSettings.LockscreenApp A")]
900 //[Property("SPEC_URL", "-")]
901 //[Property("CRITERIA", "PRW")]
902 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
903 public static void LockscreenApp_READ_WRITE()
907 LogUtils.StartTest();
909 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.LockScreenApp, "LockscreenApp_READ_WRITE: LockscreenApp not an instance of string");
910 var setValue = "org.tizen.lockscreen";
911 string preValue = Tizen.System.SystemSettings.LockScreenApp;
912 Tizen.System.SystemSettings.LockScreenApp = setValue;
913 var getValue = Tizen.System.SystemSettings.LockScreenApp;
914 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "LockscreenApp_READ_WRITE: Set value and get value of the property should be same.");
915 Tizen.System.SystemSettings.LockScreenApp = preValue;
918 catch (NotSupportedException)
920 bool isSupport = true;
921 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.lock_screen", out isSupport);
922 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
923 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.lock_screen)");
924 LogUtils.NotSupport();
928 private static TaskCompletionSource<bool> s_tcsLockScreenApp;
929 private static bool s_lockScreenAppCallbackCalled = false;
930 private static readonly string s_lockscreenAppValue = "org.tizen.lockscreen";
933 //[Description("Check if callback to SystemSettings:LockscreenAppChanged event is called")]
934 //[Property("SPEC", "Tizen.System.SystemSettings.LockscreenAppChanged E")]
935 //[Property("SPEC_URL", "-")]
936 //[Property("CRITERIA", "EVL")]
937 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
938 public static async Task LockscreenAppChanged_CHECK_EVENT()
942 s_tcsLockScreenApp = new TaskCompletionSource<bool>();
943 LogUtils.StartTest();
945 Tizen.System.SystemSettings.LockScreenAppChanged += OnLockscreenAppChanged;
946 string preValue = Tizen.System.SystemSettings.LockScreenApp;
947 Tizen.System.SystemSettings.LockScreenApp = s_lockscreenAppValue;
948 await s_tcsLockScreenApp.Task;
949 Assert.IsTrue(s_lockScreenAppCallbackCalled, "LockscreenAppChanged_CHECK_EVENT: EventHandler added. Not getting called");
950 s_lockScreenAppCallbackCalled = false;
951 Tizen.System.SystemSettings.LockScreenAppChanged -= OnLockscreenAppChanged;
952 Tizen.System.SystemSettings.LockScreenApp = s_lockscreenAppValue;
953 await Task.Delay(100);
954 Assert.IsFalse(s_lockScreenAppCallbackCalled, "LockscreenAppChanged_CHECK_EVENT: EventHandler removed. Still getting called");
955 Tizen.System.SystemSettings.LockScreenApp = preValue;
958 catch (NotSupportedException)
960 bool isSupport = true;
961 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.lock_screen", out isSupport);
962 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
963 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.lock_screen)");
964 LogUtils.NotSupport();
967 private static void OnLockscreenAppChanged(object sender, Tizen.System.LockScreenAppChangedEventArgs e)
969 s_tcsLockScreenApp.SetResult(true);
970 s_lockScreenAppCallbackCalled = true;
971 Assert.IsInstanceOf<string>(e.Value, "OnLockscreenAppChanged: LockscreenApp not an instance of string");
972 Assert.IsTrue(s_lockscreenAppValue.CompareTo(e.Value) == 0, "OnLockscreenAppChanged: The callback should receive the latest value for the property.");
978 //[Description("Test if get for SystemSettings:DefaultFontType is working properly")]
979 //[Property("SPEC", "Tizen.System.SystemSettings.DefaultFontType A")]
980 //[Property("SPEC_URL", "-")]
981 //[Property("CRITERIA", "PRO")]
982 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
983 public static void DefaultFontType_READ_ONLY()
985 LogUtils.StartTest();
987 Assert.IsNotNull(Tizen.System.SystemSettings.DefaultFontType, "DefaultFontType_READ_ONLY: DefaultFontType is null");
988 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.DefaultFontType, "DefaultFontType_READ_ONLY: DefaultFontType not an instance of string");
995 //[Description("Test if set/get for SystemSettings:LocaleCountry is working properly")]
996 //[Property("SPEC", "Tizen.System.SystemSettings.LocaleCountry A")]
997 //[Property("SPEC_URL", "-")]
998 //[Property("CRITERIA", "PRW")]
999 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1000 public static void LocaleCountry_READ_WRITE()
1002 LogUtils.StartTest();
1004 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.LocaleCountry, "LocaleCountry_READ_WRITE: LocaleCountry not an instance of string");
1005 var setValue = "en_US";
1006 string preValue = Tizen.System.SystemSettings.LocaleCountry;
1007 Tizen.System.SystemSettings.LocaleCountry = setValue;
1008 var getValue = Tizen.System.SystemSettings.LocaleCountry;
1009 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "LocaleCountry_READ_WRITE: Set value and get value of the property should be same.");
1010 Tizen.System.SystemSettings.LocaleCountry = preValue;
1014 private static TaskCompletionSource<bool> s_tcsLocaleCountry;
1015 private static bool s_localeCountryCallbackCalled = false;
1016 private static readonly string s_localeCountryValue = "en_US";
1019 //[Description("Check if callback to SystemSettings:LocaleCountryChanged event is called")]
1020 //[Property("SPEC", "Tizen.System.SystemSettings.LocaleCountryChanged E")]
1021 //[Property("SPEC_URL", "-")]
1022 //[Property("CRITERIA", "EVL")]
1023 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1024 public static async Task LocaleCountryChanged_CHECK_EVENT()
1026 LogUtils.StartTest();
1027 s_tcsLocaleCountry = new TaskCompletionSource<bool>();
1029 Tizen.System.SystemSettings.LocaleCountryChanged += OnLocaleCountryChanged;
1030 string preValue = Tizen.System.SystemSettings.LocaleCountry;
1031 Tizen.System.SystemSettings.LocaleCountry = s_localeCountryValue;
1032 await s_tcsLocaleCountry.Task;
1033 Assert.IsTrue(s_localeCountryCallbackCalled, "LocaleCountryChanged_CHECK_EVENT: EventHandler added. Not getting called");
1034 s_localeCountryCallbackCalled = false;
1035 Tizen.System.SystemSettings.LocaleCountryChanged -= OnLocaleCountryChanged;
1036 Tizen.System.SystemSettings.LocaleCountry = s_localeCountryValue;
1037 await Task.Delay(100);
1038 Assert.IsFalse(s_localeCountryCallbackCalled, "LocaleCountryChanged_CHECK_EVENT: EventHandler removed. Still getting called");
1039 Tizen.System.SystemSettings.LocaleCountry = preValue;
1042 private static void OnLocaleCountryChanged(object sender, Tizen.System.LocaleCountryChangedEventArgs e)
1044 s_tcsLocaleCountry.SetResult(true);
1045 s_localeCountryCallbackCalled = true;
1046 Assert.IsInstanceOf<string>(e.Value, "OnLocaleCountryChanged: LocaleCountry not an instance of string");
1047 Assert.IsTrue(s_localeCountryValue.CompareTo(e.Value) == 0, "OnLocaleCountryChanged: The callback should receive the latest value for the property.");
1053 //[Description("Test if set/get for SystemSettings:LocaleLanguage is working properly")]
1054 //[Property("SPEC", "Tizen.System.SystemSettings.LocaleLanguage A")]
1055 //[Property("SPEC_URL", "-")]
1056 //[Property("CRITERIA", "PRW")]
1057 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1058 public static void LocaleLanguage_READ_WRITE()
1060 LogUtils.StartTest();
1062 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.LocaleLanguage, "LocaleLanguage_READ_WRITE: LocaleLanguage not an instance of string");
1063 var setValue = "en_US";
1064 string preValue = Tizen.System.SystemSettings.LocaleLanguage;
1065 Tizen.System.SystemSettings.LocaleLanguage = setValue;
1066 var getValue = Tizen.System.SystemSettings.LocaleLanguage;
1067 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "LocaleLanguage_READ_WRITE: Set value and get value of the property should be same.");
1068 Tizen.System.SystemSettings.LocaleLanguage = preValue;
1072 private static TaskCompletionSource<bool> s_tcsLocaleLanguage;
1073 private static bool s_localeLanguageCallbackCalled = false;
1074 private static readonly string s_localeLanguageValue = "en_US";
1077 //[Description("Check if callback to SystemSettings:LocaleLanguageChanged event is called")]
1078 //[Property("SPEC", "Tizen.System.SystemSettings.LocaleLanguageChanged E")]
1079 //[Property("SPEC_URL", "-")]
1080 //[Property("CRITERIA", "EVL")]
1081 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1082 public static async Task LocaleLanguageChanged_CHECK_EVENT()
1084 s_tcsLocaleLanguage = new TaskCompletionSource<bool>();
1085 LogUtils.StartTest();
1087 Tizen.System.SystemSettings.LocaleLanguageChanged += OnLocaleLanguageChanged;
1088 string preValue = Tizen.System.SystemSettings.LocaleLanguage;
1089 Tizen.System.SystemSettings.LocaleLanguage = s_localeLanguageValue;
1090 await s_tcsLocaleLanguage.Task;
1091 Assert.IsTrue(s_localeLanguageCallbackCalled, "LocaleLanguageChanged_CHECK_EVENT: EventHandler added. Not getting called");
1092 s_localeLanguageCallbackCalled = false;
1093 Tizen.System.SystemSettings.LocaleLanguageChanged -= OnLocaleLanguageChanged;
1094 Tizen.System.SystemSettings.LocaleLanguage = s_localeLanguageValue;
1095 await Task.Delay(100);
1096 Assert.IsFalse(s_localeLanguageCallbackCalled, "LocaleLanguageChanged_CHECK_EVENT: EventHandler removed. Still getting called");
1097 Tizen.System.SystemSettings.LocaleLanguage = preValue;
1100 private static void OnLocaleLanguageChanged(object sender, Tizen.System.LocaleLanguageChangedEventArgs e)
1102 s_tcsLocaleLanguage.SetResult(true);
1103 s_localeLanguageCallbackCalled = true;
1104 Assert.IsInstanceOf<string>(e.Value, "OnLocaleLanguageChanged: LocaleLanguage not an instance of string");
1105 Assert.IsTrue(s_localeLanguageValue.CompareTo(e.Value) == 0, "OnLocaleLanguageChanged: The callback should receive the latest value for the property.");
1108 // LocaleTimeformat24Hour
1111 //[Description("Test if set/get for SystemSettings:LocaleTimeFormat24HourEnabled is working properly")]
1112 //[Property("SPEC", "Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled A")]
1113 //[Property("SPEC_URL", "-")]
1114 //[Property("CRITERIA", "PRW")]
1115 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1116 public static void LocaleTimeFormat24HourEnabled_READ_WRITE()
1118 LogUtils.StartTest();
1120 bool preValue = Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled;
1121 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled, "LocaleTimeFormat24HourEnabled_READ_WRITE: LocaleTimeFormat24HourEnabled not an instance of bool");
1122 Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled = true;
1123 Assert.IsTrue(Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled, "LocaleTimeformat24Hour_READ_WRITE: Set value and get value of the property should be same.");
1124 Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled = false;
1125 Assert.IsFalse(Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled, "LocaleTimeformat24Hour_READ_WRITE: Set value and get value of the property should be same.");
1126 Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled = preValue;
1130 private static TaskCompletionSource<bool> s_tcsTimeFormat;
1131 private static bool s_timeFormatCallbackCalled = false;
1132 private static bool s_localeTimeformat24HourValue = !Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled;
1135 //[Description("Check if callback to SystemSettings:LocaleTimeFormat24HourSettingChanged event is called")]
1136 //[Property("SPEC", "Tizen.System.SystemSettings.LocaleTimeFormat24HourSettingChanged E")]
1137 //[Property("SPEC_URL", "-")]
1138 //[Property("CRITERIA", "EVL")]
1139 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1140 public static async Task LocaleTimeFormat24HourSettingChanged_CHECK_EVENT()
1142 s_tcsTimeFormat = new TaskCompletionSource<bool>();
1143 LogUtils.StartTest();
1145 Tizen.System.SystemSettings.LocaleTimeFormat24HourSettingChanged += OnLocaleTimeformat24HourChanged;
1146 bool preValue = Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled;
1147 Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled = s_localeTimeformat24HourValue;
1148 await s_tcsTimeFormat.Task;
1149 s_tcsTimeFormat = new TaskCompletionSource<bool>();
1150 Assert.IsTrue(s_timeFormatCallbackCalled, "LocaleTimeFormat24HourSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
1151 s_timeFormatCallbackCalled = false;
1153 s_localeTimeformat24HourValue = !s_localeTimeformat24HourValue;
1154 Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled = s_localeTimeformat24HourValue;
1155 await s_tcsTimeFormat.Task;
1156 Assert.IsTrue(s_timeFormatCallbackCalled, "LocaleTimeFormat24HourSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
1157 s_timeFormatCallbackCalled = false;
1159 Tizen.System.SystemSettings.LocaleTimeFormat24HourSettingChanged -= OnLocaleTimeformat24HourChanged;
1160 Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled = s_localeTimeformat24HourValue;
1161 await Task.Delay(100);
1162 Assert.IsFalse(s_timeFormatCallbackCalled, "LocaleTimeFormat24HourSettingChanged_CHECK_EVENT: EventHandler removed. Still getting called");
1163 Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled = preValue;
1167 private static void OnLocaleTimeformat24HourChanged(object sender, Tizen.System.LocaleTimeFormat24HourSettingChangedEventArgs e)
1169 s_tcsTimeFormat.SetResult(true);
1170 s_timeFormatCallbackCalled = true;
1171 Assert.IsInstanceOf<bool>(e.Value, "OnLocaleTimeformat24HourChanged: LocaleTimeFormat24HourEnabled not an instance of bool");
1172 Assert.IsTrue(e.Value == s_localeTimeformat24HourValue, "OnLocaleTimeformat24HourChanged: The callback should receive the latest value for the property.");
1178 //[Description("Test if set/get for SystemSettings:LocaleTimeZone is working properly")]
1179 //[Property("SPEC", "Tizen.System.SystemSettings.LocaleTimeZone A")]
1180 //[Property("SPEC_URL", "-")]
1181 //[Property("CRITERIA", "PRW")]
1182 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1183 public static void LocaleTimeZone_READ_WRITE()
1185 LogUtils.StartTest();
1187 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.LocaleTimeZone, "LocaleTimeZone_READ_WRITE: LocaleTimeZone not an instance of string");
1188 //var setValue = "Pacific/Tahiti";
1189 var setValue = "Asia/Seoul";
1190 string preValue = Tizen.System.SystemSettings.LocaleTimeZone;
1191 Tizen.System.SystemSettings.LocaleTimeZone = setValue;
1192 var getValue = Tizen.System.SystemSettings.LocaleTimeZone;
1193 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "LocaleTimezone_READ_WRITE: Set value and get value of the property should be same.");
1194 Tizen.System.SystemSettings.LocaleTimeZone = preValue;
1198 private static TaskCompletionSource<bool> s_tcsLocaleTimeZone;
1199 private static bool s_localeTimeZoneCallbackCalled = false;
1200 private static readonly string s_localeTimeZoneValue = "Asia/Seoul";
1203 //[Description("Check if callback to SystemSettings:LocaleTimeZoneChanged event is called")]
1204 //[Property("SPEC", "Tizen.System.SystemSettings.LocaleTimeZoneChanged E")]
1205 //[Property("SPEC_URL", "-")]
1206 //[Property("CRITERIA", "EVL")]
1207 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1208 public static async Task LocaleTimeZoneChanged_CHECK_EVENT()
1210 s_tcsLocaleTimeZone = new TaskCompletionSource<bool>();
1211 LogUtils.StartTest();
1213 Tizen.System.SystemSettings.LocaleTimeZoneChanged += OnLocaleTimeZoneChanged;
1214 string preValue = Tizen.System.SystemSettings.LocaleTimeZone;
1215 Tizen.System.SystemSettings.LocaleTimeZone = s_localeTimeZoneValue;
1216 await s_tcsLocaleTimeZone.Task;
1217 Assert.IsTrue(s_localeTimeZoneCallbackCalled, "LocaleTimeZoneChanged_CHECK_EVENT: EventHandler added. Not getting called");
1218 s_localeTimeZoneCallbackCalled = false;
1220 Tizen.System.SystemSettings.LocaleTimeZoneChanged -= OnLocaleTimeZoneChanged;
1221 Tizen.System.SystemSettings.LocaleTimeZone = s_localeTimeZoneValue;
1222 await Task.Delay(100);
1223 Assert.IsFalse(s_localeTimeZoneCallbackCalled, "LocaleTimeZoneChanged_CHECK_EVENT: EventHandler removed. Still getting called");
1224 Tizen.System.SystemSettings.LocaleTimeZone = preValue;
1227 private static void OnLocaleTimeZoneChanged(object sender, Tizen.System.LocaleTimeZoneChangedEventArgs e)
1229 s_tcsLocaleTimeZone.SetResult(true);
1230 s_localeTimeZoneCallbackCalled = true;
1231 Assert.IsInstanceOf<string>(e.Value, "OnLocaleTimeZoneChanged: LocaleTimeZone not an instance of string");
1232 Assert.IsTrue(s_localeTimeZoneValue.CompareTo(e.Value) == 0, "OnLocaleTimezoneChanged: The callback should receive the latest value for the property.");
1238 //[Description("Test if get for SystemSettings:SoundLockEnabled is working properly")]
1239 //[Property("SPEC", "Tizen.System.SystemSettings.SoundLockEnabled A")]
1240 //[Property("SPEC_URL", "-")]
1241 //[Property("CRITERIA", "PRO")]
1242 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1243 public static void SoundLockEnabled_READ_ONLY()
1245 LogUtils.StartTest();
1247 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SoundLockEnabled, "SoundLockEnabled_READ_ONLY: SoundLockEnabled not an instance of bool");
1254 //[Description("Test if get for SystemSettings:SoundSilentModeEnabled is working properly")]
1255 //[Property("SPEC", "Tizen.System.SystemSettings.SoundSilentModeEnabled A")]
1256 //[Property("SPEC_URL", "-")]
1257 //[Property("CRITERIA", "PRO")]
1258 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1259 public static void SoundSilentModeEnabled_READ_ONLY()
1261 LogUtils.StartTest();
1263 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SoundSilentModeEnabled, "SoundSilentModeEnabled_READ_ONLY: SoundSilentModeEnabled not an instance of bool");
1270 //[Description("Test if get for SystemSettings:SoundTouchEnabled is working properly")]
1271 //[Property("SPEC", "Tizen.System.SystemSettings.SoundTouchEnabled A")]
1272 //[Property("SPEC_URL", "-")]
1273 //[Property("CRITERIA", "PRO")]
1274 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1275 public static void SoundTouchEnabled_READ_ONLY()
1277 LogUtils.StartTest();
1279 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SoundTouchEnabled, "SoundTouchEnabled_READ_ONLY: SoundTouchEnabled not an instance of bool");
1283 // DisplayScreenRotationAuto
1286 //[Description("Test if get for SystemSettings:DisplayScreenRotationAutoEnabled is working properly")]
1287 //[Property("SPEC", "Tizen.System.SystemSettings.DisplayScreenRotationAutoEnabled A")]
1288 //[Property("SPEC_URL", "-")]
1289 //[Property("CRITERIA", "PRO")]
1290 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1291 public static void DisplayScreenRotationAutoEnabled_READ_ONLY()
1293 LogUtils.StartTest();
1295 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.DisplayScreenRotationAutoEnabled, "DisplayScreenRotationAutoEnabled_READ_ONLY: DisplayScreenRotationAutoEnabled not an instance of bool");
1302 //[Description("Test if get for SystemSettings:DeviceName is working properly")]
1303 //[Property("SPEC", "Tizen.System.SystemSettings.DeviceName A")]
1304 //[Property("SPEC_URL", "-")]
1305 //[Property("CRITERIA", "PRO")]
1306 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1307 public static void DeviceName_READ_ONLY()
1309 LogUtils.StartTest();
1311 Assert.IsNotNull(Tizen.System.SystemSettings.DeviceName, "DeviceName_READ_ONLY: DeviceName is null");
1312 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.DeviceName, "DeviceName_READ_ONLY: DeviceName not an instance of string");
1313 Assert.IsFalse(Tizen.System.SystemSettings.DeviceName.CompareTo("") == 0, "DeviceName_READ_ONLY: Device name is empty");
1320 //[Description("Test if get for SystemSettings:MotionEnabled is working properly")]
1321 //[Property("SPEC", "Tizen.System.SystemSettings.MotionEnabled A")]
1322 //[Property("SPEC_URL", "-")]
1323 //[Property("CRITERIA", "PRO")]
1324 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1325 public static void MotionEnabled_READ_ONLY()
1327 LogUtils.StartTest();
1329 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.MotionEnabled, "MotionEnabled_READ_ONLY: MotionEnabled not an instance of bool");
1333 // NetworkWifiNotification
1336 //[Description("Test if get for SystemSettings:NetworkWifiNotificationEnabled is working properly")]
1337 //[Property("SPEC", "Tizen.System.SystemSettings.NetworkWifiNotificationEnabled A")]
1338 //[Property("SPEC_URL", "-")]
1339 //[Property("CRITERIA", "PRO")]
1340 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1341 public static void NetworkWifiNotificationEnabled_READ_ONLY()
1346 LogUtils.StartTest();
1347 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.NetworkWifiNotificationEnabled, "NetworkWifiNotificationEnabled_READ_ONLY: NetworkWifiNotificationEnabled not an instance of bool");
1350 catch (NotSupportedException)
1352 bool isSupport = true;
1353 Information.TryGetValue<bool>("tizen.org/feature/network.wifi", out isSupport);
1354 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
1355 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.wifi)");
1356 LogUtils.NotSupport();
1360 // NetworkFlightMode
1363 //[Description("Test if get for SystemSettings:NetworkFlightModeEnabled is working properly")]
1364 //[Property("SPEC", "Tizen.System.SystemSettings.NetworkFlightModeEnabled A")]
1365 //[Property("SPEC_URL", "-")]
1366 //[Property("CRITERIA", "PRO")]
1367 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1368 public static void NetworkFlightModeEnabled_READ_ONLY()
1370 LogUtils.StartTest();
1372 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.NetworkFlightModeEnabled, "NetworkFlightModeEnabled_READ_ONLY: NetworkFlightModeEnabled not an instance of bool");
1376 // ScreenBacklightTime
1379 //[Description("Test if set/get for SystemSettings:ScreenBacklightTime is working properly")]
1380 //[Property("SPEC", "Tizen.System.SystemSettings.ScreenBacklightTime A")]
1381 //[Property("SPEC_URL", "-")]
1382 //[Property("CRITERIA", "PRW")]
1383 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1384 public static void ScreenBacklightTime_READ_WRITE_ALL()
1386 LogUtils.StartTest();
1388 Assert.IsInstanceOf<int>(Tizen.System.SystemSettings.ScreenBacklightTime, "ScreenBacklightTime_READ_WRITE_ALL: ScreenBacklightTime not an instance of int");
1390 int preValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1391 Tizen.System.SystemSettings.ScreenBacklightTime = setValue;
1392 var getValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1393 Assert.IsTrue(setValue == getValue, "ScreenBacklightTime_READ_WRITE_ALL: Set value and get value of the property should be same.");
1396 Tizen.System.SystemSettings.ScreenBacklightTime = setValue;
1397 getValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1398 Assert.IsTrue(setValue == getValue, "ScreenBacklightTime_READ_WRITE_ALL: Set value and get value of the property should be same.");
1401 Tizen.System.SystemSettings.ScreenBacklightTime = setValue;
1402 getValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1403 Assert.IsTrue(setValue == getValue, "ScreenBacklightTime_READ_WRITE_ALL: Set value and get value of the property should be same.");
1406 Tizen.System.SystemSettings.ScreenBacklightTime = setValue;
1407 getValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1408 Assert.IsTrue(setValue == getValue, "ScreenBacklightTime_READ_WRITE_ALL: Set value and get value of the property should be same.");
1411 Tizen.System.SystemSettings.ScreenBacklightTime = setValue;
1412 getValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1413 Assert.IsTrue(setValue == getValue, "ScreenBacklightTime_READ_WRITE_ALL: Set value and get value of the property should be same.");
1416 Tizen.System.SystemSettings.ScreenBacklightTime = setValue;
1417 getValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1418 Assert.IsTrue(setValue == getValue, "ScreenBacklightTime_READ_WRITE_ALL: Set value and get value of the property should be same.");
1419 Tizen.System.SystemSettings.ScreenBacklightTime = preValue;
1423 private static TaskCompletionSource<bool> s_tcsScreenBacklightTime15;
1424 private static bool s_screenBacklightTime15CallbackCalled = false;
1427 //[Description("Check if callback to SystemSettings:ScreenBacklightTimeChanged event is called")]
1428 //[Property("SPEC", "Tizen.System.SystemSettings.ScreenBacklightTimeChanged E")]
1429 //[Property("SPEC_URL", "-")]
1430 //[Property("CRITERIA", "EVL")]
1431 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1432 public static async Task ScreenBacklightTimeChanged_CHECK_EVENT_15()
1434 s_tcsScreenBacklightTime15 = new TaskCompletionSource<bool>();
1435 LogUtils.StartTest();
1437 Tizen.System.SystemSettings.ScreenBacklightTimeChanged += OnScreenBacklightTime15Changed;
1438 int preValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1439 Tizen.System.SystemSettings.ScreenBacklightTime = 15;
1440 await s_tcsScreenBacklightTime15.Task;
1441 Tizen.System.SystemSettings.ScreenBacklightTimeChanged -= OnScreenBacklightTime15Changed;
1442 Assert.IsTrue(s_screenBacklightTime15CallbackCalled, "ScreenBacklightTimeChanged_CHECK_EVENT_15: EventHandler added. Not getting called");
1443 s_screenBacklightTime15CallbackCalled = false;
1444 Tizen.System.SystemSettings.ScreenBacklightTime = preValue;
1447 private static void OnScreenBacklightTime15Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1449 s_tcsScreenBacklightTime15.SetResult(true);
1450 s_screenBacklightTime15CallbackCalled = true;
1451 Assert.IsInstanceOf<int>(e.Value, "OnScreenBacklightTime15Changed: ScreenBacklightTime not an instance of int");
1452 Assert.IsTrue(e.Value == 15, "OnScreenBacklightTime15Changed: The callback should receive the latest value for the property.");
1455 private static TaskCompletionSource<bool> s_tcsScreenBacklightTime30;
1456 private static bool s_screenBacklightTime30CallbackCalled = false;
1459 //[Description("Check if callback to SystemSettings:ScreenBacklightTimeChanged event is called")]
1460 //[Property("SPEC", "Tizen.System.SystemSettings.ScreenBacklightTimeChanged E")]
1461 //[Property("SPEC_URL", "-")]
1462 //[Property("CRITERIA", "EVL")]
1463 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1464 public static async Task ScreenBacklightTimeChanged_CHECK_EVENT_30()
1466 s_tcsScreenBacklightTime30 = new TaskCompletionSource<bool>();
1467 LogUtils.StartTest();
1469 Tizen.System.SystemSettings.ScreenBacklightTimeChanged += OnScreenBacklightTime30Changed;
1470 int preValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1471 Tizen.System.SystemSettings.ScreenBacklightTime = 30;
1472 await s_tcsScreenBacklightTime30.Task;
1473 Tizen.System.SystemSettings.ScreenBacklightTimeChanged -= OnScreenBacklightTime30Changed;
1474 Assert.IsTrue(s_screenBacklightTime30CallbackCalled, "ScreenBacklightTimeChanged_CHECK_EVENT_30: EventHandler added. Not getting called");
1475 s_screenBacklightTime30CallbackCalled = false;
1476 Tizen.System.SystemSettings.ScreenBacklightTime = preValue;
1479 private static void OnScreenBacklightTime30Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1481 s_tcsScreenBacklightTime30.SetResult(true);
1482 s_screenBacklightTime30CallbackCalled = true;
1483 Assert.IsInstanceOf<int>(e.Value, "OnScreenBacklightTime30Changed: ScreenBacklightTime not an instance of int");
1484 Assert.IsTrue(e.Value == 30, "OnScreenBacklightTime30Changed: The callback should receive the latest value for the property.");
1487 private static TaskCompletionSource<bool> s_tcsScreenBacklightTime60;
1488 private static bool s_screenBacklightTime60CallbackCalled = false;
1491 //[Description("Check if callback to SystemSettings:ScreenBacklightTimeChanged event is called")]
1492 //[Property("SPEC", "Tizen.System.SystemSettings.ScreenBacklightTimeChanged E")]
1493 //[Property("SPEC_URL", "-")]
1494 //[Property("CRITERIA", "EVL")]
1495 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1496 public static async Task ScreenBacklightTimeChanged_CHECK_EVENT_60()
1498 s_tcsScreenBacklightTime60 = new TaskCompletionSource<bool>();
1499 LogUtils.StartTest();
1501 Tizen.System.SystemSettings.ScreenBacklightTimeChanged += OnScreenBacklightTime60Changed;
1502 int preValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1503 Tizen.System.SystemSettings.ScreenBacklightTime = 60;
1504 await s_tcsScreenBacklightTime60.Task;
1505 Tizen.System.SystemSettings.ScreenBacklightTimeChanged -= OnScreenBacklightTime60Changed;
1506 Assert.IsTrue(s_screenBacklightTime60CallbackCalled, "ScreenBacklightTimeChanged_CHECK_EVENT_60: EventHandler added. Not getting called");
1507 s_screenBacklightTime60CallbackCalled = false;
1508 Tizen.System.SystemSettings.ScreenBacklightTime = preValue;
1511 private static void OnScreenBacklightTime60Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1513 s_tcsScreenBacklightTime60.SetResult(true);
1514 s_screenBacklightTime60CallbackCalled = true;
1515 Assert.IsInstanceOf<int>(e.Value, "OnScreenBacklightTime60Changed: ScreenBacklightTime not an instance of int");
1516 Assert.IsTrue(e.Value == 60, "OnScreenBacklightTime60Changed: The callback should receive the latest value for the property.");
1519 private static TaskCompletionSource<bool> s_tcsScreenBacklightTime120;
1520 private static bool s_screenBacklightTime120CallbackCalled = false;
1523 //[Description("Check if callback to SystemSettings:ScreenBacklightTimeChanged event is called")]
1524 //[Property("SPEC", "Tizen.System.SystemSettings.ScreenBacklightTimeChanged E")]
1525 //[Property("SPEC_URL", "-")]
1526 //[Property("CRITERIA", "EVL")]
1527 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1528 public static async Task ScreenBacklightTimeChanged_CHECK_EVENT_120()
1530 s_tcsScreenBacklightTime120 = new TaskCompletionSource<bool>();
1531 LogUtils.StartTest();
1533 Tizen.System.SystemSettings.ScreenBacklightTimeChanged += OnScreenBacklightTime120Changed;
1534 int preValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1535 Tizen.System.SystemSettings.ScreenBacklightTime = 120;
1536 await s_tcsScreenBacklightTime120.Task;
1537 Tizen.System.SystemSettings.ScreenBacklightTimeChanged -= OnScreenBacklightTime120Changed;
1538 Assert.IsTrue(s_screenBacklightTime120CallbackCalled, "ScreenBacklightTimeChanged_CHECK_EVENT_120: EventHandler added. Not getting called");
1539 s_screenBacklightTime120CallbackCalled = false;
1540 Tizen.System.SystemSettings.ScreenBacklightTime = preValue;
1543 private static void OnScreenBacklightTime120Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1545 s_tcsScreenBacklightTime120.SetResult(true);
1546 s_screenBacklightTime120CallbackCalled = true;
1547 Assert.IsInstanceOf<int>(e.Value, "OnScreenBacklightTime120Changed: ScreenBacklightTime not an instance of int");
1548 Assert.IsTrue(e.Value == 120, "OnScreenBacklightTime120Changed: The callback should receive the latest value for the property.");
1551 private static TaskCompletionSource<bool> s_tcsScreenBacklightTime300;
1552 private static bool s_screenBacklightTime300CallbackCalled = false;
1555 //[Description("Check if callback to SystemSettings:ScreenBacklightTimeChanged event is called")]
1556 //[Property("SPEC", "Tizen.System.SystemSettings.ScreenBacklightTimeChanged E")]
1557 //[Property("SPEC_URL", "-")]
1558 //[Property("CRITERIA", "EVL")]
1559 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1560 public static async Task ScreenBacklightTimeChanged_CHECK_EVENT_300()
1562 s_tcsScreenBacklightTime300 = new TaskCompletionSource<bool>();
1563 LogUtils.StartTest();
1565 Tizen.System.SystemSettings.ScreenBacklightTimeChanged += OnScreenBacklightTime300Changed;
1566 int preValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1567 Tizen.System.SystemSettings.ScreenBacklightTime = 300;
1568 await s_tcsScreenBacklightTime300.Task;
1569 Tizen.System.SystemSettings.ScreenBacklightTimeChanged -= OnScreenBacklightTime300Changed;
1570 Assert.IsTrue(s_screenBacklightTime300CallbackCalled, "ScreenBacklightTimeChanged_CHECK_EVENT_300: EventHandler added. Not getting called");
1571 s_screenBacklightTime300CallbackCalled = false;
1572 Tizen.System.SystemSettings.ScreenBacklightTime = preValue;
1575 private static void OnScreenBacklightTime300Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1577 s_tcsScreenBacklightTime300.SetResult(true);
1578 s_screenBacklightTime300CallbackCalled = true;
1579 Assert.IsInstanceOf<int>(e.Value, "OnScreenBacklightTime300Changed: ScreenBacklightTime not an instance of int");
1580 Assert.IsTrue(e.Value == 300, "OnScreenBacklightTime300Changed: The callback should receive the latest value for the property.");
1583 private static TaskCompletionSource<bool> s_tcsScreenBacklightTime600;
1584 private static bool s_screenBacklightTime600CallbackCalled = false;
1587 //[Description("Check if callback to SystemSettings:ScreenBacklightTimeChanged event is called")]
1588 //[Property("SPEC", "Tizen.System.SystemSettings.ScreenBacklightTimeChanged E")]
1589 //[Property("SPEC_URL", "-")]
1590 //[Property("CRITERIA", "EVL")]
1591 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1592 public static async Task ScreenBacklightTimeChanged_CHECK_EVENT_600()
1594 s_tcsScreenBacklightTime600 = new TaskCompletionSource<bool>();
1595 LogUtils.StartTest();
1597 Tizen.System.SystemSettings.ScreenBacklightTimeChanged += OnScreenBacklightTime600Changed;
1598 int preValue = Tizen.System.SystemSettings.ScreenBacklightTime;
1599 Tizen.System.SystemSettings.ScreenBacklightTime = 600;
1600 await s_tcsScreenBacklightTime600.Task;
1601 Tizen.System.SystemSettings.ScreenBacklightTimeChanged -= OnScreenBacklightTime600Changed;
1602 Assert.IsTrue(s_screenBacklightTime600CallbackCalled, "ScreenBacklightTimeChanged_CHECK_EVENT_600: EventHandler added. Not getting called");
1603 s_screenBacklightTime600CallbackCalled = false;
1604 Tizen.System.SystemSettings.ScreenBacklightTime = preValue;
1607 private static void OnScreenBacklightTime600Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1609 s_tcsScreenBacklightTime600.SetResult(true);
1610 s_screenBacklightTime600CallbackCalled = true;
1611 Assert.IsInstanceOf<int>(e.Value, "OnScreenBacklightTime600Changed: ScreenBacklightTime not an instance of int");
1612 Assert.IsTrue(e.Value == 600, "OnScreenBacklightTime600Changed; The callback should receive the latest value for the property.");
1615 // SoundNotification
1618 //[Description("Test if set/get for SystemSettings:SoundNotification is working properly")]
1619 //[Property("SPEC", "Tizen.System.SystemSettings.SoundNotification A")]
1620 //[Property("SPEC_URL", "-")]
1621 //[Property("CRITERIA", "PRW")]
1622 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1623 public static void SoundNotification_READ_WRITE()
1627 LogUtils.StartTest();
1629 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.SoundNotification, "SoundNotification_READ_WRITE: SoundNotification not an instance of string");
1630 var setValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.SoundNotification);
1631 string preValue = Tizen.System.SystemSettings.SoundNotification;
1632 Tizen.System.SystemSettings.SoundNotification = setValue;
1633 var getValue = Tizen.System.SystemSettings.SoundNotification;
1634 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "SoundNotification_READ_WRITE: Set value and get value of the property should be same.");
1635 Tizen.System.SystemSettings.SoundNotification = preValue;
1638 catch (NotSupportedException)
1640 bool isSupport = true;
1641 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.incoming_call", out isSupport);
1642 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
1643 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.incoming_call)");
1644 LogUtils.NotSupport();
1648 private static TaskCompletionSource<bool> s_tcsSoundNotification;
1649 private static bool s_soundNotificationCallbackCalled = false;
1650 private static readonly string s_soundNotificationValue = SystemSettingsTestInput.GetStringValue((int)Tizen.System.SystemSettingsKeys.SoundNotification);
1653 //[Description("Check if callback to SystemSettings:SoundNotificationChanged event is called")]
1654 //[Property("SPEC", "Tizen.System.SystemSettings.SoundNotificationChanged E")]
1655 //[Property("SPEC_URL", "-")]
1656 //[Property("CRITERIA", "EVL")]
1657 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1658 public static async Task SoundNotificationChanged_CHECK_EVENT()
1662 s_tcsSoundNotification = new TaskCompletionSource<bool>();
1663 LogUtils.StartTest();
1665 Tizen.System.SystemSettings.SoundNotificationChanged += OnSoundNotificationChanged;
1666 string preValue = Tizen.System.SystemSettings.SoundNotification;
1667 Tizen.System.SystemSettings.SoundNotification = s_soundNotificationValue;
1668 await s_tcsSoundNotification.Task;
1669 Assert.IsTrue(s_soundNotificationCallbackCalled, "SoundNotificationChanged_CHECK_EVENT: EventHandler added. Not getting called");
1671 s_soundNotificationCallbackCalled = false;
1672 Tizen.System.SystemSettings.SoundNotificationChanged -= OnSoundNotificationChanged;
1673 Tizen.System.SystemSettings.SoundNotification = s_soundNotificationValue;
1674 await Task.Delay(100);
1675 Assert.IsFalse(s_soundNotificationCallbackCalled, "SoundNotificationChanged_CHECK_EVENT: EventHandler removed. Still getting called");
1676 Tizen.System.SystemSettings.SoundNotification = preValue;
1679 catch (NotSupportedException)
1681 bool isSupport = true;
1682 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.incoming_call", out isSupport);
1683 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
1684 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.incoming_call)");
1685 LogUtils.NotSupport();
1688 private static void OnSoundNotificationChanged(object sender, Tizen.System.SoundNotificationChangedEventArgs e)
1690 s_tcsSoundNotification.SetResult(true);
1691 s_soundNotificationCallbackCalled = true;
1692 Assert.IsInstanceOf<string>(e.Value, "OnSoundNotificationChanged: SoundNotification not an instance of string");
1693 Assert.IsTrue(s_soundNotificationValue.CompareTo(e.Value) == 0, "OnSoundNotificationChanged: The callback should receive the latest value for the property.");
1696 // SoundNotificationRepetitionPeriod
1699 //[Description("Test if set/get for SystemSettings:SoundNotificationRepetitionPeriod is working properly")]
1700 //[Property("SPEC", "Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod A")]
1701 //[Property("SPEC_URL", "-")]
1702 //[Property("CRITERIA", "PRW")]
1703 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1704 public static void SoundNotificationRepetitionPeriod_READ_WRITE()
1706 LogUtils.StartTest();
1708 Assert.IsInstanceOf<int>(Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod, "SoundNotificationRepetitionPeriod_READ_WRITE: SoundNotificationRepetitionPeriod not an instance of int");
1710 int preValue = Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod;
1711 Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod = setValue;
1712 var getValue = Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod;
1713 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "SoundNotificationRepetitionPeriod_READ_WRITE: Set value and get value of the property should be same.");
1714 Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod = preValue;
1718 private static TaskCompletionSource<bool> s_tcsSoundNotificationRepetitionPeriod;
1719 private static bool s_soundNotificationRepetitionPeriodCallbackCalled = false;
1720 private static readonly int s_soundNotificationRepetitionPeriodValue = 300;
1723 //[Description("Check if callback to SystemSettings:SoundNotificationRepetitionPeriodChanged event is called")]
1724 //[Property("SPEC", "Tizen.System.SystemSettings.SoundNotificationRepetitionPeriodChanged E")]
1725 //[Property("SPEC_URL", "-")]
1726 //[Property("CRITERIA", "EVL")]
1727 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1728 public static async Task SoundNotificationRepetitionPeriodChanged_CHECK_EVENT()
1730 s_tcsSoundNotificationRepetitionPeriod = new TaskCompletionSource<bool>();
1731 LogUtils.StartTest();
1733 Tizen.System.SystemSettings.SoundNotificationRepetitionPeriodChanged += OnSoundNotificationRepetitionPeriodChanged;
1734 int preValue = Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod;
1735 Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod = s_soundNotificationRepetitionPeriodValue;
1736 await s_tcsSoundNotificationRepetitionPeriod.Task;
1737 Assert.IsTrue(s_soundNotificationRepetitionPeriodCallbackCalled, "SoundNotificationRepetitionPeriodChanged_CHECK_EVENT: EventHandler added. Not getting called");
1738 s_soundNotificationRepetitionPeriodCallbackCalled = false;
1740 Tizen.System.SystemSettings.SoundNotificationRepetitionPeriodChanged -= OnSoundNotificationRepetitionPeriodChanged;
1741 Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod = s_soundNotificationRepetitionPeriodValue;
1742 await Task.Delay(100);
1743 Assert.IsFalse(s_soundNotificationRepetitionPeriodCallbackCalled, "SoundNotificationRepetitionPeriodChanged_CHECK_EVENT: EventHandler removed. Still getting called");
1744 Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod = preValue;
1747 private static void OnSoundNotificationRepetitionPeriodChanged(object sender, Tizen.System.SoundNotificationRepetitionPeriodChangedEventArgs e)
1749 s_tcsSoundNotificationRepetitionPeriod.SetResult(true);
1750 s_soundNotificationRepetitionPeriodCallbackCalled = true;
1751 Assert.IsInstanceOf<int>(e.Value, "OnSoundNotificationRepetitionPeriodChanged: SoundNotificationRepetitionPeriod not an instance of int");
1752 Assert.IsTrue(s_soundNotificationRepetitionPeriodValue.CompareTo(e.Value) == 0, "OnSoundNotificationRepetitionPeriodChanged: The callback should receive the latest value for the property.");
1758 //[Description("Test if set/get for SystemSettings:LockState is working properly")]
1759 //[Property("SPEC", "Tizen.System.SystemSettings.LockState A")]
1760 //[Property("SPEC_URL", "-")]
1761 //[Property("CRITERIA", "PRE")]
1762 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1763 public static void LockState_READ_WRITE_ALL()
1765 LogUtils.StartTest();
1767 Assert.IsInstanceOf<Tizen.System.SystemSettingsIdleLockState>(Tizen.System.SystemSettings.LockState, "LockState_READ_WRITE_ALL: LockState not an instance of SystemSettingsIdleLockState");
1768 SystemSettingsIdleLockState preValue = Tizen.System.SystemSettings.LockState;
1769 var setValue = Tizen.System.SystemSettingsIdleLockState.Unlock;
1770 Tizen.System.SystemSettings.LockState = setValue;
1771 var getValue = Tizen.System.SystemSettings.LockState;
1772 Assert.IsTrue(setValue == getValue, "LockState_READ_WRITE_ALL: Set value and get value of the property should be same.");
1774 setValue = Tizen.System.SystemSettingsIdleLockState.Lock;
1775 Tizen.System.SystemSettings.LockState = setValue;
1776 getValue = Tizen.System.SystemSettings.LockState;
1777 Assert.IsTrue(setValue == getValue, "LockState_READ_WRITE_ALL: Set value and get value of the property should be same.");
1779 setValue = Tizen.System.SystemSettingsIdleLockState.LaunchingLock;
1780 Tizen.System.SystemSettings.LockState = setValue;
1781 getValue = Tizen.System.SystemSettings.LockState;
1782 Assert.IsTrue(setValue == getValue, "LockState_READ_WRITE_ALL: Set value and get value of the property should be same.");
1783 Tizen.System.SystemSettings.LockState = preValue;
1787 private static TaskCompletionSource<bool> s_tcsLockStateLock;
1788 private static bool s_lockStateLockCallbackCalled = false;
1791 //[Description("Check if callback to SystemSettings:LockStateChanged event is called")]
1792 //[Property("SPEC", "Tizen.System.SystemSettings.LockStateChanged E")]
1793 //[Property("SPEC_URL", "-")]
1794 //[Property("CRITERIA", "EVL")]
1795 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1796 public static async Task LockStateChanged_CHECK_EVENT_LOCK()
1798 s_tcsLockStateLock = new TaskCompletionSource<bool>();
1799 LogUtils.StartTest();
1801 Tizen.System.SystemSettings.LockStateChanged += OnLockStateChangedLock;
1802 SystemSettingsIdleLockState preValue = Tizen.System.SystemSettings.LockState;
1803 Tizen.System.SystemSettings.LockState = Tizen.System.SystemSettingsIdleLockState.Lock;
1804 await s_tcsLockStateLock.Task;
1805 Assert.IsTrue(s_lockStateLockCallbackCalled, "LockStateChanged_CHECK_EVENT_LOCK: EventHandler added. Not getting called");
1806 Tizen.System.SystemSettings.LockStateChanged -= OnLockStateChangedLock;
1807 s_lockStateLockCallbackCalled = false;
1808 Tizen.System.SystemSettings.LockState = preValue;
1811 private static void OnLockStateChangedLock(object sender, Tizen.System.LockStateChangedEventArgs e)
1813 s_tcsLockStateLock.SetResult(true);
1814 s_lockStateLockCallbackCalled = true;
1815 Assert.IsInstanceOf<Tizen.System.SystemSettingsIdleLockState>(e.Value, "OnLockStateChangedLock: LockState not an instance of SystemSettingsIdleLockState");
1816 Assert.IsTrue(e.Value == Tizen.System.SystemSettingsIdleLockState.Lock, "OnLockStateChangedLock: The callback should receive the latest value for the property.");
1819 private static TaskCompletionSource<bool> s_tcsLockStateUnlock;
1820 private static bool s_lockStateUnlockCallbackCalled = false;
1823 //[Description("Check if callback to SystemSettings:LockStateChanged event is called")]
1824 //[Property("SPEC", "Tizen.System.SystemSettings.LockStateChanged E")]
1825 //[Property("SPEC_URL", "-")]
1826 //[Property("CRITERIA", "EVL")]
1827 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1828 public static async Task LockStateChanged_CHECK_EVENT_UNLOCK()
1830 s_tcsLockStateUnlock = new TaskCompletionSource<bool>();
1831 LogUtils.StartTest();
1833 Tizen.System.SystemSettings.LockStateChanged += OnLockStateChangedUnlock;
1834 SystemSettingsIdleLockState preValue = Tizen.System.SystemSettings.LockState;
1835 Tizen.System.SystemSettings.LockState = Tizen.System.SystemSettingsIdleLockState.Unlock;
1836 await s_tcsLockStateUnlock.Task;
1837 Tizen.System.SystemSettings.LockStateChanged -= OnLockStateChangedUnlock;
1838 Assert.IsTrue(s_lockStateUnlockCallbackCalled, "LockStateChanged_CHECK_EVENT_UNLOCK: EventHandler added. Not getting called");
1839 s_lockStateLockCallbackCalled = false;
1840 Tizen.System.SystemSettings.LockState = preValue;
1843 private static void OnLockStateChangedUnlock(object sender, Tizen.System.LockStateChangedEventArgs e)
1845 s_tcsLockStateUnlock.SetResult(true);
1846 s_lockStateUnlockCallbackCalled = true;
1847 Assert.IsInstanceOf<Tizen.System.SystemSettingsIdleLockState>(e.Value, "OnLockStateChangedUnlock: LockState not an instance of SystemSettingsIdleLockState");
1848 Assert.IsTrue(e.Value == Tizen.System.SystemSettingsIdleLockState.Unlock, "OnLockStateChangedUnlock: The callback should receive the latest value for the property.");
1851 private static TaskCompletionSource<bool> s_tcsLockStateLaunchingLock;
1852 private static bool s_lockStateLaunchingLockCallbackCalled = false;
1855 //[Description("Check if callback to SystemSettings:LockStateChanged event is called")]
1856 //[Property("SPEC", "Tizen.System.SystemSettings.LockStateChanged E")]
1857 //[Property("SPEC_URL", "-")]
1858 //[Property("CRITERIA", "EVL")]
1859 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1860 public static async Task LockStateChanged_CHECK_EVENT_LAUNCHING_LOCK()
1862 s_tcsLockStateLaunchingLock = new TaskCompletionSource<bool>();
1863 LogUtils.StartTest();
1865 Tizen.System.SystemSettings.LockStateChanged += OnLockStateChangedLaunchingLock;
1866 SystemSettingsIdleLockState preValue = Tizen.System.SystemSettings.LockState;
1867 Tizen.System.SystemSettings.LockState = Tizen.System.SystemSettingsIdleLockState.LaunchingLock;
1868 await s_tcsLockStateLaunchingLock.Task;
1869 Tizen.System.SystemSettings.LockStateChanged -= OnLockStateChangedLaunchingLock;
1870 Assert.IsTrue(s_lockStateLaunchingLockCallbackCalled, "LockStateChanged_CHECK_EVENT_LAUNCHING_LOCK: EventHandler added. Not getting called");
1871 s_lockStateLockCallbackCalled = false;
1872 Tizen.System.SystemSettings.LockState = preValue;
1875 private static void OnLockStateChangedLaunchingLock(object sender, Tizen.System.LockStateChangedEventArgs e)
1877 s_tcsLockStateLaunchingLock.SetResult(true);
1878 s_lockStateLaunchingLockCallbackCalled = true;
1879 Assert.IsInstanceOf<Tizen.System.SystemSettingsIdleLockState>(e.Value, "OnLockStateChangedLaunchingLock: LockState not an instance of SystemSettingsIdleLockState");
1880 Assert.IsTrue(e.Value == Tizen.System.SystemSettingsIdleLockState.LaunchingLock, "OnLockStateChangedLaunchingLock: The callback should receive the latest value for the property.");
1886 //[Description("Test if get for SystemSettings:Time is working properly")]
1887 //[Property("SPEC", "Tizen.System.SystemSettings.Time A")]
1888 //[Property("SPEC_URL", "-")]
1889 //[Property("CRITERIA", "PRO")]
1890 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1891 public static void Time_READ_ONLY()
1893 LogUtils.StartTest();
1895 Assert.IsInstanceOf<int>(Tizen.System.SystemSettings.Time, "Time_READ_ONLY: Time not an instance of int");
1896 var readValue = Tizen.System.SystemSettings.Time;
1897 Assert.NotNull(readValue, "Should be readable");
1901 // UsbDebuggingEnabled
1904 //[Description("Test if get for SystemSettings:UsbDebuggingEnabled is working properly")]
1905 //[Property("SPEC", "Tizen.System.SystemSettings.UsbDebuggingEnabled A")]
1906 //[Property("SPEC_URL", "-")]
1907 //[Property("CRITERIA", "PRW")]
1908 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1909 public static void UsbDebuggingEnabled_READ_WRITE()
1911 LogUtils.StartTest();
1913 bool setValue = true;
1914 bool preValue = Tizen.System.SystemSettings.UsbDebuggingEnabled;
1915 Tizen.System.SystemSettings.UsbDebuggingEnabled = setValue;
1916 Assert.IsTrue(Tizen.System.SystemSettings.UsbDebuggingEnabled, "UsbDebuggingEnabled_READ_WRITE: Set value and get value of the property should be same.");
1917 Tizen.System.SystemSettings.UsbDebuggingEnabled = preValue;
1926 //[Description("Test if set/get for SystemSettings:AdsId is working properly")]
1927 //[Property("SPEC", "Tizen.System.SystemSettings.AdsId A")]
1928 //[Property("SPEC_URL", "-")]
1929 //[Property("CRITERIA", "PRW")]
1930 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1931 public static void AdsId_READ_WRITE()
1935 LogUtils.StartTest();
1937 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.AdsId, "AdsId_READ_WRITE: AdsId not an instance of string");
1938 string preValue = Tizen.System.SystemSettings.AdsId;
1939 var setValue = "00000215-0156-0133-0034-000000000102";
1941 Tizen.System.SystemSettings.AdsId = setValue;
1942 var getValue = Tizen.System.SystemSettings.AdsId;
1943 Assert.IsTrue(setValue.CompareTo(getValue) == 0, "AdsId_READ_WRITE: Set value and get value of the property should be same.");
1944 Tizen.System.SystemSettings.AdsId = preValue;
1947 catch (NotSupportedException)
1949 bool isSupport = true;
1950 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.incoming_call", out isSupport);
1951 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
1952 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.incoming_call)");
1953 LogUtils.NotSupport();
1957 private static TaskCompletionSource<bool> s_tcsAdsId;
1958 private static bool s_adsIdCallbackCalled = false;
1959 private static readonly string s_adsIdValue = "00000215-0156-0133-0034-000000000102";
1962 //[Description("Check if callback to SystemSettings:AdsIdChanged event is called")]
1963 //[Property("SPEC", "Tizen.System.SystemSettings.AdsIdChanged E")]
1964 //[Property("SPEC_URL", "-")]
1965 //[Property("CRITERIA", "EVL")]
1966 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
1967 public static async Task AdsIdChanged_CHECK_EVENT()
1971 s_tcsAdsId = new TaskCompletionSource<bool>();
1972 LogUtils.StartTest();
1974 Tizen.System.SystemSettings.AdsIdChanged += OnAdsIdChanged;
1975 string preValue = Tizen.System.SystemSettings.AdsId;
1976 Tizen.System.SystemSettings.AdsId = s_adsIdValue;
1977 await s_tcsAdsId.Task;
1978 Assert.IsTrue(s_adsIdCallbackCalled, "AdsIdChanged_CHECK_EVENT: EventHandler added. Not getting called");
1979 s_adsIdCallbackCalled = false;
1980 Tizen.System.SystemSettings.AdsIdChanged -= OnAdsIdChanged;
1981 Tizen.System.SystemSettings.AdsId = s_adsIdValue;
1982 await Task.Delay(100);
1983 Assert.IsFalse(s_adsIdCallbackCalled, "AdsIdChanged_CHECK_EVENT: EventHandler removed. Still getting called");
1984 Tizen.System.SystemSettings.AdsId = preValue;
1987 catch (NotSupportedException)
1989 bool isSupport = true;
1990 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.incoming_call", out isSupport);
1991 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
1992 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.incoming_call)");
1993 LogUtils.NotSupport();
1996 private static void OnAdsIdChanged(object sender, Tizen.System.AdsIdChangedEventArgs e)
1998 s_tcsAdsId.SetResult(true);
1999 s_adsIdCallbackCalled = true;
2000 Assert.IsInstanceOf<string>(e.Value, "OnAdsIdChanged: AdsId not an instance of string");
2001 Assert.IsTrue(s_adsIdValue.CompareTo(e.Value) == 0, "OnAdsIdChanged: The callback should receive the latest value for the property.");
2007 //[Description("Test if get for SystemSettings:UltraDataSave is working properly")]
2008 //[Property("SPEC", "Tizen.System.SystemSettings.UltraDataSave A")]
2009 //[Property("SPEC_URL", "-")]
2010 //[Property("CRITERIA", "PRO")]
2011 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2012 public static void UltraDataSave_READ_ONLY()
2016 LogUtils.StartTest();
2018 Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.UltraDataSave, "UltraDataSave_READ_ONLY: UltraDataSave not an instance of string");
2019 var readValue = Tizen.System.SystemSettings.UltraDataSave;
2020 Assert.NotNull(readValue, "Should be readable");
2023 catch (NotSupportedException)
2025 bool isSupport = true;
2026 Information.TryGetValue<bool>("tizen.org/feature/network.telephony", out isSupport);
2027 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
2028 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/network.telephony)");
2029 LogUtils.NotSupport();
2037 //[Description("Test if set/get for SystemSettings:AccessibilityTtsEnabled is working properly")]
2038 //[Property("SPEC", "Tizen.System.SystemSettings.AccessibilityTtsEnabled A")]
2039 //[Property("SPEC_URL", "-")]
2040 //[Property("CRITERIA", "PRW")]
2041 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2042 public static void AccessibilityTtsEnabled_READ_WRITE()
2044 LogUtils.StartTest();
2046 bool preValue = Tizen.System.SystemSettings.AccessibilityTtsEnabled;
2047 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.AccessibilityTtsEnabled, "AccessibilityTtsEnabled_READ_WRITE: AccessibilityTtsEnabled not an instance of bool");
2048 Tizen.System.SystemSettings.AccessibilityTtsEnabled = true;
2049 Assert.IsTrue(Tizen.System.SystemSettings.AccessibilityTtsEnabled, "AccessibilityTts_READ_WRITE: Set value and get value of the property should be same.");
2050 Tizen.System.SystemSettings.AccessibilityTtsEnabled = false;
2051 Assert.IsFalse(Tizen.System.SystemSettings.AccessibilityTtsEnabled, "AccessibilityTts_READ_WRITE: Set value and get value of the property should be same.");
2052 Tizen.System.SystemSettings.AccessibilityTtsEnabled = preValue;
2056 private static TaskCompletionSource<bool> s_tcsAccessibilityTts;
2057 private static bool s_accessibilityTtsCallbackCalled = false;
2058 private static bool s_accessibilityTtsValue = !Tizen.System.SystemSettings.AccessibilityTtsEnabled;
2061 //[Description("Check if callback to SystemSettings:AccessibilityTtsSettingChanged event is called")]
2062 //[Property("SPEC", "Tizen.System.SystemSettings.AccessibilityTtsSettingChanged E")]
2063 //[Property("SPEC_URL", "-")]
2064 //[Property("CRITERIA", "EVL")]
2065 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2066 public static async Task AccessibilityTtsSettingChanged_CHECK_EVENT()
2068 s_tcsAccessibilityTts = new TaskCompletionSource<bool>();
2069 LogUtils.StartTest();
2071 Tizen.System.SystemSettings.AccessibilityTtsSettingChanged += OnAccessibilityTtsChanged;
2072 bool preValue = Tizen.System.SystemSettings.AccessibilityTtsEnabled;
2073 Tizen.System.SystemSettings.AccessibilityTtsEnabled = s_accessibilityTtsValue;
2074 await s_tcsAccessibilityTts.Task;
2075 s_tcsAccessibilityTts = new TaskCompletionSource<bool>();
2076 Assert.IsTrue(s_accessibilityTtsCallbackCalled, "AccessibilityTtsSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
2077 s_accessibilityTtsCallbackCalled = false;
2078 s_accessibilityTtsValue = !s_accessibilityTtsValue;
2079 Tizen.System.SystemSettings.AccessibilityTtsEnabled = s_accessibilityTtsValue;
2080 await s_tcsFontSizeNormal.Task;
2081 Assert.IsTrue(s_accessibilityTtsCallbackCalled, "AccessibilityTtsSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
2082 s_accessibilityTtsCallbackCalled = false;
2084 Tizen.System.SystemSettings.AccessibilityTtsSettingChanged -= OnAccessibilityTtsChanged;
2085 Tizen.System.SystemSettings.AccessibilityTtsEnabled = s_accessibilityTtsValue;
2086 await Task.Delay(100);
2087 Assert.IsFalse(s_accessibilityTtsCallbackCalled, "AccessibilityTtsSettingChanged_CHECK_EVENT: EventHandler removed. Still getting called");
2088 Tizen.System.SystemSettings.AccessibilityTtsEnabled = preValue;
2091 private static void OnAccessibilityTtsChanged(object sender, Tizen.System.AccessibilityTtsSettingChangedEventArgs e)
2093 s_tcsAccessibilityTts.SetResult(true);
2094 s_accessibilityTtsCallbackCalled = true;
2095 Assert.IsInstanceOf<bool>(e.Value, "OnAccessibilityTtsChanged: AccessibilityTtsEnabled not an instance of bool");
2096 Assert.IsTrue(e.Value == s_accessibilityTtsValue, "OnAccessibilityTtsChanged: The callback should receive the latest value for the property.");
2102 //[Description("Test if set/get for SystemSettings:Vibration is working properly")]
2103 //[Property("SPEC", "Tizen.System.SystemSettings.Vibration A")]
2104 //[Property("SPEC_URL", "-")]
2105 //[Property("CRITERIA", "PRW")]
2106 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2107 public static void Vibration_READ_WRITE()
2109 LogUtils.StartTest();
2111 bool preValue = Tizen.System.SystemSettings.Vibration;
2112 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.Vibration, "Vibration_READ_WRITE: Vibration not an instance of bool");
2113 Tizen.System.SystemSettings.Vibration = true;
2114 Assert.IsTrue(Tizen.System.SystemSettings.Vibration, "Vibration_READ_WRITE: Set value and get value of the property should be same.");
2115 Tizen.System.SystemSettings.Vibration = false;
2116 Assert.IsFalse(Tizen.System.SystemSettings.Vibration, "Vibration_READ_WRITE: Set value and get value of the property should be same.");
2117 Tizen.System.SystemSettings.Vibration = preValue;
2121 private static TaskCompletionSource<bool> s_tcsVibration;
2122 private static bool s_vibrationCallbackCalled = false;
2123 private static bool s_vibrationValue = !Tizen.System.SystemSettings.Vibration;
2126 //[Description("Check if callback to SystemSettings:VibrationSettingChanged event is called")]
2127 //[Property("SPEC", "Tizen.System.SystemSettings.VibrationSettingChanged E")]
2128 //[Property("SPEC_URL", "-")]
2129 //[Property("CRITERIA", "EVL")]
2130 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2131 public static async Task VibrationSettingChanged_CHECK_EVENT()
2133 s_tcsVibration = new TaskCompletionSource<bool>();
2134 LogUtils.StartTest();
2136 Tizen.System.SystemSettings.VibrationChanged += OnVibrationChanged;
2137 bool preValue = Tizen.System.SystemSettings.Vibration;
2138 Tizen.System.SystemSettings.Vibration = s_vibrationValue;
2139 await s_tcsVibration.Task;
2140 s_tcsVibration = new TaskCompletionSource<bool>();
2141 Assert.IsTrue(s_vibrationCallbackCalled, "VibrationSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
2142 s_vibrationCallbackCalled = false;
2143 s_vibrationValue = !s_vibrationValue;
2144 Tizen.System.SystemSettings.Vibration = s_vibrationValue;
2145 await s_tcsVibration.Task;
2146 Assert.IsTrue(s_vibrationCallbackCalled, "VibrationSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
2147 s_vibrationCallbackCalled = false;
2149 Tizen.System.SystemSettings.VibrationChanged -= OnVibrationChanged;
2150 Tizen.System.SystemSettings.Vibration = s_vibrationValue;
2151 await Task.Delay(100);
2152 Assert.IsFalse(s_vibrationCallbackCalled, "VibrationSettingChanged_CHECK_EVENT: EventHandler removed. Still getting called");
2153 Tizen.System.SystemSettings.Vibration = preValue;
2156 private static void OnVibrationChanged(object sender, Tizen.System.VibrationChangedEventArgs e)
2158 s_tcsVibration.SetResult(true);
2159 s_vibrationCallbackCalled = true;
2160 Assert.IsInstanceOf<bool>(e.Value, "OnVibrationChanged: Vibration not an instance of bool");
2161 Assert.IsTrue(e.Value == s_vibrationValue, "OnVibrationChanged: The callback should receive the latest value for the property.");
2164 // AutomaticTimeUpdate
2167 //[Description("Test if set/get for SystemSettings:AutomaticTimeUpdate is working properly")]
2168 //[Property("SPEC", "Tizen.System.SystemSettings.AutomaticTimeUpdate A")]
2169 //[Property("SPEC_URL", "-")]
2170 //[Property("CRITERIA", "PRW")]
2171 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2172 public static void AutomaticTimeUpdate_READ_WRITE()
2176 LogUtils.StartTest();
2178 bool preValue = Tizen.System.SystemSettings.AutomaticTimeUpdate;
2179 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.AutomaticTimeUpdate, "AutomaticTimeUpdate_READ_WRITE: AutomaticTimeUpdate not an instance of bool");
2180 Tizen.System.SystemSettings.AutomaticTimeUpdate = true;
2181 Assert.IsTrue(Tizen.System.SystemSettings.AutomaticTimeUpdate, "AutomaticTimeUpdate_READ_WRITE: Set value and get value of the property should be same.");
2182 Tizen.System.SystemSettings.AutomaticTimeUpdate = false;
2183 Assert.IsFalse(Tizen.System.SystemSettings.AutomaticTimeUpdate, "AutomaticTimeUpdate_READ_WRITE: Set value and get value of the property should be same.");
2184 Tizen.System.SystemSettings.AutomaticTimeUpdate = preValue;
2187 catch (NotSupportedException)
2189 bool isSupport = true;
2190 Information.TryGetValue<bool>("tizen.org/feature/network.telephony", out isSupport);
2191 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
2192 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/network.telephony)");
2193 LogUtils.NotSupport();
2197 private static TaskCompletionSource<bool> s_tcsAutomaticTimeUpdate;
2198 private static bool s_automaticTimeUpdateCallbackCalled = false;
2199 private static bool s_automaticTimeUpdateValue = false;
2202 //[Description("Check if callback to SystemSettings:AutomaticTimeUpdateSettingChanged event is called")]
2203 //[Property("SPEC", "Tizen.System.SystemSettings.AutomaticTimeUpdateSettingChanged E")]
2204 //[Property("SPEC_URL", "-")]
2205 //[Property("CRITERIA", "EVL")]
2206 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2207 public static async Task AutomaticTimeUpdateSettingChanged_CHECK_EVENT()
2211 s_tcsAutomaticTimeUpdate = new TaskCompletionSource<bool>();
2212 LogUtils.StartTest();
2214 s_automaticTimeUpdateValue = !Tizen.System.SystemSettings.AutomaticTimeUpdate;
2215 Tizen.System.SystemSettings.AutomaticTimeUpdateChanged += OnAutomaticTimeUpdateChanged;
2216 bool preValue = Tizen.System.SystemSettings.AutomaticTimeUpdate;
2217 Tizen.System.SystemSettings.AutomaticTimeUpdate = s_automaticTimeUpdateValue;
2218 await s_tcsAutomaticTimeUpdate.Task;
2219 Assert.IsTrue(s_automaticTimeUpdateCallbackCalled, "AutomaticTimeUpdateSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
2220 s_automaticTimeUpdateCallbackCalled = false;
2221 s_automaticTimeUpdateValue = !s_automaticTimeUpdateValue;
2222 Tizen.System.SystemSettings.AutomaticTimeUpdate = s_automaticTimeUpdateValue;
2223 s_tcsAutomaticTimeUpdate = new TaskCompletionSource<bool>();
2224 Assert.IsTrue(s_automaticTimeUpdateCallbackCalled, "AutomaticTimeUpdateSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
2225 s_automaticTimeUpdateCallbackCalled = false;
2227 Tizen.System.SystemSettings.AutomaticTimeUpdateChanged -= OnAutomaticTimeUpdateChanged;
2228 Tizen.System.SystemSettings.AutomaticTimeUpdate = s_automaticTimeUpdateValue;
2229 await Task.Delay(100);
2230 Assert.IsFalse(s_automaticTimeUpdateCallbackCalled, "AutomaticTimeUpdateSettingChanged_CHECK_EVENT: EventHandler removed. Still getting called");
2231 Tizen.System.SystemSettings.AutomaticTimeUpdate = preValue;
2234 catch (NotSupportedException)
2236 bool isSupport = true;
2237 Information.TryGetValue<bool>("tizen.org/feature/network.telephony", out isSupport);
2238 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
2239 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/network.telephony)");
2240 LogUtils.NotSupport();
2243 private static void OnAutomaticTimeUpdateChanged(object sender, Tizen.System.AutomaticTimeUpdateChangedEventArgs e)
2245 s_tcsAutomaticTimeUpdate.SetResult(true);
2246 s_automaticTimeUpdateCallbackCalled = true;
2247 Assert.IsInstanceOf<bool>(e.Value, "OnAutomaticTimeUpdateChanged: AutomaticTimeUpdate not an instance of bool");
2248 Assert.IsTrue(e.Value == s_automaticTimeUpdateValue, "OnAutomaticTimeUpdateChanged: The callback should receive the latest value for the property.");
2251 // DeveloperOptionState
2254 //[Description("Test if set/get for SystemSettings:DeveloperOptionState is working properly")]
2255 //[Property("SPEC", "Tizen.System.SystemSettings.DeveloperOptionState A")]
2256 //[Property("SPEC_URL", "-")]
2257 //[Property("CRITERIA", "PRW")]
2258 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2259 public static void DeveloperOptionState_READ_WRITE()
2261 LogUtils.StartTest();
2263 bool preValue = Tizen.System.SystemSettings.DeveloperOptionState;
2264 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.DeveloperOptionState, "DeveloperOptionState_READ_WRITE: DeveloperOptionState not an instance of bool");
2265 Tizen.System.SystemSettings.DeveloperOptionState = true;
2266 Assert.IsTrue(Tizen.System.SystemSettings.DeveloperOptionState, "DeveloperOptionState_READ_WRITE: Set value and get value of the property should be same.");
2267 Tizen.System.SystemSettings.DeveloperOptionState = false;
2268 Assert.IsFalse(Tizen.System.SystemSettings.DeveloperOptionState, "DeveloperOptionState_READ_WRITE: Set value and get value of the property should be same.");
2269 Tizen.System.SystemSettings.DeveloperOptionState = preValue;
2273 private static TaskCompletionSource<bool> s_tcsDeveloperOptionState;
2274 private static bool s_developerOptionStateCallbackCalled = false;
2275 private static bool s_developerOptionStateValue = !Tizen.System.SystemSettings.DeveloperOptionState;
2278 //[Description("Check if callback to SystemSettings:DeveloperOptionStateSettingChanged event is called")]
2279 //[Property("SPEC", "Tizen.System.SystemSettings.DeveloperOptionStateSettingChanged E")]
2280 //[Property("SPEC_URL", "-")]
2281 //[Property("CRITERIA", "EVL")]
2282 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2283 public static async Task DeveloperOptionStateSettingChanged_CHECK_EVENT()
2285 s_tcsDeveloperOptionState = new TaskCompletionSource<bool>();
2286 LogUtils.StartTest();
2288 Tizen.System.SystemSettings.DeveloperOptionStateChanged += OnDeveloperOptionStateChanged;
2289 bool preValue = Tizen.System.SystemSettings.DeveloperOptionState;
2290 Tizen.System.SystemSettings.DeveloperOptionState = s_developerOptionStateValue;
2291 await s_tcsDeveloperOptionState.Task;
2292 s_tcsDeveloperOptionState = new TaskCompletionSource<bool>();
2293 Assert.IsTrue(s_developerOptionStateCallbackCalled, "DeveloperOptionStateSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
2294 s_developerOptionStateCallbackCalled = false;
2295 s_developerOptionStateValue = !s_developerOptionStateValue;
2296 Tizen.System.SystemSettings.DeveloperOptionState = s_developerOptionStateValue;
2297 await s_tcsFontSizeNormal.Task;
2298 Assert.IsTrue(s_developerOptionStateCallbackCalled, "DeveloperOptionStateSettingChanged_CHECK_EVENT: EventHandler added. Not getting called");
2299 s_developerOptionStateCallbackCalled = false;
2301 Tizen.System.SystemSettings.DeveloperOptionStateChanged -= OnDeveloperOptionStateChanged;
2302 Tizen.System.SystemSettings.DeveloperOptionState = s_developerOptionStateValue;
2303 await Task.Delay(100);
2304 Assert.IsFalse(s_developerOptionStateCallbackCalled, "DeveloperOptionStateSettingChanged_CHECK_EVENT: EventHandler removed. Still getting called");
2305 Tizen.System.SystemSettings.DeveloperOptionState = preValue;
2308 private static void OnDeveloperOptionStateChanged(object sender, Tizen.System.DeveloperOptionStateChangedEventArgs e)
2310 s_tcsDeveloperOptionState.SetResult(true);
2311 s_developerOptionStateCallbackCalled = true;
2312 Assert.IsInstanceOf<bool>(e.Value, "OnDeveloperOptionStateChanged: DeveloperOptionState not an instance of bool");
2313 Assert.IsTrue(e.Value == s_developerOptionStateValue, "OnDeveloperOptionStateChanged: The callback should receive the latest value for the property.");
2316 // AccessibilityGrayscale
2319 //[Description("Test if set/get for SystemSettings:AccessibilityGrayscale is working properly")]
2320 //[Property("SPEC", "Tizen.System.SystemSettings.AccessibilityGrayscale A")]
2321 //[Property("SPEC_URL", "-")]
2322 //[Property("CRITERIA", "PRW")]
2323 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2324 public static void AccessibilityGrayscale_READ_WRITE()
2328 LogUtils.StartTest();
2330 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.AccessibilityGrayscale, "AccessibilityGrayscale_READ_WRITE: AccessibilityGrayscale not an instance of string");
2331 bool preValue = Tizen.System.SystemSettings.AccessibilityGrayscale;
2332 var setValue = !preValue;
2334 Tizen.System.SystemSettings.AccessibilityGrayscale = setValue;
2335 var getValue = Tizen.System.SystemSettings.AccessibilityGrayscale;
2336 Assert.IsTrue(getValue == setValue, "AccessibilityGrayscale_READ_WRITE: Set value and get value of the property should be same.");
2337 Tizen.System.SystemSettings.AccessibilityGrayscale = preValue;
2340 catch (NotSupportedException)
2342 bool isSupport = true;
2343 Information.TryGetValue<bool>("tizen.org/feature/accessibility.grayscale", out isSupport);
2344 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
2345 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/accessibility.grayscale)");
2346 LogUtils.NotSupport();
2350 private static TaskCompletionSource<bool> s_tcsAccessibilityGrayscale;
2351 private static bool s_accessibilityGrayscaleCallbackCalled = false;
2352 private static bool s_accessibilityGrayscaleValue = false;
2355 //[Description("Check if callback to SystemSettings:AccessibilityGrayscaleChanged event is called")]
2356 //[Property("SPEC", "Tizen.System.SystemSettings.AccessibilityGrayscaleChanged E")]
2357 //[Property("SPEC_URL", "-")]
2358 //[Property("CRITERIA", "EVL")]
2359 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2360 public static async Task AccessibilityGrayscaleChanged_CHECK_EVENT()
2364 s_tcsAccessibilityGrayscale = new TaskCompletionSource<bool>();
2365 LogUtils.StartTest();
2367 Tizen.System.SystemSettings.AccessibilityGrayscaleChanged += OnAccessibilityGrayscaleChanged;
2368 bool preValue = Tizen.System.SystemSettings.AccessibilityGrayscale;
2369 s_accessibilityGrayscaleValue = !preValue;
2370 Tizen.System.SystemSettings.AccessibilityGrayscale = s_accessibilityGrayscaleValue;
2371 await s_tcsAccessibilityGrayscale.Task;
2372 Assert.IsTrue(s_accessibilityGrayscaleCallbackCalled, "AccessibilityGrayscaleChanged_CHECK_EVENT: EventHandler added. Not getting called");
2373 s_accessibilityGrayscaleCallbackCalled = false;
2374 Tizen.System.SystemSettings.AccessibilityGrayscaleChanged -= OnAccessibilityGrayscaleChanged;
2375 Tizen.System.SystemSettings.AccessibilityGrayscale = !s_accessibilityGrayscaleValue;
2376 await Task.Delay(100);
2377 Assert.IsFalse(s_accessibilityGrayscaleCallbackCalled, "AccessibilityGrayscaleChanged_CHECK_EVENT: EventHandler removed. Still getting called");
2378 Tizen.System.SystemSettings.AccessibilityGrayscale = preValue;
2381 catch (NotSupportedException)
2383 bool isSupport = true;
2384 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.incoming_call", out isSupport);
2385 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
2386 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.incoming_call)");
2387 LogUtils.NotSupport();
2390 private static void OnAccessibilityGrayscaleChanged(object sender, Tizen.System.AccessibilityGrayscaleChangedEventArgs e)
2392 s_accessibilityGrayscaleCallbackCalled = true;
2393 Assert.IsInstanceOf<bool>(e.Value, "OnAccessibilityGrayscaleChanged: AccessibilityGrayscale not an instance of string");
2394 Assert.IsTrue(s_accessibilityGrayscaleValue == e.Value, "OnAccessibilityGrayscaleChanged: The callback should receive the latest value for the property.");
2397 // AccessibilityNegativeColor
2400 //[Description("Test if set/get for SystemSettings:AccessibilityNegativeColor is working properly")]
2401 //[Property("SPEC", "Tizen.System.SystemSettings.AccessibilityNegativeColor A")]
2402 //[Property("SPEC_URL", "-")]
2403 //[Property("CRITERIA", "PRW")]
2404 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2405 public static void AccessibilityNegativeColor_READ_WRITE()
2409 LogUtils.StartTest();
2411 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.AccessibilityNegativeColor, "AccessibilityNegativeColor_READ_WRITE: AccessibilityNegativeColor not an instance of string");
2412 bool preValue = Tizen.System.SystemSettings.AccessibilityNegativeColor;
2413 var setValue = !preValue;
2415 Tizen.System.SystemSettings.AccessibilityNegativeColor = setValue;
2416 var getValue = Tizen.System.SystemSettings.AccessibilityNegativeColor;
2417 Assert.IsTrue(getValue == setValue, "AccessibilityNegativeColor_READ_WRITE: Set value and get value of the property should be same.");
2418 Tizen.System.SystemSettings.AccessibilityNegativeColor = preValue;
2421 catch (NotSupportedException)
2423 bool isSupport = true;
2424 Information.TryGetValue<bool>("tizen.org/feature/accessibility.grayscale", out isSupport);
2425 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
2426 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/accessibility.grayscale)");
2427 LogUtils.NotSupport();
2431 private static TaskCompletionSource<bool> s_tcsAccessibilityNegativeColor;
2432 private static bool s_accessibilityNegativeColorCallbackCalled = false;
2433 private static bool s_accessibilityNegativeColorValue = false;
2436 //[Description("Check if callback to SystemSettings:AccessibilityNegativeColorChanged event is called")]
2437 //[Property("SPEC", "Tizen.System.SystemSettings.AccessibilityNegativeColorChanged E")]
2438 //[Property("SPEC_URL", "-")]
2439 //[Property("CRITERIA", "EVL")]
2440 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2441 public static async Task AccessibilityNegativeColorChanged_CHECK_EVENT()
2445 s_tcsAccessibilityNegativeColor = new TaskCompletionSource<bool>();
2446 LogUtils.StartTest();
2448 Tizen.System.SystemSettings.AccessibilityNegativeColorChanged += OnAccessibilityNegativeColorChanged;
2449 bool preValue = Tizen.System.SystemSettings.AccessibilityNegativeColor;
2450 s_accessibilityNegativeColorValue = !preValue;
2451 Tizen.System.SystemSettings.AccessibilityNegativeColor = s_accessibilityNegativeColorValue;
2452 await s_tcsAccessibilityNegativeColor.Task;
2453 Assert.IsTrue(s_accessibilityNegativeColorCallbackCalled, "AccessibilityNegativeColorChanged_CHECK_EVENT: EventHandler added. Not getting called");
2454 s_accessibilityNegativeColorCallbackCalled = false;
2455 Tizen.System.SystemSettings.AccessibilityNegativeColorChanged -= OnAccessibilityNegativeColorChanged;
2456 Tizen.System.SystemSettings.AccessibilityNegativeColor = !s_accessibilityNegativeColorValue;
2457 await Task.Delay(100);
2458 Assert.IsFalse(s_accessibilityNegativeColorCallbackCalled, "AccessibilityNegativeColorChanged_CHECK_EVENT: EventHandler removed. Still getting called");
2459 Tizen.System.SystemSettings.AccessibilityNegativeColor = preValue;
2462 catch (NotSupportedException)
2464 bool isSupport = true;
2465 Information.TryGetValue<bool>("tizen.org/feature/systemsetting.incoming_call", out isSupport);
2466 Assert.IsTrue(isSupport == false, "Invalid NotSupportedException");
2467 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", ">>>>>> NotSupport(tizen.org/feature/systemsetting.incoming_call)");
2468 LogUtils.NotSupport();
2471 private static void OnAccessibilityNegativeColorChanged(object sender, Tizen.System.AccessibilityNegativeColorChangedEventArgs e)
2473 s_tcsAccessibilityNegativeColor.SetResult(true);
2474 s_accessibilityNegativeColorCallbackCalled = true;
2475 Assert.IsInstanceOf<bool>(e.Value, "OnAccessibilityNegativeColorChanged: AccessibilityNegativeColor not an instance of string");
2476 Assert.IsTrue(s_accessibilityNegativeColorValue == e.Value, "OnAccessibilityNegativeColorChanged: The callback should receive the latest value for the property.");
2479 // RotaryEventEnabled
2482 //[Description("Test if set/get for SystemSettings:RotaryEventEnabled is working properly")]
2483 //[Property("SPEC", "Tizen.System.SystemSettings.RotaryEventEnabled A")]
2484 //[Property("SPEC_URL", "-")]
2485 //[Property("CRITERIA", "PRW")]
2486 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2487 public static void RotaryEventEnabled_READ_WRITE()
2489 LogUtils.StartTest();
2491 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.RotaryEventEnabled, "RotaryEventEnabled_READ_WRITE: RotaryEventEnabled not an instance of string");
2492 bool preValue = Tizen.System.SystemSettings.RotaryEventEnabled;
2493 var setValue = !preValue;
2495 Tizen.System.SystemSettings.RotaryEventEnabled = setValue;
2496 var getValue = Tizen.System.SystemSettings.RotaryEventEnabled;
2497 Assert.IsTrue(getValue == setValue, "RotaryEventEnabled_READ_WRITE: Set value and get value of the property should be same.");
2498 Tizen.System.SystemSettings.RotaryEventEnabled = preValue;
2502 private static TaskCompletionSource<bool> s_tcsRotaryEventEnabled;
2503 private static bool s_rotaryEventEnabledCallbackCalled = false;
2504 private static bool s_rotaryEventEnabledValue = false;
2507 //[Description("Check if callback to SystemSettings:RotaryEventEnabledChanged event is called")]
2508 //[Property("SPEC", "Tizen.System.SystemSettings.RotaryEventEnabledChanged E")]
2509 //[Property("SPEC_URL", "-")]
2510 //[Property("CRITERIA", "EVL")]
2511 //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
2512 public static async Task RotaryEventEnabledChanged_CHECK_EVENT()
2514 s_tcsRotaryEventEnabled = new TaskCompletionSource<bool>();
2515 LogUtils.StartTest();
2517 Tizen.System.SystemSettings.RotaryEventEnabledChanged += OnRotaryEventEnabledChanged;
2518 bool preValue = Tizen.System.SystemSettings.RotaryEventEnabled;
2519 s_rotaryEventEnabledValue = !preValue;
2520 Tizen.System.SystemSettings.RotaryEventEnabled = s_rotaryEventEnabledValue;
2521 await s_tcsRotaryEventEnabled.Task;
2522 Assert.IsTrue(s_rotaryEventEnabledCallbackCalled, "RotaryEventEnabledChanged_CHECK_EVENT: EventHandler added. Not getting called");
2523 s_rotaryEventEnabledCallbackCalled = false;
2524 Tizen.System.SystemSettings.RotaryEventEnabledChanged -= OnRotaryEventEnabledChanged;
2525 Tizen.System.SystemSettings.RotaryEventEnabled = !s_rotaryEventEnabledValue;
2526 await Task.Delay(100);
2527 Assert.IsFalse(s_rotaryEventEnabledCallbackCalled, "RotaryEventEnabledChanged_CHECK_EVENT: EventHandler removed. Still getting called");
2528 Tizen.System.SystemSettings.RotaryEventEnabled = preValue;
2531 private static void OnRotaryEventEnabledChanged(object sender, Tizen.System.RotaryEventEnabledChangedEventArgs e)
2533 s_tcsRotaryEventEnabled.SetResult(true);
2534 s_rotaryEventEnabledCallbackCalled = true;
2535 Assert.IsInstanceOf<bool>(e.Value, "OnRotaryEventEnabledChanged: RotaryEventEnabled not an instance of string");
2536 Assert.IsTrue(s_rotaryEventEnabledValue == e.Value, "OnRotaryEventEnabledChanged: The callback should receive the latest value for the property.");
2539 public static async void TestAllAsync()
2541 LogUtils.initWriteResult();
2542 IncomingCallRingtone_READ_WRITE();
2543 await IncomingCallRingtoneChanged_CHECK_EVENT();
2544 WallpaperHomeScreen_READ_WRITE();
2545 await WallpaperHomeScreenChanged_CHECK_EVENT();
2546 WallpaperLockScreen_READ_WRITE();
2547 await WallpaperLockScreenChanged_CHECK_EVENT();
2548 FontSize_READ_WRITE_ALL();
2549 await FontSizeChanged_CHECK_EVENT_SMALL();
2550 await FontSizeChanged_CHECK_EVENT_NORMAL();
2551 await FontSizeChanged_CHECK_EVENT_LARGE();
2552 await FontSizeChanged_CHECK_EVENT_HUGE();
2553 await FontSizeChanged_CHECK_EVENT_GIANT();
2554 await FontType_READ_WRITE();
2555 await FontTypeChanged_CHECK_EVENT();
2556 MotionActivationEnabled_READ_WRITE();
2557 await MotionActivationSettingChanged_CHECK_EVENT();
2558 EmailAlertRingtone_READ_WRITE();
2559 await EmailAlertRingtoneChanged_CHECK_EVENT();
2560 Data3GNetworkEnabled_READ_WRITE();
2561 await Data3GNetworkSettingChanged_CHECK_EVENT();
2562 LockscreenApp_READ_WRITE();
2563 await LockscreenAppChanged_CHECK_EVENT();
2564 DefaultFontType_READ_ONLY();
2565 LocaleCountry_READ_WRITE();
2566 await LocaleCountryChanged_CHECK_EVENT();
2567 LocaleLanguage_READ_WRITE();
2568 await LocaleLanguageChanged_CHECK_EVENT();
2569 LocaleTimeFormat24HourEnabled_READ_WRITE();
2570 await LocaleTimeFormat24HourSettingChanged_CHECK_EVENT();
2571 LocaleTimeZone_READ_WRITE();
2572 await LocaleTimeZoneChanged_CHECK_EVENT();
2573 SoundLockEnabled_READ_ONLY();
2574 SoundSilentModeEnabled_READ_ONLY();
2575 SoundTouchEnabled_READ_ONLY();
2576 DisplayScreenRotationAutoEnabled_READ_ONLY();
2577 DeviceName_READ_ONLY();
2578 MotionEnabled_READ_ONLY();
2579 NetworkWifiNotificationEnabled_READ_ONLY();
2580 NetworkFlightModeEnabled_READ_ONLY();
2582 SoundNotification_READ_WRITE();
2583 await SoundNotificationChanged_CHECK_EVENT();
2584 SoundNotificationRepetitionPeriod_READ_WRITE();
2585 await SoundNotificationRepetitionPeriodChanged_CHECK_EVENT();
2586 LockState_READ_WRITE_ALL();
2587 await LockStateChanged_CHECK_EVENT_LOCK();
2588 await LockStateChanged_CHECK_EVENT_UNLOCK();
2589 await LockStateChanged_CHECK_EVENT_LAUNCHING_LOCK();
2591 //UsbDebuggingEnabled_READ_WRITE();
2594 await AdsIdChanged_CHECK_EVENT();
2595 UltraDataSave_READ_ONLY();
2597 AccessibilityTtsEnabled_READ_WRITE();
2598 await AccessibilityTtsSettingChanged_CHECK_EVENT();
2600 Vibration_READ_WRITE();
2601 await VibrationSettingChanged_CHECK_EVENT();
2602 AutomaticTimeUpdate_READ_WRITE();
2603 await AutomaticTimeUpdateSettingChanged_CHECK_EVENT();
2604 DeveloperOptionState_READ_WRITE();
2605 await DeveloperOptionStateSettingChanged_CHECK_EVENT();
2607 AccessibilityGrayscale_READ_WRITE();
2608 await AccessibilityGrayscaleChanged_CHECK_EVENT();
2609 AccessibilityNegativeColor_READ_WRITE();
2610 await AccessibilityNegativeColorChanged_CHECK_EVENT();
2613 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "Data3GNetworkSettingChangedEventArgsTests");
2614 await Data3GNetworkSettingChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2616 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "EmailAlertRingtoneChangedEventArgsTests");
2617 await EmailAlertRingtoneChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2619 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "FontSizeChangedEventArgsTests");
2620 await FontSizeChangedEventArgsTests.Value_ENUM_GIANT();
2621 await FontSizeChangedEventArgsTests.Value_ENUM_HUGE();
2622 await FontSizeChangedEventArgsTests.Value_ENUM_LARGE();
2623 await FontSizeChangedEventArgsTests.Value_ENUM_NORMAL();
2624 await FontSizeChangedEventArgsTests.Value_ENUM_SMALL();
2626 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "FontTypeChangedEventArgsTests");
2627 await FontTypeChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2629 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "IncomingCallRingtoneChangedEventArgsTests");
2630 await IncomingCallRingtoneChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2632 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LocaleCountryChangedEventArgsTests");
2633 await LocaleCountryChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2635 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LocaleLanguageChangedEventArgsTests");
2636 await LocaleLanguageChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2638 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LocaleTimeFormat24HourSettingChangedEventArgsTests");
2639 await LocaleTimeFormat24HourSettingChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2641 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LocaleTimeZoneChangedEventArgsTests");
2642 await LocaleTimeZoneChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2644 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LockStateChangedEventArgsTests");
2645 await LockStateChangedEventArgsTests.Value_ENUM_LAUNCHING_LOCK();
2646 await LockStateChangedEventArgsTests.Value_ENUM_LOCK();
2647 await LockStateChangedEventArgsTests.Value_ENUM_UNLOCK();
2649 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "MotionActivationSettingChangedEventArgsTests");
2650 await MotionActivationSettingChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2652 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "SoundNotificationChangedEventArgsTests");
2653 await SoundNotificationChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2655 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "SoundNotificationRepetitionPeriodChangedEventArgsTests");
2656 await SoundNotificationRepetitionPeriodChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2658 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "WallpaperHomeScreenChangedEventArgsTests");
2659 await WallpaperHomeScreenChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2661 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "WallpaperLockScreenChangedEventArgsTests");
2662 await WallpaperLockScreenChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2665 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "BlackLightTime Test");
2666 ScreenBacklightTime_READ_WRITE_ALL();
2667 await ScreenBacklightTimeChanged_CHECK_EVENT_15();
2668 await ScreenBacklightTimeChanged_CHECK_EVENT_30();
2669 await ScreenBacklightTimeChanged_CHECK_EVENT_60();
2670 await ScreenBacklightTimeChanged_CHECK_EVENT_120();
2671 await ScreenBacklightTimeChanged_CHECK_EVENT_300();
2672 await ScreenBacklightTimeChanged_CHECK_EVENT_600();
2675 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "ScreenBacklightTimeChangedEventArgsTests");
2676 await ScreenBacklightTimeChangedEventArgsTests.Value_PROPERTY_READ_ONLY_120();
2677 await ScreenBacklightTimeChangedEventArgsTests.Value_PROPERTY_READ_ONLY_15();
2678 await ScreenBacklightTimeChangedEventArgsTests.Value_PROPERTY_READ_ONLY_30();
2679 await ScreenBacklightTimeChangedEventArgsTests.Value_PROPERTY_READ_ONLY_300();
2680 await ScreenBacklightTimeChangedEventArgsTests.Value_PROPERTY_READ_ONLY_60();
2681 await ScreenBacklightTimeChangedEventArgsTests.Value_PROPERTY_READ_ONLY_600();
2683 LogUtils.WriteResult();
2684 Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "All of Unit test for Tizen.System.SystemSettings have completed!");