using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Tizen.FH.NUI, PublicKey=0024000004800000940000000602000000240000525341310004000001000100edd17ed375b5865e35ee337fe9e90ef0fb0c258c091874889540bb4eaeedc992755ec0e0a6deadfbfbb685bddfc99a850418e94b6a9e831fb47bcc52be1a5110dbc141943b51ebefe6daf4e415dc430c6b3f10175188db4b3dc0073d662318fe8463dfdb22aaa3e8e9aa97313fb4b3b157cf32c9b6b340dab9812fe97fd2d6c4")]
+[assembly: InternalsVisibleTo("Tizen.NUI.Components.Devel.Tests, " + Tizen.NUI.PublicKey.Sample)]
namespace Tizen.NUI.Components
{
<PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\..\src\Tizen.NUI.Components\Tizen.NUI.Components.csproj" />
+ <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
<ProjectReference Include="..\nunit.framework\nunit.framework.csproj" />
<ProjectReference Include="..\nunitlite\nunitlite.csproj" />
</ItemGroup>
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Navigation/AppBar")]
+ class AppBarTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyAppBar : AppBar
+ {
+ public MyAppBar() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AppBar Dispose.")]
+ [Property("SPEC", "Tizen.NUI.Components.AppBar.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AppBarDispose()
+ {
+ tlog.Debug(tag, $"AppBarDispose START");
+
+ var testingTarget = new MyAppBar();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AppBar>(testingTarget, "Should return AppBar instance.");
+
+ testingTarget.AutoNavigationContent = false;
+ tlog.Debug(tag, "AutoNavigationContent : " + testingTarget.AutoNavigationContent);
+
+ testingTarget.AutoNavigationContent = false; // if "== value", return
+ testingTarget.AutoNavigationContent = true;
+ tlog.Debug(tag, "AutoNavigationContent : " + testingTarget.AutoNavigationContent);
+
+ View nc = new View()
+ {
+ Size = new Size(100, 100),
+ BackgroundColor = Color.Cyan
+ };
+ testingTarget.NavigationContent = nc;
+ testingTarget.NavigationContent = nc;
+
+ View tc = new View()
+ {
+ Size = new Size(100, 20),
+ Position = new Position(0, 0),
+ BackgroundColor = Color.Green
+ };
+ testingTarget.TitleContent = tc;
+ testingTarget.TitleContent = tc;
+
+ List<View> actions = new List<View>();
+
+ ViewStyle style1 = new ViewStyle()
+ {
+ BackgroundColor = Color.Red,
+ };
+ View action1 = new View(style1);
+
+ ButtonStyle style2 = new ButtonStyle()
+ {
+ BackgroundColor = Color.Yellow,
+ ItemAlignment = LinearLayout.Alignment.Center,
+ ItemSpacing = new Size2D(10, 2)
+ };
+ tlog.Debug(tag, "ItemAlignment : " + style2.ItemAlignment);
+ tlog.Debug(tag, "ItemSpacing : " + style2.ItemSpacing);
+ View action2 = new Button(style2);
+
+ actions.Add(action1);
+ actions.Add(action2);
+
+ testingTarget.Actions = actions;
+
+ View ac = new View()
+ {
+ Size = new Size(100, 80),
+ Position = new Position(0, 20)
+ };
+ testingTarget.ActionContent = ac;
+
+ testingTarget.Actions = actions;
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"AppBarDispose END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Navigation/ContentPage")]
+ public class ContentPageTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyContentPage : ContentPage
+ {
+ public MyContentPage() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ContentPage constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ContentPage.ContentPage C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ContentPageConstructor()
+ {
+ tlog.Debug(tag, $"ContentPageConstructor START");
+
+ var testingTarget = new MyContentPage();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ContentPage>(testingTarget, "Should return ContentPage instance.");
+
+ AppBar bar = new AppBar()
+ {
+ Title = "AppBar",
+ };
+ testingTarget.AppBar = bar;
+ tlog.Debug(tag, "AppBar : " + testingTarget.AppBar);
+
+ testingTarget.AppBar = bar;
+
+ AppBar bar2 = new AppBar()
+ {
+ Title = "AppBar2",
+ };
+ testingTarget.AppBar = bar2;
+ tlog.Debug(tag, "AppBar : " + testingTarget.AppBar);
+
+ View content = new View()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Cyan,
+ };
+ testingTarget.Content = content;
+ tlog.Debug(tag, "Content : " + testingTarget.Content);
+
+ testingTarget.Content = content;
+
+ View content2 = new View()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ };
+ testingTarget.Content = content2;
+ tlog.Debug(tag, "Content : " + testingTarget.Content);
+
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ tlog.Debug(tag, $"ContentPageConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ContentPage OnRelayout.")]
+ [Property("SPEC", "Tizen.NUI.Components.ContentPage.OnRelayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public async Task ContentPageOnRelayout()
+ {
+ tlog.Debug(tag, $"ContentPageOnRelayout START");
+
+ var testingTarget = new MyContentPage()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Cyan,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ContentPage>(testingTarget, "Should return ContentPage instance.");
+
+ AppBar bar = new AppBar()
+ {
+ Title = "AppBar",
+ Size = new Size(100, 20)
+ };
+ testingTarget.AppBar = bar;
+ tlog.Debug(tag, "AppBar : " + testingTarget.AppBar);
+
+ testingTarget.AppBar = bar;
+
+ testingTarget.AppBar.WidthSpecification = LayoutParamPolicies.MatchParent;
+ testingTarget.AppBar.HeightSpecification = LayoutParamPolicies.MatchParent;
+
+ View content = new View()
+ {
+ Size = new Size(100, 180)
+ };
+ testingTarget.Content = content;
+
+ testingTarget.Content.WidthSpecification = LayoutParamPolicies.MatchParent;
+ testingTarget.Content.HeightSpecification = LayoutParamPolicies.MatchParent;
+
+ testingTarget.Size = new Size(200, 400);
+
+ await Task.Delay(200);
+
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ tlog.Debug(tag, $"ContentPageOnRelayout END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/DialogPage")]
+ public class DialogPageTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyDialogPage : DialogPage
+ {
+ public MyDialogPage() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("DialogPage Dispose.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void DialogPageDispose()
+ {
+ tlog.Debug(tag, $"DialogPageDispose START");
+
+ var testingTarget = new MyDialogPage();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<DialogPage>(testingTarget, "Should return DialogPage instance.");
+
+ View content = new View() { BackgroundColor = Color.Black };
+ testingTarget.Content = content;
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"DialogPageDispose END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Navigation/Navigator")]
+ public class NavigationNavigatorTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyPage : Page { }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PoppedEventArgs Page.")]
+ [Property("SPEC", "Tizen.NUI.Components.PoppedEventArgs.Page A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PoppedEventArgsPage()
+ {
+ tlog.Debug(tag, $"PoppedEventArgsPage START");
+
+ var testingTarget = new PoppedEventArgs();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<PoppedEventArgs>(testingTarget, "Should return PoppedEventArgs instance.");
+
+ tlog.Debug(tag, "Page : " + testingTarget.Page);
+
+ tlog.Debug(tag, $"PoppedEventArgsPage END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Navigator Transition.")]
+ [Property("SPEC", "Tizen.NUI.Components.Navigator.Transition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NavigatorTransition()
+ {
+ tlog.Debug(tag, $"NavigatorTransition START");
+
+ var testingTarget = new Navigator();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Navigator>(testingTarget, "Should return Navigator instance.");
+
+ Transition ts = new Transition()
+ {
+ AlphaFunction = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn),
+ TimePeriod = new TimePeriod(300)
+ };
+
+ testingTarget.Transition = ts;
+ tlog.Debug(tag, "AppearingTransition : " + testingTarget.Transition);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NavigatorTransition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Navigator PushWithTransition.")]
+ [Property("SPEC", "Tizen.NUI.Components.Navigator.PushWithTransition M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NavigatorPushWithTransition()
+ {
+ tlog.Debug(tag, $"NavigatorPushWithTransition START");
+
+ var testingTarget = new Navigator()
+ {
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Navigator>(testingTarget, "Should return Navigator instance.");
+
+ Window.Instance.Add(testingTarget);
+
+ var page1 = CreateFirstPage(testingTarget);
+ var page2 = CreateSecondPage(testingTarget);
+ testingTarget.Pop();
+ var page3 = CreateThirdPage(testingTarget);
+ var page4 = CreateFourthPage(testingTarget);
+
+ Transition ts = new Transition()
+ {
+ AlphaFunction = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn),
+ TimePeriod = new TimePeriod(300)
+ };
+
+ testingTarget.Transition = ts;
+ tlog.Debug(tag, "Transition : " + testingTarget.Transition);
+
+ try
+ {
+ testingTarget.PushWithTransition(page1);
+ testingTarget.PopWithTransition();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ Window.Instance.Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NavigatorPushWithTransition END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Navigator PushWithTransition.")]
+ [Property("SPEC", "Tizen.NUI.Components.Navigator.PushWithTransition M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NavigatorPushWithTransitionWithNullPage()
+ {
+ tlog.Debug(tag, $"NavigatorPushWithTransitionWithNullPage START");
+
+ var testingTarget = new Navigator()
+ {
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Navigator>(testingTarget, "Should return Navigator instance.");
+
+ Window.Instance.Add(testingTarget);
+
+ Transition ts = new Transition()
+ {
+ AlphaFunction = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn),
+ TimePeriod = new TimePeriod(300)
+ };
+
+ testingTarget.Transition = ts;
+
+ MyPage page = null;
+
+ try
+ {
+ testingTarget.PushWithTransition(page);
+ }
+ catch (ArgumentNullException)
+ {
+ Window.Instance.Remove(testingTarget);
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NavigatorPushWithTransitionWithNullPage END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ private Page CreateFirstPage(Navigator navigator)
+ {
+ var button = new Button()
+ {
+ Text = "First Page",
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ };
+
+ var page = new MyPage();
+ page.Add(button);
+ page.Appearing += (object sender, PageAppearingEventArgs e) =>
+ {
+ global::System.Console.WriteLine("First Page is appearing!");
+ };
+ page.Disappearing += (object sender, PageDisappearingEventArgs e) =>
+ {
+ global::System.Console.WriteLine("First Page is disappearing!");
+ };
+
+ navigator.Push(page);
+
+ return page;
+ }
+
+ private Page CreateSecondPage(Navigator navigator)
+ {
+ var button = new Button()
+ {
+ Text = "Second Page",
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ };
+
+ var page = new MyPage();
+ page.Add(button);
+ page.Appearing += (object sender, PageAppearingEventArgs e) =>
+ {
+ global::System.Console.WriteLine("Second Page is appearing!");
+ };
+ page.Disappearing += (object sender, PageDisappearingEventArgs e) =>
+ {
+ global::System.Console.WriteLine("Second Page is disappearing!");
+ };
+
+ navigator.Push(page);
+
+ return page;
+ }
+
+ private Page CreateThirdPage(Navigator navigator)
+ {
+ var button = new Button()
+ {
+ Text = "Third Page",
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ };
+
+ var page = new DialogPage();
+ page.Add(button);
+ page.Appearing += (object sender, PageAppearingEventArgs e) =>
+ {
+ global::System.Console.WriteLine("Third Page is appearing!");
+ };
+ page.Disappearing += (object sender, PageDisappearingEventArgs e) =>
+ {
+ global::System.Console.WriteLine("Third Page is disappearing!");
+ };
+
+ navigator.Push(page);
+
+ return page;
+ }
+
+ private Page CreateFourthPage(Navigator navigator)
+ {
+ var button = new Button()
+ {
+ Text = "Fourth Page",
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ };
+
+ var page = new DialogPage();
+ page.Add(button);
+ page.Appearing += (object sender, PageAppearingEventArgs e) =>
+ {
+ global::System.Console.WriteLine("Third Page is appearing!");
+ };
+ page.Disappearing += (object sender, PageDisappearingEventArgs e) =>
+ {
+ global::System.Console.WriteLine("Third Page is disappearing!");
+ };
+
+ navigator.Push(page);
+
+ return page;
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Navigation/Page")]
+ public class NavigationPageTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyPage : Page { }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Page AppearingTransition.")]
+ [Property("SPEC", "Tizen.NUI.Components.Page.AppearingTransition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageAppearingTransition()
+ {
+ tlog.Debug(tag, $"PageAppearingTransition START");
+
+ var testingTarget = new MyPage();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Page>(testingTarget, "Should return Page instance.");
+
+ TransitionBase tb = new TransitionBase()
+ {
+ AlphaFunction = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn),
+ TimePeriod = new TimePeriod(300)
+ };
+
+ testingTarget.AppearingTransition = tb;
+ tlog.Debug(tag, "AppearingTransition : " + testingTarget.AppearingTransition);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PageAppearingTransition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Page DisappearingTransition.")]
+ [Property("SPEC", "Tizen.NUI.Components.Page.DisappearingTransition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageDisappearingTransition()
+ {
+ tlog.Debug(tag, $"PageDisappearingTransition START");
+
+ var testingTarget = new MyPage();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Page>(testingTarget, "Should return Page instance.");
+
+ TransitionBase tb = new TransitionBase()
+ {
+ AlphaFunction = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut),
+ TimePeriod = new TimePeriod(300)
+ };
+
+ testingTarget.DisappearingTransition = tb;
+ tlog.Debug(tag, "DisappearingTransition : " + testingTarget.DisappearingTransition);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PageDisappearingTransition END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/AlertDialog")]
+ public class AlertDialogTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyAlertDialog : AlertDialog
+ {
+ public MyAlertDialog() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+
+ public AccessibilityStates OnAccessibilityCalculateStates()
+ {
+ return base.AccessibilityCalculateStates();
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlertDialog Dispose.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlertDialogDispose()
+ {
+ tlog.Debug(tag, $"AlertDialogDispose START");
+
+ var testingTarget = new MyAlertDialog()
+ {
+ Size = new Size(100, 100),
+ TitleContent = new View() { Size = new Size(100, 20) },
+ Content = new View() { Size = new Size(100, 80) },
+ ActionContent = new View() { Size = new Size(50, 50) },
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AlertDialog>(testingTarget, "Should return AlertDialog instance.");
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlertDialogDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlertDialog AccessibilityCalculateStates.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.AccessibilityCalculateStates M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlertDialogAccessibilityCalculateStates()
+ {
+ tlog.Debug(tag, $"AlertDialogAccessibilityCalculateStates START");
+
+ var testingTarget = new MyAlertDialog()
+ {
+ Size = new Size(100, 100),
+ TitleContent = new View() { Size = new Size(100, 20) },
+ Content = new View() { Size = new Size(100, 80) },
+ ActionContent = new View() { Size = new Size(50, 50) },
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AlertDialog>(testingTarget, "Should return AlertDialog instance.");
+
+ try
+ {
+ var result = testingTarget.OnAccessibilityCalculateStates();
+ tlog.Debug(tag, "AccessibilityCalculateStates : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlertDialogAccessibilityCalculateStates END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlertDialog Actions.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.Actions A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlertDialogActions()
+ {
+ tlog.Debug(tag, $"AlertDialogActions START");
+
+ var testingTarget = new AlertDialog();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AlertDialog>(testingTarget, "Should return AlertDialog instance.");
+
+ View tc = new View()
+ {
+ Size = new Size(100, 20),
+ Position = new Position(0, 0),
+ BackgroundColor = Color.Green
+ };
+ testingTarget.TitleContent = tc;
+ testingTarget.TitleContent = tc;
+
+ List<View> actions = new List<View>();
+
+ ViewStyle style1 = new ViewStyle()
+ {
+ BackgroundColor = Color.Red,
+ };
+ View action1 = new View(style1);
+
+ ButtonStyle style2 = new ButtonStyle()
+ {
+ BackgroundColor = Color.Yellow,
+ };
+ View action2 = new Button(style2);
+
+ actions.Add(action1);
+ actions.Add(action2);
+
+ testingTarget.Actions = actions;
+
+ View ac = new View()
+ {
+ Size = new Size(100, 80),
+ Position = new Position(0, 20)
+ };
+ testingTarget.ActionContent = ac;
+
+ testingTarget.Actions = actions;
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlertDialogActions END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Button.Internal")]
+ public class ButtonInternalTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MyButton : Button
+ {
+ public MyButton() : base()
+ { }
+
+ public string MyAccessibilityGetName()
+ {
+ return base.AccessibilityGetName();
+ }
+
+ public bool MyAccessibilityShouldReportZeroChildren()
+ {
+ return base.AccessibilityShouldReportZeroChildren();
+ }
+
+ public bool MyHandleControlStateOnTouch(Touch touch)
+ {
+ return base.HandleControlStateOnTouch(touch);
+ }
+
+ public void MyOnRelayout(Vector2 size, RelayoutContainer container)
+ {
+ base.OnRelayout(size, container);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Button HandleControlStateOnTouch.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.HandleControlStateOnTouch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonHandleControlStateOnTouch()
+ {
+ tlog.Debug(tag, $"ButtonHandleControlStateOnTouch START");
+
+ var testingTarget = new MyButton()
+ {
+ Text = "Button",
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Button>(testingTarget, "Should return Button instance.");
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ using (Touch touch = new Touch())
+ {
+ tlog.Debug(tag, "HandleControlStateOnTouch : " + testingTarget.MyHandleControlStateOnTouch(touch));
+ }
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ButtonHandleControlStateOnTouch END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Button AccessibilityGetName.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.AccessibilityGetName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonAccessibilityGetName()
+ {
+ tlog.Debug(tag, $"ButtonAccessibilityGetName START");
+
+ var testingTarget = new MyButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Button>(testingTarget, "Should return Button instance.");
+
+ testingTarget.Text = "Button";
+ tlog.Debug(tag, "AccessibilityGetName : " + testingTarget.MyAccessibilityGetName());
+ tlog.Debug(tag, "AccessibilityShouldReportZeroChildren : " + testingTarget.MyAccessibilityShouldReportZeroChildren());
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ButtonAccessibilityGetName END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Button OnAccessibilityActivated.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.OnAccessibilityActivated M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonOnAccessibilityActivated()
+ {
+ tlog.Debug(tag, $"ButtonOnAccessibilityActivated START");
+
+ var testingTarget = new Button();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Button>(testingTarget, "Should return Button instance.");
+
+ try
+ {
+ testingTarget.OnAccessibilityActivated();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ButtonOnAccessibilityActivated END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Button OnRelayout.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.OnRelayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public async Task ButtonOnRelayout()
+ {
+ tlog.Debug(tag, $"ButtonOnRelayout START");
+
+ var testingTarget = new MyButton()
+ {
+ Text = "Button",
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ IsEnabled = true,
+ IconURL = image_path,
+ IconPadding = 4,
+ IconRelativeOrientation = Button.IconOrientation.Right
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Button>(testingTarget, "Should return Button instance.");
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ testingTarget.Size = new Size(50, 80);
+ testingTarget.BackgroundColor = Color.Blue;
+
+ await Task.Delay(200);
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ButtonOnRelayout END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/ButtonGroup")]
+ public class ButtonGroupTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup contructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ButtonGroup C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupContructor()
+ {
+ tlog.Debug(tag, $"ButtonGroupContructor START");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupContructor END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ButtonGroup contructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ButtonGroup C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupContructorNullView()
+ {
+ tlog.Debug(tag, $"ButtonGroupContructorNullView START");
+
+ View view = null;
+
+ try
+ {
+ var testingTarget = new ButtonGroup(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Root view is null : Passed!");
+ }
+
+ tlog.Debug(tag, $"ButtonGroupContructorNullView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup AddItem.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.AddItem M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupAddItem()
+ {
+ tlog.Debug(tag, $"ButtonGroupAddItem START");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ using (Button bt = new Button() { Size = new Size(20, 30) })
+ {
+ try
+ {
+ testingTarget.AddItem(bt);
+ tlog.Debug(tag, "Count : " + testingTarget.Count);
+ tlog.Debug(tag, "Contains : " + testingTarget.Contains(bt));
+
+ var index = testingTarget.GetIndex(bt);
+ var result = testingTarget.GetItem(index);
+ tlog.Debug(tag, "Item : " + result);
+
+ try
+ {
+ testingTarget.RemoveItem(index);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught exception : Failed!");
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupAddItem END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup Itemheight.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.Itemheight A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupItemheight()
+ {
+ tlog.Debug(tag, $"ButtonGroupItemheight START");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.Itemheight = 30.0f;
+ tlog.Debug(tag, "Itemheight : " + testingTarget.Itemheight);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupItemheight END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup ItemPointSize.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ItemPointSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupItemPointSize()
+ {
+ tlog.Debug(tag, $"ButtonGroupItemPointSize START");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.ItemPointSize = 15.0f;
+ tlog.Debug(tag, "ItemPointSize : " + testingTarget.ItemPointSize);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupItemPointSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup ItemFontFamily.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ItemFontFamily A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupItemFontFamily()
+ {
+ tlog.Debug(tag, $"ButtonGroupItemFontFamily START");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.ItemFontFamily = "SamsungOne 400";
+ tlog.Debug(tag, "ItemFontFamily : " + testingTarget.ItemFontFamily);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupItemFontFamily END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup ItemTextColor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ItemTextColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupItemTextColor()
+ {
+ tlog.Debug(tag, $"ButtonGroupItemTextColor START");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.ItemTextColor = Color.Green;
+ tlog.Debug(tag, "ItemTextColor : " + testingTarget.ItemTextColor);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupItemTextColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup ItemTextAlignment.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ItemTextAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupItemTextAlignment()
+ {
+ tlog.Debug(tag, $"ButtonGroupItemTextAlignment START");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.ItemTextAlignment = HorizontalAlignment.Center;
+ tlog.Debug(tag, "ItemTextAlignment : " + testingTarget.ItemTextAlignment);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupItemTextAlignment END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup OverLayBackgroundColorSelector.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.OverLayBackgroundColorSelector A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupOverLayBackgroundColorSelector()
+ {
+ tlog.Debug(tag, $"ButtonGroupOverLayBackgroundColorSelector START");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ Selector<Color> color = new Selector<Color>(Color.Blue);
+ testingTarget.OverLayBackgroundColorSelector = color;
+ tlog.Debug(tag, "OverLayBackgroundColorSelector : " + testingTarget.OverLayBackgroundColorSelector);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupOverLayBackgroundColorSelector END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup ItemBackgroundImageUrl.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ItemBackgroundImageUrl A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupItemBackgroundImageUrl()
+ {
+ tlog.Debug(tag, $"ButtonGroupItemBackgroundImageUrl");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.ItemBackgroundImageUrl = image_path;
+ tlog.Debug(tag, "ItemBackgroundImageUrl : " + testingTarget.ItemBackgroundImageUrl);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupItemBackgroundImageUrl END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup ItemBackgroundBorder.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ItemBackgroundBorder A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupItemBackgroundBorder()
+ {
+ tlog.Debug(tag, $"ButtonGroupItemBackgroundBorder");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.ItemBackgroundBorder = new Rectangle(10, 10, 10, 10);
+ tlog.Debug(tag, "ItemBackgroundBorder : " + testingTarget.ItemBackgroundBorder);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupItemBackgroundBorder END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonGroup ItemImageShadow.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonGroup.ItemImageShadow A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonGroupItemImageShadow()
+ {
+ tlog.Debug(tag, $"ButtonGroupItemImageShadow");
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ var testingTarget = new ButtonGroup(view);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonGroup>(testingTarget, "Should return ButtonGroup instance.");
+
+ testingTarget.ItemImageShadow = new ImageShadow(image_path, new Rectangle(10, 10, 10, 10));
+ tlog.Debug(tag, "ItemImageShadow : " + testingTarget.ItemImageShadow);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ButtonGroupItemImageShadow END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/CheckBoxGroup")]
+ public class CheckBoxGroupTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CheckBoxGroup contructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.CheckBoxGroup.CheckBoxGroup C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CheckBoxGroupContructor()
+ {
+ tlog.Debug(tag, $"CheckBoxGroupContructor START");
+
+ var testingTarget = new CheckBoxGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<CheckBoxGroup>(testingTarget, "Should return CheckBoxGroup instance.");
+
+ tlog.Debug(tag, $"CheckBoxGroupContructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CheckBoxGroup SetIsGroupHolder.")]
+ [Property("SPEC", "Tizen.NUI.Components.CheckBoxGroup.SetIsGroupHolder M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CheckBoxGroupSetIsGroupHolder()
+ {
+ tlog.Debug(tag, $"CheckBoxSetIsGroupHolder START");
+
+ View view = new View()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ };
+
+ CheckBoxGroup.SetIsGroupHolder(view, true);
+ tlog.Debug(tag, "GetIsGroupHolder : " + CheckBoxGroup.GetIsGroupHolder(view));
+
+ tlog.Debug(tag, "GetCheckBoxGroup : " + CheckBoxGroup.GetCheckBoxGroup(view));
+
+ view.Dispose();
+ tlog.Debug(tag, $"CheckBoxSetIsGroupHolder END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CheckBoxGroup Add.")]
+ [Property("SPEC", "Tizen.NUI.Components.CheckBoxGroup.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CheckBoxGroupAdd()
+ {
+ tlog.Debug(tag, $"CheckBoxGroupAdd START");
+
+ var testingTarget = new CheckBoxGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<CheckBoxGroup>(testingTarget, "Should return CheckBoxGroup instance.");
+
+ CheckBox cb = new CheckBox()
+ {
+ Size = new Size(48, 48)
+ };
+
+ try
+ {
+ testingTarget.Add(cb);
+ tlog.Debug(tag, "GetItem : " + testingTarget.GetItem(0));
+
+ testingTarget.Remove(cb);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"CheckBoxGroupAdd END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CheckBoxGroup CheckAll.")]
+ [Property("SPEC", "Tizen.NUI.Components.CheckBoxGroup.CheckAll M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CheckBoxGroupCheckAll()
+ {
+ tlog.Debug(tag, $"CheckBoxGroupCheckAll START");
+
+ var testingTarget = new CheckBoxGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<CheckBoxGroup>(testingTarget, "Should return CheckBoxGroup instance.");
+
+ CheckBox cb1 = new CheckBox()
+ {
+ Size = new Size(48, 48),
+ IsEnabled = true,
+ IsSelectable = true,
+ IsSelected = true,
+ };
+
+ CheckBox cb2 = new CheckBox()
+ {
+ Size = new Size(48, 48),
+ IsEnabled = true,
+ IsSelectable = true,
+ IsSelected = false,
+ };
+
+ try
+ {
+ testingTarget.Add(cb1);
+ testingTarget.Add(cb2);
+ testingTarget.CheckAll(true);
+
+ var result = testingTarget.IsCheckedAll();
+ tlog.Debug(tag, "IsCheckedAll : " + result);
+
+ tlog.Debug(tag, "GetCheckedItems : " + testingTarget.GetCheckedItems());
+ tlog.Debug(tag, "GetCheckedIndices : " + testingTarget.GetCheckedIndices());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"CheckBoxGroupCheckAll END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Windows.Input;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Control")]
+ public class ControlTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class ICommandImpl : ICommand
+ {
+ public event EventHandler CanExecuteChanged;
+
+ public bool CanExecute(object parameter) { return true; }
+
+ public void Execute(object parameter) { }
+ }
+
+ internal class MyControl : Control
+ {
+ public MyControl() : base()
+ { }
+
+ public override void OnFocusGained()
+ {
+ base.OnFocusGained();
+ }
+
+ public override void OnFocusLost()
+ {
+ base.OnFocusLost();
+ }
+
+ public void OnCreateViewStyle()
+ {
+ base.CreateViewStyle();
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Control Preload.")]
+ [Property("SPEC", "Tizen.NUI.Components.Control.Preload M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlPreload()
+ {
+ tlog.Debug(tag, $"ControlPreload START");
+
+ try
+ {
+ Control.Preload();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ControlPreload END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Control Feedback.")]
+ [Property("SPEC", "Tizen.NUI.Components.Control.Feedback A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlFeedback()
+ {
+ tlog.Debug(tag, $"ControlFeedback START");
+
+ var testingTarget = new Control();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Control>(testingTarget, "Should return Control instance.");
+
+ testingTarget.Feedback = true;
+ tlog.Debug(tag, "Feedback : " + testingTarget.Feedback);
+
+ // value == (feedback != null)
+ testingTarget.Feedback = true;
+ tlog.Debug(tag, "Feedback : " + testingTarget.Feedback);
+
+ testingTarget.Feedback = false;
+ tlog.Debug(tag, "Feedback : " + testingTarget.Feedback);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ControlFeedback END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Control Command.")]
+ [Property("SPEC", "Tizen.NUI.Components.Control.Command A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlCommand()
+ {
+ tlog.Debug(tag, $"ControlCommand START");
+
+ var testingTarget = new Control();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Control>(testingTarget, "Should return Control instance.");
+
+ ICommandImpl command = new ICommandImpl();
+
+ testingTarget.Command = command;
+ tlog.Debug(tag, "Command : " + testingTarget.Command);
+
+ //Button parameter = new Button()
+ //{
+ // Size = new Size(10, 30),
+ // BackgroundColor = Color.Green,
+ //};
+ //testingTarget.CommandParameter = parameter;
+ //tlog.Debug(tag, "CommandParameter : " + testingTarget.CommandParameter);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ControlCommand END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Control OnFocusGained.")]
+ [Property("SPEC", "Tizen.NUI.Components.Control.OnFocusGained M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlOnFocusGained()
+ {
+ tlog.Debug(tag, $"ControlOnFocusGained START");
+
+ var testingTarget = new MyControl();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Control>(testingTarget, "Should return Control instance.");
+
+ try
+ {
+ testingTarget.OnFocusGained();
+ testingTarget.OnFocusLost();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ControlOnFocusGained END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Control CreateViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.Control.CreateViewStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlCreateViewStyle()
+ {
+ tlog.Debug(tag, $"ControlCreateViewStyle START");
+
+ var testingTarget = new MyControl();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Control>(testingTarget, "Should return Control instance.");
+
+ try
+ {
+ testingTarget.OnCreateViewStyle();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ControlCreateViewStyle END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/DatePicker")]
+ public class DatePickerTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyDatePicker : DatePicker
+ {
+ public MyDatePicker() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+
+ public override void OnInitialize()
+ {
+ base.OnInitialize();
+ }
+
+ public override void ApplyStyle(ViewStyle viewStyle)
+ {
+ base.ApplyStyle(viewStyle);
+ }
+ }
+
+ internal class MyDatePickerStyle : DatePickerStyle
+ {
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("DatePicker constructor.")]
+ //[Property("SPEC", "Tizen.NUI.Components.DatePicker.constructor C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("COVPARAM", "")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void DatePickerConstructor()
+ //{
+ // tlog.Debug(tag, $"DatePickerConstructor START");
+
+ // var testingTarget = new MyDatePicker();
+ // Assert.IsNotNull(testingTarget, "null handle");
+ // Assert.IsInstanceOf<DatePicker>(testingTarget, "Should return DatePicker instance.");
+
+ // try
+ // {
+ // testingTarget.OnDispose(DisposeTypes.Explicit);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"DatePickerConstructor END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("DatePicker OnInitialize.")]
+ //[Property("SPEC", "Tizen.NUI.Components.DatePicker.OnInitialize M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("COVPARAM", "")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void DatePickerOnInitialize()
+ //{
+ // tlog.Debug(tag, $"DatePickerOnInitialize START");
+
+ // var testingTarget = new MyDatePicker();
+ // Assert.IsNotNull(testingTarget, "null handle");
+ // Assert.IsInstanceOf<DatePicker>(testingTarget, "Should return DatePicker instance.");
+
+ // try
+ // {
+ // testingTarget.OnInitialize();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"DatePickerOnInitialize END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("DatePicker ApplyStyle.")]
+ //[Property("SPEC", "Tizen.NUI.Components.DatePicker.ApplyStyle M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("COVPARAM", "")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void DatePickerApplyStyle()
+ //{
+ // tlog.Debug(tag, $"DatePickerApplyStyle START");
+
+ // var testingTarget = new MyDatePicker();
+ // Assert.IsNotNull(testingTarget, "null handle");
+ // Assert.IsInstanceOf<DatePicker>(testingTarget, "Should return DatePicker instance.");
+
+ // try
+ // {
+ // ViewStyle style = new ViewStyle()
+ // {
+ // Size = new Size(30, 200)
+ // };
+ // testingTarget.ApplyStyle(style);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"DatePickerApplyStyle END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Dialog")]
+ public class DialogTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyDialog : Dialog
+ {
+ public MyDialog() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+
+ public void MyAccessibilityCalculateStates()
+ {
+ base.AccessibilityCalculateStates();
+ }
+ }
+
+ internal class MyBindableObject : BindableObject
+ { }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Dialog Dispose.")]
+ [Property("SPEC", "Tizen.NUI.Components.Dialog.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void DialogDispose()
+ {
+ tlog.Debug(tag, $"DialogDispose START");
+
+ var testingTarget = new MyDialog();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Dialog>(testingTarget, "Should return Dialog instance.");
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"DialogDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Dialog Content.")]
+ [Property("SPEC", "Tizen.NUI.Components.Dialog.Content A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void DialogContent()
+ {
+ tlog.Debug(tag, $"DialogContent START");
+
+ var testingTarget = new MyDialog();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Dialog>(testingTarget, "Should return Dialog instance.");
+
+ View view = new View()
+ {
+ Size = new Size(50, 80),
+ BackgroundColor = Color.Cyan
+ };
+
+ testingTarget.Content = view;
+ tlog.Debug(tag, "Content : " + testingTarget.Content);
+
+ // content == value
+ testingTarget.Content = view;
+ tlog.Debug(tag, "Content : " + testingTarget.Content);
+
+ // content != null
+ View view2 = new View()
+ {
+ Size = new Size(30, 60),
+ BackgroundColor = Color.Green
+ };
+ testingTarget.Content = view2;
+ tlog.Debug(tag, "Content : " + testingTarget.Content);
+
+ tlog.Debug(tag, $"DialogContent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Dialog AccessibilityCalculateStates.")]
+ [Property("SPEC", "Tizen.NUI.Components.Dialog.AccessibilityCalculateStates M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void DialogAccessibilityCalculateStates()
+ {
+ tlog.Debug(tag, $"DialogAccessibilityCalculateStates START");
+
+ var testingTarget = new MyDialog();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Dialog>(testingTarget, "Should return Dialog instance.");
+
+ try
+ {
+ testingTarget.MyAccessibilityCalculateStates();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"DialogAccessibilityCalculateStates END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/ImageScrollBar")]
+ public class ImageScrollBarTest
+ {
+ private const string tag = "NUITEST";
+ private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [Obsolete]
+ internal class MyScrollBar : ScrollBar
+ {
+ public MyScrollBar() : base()
+ { }
+
+ public void OnCreateViewStyle()
+ {
+ base.CreateViewStyle();
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBar constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ScrollBar C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ScrollBarConstructor()
+ {
+ tlog.Debug(tag, $"ScrollBarConstructor START");
+
+ var testingTarget = new ScrollBar();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBar>(testingTarget, "Should return ScrollBar instance.");
+
+ testingTarget.MinValue = 0;
+ tlog.Debug(tag, "MinValue : " + testingTarget.MinValue);
+
+ testingTarget.MaxValue = 100;
+ tlog.Debug(tag, "MaxValue : " + testingTarget.MaxValue);
+
+ testingTarget.Duration = 3;
+ tlog.Debug(tag, "Duration : " + testingTarget.Duration);
+
+ testingTarget.CurrentValue = 30;
+ tlog.Debug(tag, "CurrentValue : " + testingTarget.CurrentValue);
+
+ try
+ {
+ testingTarget.SetCurrentValue(50, true);
+ tlog.Debug(tag, "CurrentValue : " + testingTarget.CurrentValue);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollBarConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBar constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ScrollBar C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ScrollBarConstructorWithScrollBarStyle()
+ {
+ tlog.Debug(tag, $"ScrollBarConstructorWithScrollBarStyle START");
+
+ ScrollBarStyle style = new ScrollBarStyle()
+ {
+ Size = new Size(30, 2),
+ HeightResizePolicy = ResizePolicyType.Fixed,
+ };
+
+ var testingTarget = new ScrollBar(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBar>(testingTarget, "Should return ScrollBar instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollBarConstructorWithScrollBarStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBar Direction.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBar.Direction A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ScrollBarDirection()
+ {
+ tlog.Debug(tag, $"ScrollBarDirection START");
+
+ var testingTarget = new ScrollBar()
+ {
+ Direction = ScrollBar.DirectionType.Vertical,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBar>(testingTarget, "Should return ScrollBar instance.");
+
+ tlog.Debug(tag, "Direction : " + testingTarget.Direction);
+
+ testingTarget.Direction = ScrollBar.DirectionType.Horizontal;
+ tlog.Debug(tag, "Direction : " + testingTarget.Direction);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollBarDirection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBar ThumbSize.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBar.ThumbSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ScrollBarThumbSize()
+ {
+ tlog.Debug(tag, $"ScrollBarThumbSize START");
+
+ var testingTarget = new ScrollBar()
+ {
+ Direction = ScrollBar.DirectionType.Vertical,
+ ThumbSize = new Size(10, 5)
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBar>(testingTarget, "Should return ScrollBar instance.");
+
+ tlog.Debug(tag, "ThumbSize : " + testingTarget.ThumbSize);
+
+ testingTarget.ThumbSize = new Size(8, 4);
+ tlog.Debug(tag, "ThumbSize : " + testingTarget.ThumbSize);
+
+ testingTarget.ThumbColor = Color.Yellow;
+ tlog.Debug(tag, "ThumbColor : " + testingTarget.ThumbColor);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollBarThumbSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBar TrackImageURL.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBar.TrackImageURL A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ScrollBarTrackImageURL()
+ {
+ tlog.Debug(tag, $"ScrollBarTrackImageURL START");
+
+ var testingTarget = new ScrollBar()
+ {
+ Direction = ScrollBar.DirectionType.Vertical,
+ ThumbSize = new Size(10, 5)
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBar>(testingTarget, "Should return ScrollBar instance.");
+
+ testingTarget.TrackImageURL = path;
+ tlog.Debug(tag, "TrackImageURL : " + testingTarget.TrackImageURL);
+
+ testingTarget.TrackColor = Color.Black;
+ tlog.Debug(tag, "TrackColor : " + testingTarget.TrackColor);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollBarTrackImageURL END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBar CreateViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBar.CreateViewStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ScrollBarCreateViewStyle()
+ {
+ tlog.Debug(tag, $"ScrollBarCreateViewStyle START");
+
+ var testingTarget = new MyScrollBar();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBar>(testingTarget, "Should return ScrollBar instance.");
+
+ try
+ {
+ testingTarget.OnCreateViewStyle();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollBarCreateViewStyle END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Menu")]
+ public class MenuTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MyMenu : Menu
+ {
+ public MyMenu() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+
+ public View MyContent
+ {
+ get
+ {
+ return base.Content;
+ }
+ set
+ {
+ base.Add(value);
+ }
+ }
+
+ public View MyScrim
+ {
+ get
+ {
+ return base.Scrim;
+ }
+ set
+ {
+ base.Add(value);
+ }
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Menu Scrim.")]
+ [Property("SPEC", "Tizen.NUI.Components.Menu.Scrim M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void MenuScrim()
+ {
+ tlog.Debug(tag, $"MenuScrim START");
+
+ var testingTarget = new MyMenu();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Menu>(testingTarget, "Should return Menu instance.");
+
+ View scrim = new View()
+ {
+ BackgroundColor = Color.Red,
+ };
+ testingTarget.MyScrim = scrim;
+ testingTarget.MyScrim = scrim;
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"MenuScrim END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Menu GetRootView.")]
+ [Property("SPEC", "Tizen.NUI.Components.Menu.GetRootView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void MenuGetRootView()
+ {
+ tlog.Debug(tag, $"MenuGetRootView START");
+
+ var testingTarget = new MyMenu()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Menu>(testingTarget, "Should return Menu instance.");
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ testingTarget.HorizontalPositionToAnchor = Menu.RelativePosition.Start;
+ tlog.Debug(tag, "HorizontalPositionToAnchor :" + testingTarget.HorizontalPositionToAnchor);
+
+ testingTarget.VerticalPositionToAnchor = Menu.RelativePosition.Center;
+ tlog.Debug(tag, "HorizontalPositionToAnchor :" + testingTarget.HorizontalPositionToAnchor);
+
+ List<MenuItem> items = new List<MenuItem>();
+ MenuItem item = new MenuItem();
+ items.Add(item);
+ items.Add(item);
+ testingTarget.Items = items;
+
+ MenuItem item2 = new MenuItem();
+ items.Add(item2);
+ testingTarget.Items = items;
+
+ View content = new View()
+ {
+ Size = new Size2D(100, 30),
+ };
+ testingTarget.MyContent = content;
+
+ View anchor1 = new View()
+ {
+ Size = new Size(100, 30),
+ BackgroundColor = Color.Cyan
+ };
+ testingTarget.Anchor = anchor1;
+
+ testingTarget.HorizontalPositionToAnchor = Menu.RelativePosition.Center;
+ tlog.Debug(tag, "HorizontalPositionToAnchor :" + testingTarget.HorizontalPositionToAnchor);
+
+ testingTarget.VerticalPositionToAnchor = Menu.RelativePosition.Start;
+ tlog.Debug(tag, "HorizontalPositionToAnchor :" + testingTarget.HorizontalPositionToAnchor);
+
+ View anchor2 = new View()
+ {
+ Size = new Size(100, 30),
+ BackgroundColor = Color.Black
+ };
+ testingTarget.Anchor = anchor2;
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ tlog.Debug(tag, $"MenuGetRootView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Menu OnRelayout.")]
+ [Property("SPEC", "Tizen.NUI.Components.Menu.OnRelayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public async Task MenuOnRelayout()
+ {
+ tlog.Debug(tag, $"MenuOnRelayout START");
+
+ var testingTarget = new MyMenu()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Menu>(testingTarget, "Should return Menu instance.");
+
+ View content = new View()
+ {
+ Size = new Size2D(100, 30),
+ };
+ testingTarget.MyContent = content;
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ testingTarget.Size = new Size(50, 80);
+ testingTarget.BackgroundColor = Color.Blue;
+
+ await Task.Delay(200);
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"MenuOnRelayout END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/MenuItem")]
+ public class MenuItemTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyMenuItem : MenuItem
+ {
+ public MyMenuItem() : base()
+ { }
+
+ public void MyOnUpdate()
+ {
+ base.OnUpdate();
+ }
+
+ public bool MyHandleControlStateOnTouch(Touch touch)
+ {
+ return base.HandleControlStateOnTouch(touch);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MenuItem OnUpdate.")]
+ [Property("SPEC", "Tizen.NUI.Components.MenuItem.OnUpdate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void MenuItemOnUpdate()
+ {
+ tlog.Debug(tag, $"MenuItemOnUpdate START");
+
+ var testingTarget = new MyMenuItem();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<MenuItem>(testingTarget, "Should return MenuItem instance.");
+
+ try
+ {
+ testingTarget.MyOnUpdate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"MenuItemOnUpdate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MenuItem OnKey.")]
+ [Property("SPEC", "Tizen.NUI.Components.MenuItem.OnKey M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void MenuItemOnKey()
+ {
+ tlog.Debug(tag, $"MenuItemOnKey START");
+
+ var testingTarget = new MyMenuItem();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<MenuItem>(testingTarget, "Should return MenuItem instance.");
+
+ testingTarget.IsEnabled = true;
+ testingTarget.IsSelected = true;
+
+ Key key = null;
+ var result = testingTarget.OnKey(key);
+ Assert.AreEqual(false, result, "should be equal here!");
+
+ key = new Key()
+ {
+ State = Key.StateType.Up,
+ KeyPressedName = "Return"
+ };
+ result = testingTarget.OnKey(key);
+ tlog.Debug(tag, "OnKey : " + result);
+
+ tlog.Debug(tag, $"MenuItemOnKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MenuItem HandleControlStateOnTouch.")]
+ [Property("SPEC", "Tizen.NUI.Components.MenuItem.HandleControlStateOnTouch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void MenuItemHandleControlStateOnTouch()
+ {
+ tlog.Debug(tag, $"MenuItemHandleControlStateOnTouch START");
+
+ var testingTarget = new MyMenuItem()
+ {
+ Text = "MenuItem",
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<MenuItem>(testingTarget, "Should return MenuItem instance.");
+
+ using (Touch touch = new Touch())
+ {
+ tlog.Debug(tag, "HandleControlStateOnTouch : " + testingTarget.MyHandleControlStateOnTouch(touch));
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"MenuItemHandleControlStateOnTouch END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/MenuItemGroup")]
+ public class MenuItemGroupTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("MenuItemGroup Add.")]
+ [Property("SPEC", "Tizen.NUI.Components.MenuItemGroup.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void MenuItemGroupAdd()
+ {
+ tlog.Debug(tag, $"MenuItemGroupAdd START");
+
+ var testingTarget = new MenuItemGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<MenuItemGroup>(testingTarget, "Should return MenuItemGroup instance.");
+
+ try
+ {
+ MenuItem item = null;
+ testingTarget.Add(item);
+ }
+ catch (ArgumentNullException)
+ {
+ tlog.Debug(tag, $"MenuItemGroupAdd END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MenuItemGroup Remove.")]
+ [Property("SPEC", "Tizen.NUI.Components.MenuItemGroup.Remove M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void MenuItemGroupRemove()
+ {
+ tlog.Debug(tag, $"MenuItemGroupRemove START");
+
+ var testingTarget = new MenuItemGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<MenuItemGroup>(testingTarget, "Should return MenuItemGroup instance.");
+
+ MenuItem item = new MenuItem()
+ {
+ BackgroundColor = Color.Cyan,
+ };
+ testingTarget.Add(item);
+
+ try
+ {
+ testingTarget.Remove(item);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"MenuItemGroupRemove END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("MenuItemGroup Remove.")]
+ [Property("SPEC", "Tizen.NUI.Components.MenuItemGroup.Remove M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void MenuItemGroupRemoveNullMenuItem()
+ {
+ tlog.Debug(tag, $"MenuItemGroupRemoveNullMenuItem START");
+
+ var testingTarget = new MenuItemGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<MenuItemGroup>(testingTarget, "Should return MenuItemGroup instance.");
+
+ try
+ {
+ MenuItem item = null;
+ testingTarget.Remove(item);
+ }
+ catch (ArgumentNullException)
+ {
+ tlog.Debug(tag, $"MenuItemGroupAdd END (OK)");
+ Assert.Pass("Caught MenuItemGroupRemoveNullMenuItem : Passed!");
+ }
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Notification")]
+ public class NotificationTest
+ {
+ private const string tag = "NUITEST";
+ bool isSurfacelessContextSupported = false;
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ Tizen.System.Information.TryGetValue("http://tizen.org/feature/opengles.surfaceless_context", out isSurfacelessContextSupported);
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Notification SetLevel.")]
+ [Property("SPEC", "Tizen.NUI.Components.Notification.SetLevel M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NotificationSetLevel()
+ {
+ tlog.Debug(tag, $"NotificationSetLevel START");
+
+ if (isSurfacelessContextSupported == false)
+ {
+ Tizen.Log.Error("NUITEST", "Test skipped! This Device is not support to opengles.surfaceless_context");
+ Assert.Pass("Test skipped! This Device is not support to opengles.surfaceless_context");
+ return;
+ }
+
+ View view = new View();
+
+ var noti = new Notification(view);
+ Assert.IsNotNull(noti, "Can't create success object Notification");
+ Assert.IsInstanceOf<Notification>(noti, "Should be an instance of Notification type");
+
+ try
+ {
+ uint duration = 3000;
+ noti.Post(duration);
+ try
+ {
+ noti.SetLevel(NotificationLevel.High);
+ noti.SetPositionSize(new Rectangle(0, 0, 81, 81));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"NotificationSetLevel END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Notification SetDismissOnTouch.")]
+ [Property("SPEC", "Tizen.NUI.Components.Notification.SetDismissOnTouch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NotificationSetDismissOnTouch()
+ {
+ tlog.Debug(tag, $"NotificationSetDismissOnTouch START");
+
+ if (isSurfacelessContextSupported == false)
+ {
+ Tizen.Log.Error("NUITEST", "Test skipped! This Device is not support to opengles.surfaceless_context");
+ Assert.Pass("Test skipped! This Device is not support to opengles.surfaceless_context");
+ return;
+ }
+
+ View view = new View();
+
+ var noti = new Notification(view);
+ Assert.IsNotNull(noti, "Can't create success object Notification");
+ Assert.IsInstanceOf<Notification>(noti, "Should be an instance of Notification type");
+
+ var result = noti.SetDismissOnTouch(true);
+ tlog.Debug(tag, "SetDismissOnTouch : " + result);
+
+ tlog.Debug(tag, $"NotificationSetDismissOnTouch END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Pagination")]
+ public class PaginationTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MyPagination : Pagination
+ {
+ public MyPagination() : base()
+ { }
+
+ public void MyAccessibilitySetCurrent(double value)
+ {
+ base.AccessibilitySetCurrent(value);
+ }
+
+ public void MyAccessibilityGetMinimumIncrement()
+ {
+ base.AccessibilityGetMinimumIncrement();
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Pagination LastIndicatorImageUrl.")]
+ [Property("SPEC", "Tizen.NUI.Components.Pagination.LastIndicatorImageUrl M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PaginationLastIndicatorImageUrl()
+ {
+ tlog.Debug(tag, $"PaginationLastIndicatorImageUrl START");
+
+ PaginationStyle style = new PaginationStyle()
+ {
+ Size = new Size(80, 20),
+ };
+
+ var testingTarget = new Pagination(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Pagination>(testingTarget, "Should return Pagination instance.");
+
+ Selector<String> url = new Selector<string>();
+ url.Add(ControlState.All, image_path);
+
+ testingTarget.LastIndicatorImageUrl = url;
+ tlog.Debug(tag, "LastIndicatorImageUrl : " + testingTarget.LastIndicatorImageUrl);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PaginationLastIndicatorImageUrl END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Pagination AccessibilitySetCurrent.")]
+ [Property("SPEC", "Tizen.NUI.Components.Pagination.AccessibilitySetCurrent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PaginationAccessibilitySetCurrent()
+ {
+ tlog.Debug(tag, $"PaginationAccessibilitySetCurrent START");
+
+ var testingTarget = new MyPagination();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Pagination>(testingTarget, "Should return Pagination instance.");
+
+ testingTarget.IndicatorCount = 8;
+
+ try
+ {
+ testingTarget.MyAccessibilitySetCurrent(5.0f);
+ testingTarget.MyAccessibilityGetMinimumIncrement();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PaginationAccessibilitySetCurrent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Pagination SelectedIndex.")]
+ [Property("SPEC", "Tizen.NUI.Components.Pagination.SelectedIndex A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PaginationSelectedIndex()
+ {
+ tlog.Debug(tag, $"PaginationSelectedIndex START");
+
+ var testingTarget = new MyPagination();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Pagination>(testingTarget, "Should return Pagination instance.");
+
+ testingTarget.IndicatorCount = 8;
+
+ testingTarget.SelectedIndex = 9;
+ tlog.Debug(tag, "SelectedIndex : " + testingTarget.SelectedIndex);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PaginationSelectedIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Pagination SelectedIndicatorColor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Pagination.SelectedIndicatorColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PaginationSelectedIndicatorColor()
+ {
+ tlog.Debug(tag, $"PaginationSelectedIndicatorColor START");
+
+ var testingTarget = new MyPagination();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Pagination>(testingTarget, "Should return Pagination instance.");
+
+ testingTarget.IndicatorCount = 8;
+ testingTarget.SelectedIndex = 5;
+ testingTarget.SelectedIndicatorColor = Color.Black;
+ tlog.Debug(tag, "SelectedIndicatorColor : " + testingTarget.SelectedIndicatorColor);
+
+ // indicatorCount > value
+ testingTarget.IndicatorCount = 7;
+ // selectedIndex >= value
+ testingTarget.SelectedIndex = 7;
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PaginationSelectedIndicatorColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Pagination IndicatorColor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Pagination.IndicatorColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PaginationIndicatorColor()
+ {
+ tlog.Debug(tag, $"PaginationIndicatorColor START");
+
+ var testingTarget = new MyPagination();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Pagination>(testingTarget, "Should return Pagination instance.");
+
+ testingTarget.IndicatorCount = 8;
+ testingTarget.SelectedIndex = 5;
+ testingTarget.IndicatorColor = Color.Black;
+ tlog.Debug(tag, "IndicatorColor : " + testingTarget.IndicatorColor);
+ testingTarget.IndicatorColor = Color.Yellow;
+ tlog.Debug(tag, "IndicatorColor : " + testingTarget.IndicatorColor);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PaginationIndicatorColor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.ObjectModel;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Picker")]
+ public class PickerTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyPicker : Picker
+ {
+ public MyPicker() : base()
+ { }
+
+ public override void OnInitialize()
+ {
+ base.OnInitialize();
+ }
+
+ public override void ApplyStyle(ViewStyle viewStyle)
+ {
+ base.ApplyStyle(viewStyle);
+ }
+ }
+
+ internal class MyPickerScroller : Picker.PickerScroller
+ {
+ public void MyDecelerating(float velocity, Animation animation)
+ {
+ base.Decelerating(velocity, animation);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Picker constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Picker.Picker C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PickerConstructor()
+ {
+ tlog.Debug(tag, $"PickerConstructor START");
+
+ var testingTarget = new Picker();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Picker DisplayedValues.")]
+ [Property("SPEC", "Tizen.NUI.Components.Picker.DisplayedValues A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PickerDisplayedValues()
+ {
+ tlog.Debug(tag, $"PickerDisplayedValues START");
+
+ var testingTarget = new Picker();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ string[] items = new string[3];
+ items[0] = "str0";
+ items[1] = "str1";
+ items[2] = "str2";
+ ReadOnlyCollection<string> rc = new ReadOnlyCollection<string>(items);
+ testingTarget.DisplayedValues = rc;
+ tlog.Debug(tag, "DisplayedValues : " + testingTarget.DisplayedValues);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerDisplayedValues END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Picker CurrentValue.")]
+ [Property("SPEC", "Tizen.NUI.Components.Picker.CurrentValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PickerCurrentValue()
+ {
+ tlog.Debug(tag, $"PickerCurrentValue START");
+
+ var testingTarget = new Picker();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ testingTarget.CurrentValue = 12;
+ tlog.Debug(tag, "CurrentValue : " + testingTarget.CurrentValue);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerCurrentValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Picker MinValue.")]
+ [Property("SPEC", "Tizen.NUI.Components.Picker.MinValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PickerMinValue()
+ {
+ tlog.Debug(tag, $"PickerMinValue START");
+
+ var testingTarget = new Picker();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ testingTarget.MinValue = 10;
+ tlog.Debug(tag, "MinValue : " + testingTarget.MinValue);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerCurrentValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Picker MaxValue.")]
+ [Property("SPEC", "Tizen.NUI.Components.Picker.MaxValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PickerMaxValue()
+ {
+ tlog.Debug(tag, $"PickerMaxValue START");
+
+ var testingTarget = new Picker();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ testingTarget.MaxValue = 60;
+ tlog.Debug(tag, "MaxValue : " + testingTarget.MaxValue);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerMaxValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Picker OnInitialize.")]
+ [Property("SPEC", "Tizen.NUI.Components.Picker.OnInitialize M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PickerOnInitialize()
+ {
+ tlog.Debug(tag, $"PickerOnInitialize START");
+
+ var testingTarget = new MyPicker();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ try
+ {
+ testingTarget.OnInitialize();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerOnInitialize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Picker ApplyStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.Picker.ApplyStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PickerApplyStyle()
+ {
+ tlog.Debug(tag, $"PickerApplyStyle START");
+
+ var testingTarget = new MyPicker();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ try
+ {
+ ViewStyle style = new ViewStyle()
+ {
+ Size = new Size(30, 80),
+ };
+ testingTarget.ApplyStyle(style);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerApplyStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ValueChangedEventArgs constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ValueChangedEventArgs.ValueChangedEventArgs M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ValueChangedEventArgsConstructor()
+ {
+ tlog.Debug(tag, $"ValueChangedEventArgsConstructor START");
+
+ var testingTarget = new ValueChangedEventArgs(10);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ValueChangedEventArgs>(testingTarget, "Should return ValueChangedEventArgs instance.");
+
+ tlog.Debug(tag, "Value : " + testingTarget.Value);
+
+ tlog.Debug(tag, $"ValueChangedEventArgsConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Picker OnRelayout.")]
+ [Property("SPEC", "Tizen.NUI.Components.Picker.OnRelayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public async Task PickerOnRelayout()
+ {
+ tlog.Debug(tag, $"PickerOnRelayout START");
+
+ var testingTarget = new MyPicker()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ testingTarget.Size = new Size(50, 100);
+ testingTarget.BackgroundColor = Color.Blue;
+
+ await Task.Delay(200);
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerOnRelayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PickerScroller Decelerating")]
+ [Property("SPEC", "Tizen.NUI.Components.PickerScroller.Decelerating M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PickerScrollerDecelerating()
+ {
+ tlog.Debug(tag, $"PickerScrollerDecelerating START");
+
+ var testingTarget = new MyPickerScroller();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker.PickerScroller>(testingTarget, "Should return PickerScroller instance.");
+
+ try
+ {
+ using (Animation ani = new Animation(300))
+ {
+ ani.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Bounce);
+ testingTarget.MyDecelerating(0.3f, ani);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"PickerScrollerDecelerating END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.ObjectModel;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Popup")]
+ public class PopupTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Popup constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Popup.Popup C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void PopupConstructor()
+ {
+ tlog.Debug(tag, $"PopupConstructor START");
+
+ var testingTarget = new Popup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Popup>(testingTarget, "Should return Popup instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PopupConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Popup constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Popup.Popup C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void PopupConstructorWithPopupStyle()
+ {
+ tlog.Debug(tag, $"PopupConstructorWithPopupStyle START");
+
+ PopupStyle style = new PopupStyle()
+ {
+ Size = new Size(50, 100),
+ };
+
+ var testingTarget = new Popup(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Popup>(testingTarget, "Should return Popup instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PopupConstructorWithPopupStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Popup AddContentText.")]
+ [Property("SPEC", "Tizen.NUI.Components.Popup.AddContentText M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void PopupAddContentText()
+ {
+ tlog.Debug(tag, $"PopupAddContentText START");
+
+ var testingTarget = new Popup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Popup>(testingTarget, "Should return Popup instance.");
+
+ testingTarget.MinimumSize = new Size(1032, 184);
+ testingTarget.Size = new Size(1032, 400);
+ testingTarget.Position = new Position(150, 100);
+
+ testingTarget.TitleText = "Popup";
+ tlog.Debug(tag, "TitleText : " + testingTarget.TitleText);
+
+ testingTarget.TitlePointSize = 15.0f;
+ tlog.Debug(tag, "TitlePointSize : " + testingTarget.TitlePointSize);
+
+ testingTarget.TitleTextColor = Color.Blue;
+ tlog.Debug(tag, "TitelTextColor : " + testingTarget.TitleTextColor);
+
+ testingTarget.TitleTextHorizontalAlignment = HorizontalAlignment.Begin;
+ tlog.Debug(tag, "TitleTextHorizontalAlignment : " + testingTarget.TitleTextHorizontalAlignment);
+
+ testingTarget.TitleTextPosition = new Position(64, 52);
+ tlog.Debug(tag, "TitleTextPosition : " + testingTarget.TitleTextPosition);
+
+ testingTarget.TitleHeight = 20;
+ tlog.Debug(tag, "TitleHeight : " + testingTarget.TitleHeight);
+
+ testingTarget.Title.Padding = 0;
+
+ testingTarget.ImageShadow = new ImageShadow(image_path);
+
+ testingTarget.BackgroundImage = image_path;
+ testingTarget.BackgroundImageBorder = new Rectangle(0, 0, 81, 81);
+
+ testingTarget.AddButton("Ok");
+ testingTarget.AddButton("Cancel");
+
+ testingTarget.ButtonBackground = image_path;
+ testingTarget.ButtonBackgroundBorder = new Rectangle(5, 5, 5, 5);
+ testingTarget.ButtonOverLayBackgroundColorSelector = new Selector<Color>
+ {
+ Normal = new Color(1.0f, 1.0f, 1.0f, 0.5f),
+ Pressed = new Color(0.0f, 0.0f, 0.0f, 0.5f)
+ };
+ testingTarget.ButtonImageShadow = new ImageShadow(image_path);
+ testingTarget.Post(Window.Instance);
+
+ var contentText = new TextLabel();
+ contentText.Size = new Size(1032, 100);
+ contentText.PointSize = 20;
+ contentText.HorizontalAlignment = HorizontalAlignment.Begin;
+ contentText.VerticalAlignment = VerticalAlignment.Center;
+ contentText.Text = "Popup ButtonStyle!";
+ contentText.TextColor = new Color(0, 0, 222, 1);
+ testingTarget.AddContentText(contentText);
+
+ testingTarget.Dismiss();
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PopupAddContentText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Popup AddButton.")]
+ [Property("SPEC", "Tizen.NUI.Components.Popup.AddButton M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void PopupAddButton()
+ {
+ tlog.Debug(tag, $"PopupAddButton START");
+
+ var testingTarget = new Popup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Popup>(testingTarget, "Should return Popup instance.");
+
+ try
+ {
+ testingTarget.AddButton("lb");
+
+ ButtonStyle style = new ButtonStyle()
+ {
+ Opacity = 0.8f,
+ };
+ testingTarget.AddButton("rb", style);
+
+ var result = testingTarget.GetButton(0);
+ tlog.Debug(tag, "GetButton : " + result);
+
+ try
+ {
+ testingTarget.RemoveButton(0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PopupAddButton END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/RadioButton")]
+ public class RadioButtonTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyRadioButton : RadioButton
+ {
+ public MyRadioButton() : base()
+ { }
+
+ public override bool OnKey(Key key)
+ {
+ return base.OnKey(key);
+ }
+
+ public void MyHandleControlStateOnTouch(Touch touch)
+ {
+ base.HandleControlStateOnTouch(touch);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RadioButton ItemGroup.")]
+ [Property("SPEC", "Tizen.NUI.Components.RadioButton.ItemGroup M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void RadioButtonItemGroup()
+ {
+ tlog.Debug(tag, $"RadioButtonItemGroup START");
+
+ var testingTarget = new RadioButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<RadioButton>(testingTarget, "Should return RadioButton instance.");
+
+ var group = new RadioButtonGroup();
+ group.Add(testingTarget);
+
+ tlog.Debug(tag, "ItemGroup : " + testingTarget.ItemGroup);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"RadioButtonItemGroup END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RadioButton OnKey.")]
+ [Property("SPEC", "Tizen.NUI.Components.RadioButton.OnKey M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void RadioButtonOnKey()
+ {
+ tlog.Debug(tag, $"RadioButtonOnKey START");
+
+ var testingTarget = new MyRadioButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<RadioButton>(testingTarget, "Should return RadioButton instance.");
+
+ testingTarget.IsEnabled = true;
+ testingTarget.IsSelected = true;
+
+ Key key = null;
+ var result = testingTarget.OnKey(key);
+ Assert.AreEqual(false, result, "should be equal here!");
+
+ key = new Key()
+ {
+ State = Key.StateType.Up,
+ KeyPressedName = "Return"
+ };
+ result = testingTarget.OnKey(key);
+ tlog.Debug(tag, "OnKey : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"RadioButtonOnKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RadioButton HandleControlStateOnTouch.")]
+ [Property("SPEC", "Tizen.NUI.Components.RadioButton.HandleControlStateOnTouch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void RadioHandleControlStateOnTouch()
+ {
+ tlog.Debug(tag, $"RadioButtonOnKey START");
+
+ var testingTarget = new MyRadioButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<RadioButton>(testingTarget, "Should return RadioButton instance.");
+
+ testingTarget.IsEnabled = true;
+ Touch touch = new Touch();
+
+ try
+ {
+ testingTarget.MyHandleControlStateOnTouch(touch);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"RadioButtonOnKey END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/RadioButtonGroup")]
+ public class RadioButtonGroupTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RadioButtonGroup SetIsGroupHolder.")]
+ [Property("SPEC", "Tizen.NUI.Components.Dialog.SetIsGroupHolder M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RadioButtonGroupSetIsGroupHolder()
+ {
+ tlog.Debug(tag, $"RadioButtonGroupSetIsGroupHolder START");
+
+ View view = new View()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Green,
+ };
+
+ RadioButtonGroup.SetIsGroupHolder(view, true);
+ tlog.Debug(tag, "GetIsGroupHolder : " + RadioButtonGroup.GetIsGroupHolder(view));
+
+ tlog.Debug(tag, "GetRadioButtonGroup : " + RadioButtonGroup.GetRadioButtonGroup(view));
+
+ view.Dispose();
+ tlog.Debug(tag, $"RadioButtonGroupSetIsGroupHolder END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RadioButtonGroup GetItem.")]
+ [Property("SPEC", "Tizen.NUI.Components.Dialog.GetItem M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RadioButtonGroupGetItem()
+ {
+ tlog.Debug(tag, $"RadioButtonGroupGetItem START");
+
+ var testingTarget = new RadioButtonGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<RadioButtonGroup>(testingTarget, "Should return RadioButtonGroup instance.");
+
+ RadioButton button = new RadioButton();
+
+ testingTarget.Add(button);
+ var result = testingTarget.GetItem(0);
+ tlog.Debug(tag, "GetItem : " + result);
+
+ button.IsSelected = true;
+ tlog.Debug(tag, "GetSelectedItem : " + testingTarget.GetSelectedItem());
+
+ try
+ {
+ testingTarget.Remove(button);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ button.Dispose();
+ tlog.Debug(tag, $"RadioButtonGroupGetItem END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.Components.ScrollOutOfBoundEventArgs;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/ScrollableBase")]
+ public class ScrollableBaseTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyScrollableBase : ScrollableBase
+ {
+ public MyScrollableBase() : base()
+ { }
+
+ public void MyAccessibilityIsScrollable()
+ {
+ base.AccessibilityIsScrollable();
+ }
+
+ public void OnGetNextFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)
+ {
+ base.GetNextFocusableView(currentFocusedView, direction, loopEnabled);
+ }
+
+ public void MyDecelerating(float velocity, Animation animation)
+ {
+ base.Decelerating(velocity, animation);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.ScrollableBase C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseConstructor()
+ {
+ tlog.Debug(tag, $"ScrollableBaseConstructor START");
+
+ var testingTarget = new ScrollableBase();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ tlog.Debug(tag, "ScrollPosition : " + testingTarget.ScrollPosition);
+
+ testingTarget.ScrollingEventThreshold = 0.3f;
+ tlog.Debug(tag, "ScrollingEventThreshold : " + testingTarget.ScrollingEventThreshold);
+
+ testingTarget.NoticeAnimationEndBeforePosition = 0.5f;
+ tlog.Debug(tag, "NoticeAnimationEndBeforePosition : " + testingTarget.NoticeAnimationEndBeforePosition);
+
+ testingTarget.Padding = new Extents(2, 2, 2, 2);
+ tlog.Debug(tag, "Padding : " + testingTarget.Padding);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollEventArgs ScrollPosition")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollEventArgs.ScrollPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollEventArgsScrollPosition()
+ {
+ tlog.Debug(tag, $"ScrollEventArgsScrollPosition START");
+
+ using (Position position = new Position(10, 20))
+ {
+ var testingTarget = new ScrollEventArgs(position);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollEventArgs>(testingTarget, "Should return ScrollEventArgs instance.");
+
+ tlog.Debug(tag, "ScrollPosition : " + testingTarget.ScrollPosition);
+ }
+
+ tlog.Debug(tag, $"ScrollEventArgsScrollPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollOutOfBoundEventArgs constructor")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.ScrollOutOfBoundEventArgs C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollOutOfBoundEventArgsConstructor()
+ {
+ tlog.Debug(tag, $"ScrollOutOfBoundEventArgsConstructor START");
+
+ var testingTarget = new ScrollOutOfBoundEventArgs(ScrollOutOfBoundEventArgs.Direction.Up, 0.3f);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollOutOfBoundEventArgs>(testingTarget, "Should return ScrollOutOfBoundEventArgs instance.");
+
+ tlog.Debug(tag, "PanDirection : " + testingTarget.PanDirection);
+ tlog.Debug(tag, "Displacement : " + testingTarget.Displacement);
+
+ tlog.Debug(tag, $"ScrollOutOfBoundEventArgsConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase ScrollEnabled")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.ScrollEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseScrollEnabled()
+ {
+ tlog.Debug(tag, $"ScrollableBaseScrollEnabled START");
+
+ var testingTarget = new ScrollableBase();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ testingTarget.ScrollEnabled = true;
+ tlog.Debug(tag, "ScrollEnabled : " + testingTarget.ScrollEnabled);
+
+ testingTarget.ScrollEnabled = false;
+ tlog.Debug(tag, "ScrollEnabled : " + testingTarget.ScrollEnabled);
+
+ testingTarget.ScrollEnabled = true;
+ tlog.Debug(tag, "ScrollEnabled : " + testingTarget.ScrollEnabled);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseScrollEnabled END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase Scrollbar")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.Scrollbar A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseScrollbar()
+ {
+ tlog.Debug(tag, $"ScrollableBaseScrollbar START");
+
+ var testingTarget = new ScrollableBase();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ testingTarget.ScrollEnabled = true;
+ tlog.Debug(tag, "ScrollEnabled : " + testingTarget.ScrollEnabled);
+
+ testingTarget.HideScrollbar = false;
+
+ Scrollbar bar = new Scrollbar()
+ {
+ Size = new Size(50, 2),
+ };
+ testingTarget.Scrollbar = bar;
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseScrollbar END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase ScrollableBaseAccessibilityIsScrollable")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.ScrollableBaseAccessibilityIsScrollable M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseAccessibilityIsScrollable()
+ {
+ tlog.Debug(tag, $"ScrollableBaseAccessibilityIsScrollable START");
+
+ var testingTarget = new MyScrollableBase();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ try
+ {
+ testingTarget.MyAccessibilityIsScrollable();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseAccessibilityIsScrollable END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase GetNextFocusableView")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.GetNextFocusableView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseGetNextFocusableView()
+ {
+ tlog.Debug(tag, $"ScrollableBaseGetNextFocusableView START");
+
+ var testingTarget = new MyScrollableBase();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ View view1 = new View()
+ {
+ Size = new Size(100, 200),
+ Position = new Position(0, 0),
+ BackgroundColor = Color.Cyan
+ };
+
+ View view2 = new View()
+ {
+ Size = new Size(100, 200),
+ Position = new Position(150, 0),
+ BackgroundColor = Color.Green
+ };
+
+ View view3 = new View()
+ {
+ Size = new Size(100, 200),
+ Position = new Position(300, 200),
+ BackgroundColor = Color.Green
+ };
+
+ FocusManager.Instance.SetCurrentFocusView(view1);
+
+ try
+ {
+ testingTarget.OnGetNextFocusableView(view1, View.FocusDirection.Right, true);
+ testingTarget.OnGetNextFocusableView(view2, View.FocusDirection.Right, true);
+ testingTarget.OnGetNextFocusableView(view3, View.FocusDirection.Left, true);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ FocusManager.Instance.ClearFocus();
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseGetNextFocusableView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase ScrollTo")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.ScrollTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseScrollTo()
+ {
+ tlog.Debug(tag, $"ScrollableBaseScrollTo START");
+
+ var testingTarget = new ScrollableBase()
+ {
+ Size = new Size(100, 2),
+ BackgroundColor = Color.Cyan,
+ ScrollingDirection = ScrollableBase.Direction.Horizontal,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ try
+ {
+ testingTarget.ScrollTo(0.3f, true);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseScrollTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase OnAccessibilityPan")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.OnAccessibilityPan M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseOnAccessibilityPan()
+ {
+ tlog.Debug(tag, $"ScrollableBaseOnAccessibilityPan START");
+
+ var testingTarget = new ScrollableBase()
+ {
+ Size = new Size(100, 2),
+ BackgroundColor = Color.Cyan,
+ ScrollingDirection = ScrollableBase.Direction.Vertical,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ using (PanGesture gesture = new PanGesture())
+ {
+ try
+ {
+ testingTarget.OnAccessibilityPan(gesture);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseOnAccessibilityPan END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase Decelerating")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.Decelerating M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseDecelerating()
+ {
+ tlog.Debug(tag, $"ScrollableBaseDecelerating START");
+
+ var testingTarget = new MyScrollableBase()
+ {
+ Size = new Size(100, 2),
+ BackgroundColor = Color.Cyan,
+ ScrollingDirection = ScrollableBase.Direction.Vertical,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ try
+ {
+ using (Animation ani = new Animation(300))
+ {
+ ani.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Bounce);
+ testingTarget.MyDecelerating(0.3f, ani);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseDecelerating END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Scrollbar")]
+ public class ScrollbarTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MyScrollbar : Scrollbar
+ {
+ public MyScrollbar() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+
+ public void OnCreateViewStyle()
+ {
+ base.CreateViewStyle();
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.Scrollbar C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarConstructor()
+ {
+ tlog.Debug(tag, $"ScrollbarConstructor START");
+
+ var testingTarget = new Scrollbar(100.0f, 50.0f, 20.0f, false);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.Scrollbar C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarConstructorWithScrollbarStyle()
+ {
+ tlog.Debug(tag, $"ScrollbarConstructorWithScrollbarStyle START");
+
+ ScrollbarStyle style = new ScrollbarStyle()
+ {
+ Size = new Size(100, 2),
+ };
+
+ var testingTarget = new Scrollbar(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarConstructorWithScrollbarStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar TrackThickness.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.TrackThickness A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarTrackThickness()
+ {
+ tlog.Debug(tag, $"ScrollbarTrackThickness START");
+
+ var testingTarget = new Scrollbar(100.0f, 2, 40, true);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ testingTarget.TrackThickness = 13.0f;
+ testingTarget.ThumbThickness = 3.0f;
+
+ testingTarget.TrackColor = Color.Blue;
+ tlog.Debug(tag, "TrackColor : " + testingTarget.TrackColor);
+
+ testingTarget.ThumbColor = Color.Black;
+ tlog.Debug(tag, "ThumbColor : " + testingTarget.ThumbColor);
+
+ testingTarget.ThumbVerticalImageUrl = image_path;
+ tlog.Debug(tag, "ThumbVerticalImageUrl : " + testingTarget.ThumbVerticalImageUrl);
+
+ testingTarget.ThumbHorizontalImageUrl = image_path;
+ tlog.Debug(tag, "ThumbHorizontalImageUrl : " + testingTarget.ThumbHorizontalImageUrl);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarTrackThickness END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar ScrollPosition.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.ScrollPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarScrollPosition()
+ {
+ tlog.Debug(tag, $"ScrollbarScrollPosition START");
+
+ var testingTarget = new Scrollbar(100.0f, 2, 40, true);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ tlog.Debug(tag, "ScrollPosition : " + testingTarget.ScrollPosition);
+ tlog.Debug(tag, "ScrollCurrentPosition : " + testingTarget.ScrollCurrentPosition);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarScrollPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar Update.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.Update M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarUpdate()
+ {
+ tlog.Debug(tag, $"ScrollbarUpdate START");
+
+ var testingTarget = new Scrollbar(100.0f, 2, 40, true);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ try
+ {
+ testingTarget.OnInitialize();
+ testingTarget.Update(100.0f, 80, 200, null);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarUpdate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar ScrollTo.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.ScrollTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarScrollTo()
+ {
+ tlog.Debug(tag, $"ScrollbarScrollTo START");
+
+ var testingTarget = new Scrollbar(100.0f, 2, 40, true);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ try
+ {
+ testingTarget.OnInitialize();
+ testingTarget.ScrollTo(80, 200, null);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarScrollTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar CreateViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.CreateViewStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarCreateViewStyle()
+ {
+ tlog.Debug(tag, $"ScrollbarCreateViewStyle START");
+
+ var testingTarget = new MyScrollbar();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ try
+ {
+ testingTarget.OnCreateViewStyle();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarScrollTo END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/ScrollbarBase")]
+ public class ScrollbarBaseTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class ScrollbarBaseImpl : ScrollbarBase
+ {
+ public ScrollbarBaseImpl() : base()
+ { }
+
+ public override float ScrollPosition => 0.0f;
+
+ public override float ScrollCurrentPosition => 30.0f;
+
+ public override void Initialize(float contentLength, float viewportLength, float currentPosition, bool isHorizontal = false) { }
+
+ public override void ScrollTo(float position, uint durationMs = 0, AlphaFunction alphaFunction = null) { }
+
+ public override void Update(float contentLength, float viewportLength, float position, uint durationMs = 0, AlphaFunction alphaFunction = null) { }
+
+ public override void Update(float contentLength, float position, uint durationMs = 0, AlphaFunction alphaFunction = null) { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollbarBase Unparent.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollbarBase.Unparent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarBaseUnparent()
+ {
+ tlog.Debug(tag, $"ScrollbarBaseUnparent START");
+
+ var testingTarget = new ScrollbarBaseImpl();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollbarBase>(testingTarget, "Should return ScrollbarBase instance.");
+
+ try
+ {
+ testingTarget.Unparent();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Assert Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarBaseUnparent END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.BaseComponents.View;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/SelectButton")]
+ public class SelectButtonTest
+ {
+ private const string tag = "NUITEST";
+ private void OnSelectedChanged(object sender, SelectedChangedEventArgs e) { }
+
+ internal class MySelectButton : SelectButton
+ {
+ public MySelectButton() : base()
+ { }
+
+ public SelectGroup MySelectGroup
+ {
+ get
+ {
+ return base.ItemGroup;
+ }
+ set
+ {
+ base.ItemGroup = value;
+ }
+ }
+
+ public void MyHandleControlStateOnTouch(Touch touch)
+ {
+ base.HandleControlStateOnTouch(touch);
+ }
+
+ public void MyOnControlStateChanged(ControlStateChangedEventArgs args)
+ {
+ base.OnControlStateChanged(args);
+ }
+ }
+
+ internal class SelectGroupImpl : SelectGroup
+ {
+ public SelectGroupImpl() : base()
+ {
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SelectButton Index.")]
+ [Property("SPEC", "Tizen.NUI.Components.SelectButton.Index M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SelectButtonIndex()
+ {
+ tlog.Debug(tag, $"SelectButtonIndex START");
+
+ var testingTarget = new MySelectButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SelectButton>(testingTarget, "Should return SelectButton instance.");
+
+ testingTarget.MySelectGroup = new SelectGroupImpl();
+ tlog.Debug(tag, "Index : " + testingTarget.Index);
+
+ tlog.Debug(tag, $"SelectButtonIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SelectButton OnTouch.")]
+ [Property("SPEC", "Tizen.NUI.Components.SelectButton.OnTouch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SelectOnTouch()
+ {
+ tlog.Debug(tag, $"SelectOnTouch START");
+
+ var testingTarget = new MySelectButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SelectButton>(testingTarget, "Should return SelectButton instance.");
+
+ using (Touch touch = new Touch())
+ {
+ var result = testingTarget.OnTouch(touch);
+ tlog.Debug(tag, "OnTouch : " + result);
+ }
+
+ tlog.Debug(tag, $"SelectOnTouch END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SelectButton HandleControlStateOnTouch.")]
+ [Property("SPEC", "Tizen.NUI.Components.SelectButton.HandleControlStateOnTouch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SelectButtonHandleControlStateOnTouch()
+ {
+ tlog.Debug(tag, $"SelectButtonHandleControlStateOnTouch START");
+
+ var testingTarget = new MySelectButton()
+ {
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SelectButton>(testingTarget, "Should return SelectButton instance.");
+
+ using (Touch touch = new Touch())
+ {
+ try
+ {
+ testingTarget.MyHandleControlStateOnTouch(touch);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"SelectButtonHandleControlStateOnTouch END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SelectButton OnControlStateChanged.")]
+ [Property("SPEC", "Tizen.NUI.Components.SelectButton.OnControlStateChanged M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SelectButtonOnControlStateChanged()
+ {
+ tlog.Debug(tag, $"SelectButtonOnControlStateChanged START");
+
+ var testingTarget = new MySelectButton()
+ {
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SelectButton>(testingTarget, "Should return SelectButton instance.");
+
+ Key key = new Key()
+ {
+ State = Key.StateType.Up,
+ KeyPressedName = "Return"
+ };
+ testingTarget.OnKey(key);
+
+ testingTarget.SelectedChanged += OnSelectedChanged;
+
+ try
+ {
+ ControlStateChangedEventArgs args = new ControlStateChangedEventArgs(ControlState.Selected, ControlState.Normal);
+ testingTarget.MyOnControlStateChanged(args);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.SelectedChanged -= OnSelectedChanged;
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SelectButtonOnControlStateChanged END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SelectButton OnKey.")]
+ [Property("SPEC", "Tizen.NUI.Components.SelectButton.OnKey M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SelectButtonOnKey()
+ {
+ tlog.Debug(tag, $"SelectButtonOnKey START");
+
+ var testingTarget = new MySelectButton()
+ {
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SelectButton>(testingTarget, "Should return SelectButton instance.");
+
+ Key key = null;
+ var result = testingTarget.OnKey(key);
+ tlog.Debug(tag, "OnKey : " + result);
+
+ try
+ {
+ key = new Key()
+ {
+ State = Key.StateType.Down,
+ };
+ testingTarget.OnKey(key);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SelectButtonOnKey END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/SelectGroup")]
+ public class SelectGroupTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MySelectGroup : SelectGroup
+ {
+ public MySelectGroup() : base()
+ {
+ }
+
+ public void MyAddSelection(SelectButton selection)
+ {
+ base.AddSelection(selection);
+ }
+
+ public void MyOnSelectedChanged(SelectButton selection)
+ {
+ base.OnSelectedChanged(selection);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SelectGroup Count.")]
+ [Property("SPEC", "Tizen.NUI.Components.SelectGroup.Count A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SelectGroupCount()
+ {
+ tlog.Debug(tag, $"SelectGroupCount START");
+
+ var testingTarget = new MySelectGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SelectGroup>(testingTarget, "Should return SelectGroup instance.");
+
+ tlog.Debug(tag, "Count : " + testingTarget.Count);
+
+ SelectButton selection = new SelectButton();
+ testingTarget.MyAddSelection(selection);
+ tlog.Debug(tag, "Count : " + testingTarget.Count);
+
+ var result = testingTarget.Contains(selection);
+ tlog.Debug(tag, "Contains : " + result);
+
+ using (View view = new View() { Size = new Size(100, 200) })
+ {
+ try
+ {
+ testingTarget.AddAllToView(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"SelectGroupCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SelectGroup OnSelectedChanged.")]
+ [Property("SPEC", "Tizen.NUI.Components.SelectGroup.OnSelectedChanged M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SelectGroupOnSelectedChanged()
+ {
+ tlog.Debug(tag, $"SelectGroupOnSelectedChanged START");
+
+ var testingTarget = new MySelectGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SelectGroup>(testingTarget, "Should return SelectGroup instance.");
+
+ SelectButton selection = new SelectButton();
+ testingTarget.MyAddSelection(selection);
+
+ try
+ {
+ testingTarget.MyOnSelectedChanged(selection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"SelectGroupOnSelectedChanged END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Slider")]
+ public class SliderTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [Obsolete]
+ private EventHandler<Slider.ValueChangedArgs> OnValueChangedEvent()
+ {
+ return null;
+ }
+
+ [Obsolete]
+ private EventHandler<Slider.SlidingFinishedArgs> OnSlidingFinishedEvent()
+ {
+ return null;
+ }
+
+ private EventHandler<SliderValueChangedEventArgs> OnValueChanged()
+ {
+ return null;
+ }
+
+ private EventHandler<SliderSlidingStartedEventArgs> OnSlidingStarted()
+ {
+ return null;
+ }
+
+ private EventHandler<SliderSlidingFinishedEventArgs> OnSlidingFinished()
+ {
+ return null;
+ }
+
+ [Obsolete]
+ private EventHandler<Slider.StateChangedArgs> OnStateChangedEvent()
+ {
+ return null;
+ }
+
+ internal class MySlider : Slider
+ {
+ public MySlider() : base()
+ { }
+
+ public bool OnAccessibilityShouldReportZeroChildren()
+ {
+ return base.AccessibilityShouldReportZeroChildren();
+ }
+
+ public double OnAccessibilityGetMinimum()
+ {
+ return base.AccessibilityGetMinimum();
+ }
+
+ public double OnAccessibilityGetCurrent()
+ {
+ return base.AccessibilityGetCurrent();
+ }
+
+ public double OnAccessibilityGetMaximum()
+ {
+ return base.AccessibilityGetMaximum();
+ }
+
+ public bool OnAccessibilitySetCurrent(double value)
+ {
+ return base.AccessibilitySetCurrent(value);
+ }
+
+ public double OnAccessibilityGetMinimumIncrement()
+ {
+ return base.AccessibilityGetMinimumIncrement();
+ }
+
+ public void MyOnUpdate()
+ {
+ base.OnUpdate();
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider TrackThickness.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.TrackThickness A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SliderTrackThickness()
+ {
+ tlog.Debug(tag, $"SliderTrackThickness START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.IsEnabled = true;
+ tlog.Debug(tag, "IsEnabled : " + testingTarget.IsEnabled);
+
+ testingTarget.TrackThickness = 30;
+ tlog.Debug(tag, "TrackThickness : " + testingTarget.TrackThickness);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TrackThickness END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider WarningStartValue.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.WarningStartValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SliderWarningStartValue()
+ {
+ tlog.Debug(tag, $"SliderWarningStartValue START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.IsEnabled = true;
+ tlog.Debug(tag, "IsEnabled : " + testingTarget.IsEnabled);
+
+ testingTarget.WarningStartValue = 30.0f;
+ tlog.Debug(tag, "WarningStartValue : " + testingTarget.WarningStartValue);
+
+ testingTarget.WarningTrackColor = Color.Cyan;
+ tlog.Debug(tag, "WarningTrackColor :" + testingTarget.WarningTrackColor);
+
+ testingTarget.WarningSlidedTrackColor = Color.Green;
+ tlog.Debug(tag, "WarningSlidedTrackColor :" + testingTarget.WarningSlidedTrackColor);
+
+ testingTarget.WarningThumbColor = Color.Red;
+ tlog.Debug(tag, "WarningThumbColor : " + testingTarget.WarningThumbColor);
+
+ Selector<string> url = new Selector<string>()
+ {
+ All = image_path,
+ };
+ testingTarget.WarningThumbImageUrl = url;
+ tlog.Debug(tag, "WarningThumbImageUrl : " + testingTarget.WarningThumbImageUrl);
+
+ try
+ {
+ testingTarget.WarningThumbImageUrl = null;
+ }
+ catch (NullReferenceException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderThumbImageUrl END (OK)");
+ Assert.Pass("Caught NullReferenceException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider OnFocusGained.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.OnFocusGained M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SliderOnFocusGained()
+ {
+ tlog.Debug(tag, $"SliderOnFocusGained START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ try
+ {
+ testingTarget.OnFocusGained();
+ testingTarget.OnFocusLost();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderOnFocusGained END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider OnKey.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.OnKey M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SliderOnKey()
+ {
+ tlog.Debug(tag, $"SliderOnKey START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ IsDiscrete = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.MinValue = 0.0f;
+ testingTarget.MaxValue = 100.0f;
+ testingTarget.CurrentValue = 30.0f;
+
+ Key dummy = null;
+ var result = testingTarget.OnKey(dummy);
+ Assert.AreEqual(false, result, "should be equal here!");
+
+ using (Key key = new Key())
+ {
+ key.State = Key.StateType.Down;
+ key.KeyPressedName = "Down";
+
+ try
+ {
+ testingTarget.OnKey(key);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ key.State = Key.StateType.Up;
+ try
+ {
+ testingTarget.OnKey(key);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderOnKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider OnKey.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.OnKey M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SliderOnKeyKeyPressedNameUp()
+ {
+ tlog.Debug(tag, $"SliderOnKeyKeyPressedNameUp START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.MinValue = 0.0f;
+ testingTarget.MaxValue = 100.0f;
+ testingTarget.CurrentValue = 30.0f;
+
+ using (Key key = new Key())
+ {
+ key.State = Key.StateType.Down;
+ key.KeyPressedName = "Up";
+
+ try
+ {
+ testingTarget.OnKey(key);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderOnKeyKeyPressedNameUp END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider ValueChangedEvent.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.ValueChangedEvent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderValueChangedEvent()
+ {
+ tlog.Debug(tag, $"SliderValueChangedEvent START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.ValueChangedEvent += OnValueChangedEvent();
+ testingTarget.ValueChangedEvent -= OnValueChangedEvent();
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderValueChangedEvent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider SlidingFinishedEvent.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.SlidingFinishedEvent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderSlidingFinishedEvent()
+ {
+ tlog.Debug(tag, $"SliderSlidingFinishedEvent START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.SlidingFinishedEvent += OnSlidingFinishedEvent();
+ testingTarget.SlidingFinishedEvent -= OnSlidingFinishedEvent();
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderValueChangedEvent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SliderSlidingStartedEventArgs CurrentValue.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.OnKey A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SliderSlidingStartedEventArgsCurrentValue()
+ {
+ tlog.Debug(tag, $"SliderSlidingStartedEventArgsCurrentValue START");
+
+ var testingTarget = new SliderSlidingStartedEventArgs();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SliderSlidingStartedEventArgs>(testingTarget, "Should return SliderSlidingStartedEventArgs instance.");
+
+ testingTarget.CurrentValue = 30.0f;
+ tlog.Debug(tag, "CurrentValue : " + testingTarget.CurrentValue);
+
+ tlog.Debug(tag, $"SliderSlidingStartedEventArgsCurrentValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider ValueChanged.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.ValueChanged A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderValueChanged()
+ {
+ tlog.Debug(tag, $"SliderValueChanged START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.ValueChanged += OnValueChanged();
+ testingTarget.ValueChanged -= OnValueChanged();
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderValueChanged END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider SlidingStarted.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.SlidingStarted A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderSlidingStarted()
+ {
+ tlog.Debug(tag, $"SliderSlidingStarted START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.SlidingStarted += OnSlidingStarted();
+ testingTarget.SlidingStarted -= OnSlidingStarted();
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderSlidingStarted END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider SlidingFinished.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.SlidingFinished A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderSlidingFinished()
+ {
+ tlog.Debug(tag, $"SliderSlidingFinished START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.SlidingFinished += OnSlidingFinished();
+ testingTarget.SlidingFinished -= OnSlidingFinished();
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderSlidingFinished END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider StateChangedEvent.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.StateChangedEvent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderStateChangedEvent()
+ {
+ tlog.Debug(tag, $"SliderStateChangedEvent START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.StateChangedEvent += OnStateChangedEvent();
+ testingTarget.StateChangedEvent -= OnStateChangedEvent();
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderStateChangedEvent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider ThumbImageUrl.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.ThumbImageUrl A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderThumbImageUrl()
+ {
+ tlog.Debug(tag, $"SliderThumbImageUrl START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ tlog.Debug(tag, "ThumbImageUrl : " + testingTarget.ThumbImageUrl);
+
+ testingTarget.ThumbImageUrl = image_path;
+ tlog.Debug(tag, "ThumbImageUrl : " + testingTarget.ThumbImageUrl);
+
+ try
+ {
+ testingTarget.ThumbImageUrl = null;
+ }
+ catch (NullReferenceException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderThumbImageUrl END (OK)");
+ Assert.Pass("Caught NullReferenceException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider ThumbColor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.ThumbColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderThumbColor()
+ {
+ tlog.Debug(tag, $"SliderThumbColor START");
+
+ var testingTarget = new Slider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.ThumbImageUrl = image_path;
+ testingTarget.ThumbColor = Color.Black;
+ tlog.Debug(tag, "ThumbColor : " + testingTarget.ThumbColor);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderThumbColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider AccessibilityShouldReportZeroChildren.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.AccessibilityShouldReportZeroChildren M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderAccessibilityShouldReportZeroChildren()
+ {
+ tlog.Debug(tag, $"SliderAccessibilityShouldReportZeroChildren START");
+
+ var testingTarget = new MySlider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ var result = testingTarget.OnAccessibilityShouldReportZeroChildren();
+ tlog.Debug(tag, "AccessibilityShouldReportZeroChildren : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderAccessibilityShouldReportZeroChildren END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider AccessibilityGetMinimum.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.AccessibilityGetMinimum M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderAccessibilityGetMinimum()
+ {
+ tlog.Debug(tag, $"SliderAccessibilityGetMinimum START");
+
+ var testingTarget = new MySlider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.MinValue = 0.0f;
+ testingTarget.MaxValue = 100.0f;
+ testingTarget.CurrentValue = 30.0f;
+
+ var result = testingTarget.OnAccessibilityGetMinimum();
+ tlog.Debug(tag, "AccessibilityGetMinimum : " + result);
+
+ result = testingTarget.OnAccessibilityGetMaximum();
+ tlog.Debug(tag, "AccessibilityGetMaximum : " + result);
+
+ result = testingTarget.OnAccessibilityGetCurrent();
+ tlog.Debug(tag, "AccessibilityGetCurrent : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderAccessibilityGetMinimum END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider AccessibilitySetCurrent.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.AccessibilitySetCurrent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderAccessibilitySetCurrent()
+ {
+ tlog.Debug(tag, $"SliderAccessibilitySetCurrent START");
+
+ var testingTarget = new MySlider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.MinValue = 0.0f;
+ testingTarget.MaxValue = 100.0f;
+
+ var result = testingTarget.OnAccessibilitySetCurrent(30.0f);
+ tlog.Debug(tag, "AccessibilitySetCurrent : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderAccessibilitySetCurrent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider AccessibilityGetMinimumIncrement.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.AccessibilityGetMinimumIncrement M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderAccessibilityGetMinimumIncrement()
+ {
+ tlog.Debug(tag, $"SliderAccessibilityGetMinimumIncrement START");
+
+ var testingTarget = new MySlider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.MinValue = 0.0f;
+ testingTarget.MaxValue = 100.0f;
+
+ var result = testingTarget.OnAccessibilityGetMinimumIncrement();
+ tlog.Debug(tag, "AccessibilityGetMinimumIncrement : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderAccessibilityGetMinimumIncrement END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider OnUpdate.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.OnUpdate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderOnUpdate()
+ {
+ tlog.Debug(tag, $"SliderOnUpdate START");
+
+ var testingTarget = new MySlider()
+ {
+ Direction = Slider.DirectionType.Vertical,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.MinValue = 0.0f;
+ testingTarget.MaxValue = 100.0f;
+ testingTarget.BgTrackColor = Color.Cyan;
+ testingTarget.LowIndicatorImageURL = image_path;
+ testingTarget.LowIndicatorSize = new Size(8, 8);
+ testingTarget.HighIndicatorImageURL = image_path;
+ testingTarget.HighIndicatorSize = new Size(10, 10);
+
+ SliderStyle style1 = new SliderStyle()
+ {
+ IndicatorType = Slider.IndicatorType.Image,
+ };
+ testingTarget.ApplyStyle(style1);
+
+ try
+ {
+ testingTarget.MyOnUpdate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ SliderStyle style2 = new SliderStyle()
+ {
+ IndicatorType = Slider.IndicatorType.Text,
+ };
+ testingTarget.ApplyStyle(style2);
+
+ try
+ {
+ testingTarget.MyOnUpdate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderOnUpdate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider OnUpdate.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.OnUpdate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderOnUpdateDirectionIsHorizontal()
+ {
+ tlog.Debug(tag, $"SliderOnUpdateDirectionIsHorizontal START");
+
+ var testingTarget = new MySlider()
+ {
+ Size = new Size(100, 5),
+ Direction = Slider.DirectionType.Horizontal,
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ testingTarget.MinValue = 0.0f;
+ testingTarget.MaxValue = 100.0f;
+ testingTarget.BgTrackColor = Color.Cyan;
+ testingTarget.LowIndicatorImageURL = image_path;
+ testingTarget.LowIndicatorSize = new Size(8, 8);
+ testingTarget.HighIndicatorImageURL = image_path;
+ testingTarget.HighIndicatorSize = new Size(10, 10);
+
+ SliderStyle style1 = new SliderStyle()
+ {
+ IndicatorType = Slider.IndicatorType.Image,
+ };
+ testingTarget.ApplyStyle(style1);
+
+ try
+ {
+ testingTarget.MyOnUpdate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ SliderStyle style2 = new SliderStyle()
+ {
+ IndicatorType = Slider.IndicatorType.Text,
+ };
+ testingTarget.ApplyStyle(style2);
+
+ try
+ {
+ testingTarget.MyOnUpdate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderOnUpdateDirectionIsHorizontal END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.BaseComponents.View;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Switch")]
+ public class SwitchTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [Obsolete]
+ private void OnSelectedEvent(object sender, Switch.SelectEventArgs e) { }
+
+ private void OnSelectedChanged(object sender, SelectedChangedEventArgs e) { }
+
+ internal class MySwitch : Switch
+ {
+ public MySwitch() : base()
+ { }
+
+ public void OnAccessibilityCalculateStates()
+ {
+ base.AccessibilityCalculateStates();
+ }
+
+ public void MyOnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
+ {
+ base.OnControlStateChanged(controlStateChangedInfo);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Switch AccessibilityCalculateStates.")]
+ [Property("SPEC", "Tizen.NUI.Components.Switch.AccessibilityCalculateStates M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SwitchAccessibilityCalculateStates()
+ {
+ tlog.Debug(tag, $"SwitchAccessibilityCalculateStates START");
+
+ var testingTarget = new MySwitch();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Switch>(testingTarget, "Should return Switch instance.");
+
+ try
+ {
+ testingTarget.OnAccessibilityCalculateStates();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SwitchAccessibilityCalculateStates END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Switch Track.")]
+ [Property("SPEC", "Tizen.NUI.Components.Switch.Track A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SwitchTrack()
+ {
+ tlog.Debug(tag, $"SwitchTrack START");
+
+ var testingTarget = new Switch();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Switch>(testingTarget, "Should return Switch instance.");
+
+ testingTarget.Track = new ImageView(image_path);
+ tlog.Debug(tag, "Track : " + testingTarget.Track);
+
+ testingTarget.Thumb = new ImageView(image_path);
+ tlog.Debug(tag, "Thumb : " + testingTarget.Thumb);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SwitchTrack END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Switch OnKey.")]
+ [Property("SPEC", "Tizen.NUI.Components.Switch.OnKey M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SwitchOnKey()
+ {
+ tlog.Debug(tag, $"SwitchOnKey START");
+
+ var testingTarget = new Switch();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Switch>(testingTarget, "Should return Switch instance.");
+
+ try
+ {
+ using (Key key = new Key())
+ {
+ testingTarget.OnKey(key);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SwitchOnKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Switch OnKey.")]
+ [Property("SPEC", "Tizen.NUI.Components.Switch.OnControlStateChanged M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SwitchOnControlStateChanged()
+ {
+ tlog.Debug(tag, $"SwitchOnControlStateChanged START");
+
+ var testingTarget = new MySwitch();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Switch>(testingTarget, "Should return Switch instance.");
+
+ testingTarget.IsSelectable = true;
+ testingTarget.SelectedEvent += OnSelectedEvent;
+ testingTarget.SelectedChanged += OnSelectedChanged;
+
+ try
+ {
+ ControlStateChangedEventArgs args = new ControlStateChangedEventArgs(ControlState.Selected, ControlState.Normal);
+ testingTarget.MyOnControlStateChanged(args);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.SelectedEvent -= OnSelectedEvent;
+ testingTarget.SelectedChanged -= OnSelectedChanged;
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SwitchOnControlStateChanged END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.Components.Tab;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Tab")]
+ public class TabTest
+ {
+ private const string tag = "NUITEST";
+
+ [Obsolete]
+ internal class MyTab : Tab
+ {
+ public MyTab() : base()
+ { }
+
+ public void MyOnUpdate()
+ {
+ base.OnUpdate();
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab contructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.Tab C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabContructor()
+ {
+ tlog.Debug(tag, $"TabContructor START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabContructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab contructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.Tab C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabContructorWithTabStyle()
+ {
+ tlog.Debug(tag, $"TabContructorWithTabStyle START");
+
+ TabStyle style = new TabStyle()
+ {
+ Size = new Size(100, 200),
+ };
+
+ var testingTarget = new Tab(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabContructorWithTabStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab Underline.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.Underline A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabUnderline()
+ {
+ tlog.Debug(tag, $"TabUnderline START");
+
+ using (View view = new View() { Size = new Size(2, 20) })
+ {
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.Underline = view;
+ tlog.Debug(tag, "Underline : " + testingTarget.Underline);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TabUnderline END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab SelectedItemIndex.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.SelectedItemIndex A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabSelectedItemIndex()
+ {
+ tlog.Debug(tag, $"TabSelectedItemIndex START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.SelectedItemIndex = 1;
+ tlog.Debug(tag, "SelectedItemIndex : " + testingTarget.SelectedItemIndex);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabSelectedItemIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab UseTextNaturalSize.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.UseTextNaturalSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabUseTextNaturalSize()
+ {
+ tlog.Debug(tag, $"TabUseTextNaturalSize START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.UseTextNaturalSize = true;
+ tlog.Debug(tag, "UseTextNaturalSize : " + testingTarget.UseTextNaturalSize);
+
+ testingTarget.UseTextNaturalSize = false;
+ tlog.Debug(tag, "UseTextNaturalSize : " + testingTarget.UseTextNaturalSize);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabUseTextNaturalSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab ItemSpace.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.ItemSpace A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabItemSpace()
+ {
+ tlog.Debug(tag, $"TabItemSpace START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.ItemSpace = 10;
+ tlog.Debug(tag, "ItemSpace : " + testingTarget.ItemSpace);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabItemSpace END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab Space.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.Space A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabSpace()
+ {
+ tlog.Debug(tag, $"TabSpace START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.Space = new Extents(4, 4, 4, 4);
+ tlog.Debug(tag, "Space : " + testingTarget.Space);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabSpace END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab ItemPadding.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.ItemPadding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabItemPadding()
+ {
+ tlog.Debug(tag, $"TabItemPadding START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.ItemPadding = new Extents(4, 4, 4, 4);
+ tlog.Debug(tag, "ItemPadding : " + testingTarget.ItemPadding);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabItemPadding END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab UnderLineSize.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.UnderLineSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabUnderLineSize()
+ {
+ tlog.Debug(tag, $"TabUnderLineSize START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.UnderLineSize = new Size(10, 20);
+ tlog.Debug(tag, "UnderLineSize : " + testingTarget.UnderLineSize);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabUnderLineSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab UnderLineBackgroundColor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.UnderLineBackgroundColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabUnderLineBackgroundColor()
+ {
+ tlog.Debug(tag, $"TabUnderLineBackgroundColor START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.UnderLineBackgroundColor = Color.Red;
+ tlog.Debug(tag, "UnderLineBackgroundColor : " + testingTarget.UnderLineBackgroundColor);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabUnderLineBackgroundColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab PointSize.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.PointSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabPointSize()
+ {
+ tlog.Debug(tag, $"TabPointSize START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.PointSize = 0.3f;
+ tlog.Debug(tag, "PointSize : " + testingTarget.PointSize);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabPointSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab FontFamily.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.FontFamily A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabFontFamily()
+ {
+ tlog.Debug(tag, $"TabFontFamily START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.FontFamily = "BreezeSans";
+ tlog.Debug(tag, "FontFamily : " + testingTarget.FontFamily);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabFontFamily END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab TextColor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.TextColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabTextColor()
+ {
+ tlog.Debug(tag, $"TabTextColor START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ testingTarget.TextColor = Color.Green;
+ tlog.Debug(tag, "TextColor : " + testingTarget.TextColor);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabTextColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab TextColorSelector.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.TextColorSelector A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabTextColorSelector()
+ {
+ tlog.Debug(tag, $"TabTextColorSelector START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ var textColorSelector = new ColorSelector();
+ textColorSelector.Add(ControlState.All, Color.Cyan);
+ testingTarget.TextColorSelector = textColorSelector;
+ tlog.Debug(tag, "TextColorSelector : " + testingTarget.TextColorSelector);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabTextColorSelector END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Tab TextColorSelector.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.TextColorSelector A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabTextColorSelectorNullReferenceException()
+ {
+ tlog.Debug(tag, $"TabTextColorSelectorNullReferenceException START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ try
+ {
+ ColorSelector textColorSelector = null;
+ testingTarget.TextColorSelector = textColorSelector;
+ }
+ catch (NullReferenceException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabTextColorSelectorNullReferenceException END (OK)");
+ Assert.Pass("Caught NullReferenceException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab AddItem.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.AddItem M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabAddItem()
+ {
+ tlog.Debug(tag, $"TabAddItem START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ try
+ {
+ TabItemData item1 = new TabItemData();
+ testingTarget.AddItem(item1);
+ TabItemData item2 = new TabItemData();
+ testingTarget.InsertItem(item2, 1);
+
+ testingTarget.SelectedItemIndex = 1;
+
+ try
+ {
+ testingTarget.DeleteItem(0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabAddItem END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab Style.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.Style M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabStyle()
+ {
+ tlog.Debug(tag, $"TabStyle START");
+
+ var testingTarget = new Tab();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ var result = testingTarget.Style;
+ tlog.Debug(tag, "Style : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Tab OnUpdate.")]
+ [Property("SPEC", "Tizen.NUI.Components.Tab.OnUpdate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabOnUpdate()
+ {
+ tlog.Debug(tag, $"TabOnUpdate START");
+
+ var testingTarget = new MyTab()
+ {
+ LayoutDirection = ViewLayoutDirectionType.RTL,
+ UseTextNaturalSize = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Tab>(testingTarget, "Should return Tab instance.");
+
+ try
+ {
+ testingTarget.MyOnUpdate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabOnUpdate END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/TabButton")]
+ public class TabButtonTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MyTabButton : TabButton
+ {
+ public MyTabButton() : base()
+ { }
+
+ public override bool OnKey(Key key)
+ {
+ return base.OnKey(key);
+ }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+
+ public void OnCreateViewStyle()
+ {
+ base.CreateViewStyle();
+ }
+
+ public void OnHandleControlStateOnTouch(Touch touch)
+ {
+ base.HandleControlStateOnTouch(touch);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabButton constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButton.TabButton C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabButtonConstructor()
+ {
+ tlog.Debug(tag, $"TabButtonConstructor START");
+
+ TabButtonStyle style = new TabButtonStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ };
+ var testingTarget = new TabButton(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButton>(testingTarget, "Should return TabButton instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabButtonConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabButton OnKey.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButton.OnKey M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabButtonOnKey()
+ {
+ tlog.Debug(tag, $"TabButtonOnKey START");
+
+ var testingTarget = new MyTabButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButton>(testingTarget, "Should return TabButton instance.");
+
+ Key key = null;
+ var result = testingTarget.OnKey(key);
+ Assert.AreEqual(false, result, "should be equal here!");
+
+ key = new Key()
+ {
+ State = Key.StateType.Up,
+ KeyPressedName = "Return"
+ };
+ testingTarget.IsEnabled = true;
+ testingTarget.IsSelected = true;
+ result = testingTarget.OnKey(key);
+ tlog.Debug(tag, "OnKey : " + result);
+
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ tlog.Debug(tag, $"TabButtonOnKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabButton CreateViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButton.CreateViewStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabButtonCreateViewStyle()
+ {
+ tlog.Debug(tag, $"TabButtonCreateViewStyle START");
+
+ var testingTarget = new MyTabButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButton>(testingTarget, "Should return TabButton instance.");
+
+ try
+ {
+ testingTarget.OnCreateViewStyle();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"TabButtonCreateViewStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabButton HandleControlStateOnTouch.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButton.HandleControlStateOnTouch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TabButtonHandleControlStateOnTouch()
+ {
+ tlog.Debug(tag, $"TabButtonHandleControlStateOnTouch START");
+
+ var testingTarget = new MyTabButton()
+ {
+ IsEnabled = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButton>(testingTarget, "Should return TabButton instance.");
+
+ try
+ {
+ using (Touch touch = new Touch())
+ {
+ testingTarget.OnHandleControlStateOnTouch(touch);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"TabButtonHandleControlStateOnTouch END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabButton OnRelayout.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButton.OnRelayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public async Task TabButtonOnRelayout()
+ {
+ tlog.Debug(tag, $"TabButtonOnRelayout START");
+
+ var testingTarget = new MyTabButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButton>(testingTarget, "Should return TabButton instance.");
+
+ ViewStyle style = new ViewStyle()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Cyan,
+ };
+ testingTarget.ApplyStyle(style);
+
+ testingTarget.IconURL = image_path;
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ testingTarget.Size = new Size(50, 80);
+ testingTarget.BackgroundColor = Color.Blue;
+
+ await Task.Delay(200);
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabButtonOnRelayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabButton OnRelayout.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButton.OnRelayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public async Task TabButtonOnRelayoutWithText()
+ {
+ tlog.Debug(tag, $"TabButtonOnRelayoutWithText START");
+
+ TabButtonStyle style = new TabButtonStyle()
+ {
+ Size = new Size(100, 200),
+ BackgroundColor = Color.Cyan,
+ Text = new TextLabelStyle()
+ {
+ BackgroundColor = Color.Red,
+ }
+ };
+
+ var testingTarget = new MyTabButton();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButton>(testingTarget, "Should return TabButton instance.");
+
+
+ testingTarget.IconURL = image_path;
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ testingTarget.Size = new Size(50, 80);
+ testingTarget.BackgroundColor = Color.Blue;
+
+ await Task.Delay(200);
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabButtonOnRelayoutWithText END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/TabButtonGroup")]
+ public class TabButtonGroupTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("TabButtonGroup Add.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButtonGroup.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabButtonGroupAddArgumentNullException()
+ {
+ tlog.Debug(tag, $"TabButtonGroupAddArgumentNullException START");
+
+ var testingTarget = new TabButtonGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButtonGroup>(testingTarget, "Should return TabButtonGroup instance.");
+
+ TabButton button = null;
+ try
+ {
+ testingTarget.Add(button);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"TabButtonGroupAddArgumentNullException END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("TabButtonGroup Remove.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButtonGroup.Remove M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabButtonGroupRemoveArgumentNullException()
+ {
+ tlog.Debug(tag, $"TabButtonGroupRemoveArgumentNullException START");
+
+ var testingTarget = new TabButtonGroup();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButtonGroup>(testingTarget, "Should return TabButtonGroup instance.");
+
+ TabButton button = null;
+ try
+ {
+ testingTarget.Remove(button);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"TabButtonGroupRemoveArgumentNullException END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/TabContent")]
+ public class TabContentTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyTabContent : TabContent
+ {
+ public MyTabContent() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+
+ public void OnAddView(View view)
+ {
+ base.AddView(view);
+ }
+
+ public void OnRemoveView(View view)
+ {
+ base.RemoveView(view);
+ }
+
+ public void OnSelect(int index)
+ {
+ base.Select(index);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabContent Dispose.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabContent.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabContentDispose()
+ {
+ tlog.Debug(tag, $"TabContentDispose START");
+
+ var testingTarget = new MyTabContent();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabContent>(testingTarget, "Should return TabContent instance.");
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabContentDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabContent RemoveView.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabContent.RemoveView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabContentRemoveView()
+ {
+ tlog.Debug(tag, $"TabContentRemoveView START");
+
+ var testingTarget = new MyTabContent()
+ {
+ Size = new Size(100, 100),
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabContent>(testingTarget, "Should return TabContent instance.");
+
+ View dummy1 = new View()
+ {
+ Size = new Size(50, 100),
+ Position = new Position(0, 0),
+ };
+
+ View dummy2 = new View()
+ {
+ Size = new Size(50, 100),
+ Position = new Position(50, 0),
+ };
+
+ testingTarget.OnAddView(dummy1);
+ testingTarget.OnAddView(dummy2);
+
+ testingTarget.OnSelect(0);
+
+ try
+ {
+ testingTarget.OnRemoveView(dummy1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ dummy1.Dispose();
+ dummy2.Dispose();
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ tlog.Debug(tag, $"TabContentRemoveView END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("TabContent AddView.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabContent.AddView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabContentAddView()
+ {
+ tlog.Debug(tag, $"TabContentAddView START");
+
+ var testingTarget = new MyTabContent();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabContent>(testingTarget, "Should return TabContent instance.");
+
+ View view = null;
+
+ try
+ {
+ testingTarget.OnAddView(view);
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabContentAddView END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+
+ [Test]
+ [Category("P2")]
+ [Description("TabContent RemoveView.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabContent.RemoveView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabContentRemoveViewWithNull()
+ {
+ tlog.Debug(tag, $"TabContentRemoveViewWithNull START");
+
+ var testingTarget = new MyTabContent();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabContent>(testingTarget, "Should return TabContent instance.");
+
+ View view = null;
+
+ try
+ {
+ testingTarget.OnRemoveView(view);
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabContentRemoveViewWithNull END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/TabView")]
+ public class TabViewTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyTabView : TabView
+ {
+ public MyTabView() : base()
+ { }
+
+ public void OnDispose(DisposeTypes types)
+ {
+ base.Dispose(types);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabView Dispose.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabView.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabViewDispose()
+ {
+ tlog.Debug(tag, $"TabViewDispose START");
+
+ var testingTarget = new MyTabView();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabView>(testingTarget, "Should return TabView instance.");
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabViewDispose END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Control/TimePicker")]
+ public class TimePickerTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyTimePicker : TimePicker
+ {
+ public MyTimePicker() : base()
+ {
+ }
+
+ public override void OnInitialize()
+ {
+ base.OnInitialize();
+ }
+
+ public override void ApplyStyle(ViewStyle style)
+ {
+ base.ApplyStyle(style);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TimePicker Time.")]
+ //[Property("SPEC", "Tizen.NUI.Components.TimePicker.Time A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("COVPARAM", "")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TimePickerTime()
+ //{
+ // tlog.Debug(tag, $"TimePickerTime START");
+
+ // var testingTarget = new MyTimePicker();
+ // Assert.IsNotNull(testingTarget, "null handle");
+ // Assert.IsInstanceOf<TimePicker>(testingTarget, "Should return TimePicker instance.");
+
+ // tlog.Debug(tag, "Time : " + testingTarget.Time);
+
+ // testingTarget.Time = new DateTime(1000);
+ // tlog.Debug(tag, "Time : " + testingTarget.Time);
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"TimePickerTime END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TimePicker Is24HourView.")]
+ //[Property("SPEC", "Tizen.NUI.Components.TimePicker.Is24HourView A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("COVPARAM", "")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TimePickerIs24HourView()
+ //{
+ // tlog.Debug(tag, $"TimePickerIs24HourView START");
+
+ // var testingTarget = new TimePicker();
+ // Assert.IsNotNull(testingTarget, "null handle");
+ // Assert.IsInstanceOf<TimePicker>(testingTarget, "Should return TimePicker instance.");
+
+ // testingTarget.Is24HourView = true;
+ // tlog.Debug(tag, "Is24HourView : " + testingTarget.Is24HourView);
+
+ // testingTarget.Is24HourView = false;
+ // tlog.Debug(tag, "Is24HourView : " + testingTarget.Is24HourView);
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"TimePickerIs24HourView END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TimePicker OnInitialize.")]
+ //[Property("SPEC", "Tizen.NUI.Components.TimePicker.OnInitialize M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("COVPARAM", "")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TimePickerOnInitialize()
+ //{
+ // tlog.Debug(tag, $"TimePickerOnInitialize START");
+
+ // var testingTarget = new MyTimePicker();
+ // Assert.IsNotNull(testingTarget, "null handle");
+ // Assert.IsInstanceOf<TimePicker>(testingTarget, "Should return TimePicker instance.");
+
+ // try
+ // {
+ // testingTarget.OnInitialize();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"TimePickerOnInitialize END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TimePicker ApplyStyle.")]
+ //[Property("SPEC", "Tizen.NUI.Components.TimePicker.ApplyStyle M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("COVPARAM", "")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TimePickerApplyStyle()
+ //{
+ // tlog.Debug(tag, $"TimePickerApplyStyle START");
+
+ // var testingTarget = new MyTimePicker();
+ // Assert.IsNotNull(testingTarget, "null handle");
+ // Assert.IsInstanceOf<TimePicker>(testingTarget, "Should return TimePicker instance.");
+
+ // try
+ // {
+ // testingTarget.ApplyStyle(new ViewStyle() { Size = new Size(100, 200) });
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"TimePickerApplyStyle END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TimeChangedEventArgs constructor.")]
+ //[Property("SPEC", "Tizen.NUI.Components.TimeChangedEventArgs.TimeChangedEventArgs C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("COVPARAM", "")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TimeChangedEventArgsConstructor()
+ //{
+ // tlog.Debug(tag, $"TimeChangedEventArgsConstructor START");
+
+ // DateTime dt = new DateTime(1000);
+
+ // var testingTarget = new TimeChangedEventArgs(dt);
+ // Assert.IsNotNull(testingTarget, "null handle");
+ // Assert.IsInstanceOf<TimePicker>(testingTarget, "Should return TimePicker instance.");
+
+ // tlog.Debug(tag, "Time : " + testingTarget.Time);
+
+ // tlog.Debug(tag, $"TimeChangedEventArgsConstructor END (OK)");
+ //}
+ }
+}
-
using global::System;
using NUnit.Framework;
using NUnit.Framework.TUnit;
{
private const string tag = "NUITEST";
+ [Obsolete]
+ internal class MyToast : Toast
+ {
+ public MyToast() : base()
+ { }
+
+ public override void OnInitialize()
+ {
+ base.OnInitialize();
+ }
+
+ public void OnCreateViewStyle()
+ {
+ base.CreateViewStyle();
+ }
+ }
+
[SetUp]
public void Init()
{
{
tlog.Info(tag, "Destroy() is called!");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Toast constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.Toast.Toast C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ToastConstructor()
+ {
+ tlog.Debug(tag, $"ToastConstructor START");
+
+ ToastStyle style = new ToastStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ };
+
+ var testingTarget = new Toast(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Toast>(testingTarget, "Should return Toast instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ToastConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Toast FromText.")]
+ [Property("SPEC", "Tizen.NUI.Components.Toast.FromText M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ToastFromText()
+ {
+ tlog.Debug(tag, $"ToastFromText START");
+
+ var testingTarget = Toast.FromText("Null parameter construction", 1000);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Toast>(testingTarget, "Should return Toast instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ToastFromText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Toast Duration.")]
+ [Property("SPEC", "Tizen.NUI.Components.Toast.Duration A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ToastDuration()
+ {
+ tlog.Debug(tag, $"ToastDuration START");
+
+ var testingTarget = new MyToast();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Toast>(testingTarget, "Should return Toast instance.");
+
+ testingTarget.OnInitialize();
+
+ testingTarget.Duration = 10;
+ tlog.Debug(tag, "Duration : " + testingTarget.Duration);
+
+ testingTarget.TextLineSpace = 8;
+ tlog.Debug(tag, "testingTarget : " + testingTarget.TextLineSpace);
+
+ testingTarget.TextLineHeight = 15;
+ tlog.Debug(tag, "TextLineHeight : " + testingTarget.TextLineHeight);
+
+ testingTarget.TextPadding = new Extents(2, 2, 2, 2);
+ tlog.Debug(tag, "TextPadding : " + testingTarget.TextPadding);
+
+ testingTarget.Message = "Toast";
+ tlog.Debug(tag, "Message : " + testingTarget.Message);
+
+ testingTarget.TextAlignment = HorizontalAlignment.Center;
+ tlog.Debug(tag, "TextAlignment :" + testingTarget.TextAlignment);
+
+ testingTarget.TextArray = new string[2] { "microsoft", "perfomance" };
+ tlog.Debug(tag, "TextArray : " + testingTarget.TextArray);
+
+ testingTarget.PointSize = 15.0f;
+ tlog.Debug(tag, "PointSize : " + testingTarget.PointSize);
+
+ testingTarget.FontFamily = "BreezeSans";
+ tlog.Debug(tag, "FontFamily : " + testingTarget.FontFamily);
+
+ testingTarget.TextColor = Color.Yellow;
+ tlog.Debug(tag, "TextColor : " + testingTarget.TextColor);
+
+ try
+ {
+ testingTarget.Post(Window.Instance);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ToastDuration END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Toast CreateViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.Toast.CreateViewStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ToastCreateViewStyle()
+ {
+ tlog.Debug(tag, $"ToastCreateViewStyle START");
+
+ var testingTarget = new MyToast();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Toast>(testingTarget, "Should return Toast instance.");
+
+ try
+ {
+ testingTarget.OnCreateViewStyle();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ToastCreateViewStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Toast ApplyStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.Toast.ApplyStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ToastApplyStyle()
+ {
+ tlog.Debug(tag, $"ToastApplyStyle START");
+
+ var testingTarget = new Toast();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Toast>(testingTarget, "Should return Toast instance.");
+
+ ToastStyle style = new ToastStyle()
+ {
+ Text = new TextLabelStyle()
+ {
+ Size = new Size(80, 30)
+ }
+ };
+
+ try
+ {
+ testingTarget.ApplyStyle(style);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ToastApplyStyle END (OK)");
+ }
}
}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Extension;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Extension/ButtonExtension")]
+ public class ButtonExtensionTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class ButtonExtensionImpl : ButtonExtension
+ {
+ public ButtonExtensionImpl() : base()
+ { }
+
+ public Touch TouchInfoTest
+ {
+ get
+ {
+ return base.TouchInfo;
+ }
+ set
+ { }
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ButtonExtension SetTouchInfo.")]
+ [Property("SPEC", "Tizen.NUI.Components.ButtonExtension.SetTouchInfo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ButtonExtensionSetTouchInfo()
+ {
+ tlog.Debug(tag, $"ScrollbarBaseUnparent START");
+
+ var testingTarget = new ButtonExtensionImpl();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ButtonExtension>(testingTarget, "Should return ButtonExtension instance.");
+
+ try
+ {
+ using (Touch touch = new Touch())
+ {
+ testingTarget.SetTouchInfo(touch);
+ tlog.Debug(tag, "TouchInfo : " + testingTarget.TouchInfoTest);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Assert Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ScrollbarBaseUnparent END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Extension;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.BaseComponents.View;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Extension/LottieButtonExtension")]
+ public class LottieButtonExtensionTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+ private string lottie_url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "lottie.json";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieButtonExtension constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieButtonExtension.LottieButtonExtension C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieButtonExtensionConstructor()
+ {
+ tlog.Debug(tag, $"LottieButtonExtensionConstructor START");
+
+ var testingTarget = new LottieButtonExtension();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieButtonExtension>(testingTarget, "Should return LottieButtonExtension instance.");
+
+ tlog.Debug(tag, $"LottieButtonExtensionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieButtonExtension OnControlStateChanged.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieButtonExtension.OnControlStateChanged M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieButtonExtensionOnControlStateChanged()
+ {
+ tlog.Debug(tag, $"LottieButtonExtensionOnControlStateChanged START");
+
+ var testingTarget = new LottieButtonExtension();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieButtonExtension>(testingTarget, "Should return LottieButtonExtension instance.");
+
+ LottieFrameInfo info = new LottieFrameInfo(0, 100);
+ Selector<LottieFrameInfo> selector = new Selector<LottieFrameInfo>(info);
+
+ var style = new LottieButtonStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ LottieUrl = lottie_url,
+ PlayRange = info
+ };
+
+ using (Button button = new Button(style))
+ {
+ ControlStateChangedEventArgs args = new ControlStateChangedEventArgs(ControlState.Pressed, ControlState.Selected);
+
+ try
+ {
+ testingTarget.OnControlStateChanged(button, args);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"LottieButtonExtensionOnControlStateChanged END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieButtonExtension OnCreateIcon.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieButtonExtension.OnCreateIcon M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieButtonExtensionOnCreateIcon()
+ {
+ tlog.Debug(tag, $"LottieButtonExtensionOnCreateIcon START");
+
+ var testingTarget = new LottieButtonExtension();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieButtonExtension>(testingTarget, "Should return LottieButtonExtension instance.");
+
+ LottieFrameInfo info = new LottieFrameInfo(0, 100);
+ Selector<LottieFrameInfo> selector = new Selector<LottieFrameInfo>(info);
+
+ var style = new LottieButtonStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ LottieUrl = lottie_url,
+ PlayRange = info
+ };
+
+ using (Button button = new Button(style))
+ {
+ using (ImageView view = new ImageView(image_path))
+ {
+ var result = testingTarget.OnCreateIcon(button, view);
+ tlog.Debug(tag, "OnCreateIcon : " + result);
+ }
+ }
+
+ tlog.Debug(tag, $"LottieButtonExtensionOnCreateIcon END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Extension;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.BaseComponents.View;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Extension/LottieSwitchExtension")]
+ public class LottieSwitchExtensionTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieSwitchExtension constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieSwitchExtension.LottieSwitchExtension C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieSwitchExtensionConstructor()
+ {
+ tlog.Debug(tag, $"LottieSwitchExtensionConstructor START");
+
+ var testingTarget = new LottieSwitchExtension();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieSwitchExtension>(testingTarget, "Should return LottieSwitchExtension instance.");
+
+ tlog.Debug(tag, $"LottieSwitchExtensionConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Extension;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.BaseComponents.View;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Extension/SlidingSwitchExtension")]
+ public class SlidingSwitchExtensionTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MySlidingSwitchExtension : SlidingSwitchExtension
+ {
+ public MySlidingSwitchExtension() : base()
+ { }
+
+ public void MyOnSelectedChanged(Switch button)
+ {
+ base.OnSelectedChanged(button);
+ }
+
+ public void MyDispose(bool disposing)
+ {
+ base.Dispose(disposing);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SlidingSwitchExtension OnSelectedChanged.")]
+ [Property("SPEC", "Tizen.NUI.Components.SlidingSwitchExtension.OnSelectedChanged M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SlidingSwitchExtensionOnSelectedChanged()
+ {
+ tlog.Debug(tag, $"SlidingSwitchExtensionOnSelectedChanged START");
+
+ var testingTarget = new MySlidingSwitchExtension();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<MySlidingSwitchExtension>(testingTarget, "Should return SlidingSwitchExtension instance.");
+
+ SwitchStyle style = new SwitchStyle()
+ {
+ Track = new ImageViewStyle()
+ {
+ BackgroundImage = image_path,
+ },
+ Thumb = new ImageViewStyle()
+ {
+ BackgroundImage = image_path,
+ },
+ };
+
+ using (Switch button = new Switch(style) )
+ {
+
+ Window.Instance.Add(button);
+
+ try
+ {
+ testingTarget.MyOnSelectedChanged(button);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.MyDispose(true);
+ tlog.Debug(tag, $"SlidingSwitchExtensionOnSelectedChanged END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Extension;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.BaseComponents.View;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Extension/SwitchExtension")]
+ public class SwitchExtensionTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class SwitchExtensionImpl : SwitchExtension
+ {
+ public SwitchExtensionImpl() : base()
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SwitchExtension OnCreateTrack.")]
+ [Property("SPEC", "Tizen.NUI.Components.SwitchExtension.OnCreateTrack M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SlidingSwitchExtensionOnSelectedChanged()
+ {
+ tlog.Debug(tag, $"SlidingSwitchExtensionOnSelectedChanged START");
+
+ var testingTarget = new SwitchExtensionImpl();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<SwitchExtension>(testingTarget, "Should return SwitchExtension instance.");
+
+ using (Switch button = new Switch() { IsEnabled = true, IsSelected = true } )
+ {
+ var result = testingTarget.OnCreateTrack(button, new ImageView(image_path));
+ tlog.Debug(tag, "OnCreateTrack : " + result);
+
+ result = testingTarget.OnCreateThumb(button, new ImageView(image_path));
+ tlog.Debug(tag, "OnCreateThumb : " + result);
+ }
+
+ tlog.Debug(tag, $"SlidingSwitchExtensionOnSelectedChanged END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.BaseComponents.View;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("PreloadStyle/OverlayAnimationButtonStyle")]
+ public class OverlayAnimationButtonStyleTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("OverlayAnimationButtonStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.OverlayAnimationButtonStyle.OverlayAnimationButtonStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void OverlayAnimationButtonStyleConstructor()
+ {
+ tlog.Debug(tag, $"OverlayAnimationButtonStyleConstructor START");
+
+ var testingTarget = new OverlayAnimationButtonStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<OverlayAnimationButtonStyle>(testingTarget, "Should return OverlayAnimationButtonStyle instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"OverlayAnimationButtonStyleConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("OverlayAnimationButtonStyle CreateExtension.")]
+ [Property("SPEC", "Tizen.NUI.Components.OverlayAnimationButtonStyle.CreateExtension M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void OverlayAnimationButtonStyleCreateExtension()
+ {
+ tlog.Debug(tag, $"OverlayAnimationButtonStyleCreateExtension START");
+
+ var testingTarget = new OverlayAnimationButtonStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<OverlayAnimationButtonStyle>(testingTarget, "Should return OverlayAnimationButtonStyle instance.");
+
+ try
+ {
+ testingTarget.CreateExtension();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"OverlayAnimationButtonStyleCreateExtension END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("OverlayAnimationButtonExtension constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.OverlayAnimationButtonExtension.OverlayAnimationButtonExtension C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void OverlayAnimationButtonExtensionConstructor()
+ {
+ tlog.Debug(tag, $"OverlayAnimationButtonExtensionConstructor START");
+
+ var testingTarget = new OverlayAnimationButtonExtension();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<OverlayAnimationButtonExtension>(testingTarget, "Should return OverlayAnimationButtonExtension instance.");
+
+ try
+ {
+ using (Button button = new Button() { Size = new Size(80, 50) })
+ {
+ using (ImageView view = new ImageView(image_path))
+ {
+ testingTarget.OnCreateOverlayImage(button, view);
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"OverlayAnimationButtonExtensionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("OverlayAnimationButtonExtension OnControlStateChanged.")]
+ [Property("SPEC", "Tizen.NUI.Components.OverlayAnimationButtonExtension.OnControlStateChanged C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void OverlayAnimationButtonExtensionOnControlStateChanged()
+ {
+ tlog.Debug(tag, $"OverlayAnimationButtonExtensionOnControlStateChanged START");
+
+ var testingTarget = new OverlayAnimationButtonExtension();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<OverlayAnimationButtonExtension>(testingTarget, "Should return OverlayAnimationButtonExtension instance.");
+
+ using (Button button = new Button() { Size = new Size(80, 50) })
+ {
+ ControlStateChangedEventArgs args = new ControlStateChangedEventArgs(ControlState.Pressed, ControlState.Selected);
+
+ try
+ {
+ using (ImageView view = new ImageView(image_path))
+ {
+ testingTarget.OnCreateOverlayImage(button, view);
+ testingTarget.OnControlStateChanged(button, args);
+ testingTarget.OnDispose(button);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"OverlayAnimationButtonExtensionOnControlStateChanged END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Extension;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/Extension/LottieButtonStyle")]
+ public class LottieButtonStyleTest
+ {
+ private const string tag = "NUITEST";
+ private string lottie_url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "lottie.json";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieButtonStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieButtonStyle.LottieButtonStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieButtonStyleConstructor()
+ {
+ tlog.Debug(tag, $"LottieButtonStyleConstructor START");
+
+ var testingTarget = new LottieButtonStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieButtonStyle>(testingTarget, "Should return LottieButtonStyle instance.");
+
+ tlog.Debug(tag, $"LottieButtonStyleConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieButtonStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieButtonStyle.LottieButtonStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieButtonStyleConstructorWithLottieButtonStyle()
+ {
+ tlog.Debug(tag, $"LottieButtonStyleConstructorWithLottieButtonStyle START");
+
+ var style = new LottieButtonStyle()
+ {
+ BackgroundColor = Color.Cyan
+ };
+
+ var testingTarget = new LottieButtonStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieButtonStyle>(testingTarget, "Should return LottieButtonStyle instance.");
+
+ testingTarget.LottieUrl = lottie_url;
+ tlog.Debug(tag, "LottieUrl : " + testingTarget.LottieUrl);
+
+ LottieFrameInfo info = new LottieFrameInfo(0, 100);
+ Selector<LottieFrameInfo> selector = new Selector<LottieFrameInfo>(info);
+
+ testingTarget.PlayRange = info;
+ tlog.Debug(tag, "PlayRange : " + testingTarget.PlayRange);
+
+ tlog.Debug(tag, $"LottieButtonStyleConstructorWithLottieButtonStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieButtonStyle CopyFrom.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieButtonStyle.CopyFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieButtonStyleCopyFrom()
+ {
+ tlog.Debug(tag, $"LottieButtonStyleCopyFrom START");
+
+ LottieFrameInfo info = new LottieFrameInfo(0, 100);
+ Selector<LottieFrameInfo> selector = new Selector<LottieFrameInfo>(info);
+
+ var style = new LottieButtonStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ LottieUrl = lottie_url,
+ PlayRange = info
+ };
+
+ var testingTarget = new LottieButtonStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieButtonStyle>(testingTarget, "Should return LottieButtonStyle instance.");
+
+ try
+ {
+ testingTarget.CopyFrom(style);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"LottieButtonStyleCopyFrom END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieButtonStyle CreateExtension.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieButtonStyle.CreateExtension M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieButtonStyleCreateExtension()
+ {
+ tlog.Debug(tag, $"LottieButtonStyleCreateExtension START");
+
+ LottieFrameInfo info = new LottieFrameInfo(0, 100);
+ Selector<LottieFrameInfo> selector = new Selector<LottieFrameInfo>(info);
+
+ var style = new LottieButtonStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ LottieUrl = lottie_url,
+ PlayRange = info
+ };
+
+ var testingTarget = new LottieButtonStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieButtonStyle>(testingTarget, "Should return LottieButtonStyle instance.");
+
+ try
+ {
+ testingTarget.CreateExtension();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"LottieButtonStyleCreateExtension END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Extension;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/Extension/LottieSwitchStyle")]
+ public class LottieSwitchStyleTest
+ {
+ private const string tag = "NUITEST";
+ private string lottie_url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "lottie.json";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieSwitchStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieSwitchStyle.LottieSwitchStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieSwitchStyleConstructor()
+ {
+ tlog.Debug(tag, $"LottieSwitchStyleConstructor START");
+
+ var testingTarget = new LottieSwitchStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieSwitchStyle>(testingTarget, "Should return LottieSwitchStyle instance.");
+
+ tlog.Debug(tag, $"LottieSwitchStyleConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieSwitchStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieSwitchStyle.LottieSwitchStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieSwitchStyleConstructorWithLottieSwitchStyle()
+ {
+ tlog.Debug(tag, $"LottieSwitchStyleConstructorWithLottieSwitchStyle START");
+
+ var style = new LottieSwitchStyle()
+ {
+ BackgroundColor = Color.Cyan
+ };
+
+ var testingTarget = new LottieSwitchStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieSwitchStyle>(testingTarget, "Should return LottieSwitchStyle instance.");
+
+ testingTarget.LottieUrl = lottie_url;
+ tlog.Debug(tag, "LottieUrl : " + testingTarget.LottieUrl);
+
+ LottieFrameInfo info = new LottieFrameInfo(0, 100);
+ Selector<LottieFrameInfo> selector = new Selector<LottieFrameInfo>(info);
+
+ testingTarget.PlayRange = info;
+ tlog.Debug(tag, "PlayRange : " + testingTarget.PlayRange);
+
+ tlog.Debug(tag, $"LottieSwitchStyleConstructorWithLottieSwitchStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieSwitchStyle CopyFrom.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieSwitchStyle.CopyFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieSwitchStyleCopyFrom()
+ {
+ tlog.Debug(tag, $"LottieSwitchStyleCopyFrom START");
+
+ LottieFrameInfo info = new LottieFrameInfo(0, 100);
+ Selector<LottieFrameInfo> selector = new Selector<LottieFrameInfo>(info);
+
+ var style = new LottieSwitchStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ LottieUrl = lottie_url,
+ PlayRange = info
+ };
+
+ var testingTarget = new LottieSwitchStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieSwitchStyle>(testingTarget, "Should return LottieSwitchStyle instance.");
+
+ try
+ {
+ testingTarget.CopyFrom(style);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"LottieSwitchStyleCopyFrom END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieSwitchStyle CreateExtension.")]
+ [Property("SPEC", "Tizen.NUI.Components.LottieSwitchStyle.CreateExtension M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieSwitchStyleCreateExtension()
+ {
+ tlog.Debug(tag, $"LottieSwitchStyleCreateExtension START");
+
+ LottieFrameInfo info = new LottieFrameInfo(0, 100);
+ Selector<LottieFrameInfo> selector = new Selector<LottieFrameInfo>(info);
+
+ var style = new LottieSwitchStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ LottieUrl = lottie_url,
+ PlayRange = info
+ };
+
+ var testingTarget = new LottieSwitchStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<LottieSwitchStyle>(testingTarget, "Should return LottieSwitchStyle instance.");
+
+ try
+ {
+ testingTarget.CreateExtension();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"LottieSwitchStyleCreateExtension END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/ImageScrollBarStyle")]
+ public class StyleImageScrollBarStyleTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBarStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.ScrollBarStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollBarStyleConstructor()
+ {
+ tlog.Debug(tag, $"ScrollBarStyleConstructor START");
+
+ var testingTarget = new ScrollBarStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBarStyle>(testingTarget, "Should return ScrollBarStyle instance.");
+
+ tlog.Debug(tag, $"ScrollBarStyleConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBarStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.ScrollBarStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollBarStyleConstructorWithScrollBarStyle()
+ {
+ tlog.Debug(tag, $"ScrollBarStyleConstructorWithScrollBarStyle START");
+
+ ScrollBarStyle style = new ScrollBarStyle();
+
+ var testingTarget = new ScrollBarStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBarStyle>(testingTarget, "Should return ScrollBarStyle instance.");
+
+ tlog.Debug(tag, $"ScrollBarStyleConstructorWithScrollBarStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBarStyle Track.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.Track A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollBarStyleTrack()
+ {
+ tlog.Debug(tag, $"ScrollBarStyleTrack START");
+
+ var testingTarget = new ScrollBarStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBarStyle>(testingTarget, "Should return ScrollBarStyle instance.");
+
+ ImageViewStyle track = new ImageViewStyle()
+ {
+ BackgroundColor = Color.Blue,
+ };
+
+ testingTarget.Track = track;
+ tlog.Debug(tag, "Track : " + testingTarget.Track);
+
+ tlog.Debug(tag, $"ScrollBarStyleTrack END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollBarStyle Thumb.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollBarStyle.Thumb A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollBarStyleThumb()
+ {
+ tlog.Debug(tag, $"ScrollBarStyleThumb START");
+
+ var testingTarget = new ScrollBarStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollBarStyle>(testingTarget, "Should return ScrollBarStyle instance.");
+
+ ImageViewStyle thumb = new ImageViewStyle()
+ {
+ BackgroundColor = Color.Green,
+ };
+
+ testingTarget.Thumb = thumb;
+ tlog.Debug(tag, "Thumb : " + testingTarget.Thumb);
+
+ tlog.Debug(tag, $"ScrollBarStyleThumb END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/PopupStyle")]
+ public class PopupStyleTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+ [Test]
+ [Category("P1")]
+ [Description("PopupStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.PopupStyle.PopupStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PopupStyleConstructor()
+ {
+ tlog.Debug(tag, $"PopupStyleConstructor START");
+
+ PopupStyle style = new PopupStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ };
+ var testingTarget = new PopupStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<PopupStyle>(testingTarget, "Should return PopupStyle instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PopupStyleConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/RecyclerViewItemStyle")]
+ public class RecyclerViewItemStyleTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RecyclerViewItemStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.RecyclerViewItemStyle.RecyclerViewItemStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RecyclerViewItemStyleConstructor()
+ {
+ tlog.Debug(tag, $"RecyclerViewItemStyleConstructor START");
+
+ var style = new RecyclerViewItemStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ };
+
+ var testingTarget = new RecyclerViewItemStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<RecyclerViewItemStyle>(testingTarget, "Should return RecyclerViewItemStyle instance.");
+
+ testingTarget.IsEnabled = true;
+ tlog.Debug(tag, "IsEnabled : " + testingTarget.IsEnabled);
+
+ testingTarget.IsSelectable = true;
+ tlog.Debug(tag, "IsSelectable : " + testingTarget.IsSelectable);
+
+ testingTarget.IsSelected = false;
+ tlog.Debug(tag, "IsSelected : " + testingTarget.IsSelected);
+
+ testingTarget.IsSelected = true;
+ tlog.Debug(tag, "IsSelected : " + testingTarget.IsSelected);
+
+ tlog.Debug(tag, $"RecyclerViewItemStyleConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/ScrollbarStyle")]
+ public class ScrollbarStyleTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollbarStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollbarStyle.ScrollbarStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarStyleConstructor()
+ {
+ tlog.Debug(tag, $"ScrollbarStyleConstructor START");
+
+ ScrollbarStyle style = new ScrollbarStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ TrackThickness = 1.0f,
+ TrackColor = Color.Red,
+ ThumbThickness = 0.3f,
+ ThumbColor = Color.Green,
+ ThumbVerticalImageUrl = image_path,
+ ThumbHorizontalImageUrl = image_path,
+ TrackPadding = 0,
+ };
+ var testingTarget = new ScrollbarStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollbarStyle>(testingTarget, "Should return ScrollbarStyle instance.");
+
+ tlog.Debug(tag, "TrackThickness : " + testingTarget.TrackThickness);
+ tlog.Debug(tag, "TrackColor : " + testingTarget.TrackColor);
+ tlog.Debug(tag, "ThumbThickness : " + testingTarget.ThumbThickness);
+ tlog.Debug(tag, "ThumbColor : " + testingTarget.ThumbColor);
+ tlog.Debug(tag, "ThumbVerticalImageUrl : " + testingTarget.ThumbVerticalImageUrl);
+ tlog.Debug(tag, "ThumbHorizontalImageUrl : " + testingTarget.ThumbHorizontalImageUrl);
+ tlog.Debug(tag, "TrackPadding : " + testingTarget.TrackPadding);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarStyleConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/TabButtonStyle")]
+ public class TabButtonStyleTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+ [Test]
+ [Category("P1")]
+ [Description("TabButtonStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabButtonStyle.TabButtonStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabButtonStyleConstructor()
+ {
+ tlog.Debug(tag, $"TabButtonStyleConstructor START");
+
+ TabButtonStyle style = new TabButtonStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ };
+ var testingTarget = new TabButtonStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabButtonStyle>(testingTarget, "Should return TabButtonStyle instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TabButtonStyleConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/TabStyle")]
+ public class TabStyleTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyTabStyle : TabStyle
+ {
+ public MyTabStyle() : base()
+ { }
+
+ public override void CopyFrom(BindableObject bindableObject)
+ {
+ base.CopyFrom(bindableObject);
+ }
+ }
+
+ internal class MyBindableObject : BindableObject
+ { }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabStyle.TabStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabStyleConstructor()
+ {
+ tlog.Debug(tag, $"TabStyleConstructor START");
+
+ var testingTarget = new TabStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabStyle>(testingTarget, "Should return TabStyle instance.");
+
+ tlog.Debug(tag, $"TabStyleConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabStyle.TabStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabStyleConstructorWithTabStyle()
+ {
+ tlog.Debug(tag, $"TabStyleConstructorWithTabStyle START");
+
+ TabStyle style = new TabStyle();
+
+ var testingTarget = new TabStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabStyle>(testingTarget, "Should return TabStyle instance.");
+
+ tlog.Debug(tag, $"ScrollBarStyleConstructorWithScrollBarStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabStyle UnderLine.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabStyle.UnderLine A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabStyleUnderLine()
+ {
+ tlog.Debug(tag, $"TabStyleUnderLine START");
+
+ var testingTarget = new TabStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabStyle>(testingTarget, "Should return TabStyle instance.");
+
+ ViewStyle underline = new ViewStyle()
+ {
+ Size = new Size(2, 18),
+ };
+
+ testingTarget.UnderLine = underline;
+ tlog.Debug(tag, "UnderLine : " + testingTarget.UnderLine);
+
+ tlog.Debug(tag, $"TabStyleUnderLine END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabStyle Text.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabStyle.Text A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabStyleText()
+ {
+ tlog.Debug(tag, $"TabStyleText START");
+
+ var testingTarget = new TabStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabStyle>(testingTarget, "Should return TabStyle instance.");
+
+ TextLabelStyle text = new TextLabelStyle()
+ {
+ Size = new Size(2, 18),
+ PointSize = 15.0f
+ };
+
+ testingTarget.Text = text;
+ tlog.Debug(tag, "Text : " + testingTarget.Text);
+
+ tlog.Debug(tag, $"TabStyleText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabStyle UseTextNaturalSize.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabStyle.UseTextNaturalSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabStyleUseTextNaturalSize()
+ {
+ tlog.Debug(tag, $"TabStyleUseTextNaturalSize START");
+
+ var testingTarget = new TabStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabStyle>(testingTarget, "Should return TabStyle instance.");
+
+ testingTarget.UseTextNaturalSize = true;
+ tlog.Debug(tag, "UseTextNaturalSize : " + testingTarget.UseTextNaturalSize);
+
+ testingTarget.UseTextNaturalSize = false;
+ tlog.Debug(tag, "UseTextNaturalSize : " + testingTarget.UseTextNaturalSize);
+
+ tlog.Debug(tag, $"TabStyleUseTextNaturalSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabStyle ItemSpace.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabStyle.ItemSpace A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabStyleItemSpace()
+ {
+ tlog.Debug(tag, $"TabStyleItemSpace START");
+
+ var testingTarget = new TabStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabStyle>(testingTarget, "Should return TabStyle instance.");
+
+ testingTarget.ItemSpace = 5;
+ tlog.Debug(tag, "ItemSpace : " + testingTarget.ItemSpace);
+
+ tlog.Debug(tag, $"TabStyleItemSpace END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabStyle ItemPadding.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabStyle.ItemPadding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabStyleItemPadding()
+ {
+ tlog.Debug(tag, $"TabStyleItemPadding START");
+
+ var testingTarget = new TabStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabStyle>(testingTarget, "Should return TabStyle instance.");
+
+ testingTarget.ItemPadding = new Extents(4, 4, 4, 4);
+ tlog.Debug(tag, "ItemPadding : " + testingTarget.ItemPadding);
+
+ tlog.Debug(tag, $"TabStyleItemPadding END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TabStyle CopyFrom.")]
+ [Property("SPEC", "Tizen.NUI.Components.TabStyle.CopyFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TabStyleCopyFrom()
+ {
+ tlog.Debug(tag, $"TabStyleCopyFrom START");
+
+ var testingTarget = new MyTabStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TabStyle>(testingTarget, "Should return TabStyle instance.");
+
+ TabStyle style = new TabStyle()
+ {
+ Size = new Size(10, 20),
+ };
+
+ try
+ {
+ testingTarget.CopyFrom(style);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"TabStyleCopyFrom END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/TimePickerStyle")]
+ public class TimePickerStyleTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TimePickerStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.TimePickerStyle.TimePickerStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimePickerStyleConstructor()
+ {
+ tlog.Debug(tag, $"TimePickerStyleConstructor START");
+
+ TimePickerStyle style = new TimePickerStyle()
+ {
+ BackgroundColor = Color.Cyan,
+ };
+ var testingTarget = new TimePickerStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TimePickerStyle>(testingTarget, "Should return TimePickerStyle instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TimePickerStyleConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Style/ToastStyle")]
+ public class ToastStyleTest
+ {
+ private const string tag = "NUITEST";
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ToastStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ToastStyle.ToastStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ToastStyleConstructor()
+ {
+ tlog.Debug(tag, $"ToastStyleConstructor START");
+
+ var testingTarget = new ToastStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ToastStyle>(testingTarget, "Should return ToastStyle instance.");
+
+ tlog.Debug(tag, $"ToastStyleConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ToastStyle constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.ToastStyle.ToastStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ToastStyleConstructorWithToastStyle()
+ {
+ tlog.Debug(tag, $"ToastStyleConstructorWithToastStyle START");
+
+ ToastStyle style = new ToastStyle();
+
+ var testingTarget = new ToastStyle(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ToastStyle>(testingTarget, "Should return ToastStyle instance.");
+
+ tlog.Debug(tag, $"ToastStyleConstructorWithToastStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ToastStyle Duration.")]
+ [Property("SPEC", "Tizen.NUI.Components.ToastStyle.Duration A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ToastStyleDuration()
+ {
+ tlog.Debug(tag, $"ToastStyleDuration START");
+
+ var testingTarget = new ToastStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ToastStyle>(testingTarget, "Should return ToastStyle instance.");
+
+ testingTarget.Duration = 500;
+ tlog.Debug(tag, "Duration :" + testingTarget.Duration);
+
+ tlog.Debug(tag, $"ToastStyleDuration END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ToastStyle Text.")]
+ [Property("SPEC", "Tizen.NUI.Components.ToastStyle.Text A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ToastStyleText()
+ {
+ tlog.Debug(tag, $"ToastStyleText START");
+
+ var testingTarget = new ToastStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ToastStyle>(testingTarget, "Should return ToastStyle instance.");
+
+ TextLabelStyle text = new TextLabelStyle()
+ {
+ Size = new Size(2, 18),
+ PointSize = 15.0f
+ };
+
+ testingTarget.Text = text;
+ tlog.Debug(tag, "Text : " + testingTarget.Text);
+
+ tlog.Debug(tag, $"ToastStyleText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ToastStyle CopyFrom.")]
+ [Property("SPEC", "Tizen.NUI.Components.ToastStyle.CopyFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ToastStyleCopyFrom()
+ {
+ tlog.Debug(tag, $"ToastStyleCopyFrom START");
+
+ var testingTarget = new ToastStyle();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ToastStyle>(testingTarget, "Should return TabStyle instance.");
+
+ ToastStyle style = new ToastStyle()
+ {
+ Size = new Size(10, 20),
+ };
+
+ try
+ {
+ testingTarget.CopyFrom(style);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ToastStyleCopyFrom END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Utils/Selector")]
+ public class SelectorTest
+ {
+ private const string tag = "NUITEST";
+ private string image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("IntSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.IntSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void IntSelectorClone()
+ {
+ tlog.Debug(tag, $"IntSelectorClone START");
+
+ var testingTarget = new IntSelector()
+ {
+ All = 10,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<IntSelector>(testingTarget, "Should return IntSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Int]'
+ // to type 'Tizen.NUI.Components.IntSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"IntSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FloatSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.FloatSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FloatSelectorClone()
+ {
+ tlog.Debug(tag, $"FloatSelectorClone START");
+
+ var testingTarget = new FloatSelector()
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<FloatSelector>(testingTarget, "Should return FloatSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Float]'
+ // to type 'Tizen.NUI.Components.FloatSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"FloatSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BoolSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.BoolSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BoolSelectorClone()
+ {
+ tlog.Debug(tag, $"BoolSelectorClone START");
+
+ var testingTarget = new BoolSelector()
+ {
+ All = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<BoolSelector>(testingTarget, "Should return BoolSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Bool]'
+ // to type 'Tizen.NUI.Components.BoolSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"BoolSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StringSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.StringSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StringSelectorClone()
+ {
+ tlog.Debug(tag, $"StringSelectorClone START");
+
+ Selector<string> selector = new Selector<string>
+ {
+ Pressed = image_path,
+ Disabled = image_path,
+ DisabledFocused = image_path,
+ DisabledSelected = image_path,
+ Other = image_path
+ };
+
+ var testingTarget = new StringSelector(selector);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<StringSelector>(testingTarget, "Should return StringSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.String]'
+ // to type 'Tizen.NUI.Components.StringSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"StringSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.ColorSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorSelectorClone()
+ {
+ tlog.Debug(tag, $"StringSelectorClone START");
+
+ var testingTarget = new ColorSelector()
+ {
+ All = new Color(0.43f, 0.43f, 0.43f, 0.1f),
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ColorSelector>(testingTarget, "Should return ColorSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Color]'
+ // to type 'Tizen.NUI.Components.ColorSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"ColorSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Size2DSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.Size2DSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Size2DSelectorClone()
+ {
+ tlog.Debug(tag, $"Size2DSelectorClone START");
+
+ var testingTarget = new Size2DSelector()
+ {
+ All = new Size2D(100, 200),
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Size2DSelector>(testingTarget, "Should return Size2DSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Size2D]'
+ // to type 'Tizen.NUI.Components.Size2DSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"Size2DSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Position2DSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.Position2DSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Position2DSelectorClone()
+ {
+ tlog.Debug(tag, $"Position2DSelectorClone START");
+
+ var testingTarget = new Position2DSelector()
+ {
+ All = new Position2D(100, 200),
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Position2DSelector>(testingTarget, "Should return Position2DSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Position2D]'
+ // to type 'Tizen.NUI.Components.Position2DSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"Position2DSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PositionSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.PositionSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PositionSelectorClone()
+ {
+ tlog.Debug(tag, $"PositionSelectorClone START");
+
+ var testingTarget = new PositionSelector()
+ {
+ All = new Position(100, 200),
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<PositionSelector>(testingTarget, "Should return PositionSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Position]'
+ // to type 'Tizen.NUI.Components.PositionSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"PositionSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Vector2Selector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.Vector2Selector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Vector2SelectorClone()
+ {
+ tlog.Debug(tag, $"Vector2SelectorClone START");
+
+ var testingTarget = new Vector2Selector()
+ {
+ All = new Vector2(100, 20)
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Vector2Selector>(testingTarget, "Should return Vector2Selector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Vector2]'
+ // to type 'Tizen.NUI.Components.Vector2Selector'
+
+ // To fix
+
+ tlog.Debug(tag, $"Vector2SelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Vector3Selector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.Vector3Selector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Vector3SelectorClone()
+ {
+ tlog.Debug(tag, $"Vector3SelectorClone START");
+
+ var testingTarget = new Vector3Selector()
+ {
+ All = new Vector3(100, 20, 0)
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Vector3Selector>(testingTarget, "Should return Vector3Selector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Vector3]'
+ // to type 'Tizen.NUI.Components.Vector3Selector'
+
+ // To fix
+
+ tlog.Debug(tag, $"Vector3SelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RectangleSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.RectangleSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RectangleSelectorClone()
+ {
+ tlog.Debug(tag, $"RectangleSelectorClone START");
+
+ var testingTarget = new RectangleSelector()
+ {
+ All = new Rectangle(5, 5, 5, 5)
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<RectangleSelector>(testingTarget, "Should return RectangleSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.Rectangle]'
+ // to type 'Tizen.NUI.Components.RectangleSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"RectangleSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("HorizontalAlignmentSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.HorizontalAlignmentSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void HorizontalAlignmentSelectorClone()
+ {
+ tlog.Debug(tag, $"HorizontalAlignmentSelectorClone START");
+
+ var testingTarget = new HorizontalAlignmentSelector()
+ {
+ All = HorizontalAlignment.End,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<HorizontalAlignmentSelector>(testingTarget, "Should return HorizontalAlignmentSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.HorizontalAlignment]'
+ // to type 'Tizen.NUI.Components.HorizontalAlignmentSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"HorizontalAlignmentSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VerticalAlignmentSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.VerticalAlignmentSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VerticalAlignmentSelectorClone()
+ {
+ tlog.Debug(tag, $"VerticalAlignmentSelectorClone START");
+
+ var testingTarget = new VerticalAlignmentSelector()
+ {
+ All = VerticalAlignment.Center,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<VerticalAlignmentSelector>(testingTarget, "Should return VerticalAlignmentSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.VerticalAlignment]'
+ // to type 'Tizen.NUI.Components.VerticalAlignmentSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"VerticalAlignmentSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AutoScrollStopModeSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.AutoScrollStopModeSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AutoScrollStopModeSelectorClone()
+ {
+ tlog.Debug(tag, $"AutoScrollStopModeSelectorClone START");
+
+ var testingTarget = new AutoScrollStopModeSelector()
+ {
+ All = AutoScrollStopMode.Immediate,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AutoScrollStopModeSelector>(testingTarget, "Should return AutoScrollStopModeSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.AutoScrollStopMode]'
+ // to type 'Tizen.NUI.Components.AutoScrollStopModeSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"AutoScrollStopModeSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResizePolicyTypeSelector Clone.")]
+ [Property("SPEC", "Tizen.NUI.Components.ResizePolicyTypeSelector.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ResizePolicyTypeSelectorClone()
+ {
+ tlog.Debug(tag, $"ResizePolicyTypeSelectorClone START");
+
+ var testingTarget = new ResizePolicyTypeSelector()
+ {
+ All = ResizePolicyType.FillToParent,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ResizePolicyTypeSelector>(testingTarget, "Should return ResizePolicyTypeSelector instance.");
+
+ try
+ {
+ var result = testingTarget.Clone();
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception)
+ {
+ // System.InvalidCastException : Unable to cast object
+ // of type 'Tizen.NUI.BaseComponents.Selector`1[Tizen.NUI.ResizePolicyType]'
+ // to type 'Tizen.NUI.Components.ResizePolicyTypeSelector'
+
+ // To fix
+
+ tlog.Debug(tag, $"ResizePolicyTypeSelectorClone END (OK)");
+ Assert.Pass("Passed!");
+ }
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using static Tizen.NUI.Components.StyleManager;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Utils/StyleManager")]
+ class TSStyleManager
+ {
+ private const string tag = "NUITEST";
+
+ internal class FoodRadioButtonStyle : StyleBase
+ {
+ public ViewStyle MyGetViewStyle()
+ {
+ base.GetViewStyle();
+ ButtonStyle style = new ButtonStyle
+ {
+ Icon = new ImageViewStyle
+ {
+ Size = new Size(48, 48),
+ Position = new Position(0, 0),
+ ResourceUrl = new StringSelector
+ {
+ Normal = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png",
+ Selected = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "arrow.png",
+ Disabled = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "button_9patch.png",
+ DisabledSelected = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png",
+ },
+ Opacity = new FloatSelector
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ },
+ };
+
+ return style;
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StyleManager Theme.")]
+ [Property("SPEC", "Tizen.NUI.Components.StyleManager.Theme A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void StyleManagerTheme()
+ {
+ tlog.Debug(tag, $"StyleManagerTheme START");
+
+ var testingTarget = StyleManager.Instance;
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<StyleManager>(testingTarget, "Should return StyleManager instance.");
+
+ tlog.Debug(tag, "Theme : " + testingTarget.Theme);
+
+ Theme theme = new Theme()
+ {
+ Id = "theme",
+ Version = "1.0",
+ };
+ testingTarget.Theme = theme.Id;
+
+ tlog.Debug(tag, $"StyleManagerTheme END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StyleManager GetViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.StyleManager.GetViewStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void StyleManagerGetViewStyle()
+ {
+ tlog.Debug(tag, $"StyleManagerGetViewStyle START");
+
+ var testingTarget = StyleManager.Instance;
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<StyleManager>(testingTarget, "Should return StyleManager instance.");
+
+ StyleManager.Instance.RegisterStyle("RadioButton", "Food", typeof(FoodRadioButtonStyle), true);
+
+ var result = testingTarget.GetViewStyle("RadioButton");
+ tlog.Debug(tag, "GetViewStyle : " + result);
+
+ tlog.Debug(tag, $"StyleManagerGetViewStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("StyleManager GetViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.StyleManager.GetViewStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void StyleManagerGetViewStyleGetNullStyle()
+ {
+ tlog.Debug(tag, $"StyleManagerGetViewStyleGetNullStyle START");
+
+ var testingTarget = StyleManager.Instance;
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<StyleManager>(testingTarget, "Should return StyleManager instance.");
+
+ string style = null;
+ var result = testingTarget.GetViewStyle(style);
+ tlog.Debug(tag, "GetViewStyle : " + result);
+
+ tlog.Debug(tag, $"StyleManagerGetViewStyleGetNullStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StyleManager RegisterComponentStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterComponentStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void StyleManagerRegisterComponentStyle()
+ {
+ tlog.Debug(tag, $"StyleManagerRegisterComponentStyle START");
+
+ var testingTarget = StyleManager.Instance;
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<StyleManager>(testingTarget, "Should return StyleManager instance.");
+
+ StyleManager.Instance.RegisterComponentStyle("RadioButton", typeof(RadioButton), typeof(FoodRadioButtonStyle));
+
+ var result = testingTarget.GetComponentStyle(typeof(RadioButton));
+ tlog.Debug(tag, "GetComponentStyle : " + result);
+
+ tlog.Debug(tag, $"StyleManagerRegisterComponentStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ThemeChangeEventArgs CurrentTheme.")]
+ [Property("SPEC", "Tizen.NUI.Components.ThemeChangeEventArgs.CurrentTheme M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ThemeChangeEventArgsCurrentTheme()
+ {
+ tlog.Debug(tag, $"ThemeChangeEventArgsCurrentTheme START");
+
+ var testingTarget = new ThemeChangeEventArgs();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ThemeChangeEventArgs>(testingTarget, "Should return ThemeChangeEventArgs instance.");
+
+ testingTarget.CurrentTheme = "themeTest";
+ tlog.Debug(tag, "CurrentTheme : " + testingTarget.CurrentTheme);
+
+ tlog.Debug(tag, $"ThemeChangeEventArgsCurrentTheme END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("StyleManager RegisterStyle.")]
+ [Property("SPEC", "Tizen.NUI.Components.StyleManager.RegisterStyle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void StyleManagerRegisterStyle()
+ {
+ tlog.Debug(tag, $"StyleManagerRegisterComponentStyle START");
+
+ var testingTarget = StyleManager.Instance;
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<StyleManager>(testingTarget, "Should return StyleManager instance.");
+
+ try
+ {
+ string style = null;
+ StyleManager.Instance.RegisterStyle(style, "Food", typeof(FoodRadioButtonStyle));
+ }
+ catch (InvalidOperationException)
+ {
+ tlog.Debug(tag, $"StyleManagerRegisterComponentStyle END (OK)");
+ Assert.Pass("Caught InvalidOperationException : Passed!");
+ }
+ }
+ }
+}
</ui-application>
<privileges>
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ <privilege>http://tizen.org/privilege/window.priority.set</privilege>
</privileges>
</manifest>