From 887cca21a2e8af089c2e13d85be1dea0101c1e7c Mon Sep 17 00:00:00 2001 From: "shyun.min" Date: Wed, 4 Apr 2018 14:19:13 +0900 Subject: [PATCH] [ElmSharp][Non-ACR] Fix TC block issues - to return correct handle: AccessibleObjectTests, ContainerTests - to exclude unsupported test: FloatingButton - to remove tc for GetTextBlockGeometryByLineNumber because this API is obsolete Change-Id: I34980039720fa89440f8c43017df7a86337c1ec5 Signed-off-by: SungHyun Min --- .../testcase/TSFloatingButton.cs | 16 +++++++++++----- .../testcase/TSAccessibleObject.cs | 12 ++++++------ .../Tizen.ElmSharp.Tests/testcase/TSContainer.cs | 15 ++++++++------- .../Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs | 14 -------------- .../Tizen.ElmSharp.Tests/testcase/TSFloatingButton.cs | 18 +++++++++++------- 5 files changed, 36 insertions(+), 39 deletions(-) mode change 100755 => 100644 tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSFloatingButton.cs mode change 100755 => 100644 tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAccessibleObject.cs mode change 100755 => 100644 tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSContainer.cs mode change 100755 => 100644 tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFloatingButton.cs diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSFloatingButton.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSFloatingButton.cs old mode 100755 new mode 100644 index 7c6c4dd..27f6d66 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSFloatingButton.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSFloatingButton.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,7 +23,6 @@ using System.Threading.Tasks; namespace ElmSharp.Tests { - [TestFixture] [Description("Testing ElmSharp.FloatingButton class")] public class TSFloatingButton @@ -35,9 +34,15 @@ namespace ElmSharp.Tests [SetUp] public static void Init() { - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); - _floatingButton = new FloatingButton(_window); - + if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) == 0) + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); + _floatingButton = new FloatingButton(_window); + } + else + { + Assert.Pass("Not supported"); + } } [TearDown] @@ -50,6 +55,7 @@ namespace ElmSharp.Tests _floatingButton = null; } } + private static void CreateFloatingButton() { LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Init"); diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAccessibleObject.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAccessibleObject.cs old mode 100755 new mode 100644 index 0c3dfe8..f744735 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAccessibleObject.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAccessibleObject.cs @@ -20,8 +20,8 @@ using ElmSharpForTizen.Tizen; using System; using ElmSharp.Accessible; -namespace ElmSharp.Tests { - +namespace ElmSharp.Tests +{ [TestFixture] [Description("ElmSharp.Accessible.AccessibleObject Tests")] public class AccessibleObjectTests : AccessibleObject @@ -39,19 +39,20 @@ namespace ElmSharp.Tests { protected override IntPtr CreateHandle(EvasObject parent) { - return IntPtr.Zero; + var label = new Label(parent); + return label.Handle; } [SetUp] public static void Init() { - LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Preconditions for each TEST"); + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); } [TearDown] public static void Destroy() { - LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST"); + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST"); _accessibleObjectTests = null; } @@ -123,6 +124,5 @@ namespace ElmSharp.Tests { Assert.Fail("SetContent should not throw exception: " + ex.ToString()); } } - } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSContainer.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSContainer.cs old mode 100755 new mode 100644 index 988dd1d..c73e4b9 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSContainer.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSContainer.cs @@ -20,12 +20,12 @@ using System; using System.Collections.Generic; using ElmSharpForTizen.Tizen; - -namespace ElmSharp.Tests { - +namespace ElmSharp.Tests +{ [TestFixture] [Description("ElmSharp.Container Tests")] - public class ContainerTests { + public class ContainerTests + { private static Container _container; private static MyContainer _myContainer; private static MainWindow _window = MainWindow.GetInstance(); @@ -59,21 +59,22 @@ namespace ElmSharp.Tests { protected override IntPtr CreateHandle(EvasObject parent) { - return IntPtr.Zero; + var layout = new Layout(parent); + return layout.Handle; } } [SetUp] public static void Init() { - LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Preconditions for each TEST"); + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); _myContainer = new MyContainer(_window); } [TearDown] public static void Destroy() { - LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST"); + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST"); if (_container != null) { _container.Unrealize(); diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs index 3da8d09..c3da0e7 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs @@ -944,20 +944,6 @@ namespace ElmSharp.Tests [Test] [Category("P1")] - [Description("Check GetTextBlockGeometryByLineNumber method")] - [Property("SPEC", "ElmSharp.EvasObject.GetTextBlockGeometryByLineNumber M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")] - public void GetTextBlockGeometryByLineNumber_CHECK_METHOD() - { - int x, y, w, h; - var mark = _evasObject.GetTextBlockGeometryByLineNumber(1, out x, out y, out w, out h); - Assert.IsInstanceOf(mark); - } - - [Test] - [Category("P1")] [Description("Check whether get value of EvasCanvas are identical with the set value or not.")] [Property("SPEC", "ElmSharp.EvasObject.EvasCanvas A")] [Property("SPEC_URL", "-")] diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFloatingButton.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFloatingButton.cs old mode 100755 new mode 100644 index 94e71d6..87ff6bc --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFloatingButton.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFloatingButton.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,23 +19,27 @@ using NUnit.Framework.TUnit; using System; using ElmSharpForTizen.Tizen; - namespace ElmSharp.Tests { - [TestFixture] [Description("Testing ElmSharp.FloatingButton class")] public class FloatingButtonTests { - private static FloatingButton _floatingButton; private static MainWindow _window = MainWindow.GetInstance(); [SetUp] public static void Init() { - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); - _floatingButton = new FloatingButton(_window); + if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) == 0) + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); + _floatingButton = new FloatingButton(_window); + } + else + { + Assert.Pass("Not supported"); + } } [TearDown] @@ -124,7 +128,7 @@ namespace ElmSharp.Tests { try { - _floatingButton.SetPosition(FloatingButtonPosition.Left,true); + _floatingButton.SetPosition(FloatingButtonPosition.Left, true); } catch (Exception) { -- 2.7.4