[NUI][ACR-330]Remove TCs of StyleManager class. 93/239893/3
authorguowei.wang <guowei.wang@samsung.com>
Thu, 30 Jul 2020 09:51:16 +0000 (17:51 +0800)
committerguowei.wang <guowei.wang@samsung.com>
Tue, 11 Aug 2020 08:40:12 +0000 (16:40 +0800)
The class Tizen.NUI.Components.StyleManager was removed, so delete related TCs.

change files:
tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSStyleManager.cs
tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSStyleManager.ThemeChangeEventArgs.cs

Change-Id: Ia93c6c5a21847ccf761c94d4be2f87e05e568324

tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSStyleManager.ThemeChangeEventArgs.cs [deleted file]
tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSStyleManager.cs [deleted file]

diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSStyleManager.ThemeChangeEventArgs.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSStyleManager.ThemeChangeEventArgs.cs
deleted file mode 100755 (executable)
index 27a96da..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-using NUnit.Framework;
-using Tizen.NUI.Components;
-using Tizen.NUI.Components.Test;
-
-namespace Tizen.NUI.Components.Tests
-{
-    [TestFixture]
-    [Description("Tizen.NUI.Components.StyleManager.ThemeChangeEventArgs Tests")]
-    public class ThemeChangeEventArgsTests
-    {
-        private const string TAG = "Components";
-
-        [SetUp]
-        public void Init()
-        {
-            Tizen.Log.Info(TAG, "Init() is called!");
-        }
-
-        [TearDown]
-        public void Destroy()
-        {
-            Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Create a ThemeChangeEventArgs object. Check whether ThemeChangeEventArgs is successfully created or not.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.ThemeChangeEventArgs.ThemeChangeEventArgs C")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "CONSTR")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void ThemeChangeEventArgs_INIT()
-        {
-            var eventArgs = new StyleManager.ThemeChangeEventArgs();
-            Assert.IsNotNull(eventArgs, "Should be not null!");
-            Assert.IsInstanceOf<StyleManager.ThemeChangeEventArgs>(eventArgs, "Should return ThemeChangeEventArgs instance.");
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test CurrentTheme. Check whether CurrentTheme is readable and writable.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.ThemeChangeEventArgs.CurrentTheme A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PRW")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void CurrentTheme_SET_GET_VALUE()
-        {
-            var eventArgs = new StyleManager.ThemeChangeEventArgs();
-            Assert.IsNotNull(eventArgs, "Should be not null!");
-            Assert.IsInstanceOf<StyleManager.ThemeChangeEventArgs>(eventArgs, "Should return ThemeChangeEventArgs instance.");
-
-            eventArgs.CurrentTheme = "default";
-            Assert.AreEqual("default", eventArgs.CurrentTheme, "Retrieved CurrentTheme should be equal to set value.");
-        }
-    }
-}
-
diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSStyleManager.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSStyleManager.cs
deleted file mode 100755 (executable)
index fb19089..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-using NUnit.Framework;
-using NUnit.Framework.TUnit;
-using System;
-using Tizen.NUI;
-using Tizen.NUI.Components;
-using System.Runtime.InteropServices;
-using System.Threading.Tasks;
-using Tizen.NUI.Components.Test;
-using Tizen.NUI.BaseComponents;
-
-namespace Tizen.NUI.Components.Tests
-{
-    [TestFixture]
-    [Description("Tizen.NUI.Components.StyleManager Tests")]
-    public class StyleManagerTests
-    {
-        private const string TAG = "Components";
-        private bool flagOnThemeChangedEvent = false;
-
-        [SetUp]
-        public void Init()
-        {
-            Tizen.Log.Info(TAG, "Init() is called!");
-        }
-
-        [TearDown]
-        public void Destroy()
-        {
-            Tizen.Log.Info(TAG, "Destroy() is called!");
-        }
-
-        private void OnThemeChangedEvent(object obj, StyleManager.ThemeChangeEventArgs args)
-        {
-            flagOnThemeChangedEvent = true;
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test ThemeChangedEvent. Check Event Handler of Value Change.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.ThemeChangedEvent E")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "EVL")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void ThemeChangedEvent_SET_GET_VALUE()
-        {
-            /* TEST CODE */
-
-            try
-            {
-                flagOnThemeChangedEvent = false;
-                StyleManager.Instance.Theme = "MyFamily";
-                StyleManager.Instance.ThemeChangedEvent += OnThemeChangedEvent;
-                StyleManager.Instance.Theme = "MyFood";
-                Assert.IsTrue(flagOnThemeChangedEvent, "Item change event should received");
-                StyleManager.Instance.ThemeChangedEvent -= OnThemeChangedEvent;
-            }
-            catch (Exception e)
-            {
-                Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
-                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
-                Assert.Fail("Caught Exception" + e.ToString());
-            }
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test Instance. Check whether Instance is readable.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.Instance A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PRO")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void Instance_SET_GET_VALUE()
-        {
-            /* TEST CODE */
-            var manager = StyleManager.Instance;
-            Assert.IsNotNull(manager, "Should be not null");
-            Assert.IsInstanceOf<StyleManager>(manager, "Should be an instance of StyleManager!");
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test Theme. Check whether Theme is readable and writable.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.Theme A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PRW")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void Theme_SET_GET_VALUE()
-        {
-            /* TEST CODE */
-            StyleManager.Instance.Theme = "FAMILY";
-            // Theme name does not distinguish capital character. All the capital character is changed into small character.
-            Assert.AreEqual("FAMILY", StyleManager.Instance.Theme, "Should be equals to the set value");
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test RegisterStyle. Check whether RegisterStyle works or not.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MR")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterStyle_NO_RETURN_VALUE()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterStyle("MyButtonStyle", "default", typeof(MyButtonStyle));
-            }
-            catch (Exception e)
-            {
-                Assert.Fail("Caught Exception" + e.ToString());
-            }
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("Check exception when RegisterStyle receive a null style.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterStyle_NULL_Style_Exception()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterStyle(null, "default", typeof(MyButtonStyle));
-                Assert.Fail("Should throw the InvalidOperationException!");
-            }
-            catch (InvalidOperationException e)
-            {
-                Assert.Pass("InvalidOperationException: passed!");
-            }
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("Check exception when RegisterStyle receive a null theme.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterStyle_NULL_Theme_Exception()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterStyle("NButtonStyle", null, typeof(MyButtonStyle));
-                StyleManager.Instance.RegisterStyle("NButtonStyle", null, typeof(ButtonStyle));
-                Assert.Fail("Should throw the InvalidOperationException!");
-            }
-            catch (InvalidOperationException e)
-            {
-                Assert.Pass("InvalidOperationException: passed!");
-            }
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("Check exception when RegisterStyle receive a null style type.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterStyle_NULL_STYLE_TYPE_Exception()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterStyle("NonButtonStyle", "default", null);
-                Assert.Fail("Should throw the ArgumentException!");
-            }
-            catch (ArgumentException e)
-            {
-                Assert.Pass("ArgumentException: passed!");
-            }
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("Check exception when RegisterStyle receive same style in same theme.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterStyle_STYLE_Repeat_Exception()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterStyle("NonButtonStyle", "default", typeof(MyButtonStyle));
-                StyleManager.Instance.RegisterStyle("NonButtonStyle", "default", typeof(MyButtonStyle));
-                Assert.Fail("Should throw the InvalidOperationException!");
-            }
-            catch (InvalidOperationException e)
-            {
-                Assert.Pass("InvalidOperationException: passed!");
-            }
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test GetViewStyle. Check whether GetViewStyle works or not.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.GetViewStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MR")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void GetViewStyle_CHECK_RETURN_VALUE()
-        {
-            try
-            {
-                StyleManager.Instance.Theme = "default";
-                StyleManager.Instance.RegisterStyle("FamilyButton", "default", typeof(MyButtonStyle));
-                var style = StyleManager.Instance.GetViewStyle("FamilyButton");
-                Assert.IsNotNull(style, "Should be not null");
-                Assert.IsInstanceOf<ButtonStyle>(style, "Should be an instance of ButtonStyle!");
-            }
-            catch (Exception e)
-            {
-                Assert.Fail("Caught Exception" + e.ToString());
-            }
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test RegisterComponentStyle. Check whether RegisterComponentStyle works or not.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterComponentStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MR")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterComponentStyle_NO_RETURN_VALUE()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterComponentStyle("MyButtonStyle1", typeof(Button) ,typeof(MyButtonStyle));
-            }
-            catch (Exception e)
-            {
-                Assert.Fail("Caught Exception" + e.ToString());
-            }
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("Check exception when RegisterComponentStyle receive a null style.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterComponentStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterComponentStyle_NULL_Style_Exception()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterComponentStyle(null, typeof(Button) ,typeof(MyButtonStyle));
-                Assert.Fail("Should throw the ArgumentException!");
-            }
-            catch (ArgumentException e)
-            {
-                Assert.Pass("ArgumentException: passed!");
-            }
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("Check exception when RegisterComponentStyle receive a null component type.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterComponentStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterComponentStyle_NULL_TYPE_Exception()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterComponentStyle("MyButtonStyle", null ,typeof(MyButtonStyle));
-                Assert.Fail("Should throw the ArgumentException!");
-            }
-            catch (ArgumentException e)
-            {
-                Assert.Pass("ArgumentException: passed!");
-            }
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("Check exception when RegisterComponentStyle receive a null style type.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterComponentStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void RegisterComponentStyle_NULL_STYLE_TYPE_Exception()
-        {
-            try
-            {
-                StyleManager.Instance.RegisterComponentStyle("MyButtonStyle", typeof(Button) , null);
-                Assert.Fail("Should throw the ArgumentException!");
-            }
-            catch(ArgumentException e)
-            {
-                Assert.Pass("ArgumentException: passed!");
-            }
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Test GetComponentStyle. Check whether GetComponentStyle works or not.")]
-        [Property("SPEC", "Tizen.NUI.Components.StyleManager.GetComponentStyle M")]
-        [Property("SPEC_URL", " - ")]
-        [Property("CRITERIA", "MR")]
-        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
-        public void GetComponentStyle_CHECK_RETURN_VALUE()
-        {
-            try
-            {
-                StyleManager.Instance.Theme = "FoodButton";
-                StyleManager.Instance.RegisterComponentStyle("FoodButton", typeof(Button), typeof(MyButtonStyle));
-                var style = StyleManager.Instance.GetComponentStyle(typeof(Button));
-                Assert.IsNotNull(style, "Should be not null");
-                Assert.IsInstanceOf<ButtonStyle>(style, "Should be an instance of ButtonStyle!");
-            }
-            catch (Exception e)
-            {
-                Assert.Fail("Caught Exception" + e.ToString());
-            }
-        }
-
-        public class MyButtonStyle : StyleBase
-        {
-            protected override ViewStyle GetViewStyle()
-            {
-                return new ButtonStyle();
-            }
-        }
-    }
-}