From a66510de6c9fa53581434ab813b2b71ae7371a4c Mon Sep 17 00:00:00 2001 From: JinWang An <35290168+jinwangan@users.noreply.github.com> Date: Mon, 25 Feb 2019 17:21:56 +0900 Subject: [PATCH] [SystemSettings] Fix UnitTest error for TM1 target. (#682) Signed-off-by: jinwang.an --- .../SystemSettings.UnitTest.cs | 23 ++++++++-------------- .../test/TSSystemSettings.cs | 8 +------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/test/Tizen.System.SystemSettings.UnitTest/SystemSettings.UnitTest/SystemSettings.UnitTest.cs b/test/Tizen.System.SystemSettings.UnitTest/SystemSettings.UnitTest/SystemSettings.UnitTest.cs index f1db5f4..7a58baa 100755 --- a/test/Tizen.System.SystemSettings.UnitTest/SystemSettings.UnitTest/SystemSettings.UnitTest.cs +++ b/test/Tizen.System.SystemSettings.UnitTest/SystemSettings.UnitTest/SystemSettings.UnitTest.cs @@ -14,6 +14,7 @@ namespace SystemSettingsUnitTest { base.OnCreate(); SystemSettingsTests.TestAllAsync(); + //Initialize(); } @@ -25,26 +26,18 @@ namespace SystemSettingsUnitTest } - void Initialize() + public void DisplayString() { Window.Instance.KeyEvent += OnKeyEvent; TextLabel text = new TextLabel("SystemSettings Unit Test"); - text.HorizontalAlignment = HorizontalAlignment.Center; - text.VerticalAlignment = VerticalAlignment.Center; - text.TextColor = Color.Blue; - text.PointSize = 12.0f; - text.HeightResizePolicy = ResizePolicyType.FillToParent; - text.WidthResizePolicy = ResizePolicyType.FillToParent; + //text.HorizontalAlignment = HorizontalAlignment.Center; + //text.VerticalAlignment = VerticalAlignment.Center; + //text.TextColor = Color.Blue; + //text.PointSize = 12.0f; + //text.HeightResizePolicy = ResizePolicyType.FillToParent; + //text.WidthResizePolicy = ResizePolicyType.FillToParent; Window.Instance.GetDefaultLayer().Add(text); - /* - Animation animation = new Animation(2000); - animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(180.0f)), PositionAxis.X), 200, 500); - animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(0.0f)), PositionAxis.X), 500, 1000); - animation.Looping = true; - animation.Play(); - */ - } public void OnKeyEvent(object sender, Window.KeyEventArgs e) diff --git a/test/Tizen.System.SystemSettings.UnitTest/SystemSettings.UnitTest/test/TSSystemSettings.cs b/test/Tizen.System.SystemSettings.UnitTest/SystemSettings.UnitTest/test/TSSystemSettings.cs index cf54ea1..add665a 100755 --- a/test/Tizen.System.SystemSettings.UnitTest/SystemSettings.UnitTest/test/TSSystemSettings.cs +++ b/test/Tizen.System.SystemSettings.UnitTest/SystemSettings.UnitTest/test/TSSystemSettings.cs @@ -596,19 +596,13 @@ namespace SystemSettingsUnitTest Assert.IsInstanceOf(Tizen.System.SystemSettings.FontType, "FontType_READ_WRITE: FontType not an instance of string"); string setValue = "BreezeSans"; string preValue = Tizen.System.SystemSettings.FontType; + Thread.Sleep(3000); Tizen.System.SystemSettings.FontType = setValue; var getValue = Tizen.System.SystemSettings.FontType; Assert.IsTrue(getValue.CompareTo(setValue) == 0, "FontType_READ_WRITE: Set value and get value of the property should be same."); Thread.Sleep(1000); - - string strProfile; - Information.TryGetValue("tizen.org/feature/profile", out strProfile); - if (string.Compare(strProfile, "mobile") == 0) - Tizen.System.SystemSettings.FontType = preValue; - - LogUtils.WriteOK(); } -- 2.7.4