{
base.CreateViewStyle();
}
+
+ public string OnAccessibilityGetName()
+ {
+ return base.AccessibilityGetName();
+ }
+
+ public View OnPassFocusableViewInsideIfNeeded()
+ {
+ return base.PassFocusableViewInsideIfNeeded();
+ }
}
[SetUp]
testingTarget.Dispose();
tlog.Debug(tag, $"AppBarCreateViewStyle END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("AppBar AccessibilityGetName.")]
+ [Property("SPEC", "Tizen.NUI.Components.AppBar.AccessibilityGetName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AppBarAccessibilityGetName()
+ {
+ tlog.Debug(tag, $"AppBarAccessibilityGetName START");
+
+ var testingTarget = new MyAppBar()
+ {
+ Size = new Size(200, 600),
+ Focusable = true,
+ Title = "AppBarTest"
+ };
+
+ var result = testingTarget.OnAccessibilityGetName();
+ tlog.Debug(tag, "Title : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AppBarAccessibilityGetName END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AppBar GetNextFocusableView.")]
+ [Property("SPEC", "Tizen.NUI.Components.AppBar.GetNextFocusableView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AppBarGetNextFocusableView()
+ {
+ tlog.Debug(tag, $"AppBarGetNextFocusableView START");
+
+ var testingTarget = new AppBar()
+ {
+ Size = new Size(200, 600),
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AppBar>(testingTarget, "Should return AppBar instance.");
+
+ testingTarget.NavigationContent = new View()
+ {
+ Size = new Size(200, 500),
+ };
+
+ testingTarget.TitleContent = new View()
+ {
+ Size = new Size(200, 100),
+ };
+
+ try
+ {
+ testingTarget.GetNextFocusableView(testingTarget.TitleContent, View.FocusDirection.Down, true);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AppBarGetNextFocusableView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AppBar PassFocusableViewInsideIfNeeded.")]
+ [Property("SPEC", "Tizen.NUI.Components.AppBar.PassFocusableViewInsideIfNeeded M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AppBarPassFocusableViewInsideIfNeeded()
+ {
+ tlog.Debug(tag, $"AppBarPassFocusableViewInsideIfNeeded START");
+
+ var testingTarget = new MyAppBar()
+ {
+ Size = new Size(200, 600),
+ Focusable = true,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AppBar>(testingTarget, "Should return AppBar instance.");
+
+ testingTarget.NavigationContent = new View()
+ {
+ Size = new Size(200, 500),
+ };
+
+ testingTarget.TitleContent = new View()
+ {
+ Size = new Size(200, 100),
+ };
+
+ try
+ {
+ testingTarget.OnPassFocusableViewInsideIfNeeded();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AppBarPassFocusableViewInsideIfNeeded END (OK)");
+ }
}
}
private DataTemplate testDataTemplate;
+ internal class CollectionViewImpl : CollectionView
+ {
+ public CollectionViewImpl(IEnumerable itemsSource, ItemsLayouter layouter, DataTemplate template) : base(itemsSource, layouter, template)
+ { }
+
+ public bool OnAccessibilityScrollToChild(View child)
+ {
+ return base.AccessibilityScrollToChild(child);
+ }
+
+ public float OnAdjustTargetPositionOfScrollAnimation(float position)
+ {
+ return base.AdjustTargetPositionOfScrollAnimation(position);
+ }
+
+ public void OnScrollingImpl(object source, ScrollEventArgs args)
+ {
+ base.OnScrolling(source, args);
+ }
+ }
+
[SetUp]
public void Init()
{
}
tlog.Debug(tag, $"CollectionViewGetNextFocusableView END (OK)");
}
+
+ [Category("P1")]
+ [Description("CollectionView OnRelayout.")]
+ [Property("SPEC", "Tizen.NUI.Components.CollectionView.OnRelayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public async Task CollectionViewOnRelayout()
+ {
+ tlog.Debug(tag, $"CollectionViewOnRelayout START");
+
+ var testingTarget = new CollectionView()
+ {
+ Size = new Size(100, 200),
+ Focusable = true,
+ };
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<CollectionView>(testingTarget, "should be an instance of testing target class!");
+
+ using (Vector2 vec = new Vector2(200, 600))
+ {
+ try
+ {
+ testingTarget.OnRelayout(vec, null);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CollectionViewOnRelayout END (OK)");
+ }
+
+ [Category("P1")]
+ [Description("CollectionView AccessibilityScrollToChild.")]
+ [Property("SPEC", "Tizen.NUI.Components.CollectionView.AccessibilityScrollToChild M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CollectionViewAccessibilityScrollToChild()
+ {
+ tlog.Debug(tag, $"CollectionViewAccessibilityScrollToChild START");
+
+ var model = new TestModel();
+ var testingTarget = new CollectionViewImpl(model, new LinearLayouter(), testDataTemplate)
+ {
+ ScrollingDirection = ScrollableBase.Direction.Horizontal
+ };
+
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<CollectionView>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget.OnAccessibilityScrollToChild(testingTarget.GetChildAt(1));
+ tlog.Debug(tag, "AccessibilityScrollToChild : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CollectionViewAccessibilityScrollToChild END (OK)");
+ }
+
+ [Category("P1")]
+ [Description("CollectionView AdjustTargetPositionOfScrollAnimation.")]
+ [Property("SPEC", "Tizen.NUI.Components.CollectionView.AdjustTargetPositionOfScrollAnimation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CollectionViewAdjustTargetPositionOfScrollAnimation()
+ {
+ tlog.Debug(tag, $"CollectionViewAdjustTargetPositionOfScrollAnimation START");
+
+ var model = new TestModel();
+ var testingTarget = new CollectionViewImpl(model, new LinearLayouter(), testDataTemplate)
+ {
+ ScrollingDirection = ScrollableBase.Direction.Horizontal
+ };
+
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<CollectionView>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget.OnAdjustTargetPositionOfScrollAnimation(0.5f);
+ tlog.Debug(tag, "AdjustTargetPositionOfScrollAnimation : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CollectionViewAdjustTargetPositionOfScrollAnimation END (OK)");
+ }
+
+ [Category("P1")]
+ [Description("CollectionView OnScrolling.")]
+ [Property("SPEC", "Tizen.NUI.Components.CollectionView.OnScrolling M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CollectionViewOnScrolling()
+ {
+ tlog.Debug(tag, $"CollectionViewOnScrolling START");
+
+ var model = new TestModel();
+ var testingTarget = new CollectionViewImpl(model, new LinearLayouter(), testDataTemplate)
+ {
+ ScrollingDirection = ScrollableBase.Direction.Horizontal
+ };
+
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<CollectionView>(testingTarget, "should be an instance of testing target class!");
+
+ using (Position pos = new Position(1000, 800))
+ {
+ testingTarget.OnScrollingImpl(testingTarget, new ScrollEventArgs(pos));
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CollectionViewOnScrolling END (OK)");
+ }
}
}
{ }
}
- internal class RecyclerViewImpl : RecyclerView
- {
- public RecyclerViewImpl() : base()
- {
- base.InternalItemsLayouter = new ItemsLayouterImpl();
- }
-
- public float OnAdjustTargetPositionOfScrollAnimation(float position)
- {
- return base.AdjustTargetPositionOfScrollAnimation(position);
- }
- }
-
internal class TestItem
{
int index;
}
}
+ internal class RecyclerViewImpl : RecyclerView
+ {
+ public RecyclerViewImpl() : base()
+ {
+ base.InternalItemsLayouter = new ItemsLayouterImpl();
+ }
+
+ public float OnAdjustTargetPositionOfScrollAnimation(float position)
+ {
+ return base.AdjustTargetPositionOfScrollAnimation(position);
+ }
+
+ public void OnScrollingImpl(object source, ScrollEventArgs args)
+ {
+ base.OnScrolling(source, args);
+ }
+ }
+
[SetUp]
public void Init()
{
testingTarget.Dispose();
tlog.Debug(tag, $"RecyclerViewAdjustTargetPositionOfScrollAnimation END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("RecyclerView OnScrolling.")]
+ [Property("SPEC", "Tizen.NUI.Components.RecyclerView.OnScrolling M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RecyclerViewOnScrolling()
+ {
+ tlog.Debug(tag, $"RecyclerViewOnScrolling START");
+
+ var testingTarget = new RecyclerViewImpl()
+ {
+ Size = new Size(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height),
+ };
+
+ CreateTestSource(50);
+ testingTarget.ItemsSource = Source;
+
+
+ testingTarget.ItemTemplate = new DataTemplate(() =>
+ {
+ var item = new RecyclerViewItem()
+ {
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ WidthSpecification = 200,
+ };
+ item.SetBinding(View.BackgroundColorProperty, "BgColor");
+
+ var label = new TextLabel()
+ {
+ ParentOrigin = Tizen.NUI.ParentOrigin.Center,
+ PivotPoint = Tizen.NUI.PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ };
+ label.PixelSize = 30;
+ label.SetBinding(TextLabel.TextProperty, "Index");
+ item.Add(label);
+
+ return item;
+ });
+
+ using (Position pos = new Position(1000, 800))
+ {
+ testingTarget.OnScrollingImpl(testingTarget, new ScrollEventArgs(pos));
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"RecyclerViewOnScrolling END (OK)");
+ }
}
}
var index = testingTarget.IndexOf("China");
tlog.Debug(tag, "IndexOf : " + index);
+ // this[index]
+ tlog.Debug(tag, "this[index] : " + testingTarget[index]);
var result = testingTarget.GetEnumerator();
tlog.Debug(tag, "Enumerator : " + result);
{
return GetAccessibilityStates();
}
+
+ public string OnAccessibilityGetName()
+ {
+ return base.AccessibilityGetName();
+ }
+
+ public string OnAccessibilityGetDescription()
+ {
+ return base.AccessibilityGetDescription();
+ }
}
[SetUp]
testingTarget.Dispose();
tlog.Debug(tag, $"AlertDialogActions END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("AlertDialog AccessibilityGetName.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.AccessibilityGetName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlertDialogAccessibilityGetName()
+ {
+ tlog.Debug(tag, $"AlertDialogAccessibilityGetName START");
+
+ var testingTarget = new MyAlertDialog();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AlertDialog>(testingTarget, "Should return AlertDialog instance.");
+
+ testingTarget.Title = "AlertTest";
+ var result = testingTarget.OnAccessibilityGetName();
+ tlog.Debug(tag, "AccessibilityGetName : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlertDialogAccessibilityGetName END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlertDialog AccessibilityGetDescription.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.AccessibilityGetDescription M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlertDialogAccessibilityGetDescription()
+ {
+ tlog.Debug(tag, $"AlertDialogAccessibilityGetDescription START");
+
+ var testingTarget = new MyAlertDialog();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<AlertDialog>(testingTarget, "Should return AlertDialog instance.");
+
+ testingTarget.Content = new TextLabel()
+ {
+ //Text = "AlertContent"
+ };
+ testingTarget.Message = "AlertContent";
+ var result = testingTarget.OnAccessibilityGetDescription();
+ tlog.Debug(tag, "AccessibilityGetDescription : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlertDialogAccessibilityGetDescription END (OK)");
+ }
}
}
using Tizen.NUI.Components;
using Tizen.NUI.BaseComponents;
using System.Threading.Tasks;
+using System.Resources;
namespace Tizen.NUI.Components.Devel.Tests.testcase.Controls
NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+ NUIApplication.MultilingualResourceManager = new ResourceManager(typeof(NUIApplication));
+
if (NUIApplication.MultilingualResourceManager != null)
{
testingTarget.TranslatableText = "Test TranslatableText";
testingTarget.Dispose();
tlog.Debug(tag, $"ButtonOnFocusLost END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Button ItemHorizontalAlignment.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.ItemHorizontalAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ButtonItemHorizontalAlignment()
+ {
+ tlog.Debug(tag, $"ButtonItemHorizontalAlignment 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.");
+
+ testingTarget.ItemHorizontalAlignment = HorizontalAlignment.Begin;
+ tlog.Debug(tag, "ItemHorizontalAlignment" + testingTarget.ItemHorizontalAlignment);
+
+ testingTarget.ItemVerticalAlignment = VerticalAlignment.Center;
+ tlog.Debug(tag, "ItemVerticalAlignment" + testingTarget.ItemVerticalAlignment);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ButtonItemHorizontalAlignment END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"ControlCreateViewStyle END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Control PassFocusableViewInsideIfNeeded.")]
+ [Property("SPEC", "Tizen.NUI.Components.Control.PassFocusableViewInsideIfNeeded M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlPassFocusableViewInsideIfNeeded()
+ {
+ tlog.Debug(tag, $"ControlPassFocusableViewInsideIfNeeded START");
+
+ var testingTarget = new Control();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Control>(testingTarget, "Should return Control instance.");
+
+ var result = testingTarget.PassFocusableViewInsideIfNeeded();
+ tlog.Debug(tag, "PassFocusableViewInsideIfNeeded : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ControlPassFocusableViewInsideIfNeeded END (OK)");
+ }
}
}
[Test]
[Category("P1")]
[Description("DatePicker constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.DatePicker.DatePicker C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void DatePickerConstructorWithString()
+ {
+ tlog.Debug(tag, $"DatePickerConstructorWithString START");
+
+ try
+ {
+ new DatePicker(Tizen.NUI.DefaultThemeCreator.DefaultId);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"DatePickerConstructorWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("DatePicker constructor.")]
[Property("SPEC", "Tizen.NUI.Components.DatePicker.DatePicker M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Test]
[Category("P1")]
+ [Description("DatePicker GetNextFocusableView.")]
+ [Property("SPEC", "Tizen.NUI.Components.DatePicker.GetNextFocusableView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void DatePickerGetNextFocusableView()
+ {
+ tlog.Debug(tag, $"DatePickerGetNextFocusableView START");
+
+ DatePickerStyle dpStyle = new DatePickerStyle()
+ {
+ Pickers = new PickerStyle()
+ {
+ StartScrollOffset = new Size(10, 10),
+ Divider = new ViewStyle()
+ {
+ Position = new Position(30, 40),
+ }
+ },
+ CellPadding = new Size2D(20, 20),
+ };
+
+ var testingTarget = new DatePicker(dpStyle);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<DatePicker>(testingTarget, "Should return DatePicker instance.");
+
+ try
+ {
+ testingTarget.GetNextFocusableView(null, View.FocusDirection.Down, true);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"DatePickerGetNextFocusableView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("DateChangedEventArgs constructor.")]
[Property("SPEC", "Tizen.NUI.Components.DateChangedEventArgs.DateChangedEventArgs C")]
[Property("SPEC_URL", "-")]
Assert.Pass("Caught ArgumentOutOfRangeException : Passed!");
}
}
+
+ [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 ScrollBarConstructorWithString()
+ {
+ tlog.Debug(tag, $"ScrollBarConstructorWithString START");
+
+ try
+ {
+ new ScrollBar(Tizen.NUI.DefaultThemeCreator.DefaultId);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ScrollBarConstructorWithString END (OK)");
+ }
}
}
--- /dev/null
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Loading")]
+ public class LoadingTest
+ {
+ private const string tag = "NUITEST";
+ private string 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("Loading ImageList.")]
+ [Property("SPEC", "Tizen.NUI.Components.Loading.ImageList A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LoadingImageList()
+ {
+ tlog.Debug(tag, $"LoadingImageList START");
+
+ string[] imageArray = new string[36];
+ for (int i = 0; i < 36; i++)
+ {
+
+ imageArray[i] = path;
+
+ }
+
+ var testingTarget = new Loading()
+ {
+ Size = new Size(100, 100),
+ Margin = new Extents(200, 0, 0, 0),
+ ImageArray = imageArray
+ };
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Loading>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget.ImageList;
+ tlog.Debug(tag, "Count : " + result.Count);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"LoadingImageList END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Loading Play.")]
+ [Property("SPEC", "Tizen.NUI.Components.Loading.Play M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LoadingPlay()
+ {
+ tlog.Debug(tag, $"LoadingPlay START");
+
+ string[] imageArray = new string[36];
+ for (int i = 0; i < 36; i++)
+ {
+
+ imageArray[i] = path;
+
+ }
+
+ var testingTarget = new Loading()
+ {
+ Size = new Size(100, 100),
+ Margin = new Extents(200, 0, 0, 0),
+ ImageArray = imageArray
+ };
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Loading>(testingTarget, "should be an instance of testing target class!");
+
+ try
+ {
+ testingTarget.Play();
+ testingTarget.Pause();
+ testingTarget.Play();
+ testingTarget.Stop();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"LoadingPlay END (OK)");
+ }
+ }
+}
[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 PickerConstructorWithPickStyle()
+ {
+ tlog.Debug(tag, $"PickerConstructorWithPickStyle START");
+
+ PickerStyle style = new PickerStyle()
+ {
+ Divider = new ViewStyle()
+ {
+ Focusable = true,
+ Size = new Size(100, 2),
+ Position = new Position(100, 200)
+ },
+ };
+
+ var testingTarget = new Picker(style);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Picker>(testingTarget, "Should return Picker instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PickerConstructorWithPickStyle END (OK)");
+ }
+
+ [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 PickerConstructorWithString()
+ {
+ tlog.Debug(tag, $"PickerConstructorWithString START");
+
+ try
+ {
+ new Picker(Tizen.NUI.DefaultThemeCreator.DefaultId);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"PickerConstructorWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Picker DisplayedValues.")]
[Property("SPEC", "Tizen.NUI.Components.Picker.DisplayedValues A")]
[Property("SPEC_URL", "-")]
--- /dev/null
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Components.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Controls/Progress")]
+ public class ProgressTest
+ {
+ 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!");
+ }
+
+ internal class ProgressImpl : Progress
+ {
+ public ProgressImpl() : base()
+ { }
+
+ public void OnEnabledImpl(bool enabled)
+ {
+ base.OnEnabled(enabled);
+ }
+
+ public bool AccessibilityShouldReportZeroChildrenImpl()
+ {
+ return base.AccessibilityShouldReportZeroChildren();
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Progress OnEnabled.")]
+ [Property("SPEC", "Tizen.NUI.Components.Progress.OnEnabled M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ProgressOnEnabled()
+ {
+ tlog.Debug(tag, $"ProgressOnEnabled START");
+
+ var testingTarget = new ProgressImpl();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ProgressImpl>(testingTarget, "Should return ProgressImpl instance.");
+
+ try
+ {
+ testingTarget.OnEnabledImpl(true);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ProgressOnEnabled END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Progress OnRelayout.")]
+ [Property("SPEC", "Tizen.NUI.Components.Progress.OnRelayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ProgressOnRelayout()
+ {
+ tlog.Debug(tag, $"ProgressOnEnabled START");
+
+ var testingTarget = new ProgressImpl()
+ {
+ Size = new Size(100, 200)
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ProgressImpl>(testingTarget, "Should return ProgressImpl instance.");
+
+ try
+ {
+ testingTarget.OnRelayout(new Vector2(1920, 1080), null);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ProgressOnEnabled END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Progress AccessibilityShouldReportZeroChildren.")]
+ [Property("SPEC", "Tizen.NUI.Components.Progress.AccessibilityShouldReportZeroChildren M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ProgressAccessibilityShouldReportZeroChildren()
+ {
+ tlog.Debug(tag, $"ProgressAccessibilityShouldReportZeroChildren START");
+
+ var testingTarget = new ProgressImpl()
+ {
+ Size = new Size(100, 200)
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ProgressImpl>(testingTarget, "Should return ProgressImpl instance.");
+
+ var result = testingTarget.AccessibilityShouldReportZeroChildrenImpl();
+ tlog.Debug(tag, "AccessibilityShouldReportZeroChildren : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ProgressAccessibilityShouldReportZeroChildren END (OK)");
+ }
+ }
+}
testingTarget.Dispose();
tlog.Debug(tag, $"ScrollableBaseAccessibilityScrollToChild END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase EnableOverShootingEffect")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.EnableOverShootingEffect A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseEnableOverShootingEffect()
+ {
+ tlog.Debug(tag, $"ScrollableBaseEnableOverShootingEffect START");
+
+ var testingTarget = new MyScrollableBase()
+ {
+ Size = new Size(2000, 200),
+ BackgroundColor = Color.Cyan,
+ ScrollingDirection = ScrollableBase.Direction.Horizontal,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ testingTarget.EnableOverShootingEffect = true;
+ tlog.Debug(tag, "EnableOverShootingEffect : " + testingTarget.EnableOverShootingEffect);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseEnableOverShootingEffect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableBase BaseRemove")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.BaseRemove M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableBaseBaseRemove()
+ {
+ tlog.Debug(tag, $"ScrollableBaseBaseRemove START");
+
+ var testingTarget = new MyScrollableBase()
+ {
+ Size = new Size(2000, 200),
+ BackgroundColor = Color.Cyan,
+ ScrollingDirection = ScrollableBase.Direction.Horizontal,
+ };
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<ScrollableBase>(testingTarget, "Should return ScrollableBase instance.");
+
+ using (View view = new View() { Size = new Size(100, 200), })
+ {
+ testingTarget.Add(view);
+
+ try
+ {
+ testingTarget.BaseRemove(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollableBaseBaseRemove END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"ScrollbarScrollTo END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar TrackPadding.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.TrackPadding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarTrackPadding()
+ {
+ tlog.Debug(tag, $"ScrollbarTrackPadding START");
+
+ var testingTarget = new Scrollbar(1280, 1200, 300, true);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ testingTarget.TrackPadding = new Extents(20, 20, 20, 0);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarTrackPadding END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Scrollbar CalculateThumbPaddingPosition.")]
+ [Property("SPEC", "Tizen.NUI.Components.Scrollbar.CalculateThumbPaddingPosition M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollbarCalculateThumbPaddingPositionVertical()
+ {
+ tlog.Debug(tag, $"ScrollbarCalculateThumbPaddingPositionVertical START");
+
+ var testingTarget = new Scrollbar(1280, 1200, 300, false);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Scrollbar>(testingTarget, "Should return Scrollbar instance.");
+
+ testingTarget.TrackPadding = new Extents(20, 20, 20, 0);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ScrollbarCalculateThumbPaddingPositionVertical END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"SliderOnUpdateDirectionIsHorizontal END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Slider OnKeyboardEnter.")]
+ [Property("SPEC", "Tizen.NUI.Components.Slider.OnKeyboardEnter M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SliderOnKeyboardEnter()
+ {
+ tlog.Debug(tag, $"SliderOnKeyboardEnter START");
+
+ var testingTarget = new Slider();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Slider>(testingTarget, "Should return Slider instance.");
+
+ try
+ {
+ var result = testingTarget.OnKeyboardEnter();
+ tlog.Debug(tag, "OnKeyboardEnter : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SliderOnKeyboardEnter END (OK)");
+ }
}
}
[Test]
[Category("P1")]
- [Description("Switch OnKey.")]
+ [Description("Switch OnControlStateChanged.")]
[Property("SPEC", "Tizen.NUI.Components.Switch.OnControlStateChanged M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
testingTarget.Dispose();
tlog.Debug(tag, $"SwitchOnControlStateChanged END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Switch OnTouch.")]
+ [Property("SPEC", "Tizen.NUI.Components.Switch.OnTouch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void SwitchOnTouch()
+ {
+ tlog.Debug(tag, $"SwitchOnTouch START");
+
+ var testingTarget = new Switch();
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<Switch>(testingTarget, "Should return Switch instance.");
+
+ using (Touch touch = new Touch())
+ {
+ try
+ {
+ testingTarget.OnTouch(touch);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"SwitchOnTouch END (OK)");
+ }
}
}
[Test]
[Category("P1")]
+ [Description("TimePicker constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.TimePicker.TimePicker C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONST")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimePickerConstructor()
+ {
+ tlog.Debug(tag, $"TimePickerConstructor START");
+
+ TimePickerStyle ts = new TimePickerStyle()
+ {
+ Pickers = new PickerStyle()
+ {
+ Divider = new ViewStyle()
+ {
+ Position = new Position(100, 100),
+ }
+ }
+ };
+
+ var testingTarget = new TimePicker(ts);
+ Assert.IsNotNull(testingTarget, "null handle");
+ Assert.IsInstanceOf<TimePicker>(testingTarget, "Should return TimePicker instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TimePickerConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TimePicker constructor.")]
+ [Property("SPEC", "Tizen.NUI.Components.TimePicker.TimePicker C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONST")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimePickerConstructorWithString()
+ {
+ tlog.Debug(tag, $"TimePickerConstructorWithString START");
+
+ try
+ {
+ new TimePicker(Tizen.NUI.DefaultThemeCreator.DefaultId);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"TimePickerConstructorWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("TimePicker Time.")]
[Property("SPEC", "Tizen.NUI.Components.TimePicker.Time A")]
[Property("SPEC_URL", "-")]
tlog.Debug(tag, $"TimeChangedEventArgsConstructor END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("TimePicker GetNextFocusableView.")]
+ [Property("SPEC", "Tizen.NUI.Components.TimePicker.GetNextFocusableView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimePickerGetNextFocusableView()
+ {
+ tlog.Debug(tag, $"TimePickerGetNextFocusableView START");
+
+ TimePickerStyle ts = new TimePickerStyle()
+ {
+ Pickers = new PickerStyle()
+ {
+ StartScrollOffset = new Size(10, 10),
+ Divider = new ViewStyle()
+ {
+ Position = new Position(30, 40),
+ }
+ },
+ CellPadding = new Size2D(20, 20),
+ };
+
+ var testingTarget = new TimePicker(ts);
+
+ try
+ {
+ testingTarget.GetNextFocusableView(null, View.FocusDirection.Down, true);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"TimePickerGetNextFocusableView END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"ToastApplyStyle END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Toast construtor.")]
+ [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 ToastConstructorWithString()
+ {
+ tlog.Debug(tag, $"ToastConstructorWithString START");
+
+ try
+ {
+ new Toast(Tizen.NUI.DefaultThemeCreator.DefaultId);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ToastConstructorWithString END (OK)");
+ }
}
}