From: zhouleonlei Date: Tue, 28 Jul 2020 02:08:26 +0000 (+0800) Subject: [NUI][ACR-332] Remove the TCs of Deprecated/hidden ScrollBar APIs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7bd278e6cbe111cdc67b0863a1cc08f32a643437;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI][ACR-332] Remove the TCs of Deprecated/hidden ScrollBar APIs New Scrollbar is implementing.So plan to deprecate the old ScrollBar. Change-Id: I1bd50fb6ea88b8008636d434bda656e3a7d8541f --- diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSScrollBar.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSScrollBar.cs deleted file mode 100644 index 5decea9..0000000 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSScrollBar.cs +++ /dev/null @@ -1,475 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using Tizen.NUI; -using Tizen.NUI.BaseComponents; -using Tizen.NUI.Components; -using Tizen.NUI.Components.Test; -using System.Threading.Tasks; - -namespace Tizen.NUI.Components.Tests -{ - [TestFixture] - [Description("Tizen.NUI.Components.ScrollBar Tests")] - public class ScrollBarTests - { - private const string TAG = "NUI.Components"; - private string _trackImageUrl = ""; - private static 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!"); - } - - [Test] - [Category("P1")] - [Description("Create a ScrollBar object. Check whether object is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ScrollBar C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("COVPARAM", "")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ScrollBar_INIT() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - } - - [Test] - [Category("P1")] - [Description("Test ScrollBar constructor using string. Check whether ScrollBar is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ScrollBar C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("COVPARAM", "string")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollBar_INIT_WITH_STRING() - { - /* TEST CODE */ - StyleManager.Instance.Theme = "default"; - StyleManager.Instance.RegisterStyle("defaultScrollBar", "default", typeof(DefaultScrollBarStyle)); - var scrollBar = new ScrollBar("defaultScrollBar"); - Assert.IsNotNull(scrollBar, "Should be not null!"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar!"); - } - - [Test] - [Category("P2")] - [Description("Check exception when constructing a ScrollBar with nonexistent style.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ScrollBar C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTX")] - [Property("COVPARAM", "string")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollBar_INIT_WITH_STRING_Exception() - { - /* TEST CODE */ - try - { - var scrollBar = new ScrollBar("defaultScrollBarX"); - Assert.Fail("Should throw the Exception: There is no style of defaultScrollBarX !"); - } - catch(InvalidOperationException e) - { - if (e != null) - { - Assert.Pass("InvalidOperationException: passed!"); - } - } - } - - [Test] - [Category("P1")] - [Description("Test ScrollBar constructor using style. Check whether ScrollBar is successfully created or not.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ScrollBar C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("COVPARAM", "ScrollBarStyle")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollBar_INIT_WITH_STYLE() - { - /* TEST CODE */ - var style = new ScrollBarStyle(); - Assert.IsNotNull(style, "Should be not null!"); - Assert.IsInstanceOf(style, "Should be an instance of ScrollBarStyle!"); - - var scrollBar = new ScrollBar(style); - Assert.IsNotNull(scrollBar, "Should be not null!"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar!"); - } - - [Test] - [Category("P1")] - [Description("Test Style. Check whether Style is readable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.Style A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Xianbing teng, xb.teng@samsung.com")] - public void Style_CHECK_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Should be not null"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar!"); - - var style = scrollBar.Style; - Assert.IsNotNull(style, "Should be not null"); - Assert.IsInstanceOf(style, "Should be an instance of ScrollBarStyle!"); - } - - [Test] - [Category("P1")] - [Description("Test MinValue.Check whether MinValue is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.MinValue A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void MinValue_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.MinValue = 0; - Assert.AreEqual(0, scrollBar.MinValue, "Should be equals to the set value of MinValue."); - } - - [Test] - [Category("P1")] - [Description("Test MaxValue.Check whether MaxValue is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.MaxValue A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void MaxValue_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.MaxValue = 100; - Assert.AreEqual(100, scrollBar.MaxValue, "Should be equals to the set value of MaxValue."); - } - - [Test] - [Category("P1")] - [Description("Test CurrentValue.Check whether CurrentValue is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.CurrentValue A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void CurrentValue_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.CurrentValue = 50; - Assert.AreEqual(50, scrollBar.CurrentValue, "Should be equals to the set value of CurrentValue."); - } - - [Test] - [Category("P1")] - [Description("Test ThumbColor.Check whether ThumbColor is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ThumbColor A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ThumbColor_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.ThumbColor = Color.Red; - Assert.AreEqual(Color.Red.R, scrollBar.ThumbColor.R, "Should be equals to the set value."); - Assert.AreEqual(Color.Red.G, scrollBar.ThumbColor.G, "Should be equals to the set value."); - Assert.AreEqual(Color.Red.B, scrollBar.ThumbColor.B, "Should be equals to the set value."); - Assert.AreEqual(Color.Red.A, scrollBar.ThumbColor.A, "Should be equals to the set value."); - } - - [Test] - [Category("P1")] - [Description("Test TrackColor.Check whether TrackColor is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.TrackColor A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void TrackColor_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.TrackColor = Color.Green; - Assert.AreEqual(Color.Green.R, scrollBar.TrackColor.R, "Should be equals to the set value."); - Assert.AreEqual(Color.Green.G, scrollBar.TrackColor.G, "Should be equals to the set value."); - Assert.AreEqual(Color.Green.B, scrollBar.TrackColor.B, "Should be equals to the set value."); - Assert.AreEqual(Color.Green.A, scrollBar.TrackColor.A, "Should be equals to the set value."); - } - - [Test] - [Category("P1")] - [Description("Test TrackImageURL.Check whether TrackImageURL is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.TrackImageURL A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void TrackImageURL_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.TrackImageURL = _trackImageUrl; - Assert.AreEqual(_trackImageUrl, scrollBar.TrackImageURL, "Should be equals to the set value of TrackImageURL."); - } - - [Test] - [Category("P1")] - [Description("Test Direction.Check whether Direction is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.Direction A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Direction_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.Direction = ScrollBar.DirectionType.Vertical; - Assert.AreEqual(ScrollBar.DirectionType.Vertical, scrollBar.Direction, "Should be equals to the set value of Direction."); - scrollBar.Direction = ScrollBar.DirectionType.Horizontal; - Assert.AreEqual(ScrollBar.DirectionType.Horizontal, scrollBar.Direction, "Should be equals to the set value of Direction."); - } - - [Test] - [Category("P1")] - [Description("Test Duration.Check whether Duration is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.Duration A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void Duration_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.Duration = 100; - Assert.AreEqual(100, scrollBar.Duration, "Should be equals to the set value of Duration."); - } - - [Test] - [Category("P1")] - [Description("Test ThumbSize.Check whether ThumbSize is readable ahd writeable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ThumbSize A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void ThumbSize_SET_GET_VALUE() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.ThumbSize = new Size(50, 50); - Assert.AreEqual(50, scrollBar.ThumbSize.Width, "Should be equals to the set value."); - Assert.AreEqual(50, scrollBar.ThumbSize.Height, "Should be equals to the set value."); - } - - [Test] - [Category("P1")] - [Description("Test SetCurrentValue.Check whether SetCurrentValue works or not.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.SetCurrentValue M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void SetCurrentValue_TEST() - { - /* TEST CODE */ - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.MinValue = 0; - scrollBar.MaxValue = 100; - scrollBar.SetCurrentValue(50); - Assert.AreEqual(50, scrollBar.CurrentValue, "Should be equals to the set value of CurrentValue."); - } - - [Test] - [Category("P2")] - [Description("Check exception when current value less than min value.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.SetCurrentValue M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetCurrentValue_TEST_Exception_LESS() - { - /* TEST CODE */ - try - { - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.MinValue = 0; - scrollBar.MaxValue = 100; - scrollBar.SetCurrentValue(-1); - Assert.Fail("Should throw the ArgumentOutOfRangeException!"); - } - catch(ArgumentOutOfRangeException e) - { - if (e != null) - { - Assert.Pass("ArgumentOutOfRangeException: passed!"); - } - } - } - - [Test] - [Category("P2")] - [Description("Check exception when current value large than max value..")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.SetCurrentValue M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void SetCurrentValue_TEST_Exception_LARGE() - { - /* TEST CODE */ - try - { - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.MinValue = 0; - scrollBar.MaxValue = 100; - scrollBar.SetCurrentValue(105); - Assert.Fail("Should throw the ArgumentOutOfRangeException!"); - } - catch(ArgumentOutOfRangeException e) - { - if (e != null) - { - Assert.Pass("ArgumentOutOfRangeException: passed!"); - } - } - } - - [Test] - [Category("P1")] - [Description("Test Dispose, try to dispose the ScrollBar.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.Dispose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void Dispose_TEST() - { - /* TEST CODE */ - try - { - var scrollBar = new ScrollBar(); - Assert.IsNotNull(scrollBar, "Can't create success object ScrollBar"); - Assert.IsInstanceOf(scrollBar, "Should be an instance of ScrollBar type."); - - scrollBar.Dispose(); - } - 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 GetViewStyle. Check whether CreateViewStyle works or not.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.CreateViewStyle M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void CreateViewStyle_CHECK_RETURN_VALUE() - { - try - { - var scrollBar = new MyScrollBar(); - ViewStyle style = scrollBar.CreateMyViewStyle(); - Assert.IsNotNull(style, "Should be not null"); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBar.OnThemeChangedEvent M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void OnThemeChangedEvent_CHECK_RETURN_VALUE() - { - try - { - _flagOnThemeChangedEvent = false; - StyleManager.Instance.Theme = "Family"; - var scrollBar = new MyScrollBar(); - StyleManager.Instance.Theme = "Food"; - Assert.IsNotNull(scrollBar, "Should be not null"); - Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!"); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - - public class MyScrollBar : ScrollBar - { - public MyScrollBar() : base() {} - - public ViewStyle CreateMyViewStyle() - { - return base.CreateViewStyle(); - } - - protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) - { - _flagOnThemeChangedEvent = true; - } - } - - public class DefaultScrollBarStyle : StyleBase - { - protected override ViewStyle GetViewStyle() - { - return new ScrollBarStyle(); - } - } - } -} diff --git a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSScrollBarStyle.cs b/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSScrollBarStyle.cs deleted file mode 100755 index eae41c3..0000000 --- a/tct-suite-vs/Tizen.NUI.Components.Tests/testcase/TSScrollBarStyle.cs +++ /dev/null @@ -1,157 +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.ScrollBarStyle Tests")] - public class ScrollBarStyleTests - { - 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("Test ScrollBarStyle empty constructor. Check it has been triggered")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.ScrollBarStyle C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollBarStyle_INIT() - { - /* TEST CODE */ - var style = new ScrollBarStyle(); - Assert.IsNotNull(style, "Should be not null!"); - Assert.IsInstanceOf(style, "Should be an instance of ScrollBarStyle!"); - } - - [Test] - [Category("P1")] - [Description("Test ScrollBarStyle constructor using style. Check it has been triggered")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.ScrollBarStyle C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("COVPARAM", "ScrollBarStyle")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void ScrollBarStyle_INIT_WITH_STYLE() - { - /* TEST CODE */ - var style1 = new ScrollBarStyle(); - Assert.IsNotNull(style1, "Should be not null!"); - Assert.IsInstanceOf(style1, "Should be an instance of ScrollBarStyle!"); - - var style2 = new ScrollBarStyle(style1); - Assert.IsNotNull(style2, "Should be not null!"); - Assert.IsInstanceOf(style2, "Should be an instance of ScrollBarStyle!"); - } - - [Test] - [Category("P1")] - [Description("Test Track. Check whether Track is readable and writable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.Track A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void Track_SET_GET_VALUE() - { - /* TEST CODE */ - var style = new ScrollBarStyle(); - Assert.IsNotNull(style, "Should be not null"); - Assert.IsInstanceOf(style, "Should be equal!"); - style.Track = new ImageViewStyle() {ResourceUrl = "test.png"}; - Assert.AreEqual("test.png", style.Track.ResourceUrl.All, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test Thumb. Check whether Thumb is readable and writable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.Thumb A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void Thumb_SET_GET_VALUE() - { - /* TEST CODE */ - var style = new ScrollBarStyle(); - Assert.IsNotNull(style, "Should be not null"); - Assert.IsInstanceOf(style, "Should be equal!"); - style.Thumb = new ImageViewStyle() {ResourceUrl = "test.png"}; - Assert.AreEqual("test.png", style.Thumb.ResourceUrl.All, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test Direction. Check whether Direction is readable and writable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.Direction A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void Direction_SET_GET_VALUE() - { - /* TEST CODE */ - var style = new ScrollBarStyle(); - Assert.IsNotNull(style, "Should be not null"); - Assert.IsInstanceOf(style, "Should be equal!"); - style.Direction = ScrollBar.DirectionType.Horizontal; - Assert.AreEqual(ScrollBar.DirectionType.Horizontal, style.Direction, "Should be equals to the set value"); - style.Direction = ScrollBar.DirectionType.Vertical; - Assert.AreEqual(ScrollBar.DirectionType.Vertical, style.Direction, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test Duration. Check whether Duration is readable and writable.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.Duration A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void Duration_SET_GET_VALUE() - { - /* TEST CODE */ - var style = new ScrollBarStyle(); - Assert.IsNotNull(style, "Should be not null"); - Assert.IsInstanceOf(style, "Should be equal!"); - style.Duration = 30; - Assert.AreEqual(30, style.Duration, "Should be equals to the set value"); - } - - [Test] - [Category("P1")] - [Description("Test CopyFrom. Check whether CopyFrom works or not.")] - [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.CopyFrom M")] - [Property("SPEC_URL", " - ")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] - public void CopyFrom_NO_RETURN_VALUE() - { - try - { - var style1 = new ScrollBarStyle(); - var style2 = new ScrollBarStyle(); - style2.CopyFrom(style1); - } - catch (Exception e) - { - Assert.Fail("Caught Exception" + e.ToString()); - } - } - } -}