[ElmSharp][Non-ACR] Fix TC block issues 07/174807/2
authorshyun.min <shyun.min@samsung.com>
Wed, 4 Apr 2018 05:19:13 +0000 (14:19 +0900)
committerRinaYou <rina6350.you@samsung.com>
Wed, 4 Apr 2018 08:28:02 +0000 (17:28 +0900)
 - 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 <shyun.min@samsung.com>
tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSFloatingButton.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAccessibleObject.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSContainer.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSEvasObject.cs
tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSFloatingButton.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 7c6c4dd..27f6d66
@@ -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");
old mode 100755 (executable)
new mode 100644 (file)
index 0c3dfe8..f744735
@@ -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());
             }
         }
-
     }
 }
old mode 100755 (executable)
new mode 100644 (file)
index 988dd1d..c73e4b9
@@ -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();
index 3da8d09..c3da0e7 100755 (executable)
@@ -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<Boolean>(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", "-")]
old mode 100755 (executable)
new mode 100644 (file)
index 94e71d6..87ff6bc
@@ -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)
             {