[SystemSettings] Fix UnitTest error for TM1 target. (#682)
[platform/core/csapi/tizenfx.git] / test / Tizen.System.SystemSettings.UnitTest / SystemSettings.UnitTest / SystemSettings.UnitTest.cs
1 using System;
2 using Tizen.NUI;
3 using Tizen.NUI.BaseComponents;
4 using System.Threading.Tasks;
5 using Tizen;
6 using Tizen.System;
7
8
9 namespace SystemSettingsUnitTest
10 {
11     class Program : NUIApplication
12     {
13         protected override void OnCreate()
14         {
15             base.OnCreate();
16             SystemSettingsTests.TestAllAsync();
17
18             //Initialize();
19         }
20      
21         public static void PrintOkFuncName(String str_in)
22         {
23             String func_name = str_in.ToString();
24             String[] parse_func = func_name.Split(' ');
25             Console.WriteLine(parse_func[1] + " >>>>>> ok");
26
27         }
28
29         public void DisplayString()
30         {
31             Window.Instance.KeyEvent += OnKeyEvent;
32             TextLabel text = new TextLabel("SystemSettings Unit Test");
33             //text.HorizontalAlignment = HorizontalAlignment.Center;
34             //text.VerticalAlignment = VerticalAlignment.Center;
35             //text.TextColor = Color.Blue;
36             //text.PointSize = 12.0f;
37             //text.HeightResizePolicy = ResizePolicyType.FillToParent;
38             //text.WidthResizePolicy = ResizePolicyType.FillToParent;
39             Window.Instance.GetDefaultLayer().Add(text);
40
41         }
42
43         public void OnKeyEvent(object sender, Window.KeyEventArgs e)
44         {
45             if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
46             {
47                 Exit();
48             }
49         }
50
51         static void Main(string[] args)
52         {
53             
54             var app = new Program();
55             app.Run(args);
56             
57         }
58     }
59 }