886e8254265fa5490af6e0b05f211c841911e264
[platform/core/csapi/tizenfx.git] / test / Tizen.System.SystemSettings.UnitTest / SystemSettings.UnitTest / test / TSSystemSettings.cs
1 using System;
2 using System.Threading;
3 using System.Threading.Tasks;
4 using Tizen.NUI.Components;
5 using Tizen.System;
6 // /opt/usr/data/settings/Ringtones/ringtone_sdk.mp3
7 namespace SystemSettingsUnitTest
8 {
9
10     public static class SystemSettingsTestInput
11     {
12
13
14         private const int nStringDataSize = 100;
15
16         enum eProfileValue
17         {
18             PROFILE_MOBILE = 0,
19             PROFILE_WEARABLE,           //1
20             PROFILE_TV,                 //2
21             PROFILE_COMMON,             //3
22             PROFILE_MAX,
23
24         };
25         static string[,] string_data = new string[5, 100];
26
27         public static void InitStringValue()
28         {
29             string[,] init_data = new string[,] {
30                   { //mobile
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",
34                 },
35                 { //wearable
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",
39                 },
40                 { //tv
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",
44                 },
45                 { //common
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",
49                 },
50             };
51
52             for (int i = 0; i < 4; i++)
53             {
54                 for (int j = 0; j < 3; j++)
55                 {
56                     string_data[i, j] = init_data[i, j];
57                 }
58             }
59
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";
64
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";
69
70         }
71         static bool isStarted = false;
72
73         public static string GetStringValue(int enum_val)
74         {
75
76             if (!isStarted)
77             {
78                 InitStringValue();
79                 isStarted = true;
80             }
81             string strProfile;
82             eProfileValue profile_val = eProfileValue.PROFILE_MOBILE;
83             Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
84             if (string.Compare(strProfile, "mobile") == 0)
85             {
86                 profile_val = eProfileValue.PROFILE_MOBILE;
87             }
88             else if (string.Compare(strProfile, "wearable") == 0)
89             {
90                 profile_val = eProfileValue.PROFILE_WEARABLE;
91             }
92             else if (string.Compare(strProfile, "tv") == 0)
93             {
94                 profile_val = eProfileValue.PROFILE_TV;
95             }
96             else if (string.Compare(strProfile, "common") == 0)
97             {
98                 profile_val = eProfileValue.PROFILE_COMMON;
99             }
100             return string_data[(int)profile_val, enum_val];
101         }
102
103     }
104
105     //[TestFixture]
106     //[Description("Tizen.System.SystemSettings Tests")]
107     public static class SystemSettingsTests
108     {
109         //[SetUp]
110         public static void Init()
111         {
112             //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
113         }
114
115         //[TearDown]
116         public static void Destroy()
117         {
118             //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST");
119         }
120
121
122
123
124
125         // IncomingCallRingtone
126         ////[Test]
127         //[Category("P1")]
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()
134         {
135             try
136             {
137                 LogUtils.StartTest();
138                 /* TEST CODE */
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);
142
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;
147                 LogUtils.WriteOK();
148             }
149             catch (NotSupportedException)
150             {
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();
156             }
157         }
158
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);
162         ////[Test]
163         //[Category("P1")]
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()
170         {
171             try
172             {
173                 s_tcsIncomingCallRingtone = new TaskCompletionSource<bool>();
174                 LogUtils.StartTest();
175                 /* TEST CODE */
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;
187                 LogUtils.WriteOK();
188             }
189             catch (NotSupportedException)
190             {
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();
196             }
197         }
198         private static void OnIncomingCallRingtoneChanged(object sender, Tizen.System.IncomingCallRingtoneChangedEventArgs e)
199         {
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.");
204         }
205
206         // WallpaperHomeScreen
207         ////[Test]
208         //[Category("P1")]
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()
215         {
216             try
217             {
218                 LogUtils.StartTest();
219                 /* TEST CODE */
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);
223
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.");
227
228                 string strProfile;
229                 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
230                 if (string.Compare(strProfile, "mobile") == 0)
231                     Tizen.System.SystemSettings.WallpaperHomeScreen = preValue;
232
233                 LogUtils.WriteOK();
234             }
235             catch (NotSupportedException)
236             {
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();
242             }
243         }
244
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);
248         ////[Test]
249         //[Category("P1")]
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()
256         {
257             try
258             {
259                 LogUtils.StartTest();
260                 s_tcsWallpaperHomeScreen = new TaskCompletionSource<bool>();
261                 /* TEST CODE */
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");
272
273                 string strProfile;
274                 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
275                 if (string.Compare(strProfile, "mobile") == 0)
276                     Tizen.System.SystemSettings.WallpaperHomeScreen = preValue;
277                 LogUtils.WriteOK();
278             }
279             catch (NotSupportedException)
280             {
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();
286             }
287         }
288         private static void OnWallpaperHomeScreenChanged(object sender, Tizen.System.WallpaperHomeScreenChangedEventArgs e)
289         {
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.");
294         }
295
296         //WallpaperLockScreen
297         ////[Test]
298         //[Category("P1")]
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()
305         {
306             try
307             {
308                 LogUtils.StartTest();
309                 /* TEST CODE */
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.");
316
317                 string strProfile;
318                 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
319                 if (string.Compare(strProfile, "mobile") == 0)
320                     Tizen.System.SystemSettings.WallpaperLockScreen = preValue;
321
322
323                 LogUtils.WriteOK();
324             }
325             catch (NotSupportedException)
326             {
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();
332             }
333         }
334
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);
338         //[Category("P1")]
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()
345         {
346             try
347             {
348                 LogUtils.StartTest();
349                 s_tcsWallpaperLockScreen = new TaskCompletionSource<bool>();
350                 /* TEST CODE */
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");
361
362                 string strProfile;
363                 Information.TryGetValue<string>("tizen.org/feature/profile", out strProfile);
364                 if (string.Compare(strProfile, "mobile") == 0)
365                     Tizen.System.SystemSettings.WallpaperLockScreen = preValue;
366
367                 LogUtils.WriteOK();
368             }
369             catch (NotSupportedException)
370             {
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();
376             }
377         }
378         private static void OnWallpaperLockScreenChanged(object sender, Tizen.System.WallpaperLockScreenChangedEventArgs e)
379         {
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.");
384         }
385
386         // FontSize
387         ////[Test]
388         //[Category("P1")]
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()
395         {
396             LogUtils.StartTest();
397             /* TEST CODE */
398             Assert.IsInstanceOf<Tizen.System.SystemSettingsFontSize>(Tizen.System.SystemSettings.FontSize, "FontSize_READ_WRITE_ALL: FontSize not an instance of SystemSettingsFontSize");
399             Thread.Sleep(3000);
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.");
404
405             Thread.Sleep(3000);
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.");
409
410             Thread.Sleep(3000);
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.");
414
415             Thread.Sleep(3000);
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.");
419
420             Thread.Sleep(3000);
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;
425             LogUtils.WriteOK();
426         }
427
428         private static bool s_fontSizeSmallCallbackCalled = false;
429         private static TaskCompletionSource<bool> s_tcsFontSizeSmall;
430         private static SystemSettingsFontSize preFontValue;
431         ////[Test]
432         //[Category("P1")]
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()
439         {
440             LogUtils.StartTest();
441             s_tcsFontSizeSmall = new TaskCompletionSource<bool>();
442             /* TEST CODE */
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;
455             LogUtils.WriteOK();
456         }
457         private static void OnFontSizeChangedSmall(object sender, Tizen.System.FontSizeChangedEventArgs e)
458         {
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.");
463         }
464
465         private static bool s_fontSizeNormalCallbackCalled = false;
466         private static TaskCompletionSource<bool> s_tcsFontSizeNormal;
467         ////[Test]
468         //[Category("P1")]
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()
475         {
476             LogUtils.StartTest();
477             s_tcsFontSizeNormal = new TaskCompletionSource<bool>();
478             /* TEST CODE */
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;
491             LogUtils.WriteOK();
492         }
493         private static void OnFontSizeChangedNormal(object sender, Tizen.System.FontSizeChangedEventArgs e)
494         {
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);
499
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.");
502         }
503
504         private static bool s_fontSizeLargeCallbackCalled = false;
505         private static TaskCompletionSource<bool> s_tcsFontSizeLarge;
506         ////[Test]
507         //[Category("P1")]
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()
514         {
515             LogUtils.StartTest();
516             s_tcsFontSizeLarge = new TaskCompletionSource<bool>();
517             /* TEST CODE */
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;
530             LogUtils.WriteOK();
531         }
532         private static void OnFontSizeChangedLarge(object sender, Tizen.System.FontSizeChangedEventArgs e)
533         {
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);
538
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.");
541         }
542
543         private static TaskCompletionSource<bool> s_tcsFontSizeHuge;
544         private static bool s_fontSizeHugeCallbackCalled = false;
545         ////[Test]
546         //[Category("P1")]
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()
553         {
554             LogUtils.StartTest();
555             s_tcsFontSizeHuge = new TaskCompletionSource<bool>();
556             /* TEST CODE */
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;
569             LogUtils.WriteOK();
570         }
571         private static void OnFontSizeChangedHuge(object sender, Tizen.System.FontSizeChangedEventArgs e)
572         {
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);
577
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.");
580         }
581
582         private static TaskCompletionSource<bool> s_tcsFontSizeGiant;
583         private static bool s_fontSizeGiantCallbackCalled = false;
584         ////[Test]
585         //[Category("P1")]
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()
592         {
593             s_tcsFontSizeGiant = new TaskCompletionSource<bool>();
594             LogUtils.StartTest();
595             /* TEST CODE */
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;
609             LogUtils.WriteOK();
610         }
611         private static void OnFontSizeChangedGiant(object sender, Tizen.System.FontSizeChangedEventArgs e)
612         {
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);
617
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.");
620         }
621
622         // FontType
623         ////[Test]
624         //[Category("P1")]
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()
631         {
632             LogUtils.StartTest();
633             /* TEST CODE */
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;
637
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);
642
643             LogUtils.WriteOK();
644         }
645
646         private static bool s_fontTypeCallbackCalled = false;
647         private static readonly string s_fontTypeValue = "BreezeSans";
648         private static TaskCompletionSource<bool> s_tcsFontType;
649         ////[Test]
650         //[Category("P1")]
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()
657         {
658             s_tcsFontType = new TaskCompletionSource<bool>();
659             LogUtils.StartTest();
660             /* TEST CODE */
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;
672             LogUtils.WriteOK();
673         }
674         private static void OnFontTypeChanged(object sender, Tizen.System.FontTypeChangedEventArgs e)
675         {
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.");
680         }
681
682         // MotionActivation
683         ////[Test]
684         //[Category("P1")]
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()
691         {
692             LogUtils.StartTest();
693             /* TEST CODE */
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;
701             LogUtils.WriteOK();
702         }
703
704         private static bool s_motionActivationCallbackCalled = false;
705         private static TaskCompletionSource<bool> s_tcsMotionActivation;
706         private static bool s_motionActivationValue = !Tizen.System.SystemSettings.MotionActivationEnabled;
707         ////[Test]
708         //[Category("P1")]
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()
715         {
716             LogUtils.StartTest();
717             s_tcsMotionActivation = new TaskCompletionSource<bool>();
718             /* TEST CODE */
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;
723
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;
732
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;
738             LogUtils.WriteOK();
739         }
740         private static void OnMotionActivationChanged(object sender, Tizen.System.MotionActivationSettingChangedEventArgs e)
741         {
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.");
746         }
747
748         // EmailAlertRingtone
749         ////[Test]
750         //[Category("P1")]
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()
757         {
758             try
759             {
760                 LogUtils.StartTest();
761                 /* TEST CODE */
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;
769                 LogUtils.WriteOK();
770             }
771             catch (NotSupportedException)
772             {
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();
778
779             }
780         }
781
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);
785         ////[Test]
786         //[Category("P1")]
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()
793         {
794             try
795             {
796                                 s_tcsEmailAlertRingtone = new TaskCompletionSource<bool>();
797                 LogUtils.StartTest();
798                 /* TEST CODE */
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;
810                 LogUtils.WriteOK();
811             }
812             catch (NotSupportedException)
813             {
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();
819             }
820         }
821         private static void OnEmailAlertRingtoneChanged(object sender, Tizen.System.EmailAlertRingtoneChangedEventArgs e)
822         {
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.");
827         }
828
829         // Data3GNetworkEnabled
830         ////[Test]
831         //[Category("P1")]
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()
838         {
839             LogUtils.StartTest();
840             /* TEST CODE */
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;
848             LogUtils.WriteOK();
849         }
850
851         private static TaskCompletionSource<bool> s_tcsData3GNetwork;
852         private static bool s_data3GNetworkCallbackCalled = false;
853         private static bool s_data3GNetworkSettingValue = !Tizen.System.SystemSettings.Data3GNetworkEnabled;
854         ////[Test]
855         //[Category("P1")]
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()
862         {
863             LogUtils.StartTest();
864             s_tcsData3GNetwork = new TaskCompletionSource<bool>();
865             /* TEST CODE */
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");
872
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;
879
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;
885             LogUtils.WriteOK();
886         }
887         private static void OnData3GNetworkSettingChanged(object sender, Tizen.System.Data3GNetworkSettingChangedEventArgs e)
888         {
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.");
893         }
894
895         // LockscreenApp
896         ////[Test]
897         //[Category("P1")]
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()
904         {
905             try
906             {
907                 LogUtils.StartTest();
908                 /* TEST CODE */
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;
916                 LogUtils.WriteOK();
917             }
918             catch (NotSupportedException)
919             {
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();
925             }
926         }
927
928         private static TaskCompletionSource<bool> s_tcsLockScreenApp;
929         private static bool s_lockScreenAppCallbackCalled = false;
930         private static readonly string s_lockscreenAppValue = "org.tizen.lockscreen";
931         ////[Test]
932         //[Category("P1")]
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()
939         {
940             try
941             {
942                                 s_tcsLockScreenApp = new TaskCompletionSource<bool>();
943                 LogUtils.StartTest();
944                 /* TEST CODE */
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;
956                 LogUtils.WriteOK();
957             }
958             catch (NotSupportedException)
959             {
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();
965             }
966         }
967         private static void OnLockscreenAppChanged(object sender, Tizen.System.LockScreenAppChangedEventArgs e)
968         {
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.");
973         }
974
975         // DefaultFontType
976         //[Test]
977         //[Category("P1")]
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()
984         {
985             LogUtils.StartTest();
986             /* TEST CODE */
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");
989             LogUtils.WriteOK();
990         }
991
992         // LocaleCountry
993         ////[Test]
994         //[Category("P1")]
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()
1001         {
1002             LogUtils.StartTest();
1003             /* TEST CODE */
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;
1011             LogUtils.WriteOK();
1012         }
1013
1014         private static TaskCompletionSource<bool> s_tcsLocaleCountry;
1015         private static bool s_localeCountryCallbackCalled = false;
1016         private static readonly string s_localeCountryValue = "en_US";
1017         ////[Test]
1018         //[Category("P1")]
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()
1025         {
1026             LogUtils.StartTest();
1027             s_tcsLocaleCountry = new TaskCompletionSource<bool>();
1028             /* TEST CODE */
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;
1040             LogUtils.WriteOK();
1041         }
1042         private static void OnLocaleCountryChanged(object sender, Tizen.System.LocaleCountryChangedEventArgs e)
1043         {
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.");
1048         }
1049
1050         // LocaleLanguage
1051         ////[Test]
1052         //[Category("P1")]
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()
1059         {
1060             LogUtils.StartTest();
1061             /* TEST CODE */
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;
1069             LogUtils.WriteOK();
1070         }
1071
1072         private static TaskCompletionSource<bool> s_tcsLocaleLanguage;
1073         private static bool s_localeLanguageCallbackCalled = false;
1074         private static readonly string s_localeLanguageValue = "en_US";
1075         ////[Test]
1076         //[Category("P1")]
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()
1083         {
1084             s_tcsLocaleLanguage = new TaskCompletionSource<bool>();
1085             LogUtils.StartTest();
1086             /* TEST CODE */
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;
1098             LogUtils.WriteOK();
1099         }
1100         private static void OnLocaleLanguageChanged(object sender, Tizen.System.LocaleLanguageChangedEventArgs e)
1101         {
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.");
1106         }
1107
1108         // LocaleTimeformat24Hour
1109         ////[Test]
1110         //[Category("P1")]
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()
1117         {
1118             LogUtils.StartTest();
1119             /* TEST CODE */
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;
1127             LogUtils.WriteOK();
1128         }
1129
1130         private static TaskCompletionSource<bool> s_tcsTimeFormat;
1131         private static bool s_timeFormatCallbackCalled = false;
1132         private static bool s_localeTimeformat24HourValue = !Tizen.System.SystemSettings.LocaleTimeFormat24HourEnabled;
1133         ////[Test]
1134         //[Category("P1")]
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()
1141         {
1142             s_tcsTimeFormat = new TaskCompletionSource<bool>();
1143             LogUtils.StartTest();
1144             /* TEST CODE */
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;
1152
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;
1158
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;
1164             LogUtils.WriteOK();
1165         }
1166
1167         private static void OnLocaleTimeformat24HourChanged(object sender, Tizen.System.LocaleTimeFormat24HourSettingChangedEventArgs e)
1168         {
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.");
1173         }
1174
1175         // LocaleTimezone
1176         ////[Test]
1177         //[Category("P1")]
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()
1184         {
1185             LogUtils.StartTest();
1186             /* TEST CODE */
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;
1195             LogUtils.WriteOK();
1196         }
1197
1198         private static TaskCompletionSource<bool> s_tcsLocaleTimeZone;
1199         private static bool s_localeTimeZoneCallbackCalled = false;
1200         private static readonly string s_localeTimeZoneValue = "Asia/Seoul";
1201         ////[Test]
1202         //[Category("P1")]
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()
1209         {
1210             s_tcsLocaleTimeZone = new TaskCompletionSource<bool>();
1211             LogUtils.StartTest();
1212             /* TEST CODE */
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;
1219
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;
1225             LogUtils.WriteOK();
1226         }
1227         private static void OnLocaleTimeZoneChanged(object sender, Tizen.System.LocaleTimeZoneChangedEventArgs e)
1228         {
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.");
1233         }
1234
1235         // SoundLock
1236         //[Test]
1237         //[Category("P1")]
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()
1244         {
1245             LogUtils.StartTest();
1246             /* TEST CODE */
1247             Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SoundLockEnabled, "SoundLockEnabled_READ_ONLY: SoundLockEnabled not an instance of bool");
1248             LogUtils.WriteOK();
1249         }
1250
1251         // SoundSilentMode
1252         //[Test]
1253         //[Category("P1")]
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()
1260         {
1261             LogUtils.StartTest();
1262             /* TEST CODE */
1263             Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SoundSilentModeEnabled, "SoundSilentModeEnabled_READ_ONLY: SoundSilentModeEnabled not an instance of bool");
1264             LogUtils.WriteOK();
1265         }
1266
1267         // SoundTouch
1268         //[Test]
1269         //[Category("P1")]
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()
1276         {
1277             LogUtils.StartTest();
1278             /* TEST CODE */
1279             Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SoundTouchEnabled, "SoundTouchEnabled_READ_ONLY: SoundTouchEnabled not an instance of bool");
1280             LogUtils.WriteOK();
1281         }
1282
1283         // DisplayScreenRotationAuto
1284         //[Test]
1285         //[Category("P1")]
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()
1292         {
1293             LogUtils.StartTest();
1294             /* TEST CODE */
1295             Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.DisplayScreenRotationAutoEnabled, "DisplayScreenRotationAutoEnabled_READ_ONLY: DisplayScreenRotationAutoEnabled not an instance of bool");
1296             LogUtils.WriteOK();
1297         }
1298
1299         // DeviceName
1300         //[Test]
1301         //[Category("P1")]
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()
1308         {
1309             LogUtils.StartTest();
1310             /* TEST CODE */
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");
1314             LogUtils.WriteOK();
1315         }
1316
1317         // MotionEnabled
1318         //[Test]
1319         //[Category("P1")]
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()
1326         {
1327             LogUtils.StartTest();
1328             /* TEST CODE */
1329             Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.MotionEnabled, "MotionEnabled_READ_ONLY: MotionEnabled not an instance of bool");
1330             LogUtils.WriteOK();
1331         }
1332
1333         // NetworkWifiNotification
1334         //[Test]
1335         //[Category("P1")]
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()
1342         {
1343             /* TEST CODE */
1344             try
1345             {
1346                 LogUtils.StartTest();
1347                 Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.NetworkWifiNotificationEnabled, "NetworkWifiNotificationEnabled_READ_ONLY: NetworkWifiNotificationEnabled not an instance of bool");
1348                 LogUtils.WriteOK();
1349             }
1350             catch (NotSupportedException)
1351             {
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();
1357             }
1358         }
1359
1360         // NetworkFlightMode
1361         //[Test]
1362         //[Category("P1")]
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()
1369         {
1370             LogUtils.StartTest();
1371             /* TEST CODE */
1372             Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.NetworkFlightModeEnabled, "NetworkFlightModeEnabled_READ_ONLY: NetworkFlightModeEnabled not an instance of bool");
1373             LogUtils.WriteOK();
1374         }
1375
1376         // ScreenBacklightTime
1377         ////[Test]
1378         //[Category("P1")]
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()
1385         {
1386             LogUtils.StartTest();
1387             /* TEST CODE */
1388             Assert.IsInstanceOf<int>(Tizen.System.SystemSettings.ScreenBacklightTime, "ScreenBacklightTime_READ_WRITE_ALL: ScreenBacklightTime not an instance of int");
1389             var setValue = 15;
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.");
1394
1395             setValue = 30;
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.");
1399
1400             setValue = 60;
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.");
1404
1405             setValue = 120;
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.");
1409
1410             setValue = 300;
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.");
1414
1415             setValue = 600;
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;
1420             LogUtils.WriteOK();
1421         }
1422
1423         private static TaskCompletionSource<bool> s_tcsScreenBacklightTime15;
1424         private static bool s_screenBacklightTime15CallbackCalled = false;
1425         ////[Test]
1426         //[Category("P1")]
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()
1433         {
1434             s_tcsScreenBacklightTime15 = new TaskCompletionSource<bool>();
1435             LogUtils.StartTest();
1436             /* TEST CODE */
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;
1445             LogUtils.WriteOK();
1446         }
1447         private static void OnScreenBacklightTime15Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1448         {
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.");
1453         }
1454
1455         private static TaskCompletionSource<bool> s_tcsScreenBacklightTime30;
1456         private static bool s_screenBacklightTime30CallbackCalled = false;
1457         ////[Test]
1458         //[Category("P1")]
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()
1465         {
1466             s_tcsScreenBacklightTime30 = new TaskCompletionSource<bool>();
1467             LogUtils.StartTest();
1468             /* TEST CODE */
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;
1477             LogUtils.WriteOK();
1478         }
1479         private static void OnScreenBacklightTime30Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1480         {
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.");
1485         }
1486
1487         private static TaskCompletionSource<bool> s_tcsScreenBacklightTime60;
1488         private static bool s_screenBacklightTime60CallbackCalled = false;
1489         ////[Test]
1490         //[Category("P1")]
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()
1497         {
1498             s_tcsScreenBacklightTime60 = new TaskCompletionSource<bool>();
1499             LogUtils.StartTest();
1500             /* TEST CODE */
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;
1509             LogUtils.WriteOK();
1510         }
1511         private static void OnScreenBacklightTime60Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1512         {
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.");
1517         }
1518
1519         private static TaskCompletionSource<bool> s_tcsScreenBacklightTime120;
1520         private static bool s_screenBacklightTime120CallbackCalled = false;
1521         ////[Test]
1522         //[Category("P1")]
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()
1529         {
1530             s_tcsScreenBacklightTime120 = new TaskCompletionSource<bool>();
1531             LogUtils.StartTest();
1532             /* TEST CODE */
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;
1541             LogUtils.WriteOK();
1542         }
1543         private static void OnScreenBacklightTime120Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1544         {
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.");
1549         }
1550
1551         private static TaskCompletionSource<bool> s_tcsScreenBacklightTime300;
1552         private static bool s_screenBacklightTime300CallbackCalled = false;
1553         ////[Test]
1554         //[Category("P1")]
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()
1561         {
1562             s_tcsScreenBacklightTime300 = new TaskCompletionSource<bool>();
1563             LogUtils.StartTest();
1564             /* TEST CODE */
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;
1573             LogUtils.WriteOK();
1574         }
1575         private static void OnScreenBacklightTime300Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1576         {
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.");
1581         }
1582
1583         private static TaskCompletionSource<bool> s_tcsScreenBacklightTime600;
1584         private static bool s_screenBacklightTime600CallbackCalled = false;
1585         ////[Test]
1586         //[Category("P1")]
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()
1593         {
1594             s_tcsScreenBacklightTime600 = new TaskCompletionSource<bool>();
1595             LogUtils.StartTest();
1596             /* TEST CODE */
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;
1605             LogUtils.WriteOK();
1606         }
1607         private static void OnScreenBacklightTime600Changed(object sender, Tizen.System.ScreenBacklightTimeChangedEventArgs e)
1608         {
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.");
1613         }
1614
1615         // SoundNotification
1616         ////[Test]
1617         //[Category("P1")]
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()
1624         {
1625             try
1626             {
1627                 LogUtils.StartTest();
1628                 /* TEST CODE */
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;
1636                 LogUtils.WriteOK();
1637             }
1638             catch (NotSupportedException)
1639             {
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();
1645             }
1646         }
1647
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);
1651         ////[Test]
1652         //[Category("P1")]
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()
1659         {
1660             try
1661             {
1662                                 s_tcsSoundNotification = new TaskCompletionSource<bool>();
1663                 LogUtils.StartTest();
1664                 /* TEST CODE */
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");
1670
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;
1677                 LogUtils.WriteOK();
1678             }
1679             catch (NotSupportedException)
1680             {
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();
1686             }
1687         }
1688         private static void OnSoundNotificationChanged(object sender, Tizen.System.SoundNotificationChangedEventArgs e)
1689         {
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.");
1694         }
1695
1696         // SoundNotificationRepetitionPeriod
1697         ////[Test]
1698         //[Category("P1")]
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()
1705         {
1706             LogUtils.StartTest();
1707             /* TEST CODE */
1708             Assert.IsInstanceOf<int>(Tizen.System.SystemSettings.SoundNotificationRepetitionPeriod, "SoundNotificationRepetitionPeriod_READ_WRITE: SoundNotificationRepetitionPeriod not an instance of int");
1709             var setValue = 300;
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;
1715             LogUtils.WriteOK();
1716         }
1717
1718         private static TaskCompletionSource<bool> s_tcsSoundNotificationRepetitionPeriod;
1719         private static bool s_soundNotificationRepetitionPeriodCallbackCalled = false;
1720         private static readonly int s_soundNotificationRepetitionPeriodValue = 300;
1721         ////[Test]
1722         //[Category("P1")]
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()
1729         {
1730             s_tcsSoundNotificationRepetitionPeriod = new TaskCompletionSource<bool>();
1731             LogUtils.StartTest();
1732             /* TEST CODE */
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;
1739
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;
1745             LogUtils.WriteOK();
1746         }
1747         private static void OnSoundNotificationRepetitionPeriodChanged(object sender, Tizen.System.SoundNotificationRepetitionPeriodChangedEventArgs e)
1748         {
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.");
1753         }
1754
1755         // LockState
1756         // //[Test]
1757         //[Category("P1")]
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()
1764         {
1765             LogUtils.StartTest();
1766             /* TEST CODE */
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.");
1773
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.");
1778
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;
1784             LogUtils.WriteOK();
1785         }
1786
1787         private static TaskCompletionSource<bool> s_tcsLockStateLock;
1788         private static bool s_lockStateLockCallbackCalled = false;
1789         ////[Test]
1790         //[Category("P1")]
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()
1797         {
1798             s_tcsLockStateLock = new TaskCompletionSource<bool>();
1799             LogUtils.StartTest();
1800             /* TEST CODE */
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;
1809             LogUtils.WriteOK();
1810         }
1811         private static void OnLockStateChangedLock(object sender, Tizen.System.LockStateChangedEventArgs e)
1812         {
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.");
1817         }
1818
1819         private static TaskCompletionSource<bool> s_tcsLockStateUnlock;
1820         private static bool s_lockStateUnlockCallbackCalled = false;
1821         ////[Test]
1822         //[Category("P1")]
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()
1829         {
1830             s_tcsLockStateUnlock = new TaskCompletionSource<bool>();
1831             LogUtils.StartTest();
1832             /* TEST CODE */
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;
1841             LogUtils.WriteOK();
1842         }
1843         private static void OnLockStateChangedUnlock(object sender, Tizen.System.LockStateChangedEventArgs e)
1844         {
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.");
1849         }
1850
1851         private static TaskCompletionSource<bool> s_tcsLockStateLaunchingLock;
1852         private static bool s_lockStateLaunchingLockCallbackCalled = false;
1853         ////[Test]
1854         //[Category("P1")]
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()
1861         {
1862             s_tcsLockStateLaunchingLock = new TaskCompletionSource<bool>();
1863             LogUtils.StartTest();
1864             /* TEST CODE */
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;
1873             LogUtils.WriteOK();
1874         }
1875         private static void OnLockStateChangedLaunchingLock(object sender, Tizen.System.LockStateChangedEventArgs e)
1876         {
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.");
1881         }
1882
1883         // Time
1884         //[Test]
1885         //[Category("P1")]
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()
1892         {
1893             LogUtils.StartTest();
1894             /* TEST CODE */
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");
1898             LogUtils.WriteOK();
1899         }
1900
1901         // UsbDebuggingEnabled
1902         ////[Test]
1903         //[Category("P1")]
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()
1910         {
1911             LogUtils.StartTest();
1912             /* TEST CODE */
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;
1918             LogUtils.WriteOK();
1919         }
1920
1921
1922
1923         // AdsId
1924         ////[Test]
1925         //[Category("P1")]
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()
1932         {
1933             try
1934             {
1935                 LogUtils.StartTest();
1936                 /* TEST CODE */
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";
1940
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;
1945                 LogUtils.WriteOK();
1946             }
1947             catch (NotSupportedException)
1948             {
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();
1954             }
1955         }
1956
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";
1960         ////[Test]
1961         //[Category("P1")]
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()
1968         {
1969             try
1970             {
1971                                 s_tcsAdsId = new TaskCompletionSource<bool>();
1972                 LogUtils.StartTest();
1973                 /* TEST CODE */
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;
1985                 LogUtils.WriteOK();
1986             }
1987             catch (NotSupportedException)
1988             {
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();
1994             }
1995         }
1996         private static void OnAdsIdChanged(object sender, Tizen.System.AdsIdChangedEventArgs e)
1997         {
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.");
2002         }
2003
2004         // UltraDataSave
2005         //[Test]
2006         //[Category("P1")]
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()
2013         {
2014             try
2015             {
2016                 LogUtils.StartTest();
2017                 /* TEST CODE */
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");
2021                 LogUtils.WriteOK();
2022             }
2023             catch (NotSupportedException)
2024             {
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();
2030             }
2031         }
2032
2033 #if true
2034         // AccessibilityTts
2035         ////[Test]
2036         //[Category("P1")]
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()
2043         {
2044             LogUtils.StartTest();
2045             /* TEST CODE */
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;
2053             LogUtils.WriteOK();
2054         }
2055
2056         private static TaskCompletionSource<bool> s_tcsAccessibilityTts;
2057         private static bool s_accessibilityTtsCallbackCalled = false;
2058         private static bool s_accessibilityTtsValue = !Tizen.System.SystemSettings.AccessibilityTtsEnabled;
2059         ////[Test]
2060         //[Category("P1")]
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()
2067         {
2068             s_tcsAccessibilityTts = new TaskCompletionSource<bool>();
2069             LogUtils.StartTest();
2070             /* TEST CODE */
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;
2083
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;
2089             LogUtils.WriteOK();
2090         }
2091         private static void OnAccessibilityTtsChanged(object sender, Tizen.System.AccessibilityTtsSettingChangedEventArgs e)
2092         {
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.");
2097         }
2098 #endif
2099         // Vibration
2100         ////[Test]
2101         //[Category("P1")]
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()
2108         {
2109             LogUtils.StartTest();
2110             /* TEST CODE */
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;
2118             LogUtils.WriteOK();
2119         }
2120
2121         private static TaskCompletionSource<bool> s_tcsVibration;
2122         private static bool s_vibrationCallbackCalled = false;
2123         private static bool s_vibrationValue = !Tizen.System.SystemSettings.Vibration;
2124         ////[Test]
2125         //[Category("P1")]
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()
2132         {
2133             s_tcsVibration = new TaskCompletionSource<bool>();
2134             LogUtils.StartTest();
2135             /* TEST CODE */
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;
2148
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;
2154             LogUtils.WriteOK();
2155         }
2156         private static void OnVibrationChanged(object sender, Tizen.System.VibrationChangedEventArgs e)
2157         {
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.");
2162         }
2163
2164         // AutomaticTimeUpdate
2165         ////[Test]
2166         //[Category("P1")]
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()
2173         {
2174             try
2175             {
2176                 LogUtils.StartTest();
2177                 /* TEST CODE */
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;
2185                 LogUtils.WriteOK();
2186             }
2187             catch (NotSupportedException)
2188             {
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();
2194             }
2195         }
2196
2197         private static TaskCompletionSource<bool> s_tcsAutomaticTimeUpdate;
2198         private static bool s_automaticTimeUpdateCallbackCalled = false;
2199         private static bool s_automaticTimeUpdateValue = false;
2200         ////[Test]
2201         //[Category("P1")]
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()
2208         {
2209             try
2210             {
2211                                 s_tcsAutomaticTimeUpdate = new TaskCompletionSource<bool>();
2212                 LogUtils.StartTest();
2213                 /* TEST CODE */
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;
2226
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;
2232                 LogUtils.WriteOK();
2233             }
2234             catch (NotSupportedException)
2235             {
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();
2241             }
2242         }
2243         private static void OnAutomaticTimeUpdateChanged(object sender, Tizen.System.AutomaticTimeUpdateChangedEventArgs e)
2244         {
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.");
2249         }
2250
2251         // DeveloperOptionState
2252         ////[Test]
2253         //[Category("P1")]
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()
2260         {
2261             LogUtils.StartTest();
2262             /* TEST CODE */
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;
2270             LogUtils.WriteOK();
2271         }
2272
2273         private static TaskCompletionSource<bool> s_tcsDeveloperOptionState;
2274         private static bool s_developerOptionStateCallbackCalled = false;
2275         private static bool s_developerOptionStateValue = !Tizen.System.SystemSettings.DeveloperOptionState;
2276         ////[Test]
2277         //[Category("P1")]
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()
2284         {
2285             s_tcsDeveloperOptionState = new TaskCompletionSource<bool>();
2286             LogUtils.StartTest();
2287             /* TEST CODE */
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;
2300
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;
2306             LogUtils.WriteOK();
2307         }
2308         private static void OnDeveloperOptionStateChanged(object sender, Tizen.System.DeveloperOptionStateChangedEventArgs e)
2309         {
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.");
2314         }
2315
2316         // AccessibilityGrayscale
2317         ////[Test]
2318         //[Category("P1")]
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()
2325         {
2326             try
2327             {
2328                 LogUtils.StartTest();
2329                 /* TEST CODE */
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;
2333
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;
2338                 LogUtils.WriteOK();
2339             }
2340             catch (NotSupportedException)
2341             {
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();
2347             }
2348         }
2349
2350         private static TaskCompletionSource<bool> s_tcsAccessibilityGrayscale;
2351         private static bool s_accessibilityGrayscaleCallbackCalled = false;
2352         private static bool s_accessibilityGrayscaleValue = false;
2353         ////[Test]
2354         //[Category("P1")]
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()
2361         {
2362             try
2363             {
2364                                 s_tcsAccessibilityGrayscale = new TaskCompletionSource<bool>();
2365                 LogUtils.StartTest();
2366                 /* TEST CODE */
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;
2379                 LogUtils.WriteOK();
2380             }
2381             catch (NotSupportedException)
2382             {
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();
2388             }
2389         }
2390         private static void OnAccessibilityGrayscaleChanged(object sender, Tizen.System.AccessibilityGrayscaleChangedEventArgs e)
2391         {
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.");
2395         }
2396
2397         // AccessibilityNegativeColor
2398         ////[Test]
2399         //[Category("P1")]
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()
2406         {
2407             try
2408             {
2409                 LogUtils.StartTest();
2410                 /* TEST CODE */
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;
2414
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;
2419                 LogUtils.WriteOK();
2420             }
2421             catch (NotSupportedException)
2422             {
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();
2428             }
2429         }
2430
2431         private static TaskCompletionSource<bool> s_tcsAccessibilityNegativeColor;
2432         private static bool s_accessibilityNegativeColorCallbackCalled = false;
2433         private static bool s_accessibilityNegativeColorValue = false;
2434         ////[Test]
2435         //[Category("P1")]
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()
2442         {
2443             try
2444             {
2445                                 s_tcsAccessibilityNegativeColor = new TaskCompletionSource<bool>();
2446                 LogUtils.StartTest();
2447                 /* TEST CODE */
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;
2460                 LogUtils.WriteOK();
2461             }
2462             catch (NotSupportedException)
2463             {
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();
2469             }
2470         }
2471         private static void OnAccessibilityNegativeColorChanged(object sender, Tizen.System.AccessibilityNegativeColorChangedEventArgs e)
2472         {
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.");
2477         }
2478
2479         // RotaryEventEnabled
2480         ////[Test]
2481         //[Category("P1")]
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()
2488         {
2489             LogUtils.StartTest();
2490             /* TEST CODE */
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;
2494
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;
2499             LogUtils.WriteOK();
2500         }
2501
2502         private static TaskCompletionSource<bool> s_tcsRotaryEventEnabled;
2503         private static bool s_rotaryEventEnabledCallbackCalled = false;
2504         private static bool s_rotaryEventEnabledValue = false;
2505         ////[Test]
2506         //[Category("P1")]
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()
2513         {
2514             s_tcsRotaryEventEnabled = new TaskCompletionSource<bool>();
2515             LogUtils.StartTest();
2516             /* TEST CODE */
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;
2529             LogUtils.WriteOK();
2530         }
2531         private static void OnRotaryEventEnabledChanged(object sender, Tizen.System.RotaryEventEnabledChangedEventArgs e)
2532         {
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.");
2537         }
2538
2539         public static async void TestAllAsync()
2540         {
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();
2581
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();
2590             Time_READ_ONLY();
2591             //UsbDebuggingEnabled_READ_WRITE();
2592
2593             AdsId_READ_WRITE();
2594             await AdsIdChanged_CHECK_EVENT();
2595             UltraDataSave_READ_ONLY();
2596
2597             AccessibilityTtsEnabled_READ_WRITE();
2598             await AccessibilityTtsSettingChanged_CHECK_EVENT();
2599
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();
2606
2607             AccessibilityGrayscale_READ_WRITE();
2608             await AccessibilityGrayscaleChanged_CHECK_EVENT();
2609             AccessibilityNegativeColor_READ_WRITE();
2610             await AccessibilityNegativeColorChanged_CHECK_EVENT();
2611
2612
2613             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "Data3GNetworkSettingChangedEventArgsTests");
2614             await Data3GNetworkSettingChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2615
2616             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "EmailAlertRingtoneChangedEventArgsTests");
2617             await EmailAlertRingtoneChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2618
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();
2625
2626             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "FontTypeChangedEventArgsTests");
2627             await FontTypeChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2628
2629             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "IncomingCallRingtoneChangedEventArgsTests");
2630             await IncomingCallRingtoneChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2631
2632             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LocaleCountryChangedEventArgsTests");
2633             await LocaleCountryChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2634
2635             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LocaleLanguageChangedEventArgsTests");
2636             await LocaleLanguageChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2637
2638             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LocaleTimeFormat24HourSettingChangedEventArgsTests");
2639             await LocaleTimeFormat24HourSettingChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2640
2641             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "LocaleTimeZoneChangedEventArgsTests");
2642             await LocaleTimeZoneChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2643
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();
2648
2649             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "MotionActivationSettingChangedEventArgsTests");
2650             await MotionActivationSettingChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2651
2652             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "SoundNotificationChangedEventArgsTests");
2653             await SoundNotificationChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2654
2655             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "SoundNotificationRepetitionPeriodChangedEventArgsTests");
2656             await SoundNotificationRepetitionPeriodChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2657
2658             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "WallpaperHomeScreenChangedEventArgsTests");
2659             await WallpaperHomeScreenChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2660
2661             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "WallpaperLockScreenChangedEventArgsTests");
2662             await WallpaperLockScreenChangedEventArgsTests.Value_PROPERTY_READ_ONLY();
2663
2664
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();
2673
2674
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();
2682
2683             LogUtils.WriteResult();
2684             Tizen.Log.Debug("CS-SYSTEM-SETTINGS", "All of Unit test for Tizen.System.SystemSettings have completed!");
2685         }
2686     }
2687 }
2688
2689