--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/AnimatedImageView")]
+ public class PublicAnimatedImageViewTest
+ {
+ private const string tag = "NUITEST";
+ private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MyAnimatedImageView : AnimatedImageView
+ {
+ public MyAnimatedImageView()
+ { }
+
+ public void OnDispose(DisposeTypes type)
+ {
+ base.Dispose(type);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView constructor.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.AnimatedImageView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewConstructor()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewConstructor START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView Dispose.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewDispose()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewDispose START");
+
+ var testingTarget = new MyAnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"AnimatedImageViewDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView ResourceUrl.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.ResourceUrl A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewResourceUrl()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewResourceUrl START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ testingTarget.ResourceUrl = url;
+ Assert.AreEqual(url, testingTarget.ResourceUrl, "Should be equal");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewResourceUrl END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView URLs.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.URLs A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewURLs()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewURLs START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ Assert.IsNotNull(testingTarget.URLs);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewURLs END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView BatchSize.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.BatchSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewBatchSize()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewBatchSize START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ Assert.AreEqual(1, testingTarget.BatchSize, "Should be equal!");
+
+ testingTarget.BatchSize = 2;
+ Assert.AreEqual(2, testingTarget.BatchSize, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewBatchSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView CacheSize.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.CacheSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewCacheSize()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewCacheSize START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ Assert.AreEqual(1, testingTarget.CacheSize, "Should be equal!");
+
+ testingTarget.CacheSize = 2;
+ Assert.AreEqual(2, testingTarget.CacheSize, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewCacheSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView FrameDelay.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.FrameDelay A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewFrameDelay()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewFrameDelay START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ testingTarget.FrameDelay = 300;
+ Assert.AreEqual(300, testingTarget.FrameDelay, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewFrameDelay END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView LoopCount.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.LoopCount A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewLoopCount()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewLoopCount START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ testingTarget.LoopCount = 3;
+ Assert.AreEqual(3, testingTarget.LoopCount, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewLoopCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView StopBehavior.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.StopBehavior A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewStopBehavior()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewStopBehavior START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ testingTarget.StopBehavior = AnimatedImageView.StopBehaviorType.MinimumFrame;
+ Assert.AreEqual(AnimatedImageView.StopBehaviorType.MinimumFrame, testingTarget.StopBehavior, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewStopBehavior END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView TotalFrame.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.TotalFrame A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewTotalFrame()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewTotalFrame START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ map.Insert(ImageVisualProperty.URL, new PropertyValue(url));
+ map.Insert(ImageVisualProperty.Border, new PropertyValue(new Extents(4, 4, 4, 4)));
+ map.Insert(ImageVisualProperty.TotalFrameNumber, new PropertyValue(ImageVisualProperty.TotalFrameNumber));
+
+ testingTarget.Image = map;
+
+ try
+ {
+ var resutl = testingTarget.TotalFrame;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewTotalFrame END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedImageView CurrentFrame.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedImageView.CurrentFrame A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedImageViewCurrentFrame()
+ {
+ tlog.Debug(tag, $"AnimatedImageViewCurrentFrame START");
+
+ var testingTarget = new AnimatedImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ map.Insert(ImageVisualProperty.URL, new PropertyValue(url));
+ map.Insert(ImageVisualProperty.Border, new PropertyValue(new Extents(4, 4, 4, 4)));
+ map.Insert(ImageVisualProperty.TotalFrameNumber, new PropertyValue(30));
+ map.Insert(ImageVisualProperty.CurrentFrameNumber, new PropertyValue(0));
+
+ testingTarget.Image = map;
+
+ try
+ {
+ testingTarget.CurrentFrame = 15;
+ var resutl = testingTarget.CurrentFrame;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedImageViewCurrentFrame END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("AnimatedImageView SetValues.")]
+ //[Property("SPEC", "Tizen.NUI.AnimatedImageView.SetValues M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void AnimatedImageViewSetValues()
+ //{
+ // tlog.Debug(tag, $"AnimatedImageViewSetValues START");
+
+ // var testingTarget = new AnimatedImageView();
+ // Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ // Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ // using (PropertyMap map = new PropertyMap())
+ // {
+ // map.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ // map.Insert(ImageVisualProperty.URL, new PropertyValue(url));
+ // map.Insert(ImageVisualProperty.Border, new PropertyValue(new Extents(4, 4, 4, 4)));
+ // map.Insert(ImageVisualProperty.TotalFrameNumber, new PropertyValue(30));
+ // map.Insert(ImageVisualProperty.CurrentFrameNumber, new PropertyValue(0));
+
+ // testingTarget.Image = map;
+
+ // try
+ // {
+ // testingTarget.SetValues();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"AnimatedImageViewSetValues END (OK)");
+ // }
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("AnimatedImageView Play.")]
+ //[Property("SPEC", "Tizen.NUI.AnimatedImageView.Play M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void AnimatedImageViewPlay()
+ //{
+ // tlog.Debug(tag, $"AnimatedImageViewPlay START");
+
+ // var testingTarget = new AnimatedImageView();
+ // Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView");
+ // Assert.IsInstanceOf<AnimatedImageView>(testingTarget, "Should be an instance of AnimatedImageView type.");
+
+ // using (PropertyMap map = new PropertyMap())
+ // {
+ // map.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ // map.Insert(ImageVisualProperty.URL, new PropertyValue(url));
+ // map.Insert(ImageVisualProperty.Border, new PropertyValue(new Extents(4, 4, 4, 4)));
+ // map.Insert(ImageVisualProperty.TotalFrameNumber, new PropertyValue(30));
+ // map.Insert(ImageVisualProperty.CurrentFrameNumber, new PropertyValue(0));
+
+ // testingTarget.Image = map;
+
+ // try
+ // {
+ // testingTarget.Play();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"AnimatedImageViewPlay END (OK)");
+ // }
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/AnimatedVectorImageView")]
+ public class PublicAnimatedVectorImageViewTest
+ {
+ private const string tag = "NUITEST";
+ private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MyAnimatedVectorImageView : AnimatedVectorImageView
+ {
+ public MyAnimatedVectorImageView()
+ { }
+
+ public void OnDispose(DisposeTypes type)
+ {
+ base.Dispose(type);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView constructor.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.AnimatedVectorImageView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewConstructor()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewConstructor START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView constructor. With scale.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.AnimatedVectorImageView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewConstructorWithScale()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewConstructorWithScale START");
+
+ var testingTarget = new AnimatedVectorImageView(0.3f);
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewConstructorWithScale END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView Dispose.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewDispose()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewDispose START");
+
+ var testingTarget = new MyAnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"AnimatedVectorImageViewDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView ResourceUrl.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.ResourceUrl A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewResourceUrl()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewResourceUrl START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.ResourceUrl = url;
+ Assert.AreEqual(url, testingTarget.ResourceUrl, "Should be equal");
+
+ /** Set same url */
+ try
+ {
+ testingTarget.ResourceUrl = url;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewResourceUrl END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView RepeatCount.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.RepeatCount A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewRepeatCount()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewRepeatCount START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ Assert.AreEqual(0, testingTarget.RepeatCount, "Should be equal");
+
+ testingTarget.RepeatCount = 2;
+ Assert.AreEqual(2, testingTarget.RepeatCount, "Should be equal");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewRepeatCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView TotalFrame.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.TotalFrame A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewTotalFrame()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewTotalFrame START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ try
+ {
+ var result = testingTarget.TotalFrame;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewTotalFrame END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView CurrentFrame.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.CurrentFrame A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewCurrentFrame()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewCurrentFrame START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.ResourceUrl = url;
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ try
+ {
+ testingTarget.CurrentFrame = 200;
+ var result = testingTarget.CurrentFrame;
+
+ /** value < 0 */
+ testingTarget.CurrentFrame = -3;
+ Assert.AreEqual(0, testingTarget.CurrentFrame, "Should be equal!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewCurrentFrame END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("AnimatedVectorImageView CurrentFrame. ResourceUrl is null.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.CurrentFrame A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewCurrentFrameNotSetResourceUrl()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewCurrentFrameNotSetResourceUrl START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ try
+ {
+ testingTarget.CurrentFrame = 3;
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewCurrentFrameNotSetResourceUrl END (OK)");
+ Assert.Pass("Caught InvalidOperationException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView RepeatMode.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.RepeatMode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewRepeatMode()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewRepeatMode START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.RepeatMode = AnimatedVectorImageView.RepeatModes.Reverse;
+ Assert.AreEqual(AnimatedVectorImageView.RepeatModes.Reverse, testingTarget.RepeatMode, "Should be equal!");
+
+ testingTarget.RepeatMode = AnimatedVectorImageView.RepeatModes.Restart;
+ Assert.AreEqual(AnimatedVectorImageView.RepeatModes.Restart, testingTarget.RepeatMode, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewRepeatMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView AnimationState.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.AnimationState A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewAnimationState()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewAnimationState START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.ResourceUrl = url;
+
+ testingTarget.Play();
+ tlog.Debug(tag, "AnimationState : " + testingTarget.AnimationState);
+
+ testingTarget.Pause();
+ tlog.Debug(tag, "AnimationState : " + testingTarget.AnimationState);
+
+ testingTarget.Play();
+ tlog.Debug(tag, "AnimationState : " + testingTarget.AnimationState);
+
+ testingTarget.Stop();
+ tlog.Debug(tag, "AnimationState : " + testingTarget.AnimationState);
+
+ try
+ {
+ testingTarget.Stop();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewAnimationState END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView SetMinAndMaxFrame.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.SetMinAndMaxFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewSetMinAndMaxFrame()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewSetMinAndMaxFrame START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ try
+ {
+ testingTarget.SetMinAndMaxFrame(1, 10);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ /** minimumFrame > maximumFrame */
+ try
+ {
+ testingTarget.SetMinAndMaxFrame(10, 1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewSetMinAndMaxFrame END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView SetMinMaxFrame.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.SetMinMaxFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewSetMinMaxFrame()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewSetMinMaxFrame START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ try
+ {
+ testingTarget.SetMinMaxFrame(1, 10);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewSetMinMaxFrame END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView SetMinMaxFrameByMarker.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.SetMinMaxFrameByMarker M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewSetMinMaxFrameByMarker()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewSetMinMaxFrameByMarker START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ string maker = "startframe: 1; endframe: 10";
+
+ try
+ {
+ testingTarget.SetMinMaxFrameByMarker(maker, null);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewSetMinMaxFrameByMarker END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("AnimatedVectorImageView Play. ResourceUrl is null.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.Play M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewPlay()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewPlay START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ try
+ {
+ testingTarget.Play();
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewPlay END (OK)");
+ Assert.Pass("Caught InvalidOperationException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView Stop. EndAction is Cancel.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.Stop M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewStopAsCancel()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewStopAsCancel START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.ResourceUrl = url;
+
+ testingTarget.Play();
+
+ try
+ {
+ testingTarget.Stop(AnimatedVectorImageView.EndActions.Cancel);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewStopAsCancel END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView Stop. EndAction is Discard.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.Stop M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewStopAsDiscard()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewStopAsDiscard START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.ResourceUrl = url;
+
+ testingTarget.Play();
+
+ try
+ {
+ testingTarget.Stop(AnimatedVectorImageView.EndActions.Discard);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewStopAsDiscard END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AnimatedVectorImageView Stop. EndAction is StopFinal.")]
+ [Property("SPEC", "Tizen.NUI.AnimatedVectorImageView.Stop M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatedVectorImageViewStopAsStopFinal()
+ {
+ tlog.Debug(tag, $"AnimatedVectorImageViewStopAsStopFinal START");
+
+ var testingTarget = new AnimatedVectorImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnimatedVectorImageView");
+ Assert.IsInstanceOf<AnimatedVectorImageView>(testingTarget, "Should be an instance of AnimatedVectorImageView type.");
+
+ testingTarget.ResourceUrl = url;
+
+ testingTarget.Play();
+
+ try
+ {
+ testingTarget.Stop(AnimatedVectorImageView.EndActions.StopFinal);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatedVectorImageViewStopAsStopFinal END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/CameraView")]
+ class PublicCameraViewTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyCameraView : CameraView
+ {
+ public MyCameraView(global::System.IntPtr handle, DisplayType type = DisplayType.Window) : base(handle, type)
+ { }
+
+ public void OnDispose(DisposeTypes type)
+ {
+ base.Dispose(type);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CameraView constructor.")]
+ [Property("SPEC", "Tizen.NUI.CameraView.CameraView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraViewConstructor()
+ {
+ tlog.Debug(tag, $"CameraViewConstructor START");
+
+ var testingTarget = new CameraView(new ImageView().SwigCPtr.Handle, CameraView.DisplayType.Image);
+ Assert.IsNotNull(testingTarget, "Can't create success object CameraView");
+ Assert.IsInstanceOf<CameraView>(testingTarget, "Should be an instance of CameraView type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CameraView constructor. With CameraView Instance.")]
+ [Property("SPEC", "Tizen.NUI.CameraView.CameraView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraViewConstructorWithCameraViewInstance()
+ {
+ tlog.Debug(tag, $"CameraViewConstructorWithCameraViewInstance START");
+
+ using (CameraView cameraView = new CameraView(new ImageView().SwigCPtr.Handle, CameraView.DisplayType.Image))
+ {
+ var testingTarget = new CameraView(cameraView);
+ Assert.IsNotNull(testingTarget, "Can't create success object CameraView");
+ Assert.IsInstanceOf<CameraView>(testingTarget, "Should be an instance of CameraView type.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraViewConstructorWithCameraViewInstance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CameraView Dispose.")]
+ [Property("SPEC", "Tizen.NUI.CameraView.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraViewDispose()
+ {
+ tlog.Debug(tag, $"CameraViewDispose START");
+
+ var testingTarget = new MyCameraView(new ImageView().SwigCPtr.Handle, CameraView.DisplayType.Image);
+ Assert.IsNotNull(testingTarget, "Can't create success object CameraView");
+ Assert.IsInstanceOf<CameraView>(testingTarget, "Should be an instance of CameraView type.");
+
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"CameraViewDispose END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/ControlState")]
+ public class PublicControlStateTest
+ {
+ 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("ControlState Create. Parameter is null.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Create M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateCreateWithNullString()
+ {
+ tlog.Debug(tag, $"ControlStateCreateWithNullString START");
+
+ try
+ {
+ string str = null;
+ ControlState.Create(str);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ControlStateCreateWithNullString END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ControlState Create. Parameter is empty.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Create M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateCreateWithEmptyString()
+ {
+ tlog.Debug(tag, $"ControlStateCreateWithEmptyString START");
+
+ try
+ {
+ string str = " ";
+ ControlState.Create(str);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ControlStateCreateWithEmptyString END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ControlState Create. State is added.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Create M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateCreateWithAddedState()
+ {
+ tlog.Debug(tag, $"ControlStateCreateWithAddedState START");
+
+ var testingTarget = ControlState.Create("Focused");
+ Assert.IsNotNull(testingTarget);
+ Assert.AreEqual(ControlState.Focused, testingTarget, "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateCreateWithAddedState END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlState Create. StateList length is 0.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Create M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateCreateStateListLengthEqualZero()
+ {
+ tlog.Debug(tag, $"ControlStateCreateStateListLengthEqualZero START");
+
+ ControlState[] states = new ControlState[0];
+ var testingTarget = ControlState.Create(states);
+ Assert.IsNotNull(testingTarget);
+ Assert.AreEqual("Normal", testingTarget.ToString(), "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateCreateStateListLengthEqualZero END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlState Create. StateList length is 1.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Create M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateCreateStateListLengthEqualOne()
+ {
+ tlog.Debug(tag, $"ControlStateCreateStateListLengthEqualOne START");
+
+ ControlState[] states = new ControlState[1];
+ states[0] = ControlState.Other;
+ var testingTarget = ControlState.Create(states);
+ Assert.IsNotNull(testingTarget);
+ Assert.AreEqual("Other", testingTarget.ToString(), "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateCreateStateListLengthEqualOne END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlState Create. StateList length greater than 1.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Create M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateCreateStateListLengthGreaterThanOne()
+ {
+ tlog.Debug(tag, $"ControlStateCreateStateListLengthGreaterThanOne START");
+
+ ControlState[] states = new ControlState[5];
+ states[0] = ControlState.Normal;
+ states[1] = ControlState.Selected;
+ states[2] = ControlState.Focused;
+ states[3] = ControlState.Pressed;
+ states[4] = ControlState.Disabled;
+ var testingTarget = ControlState.Create(states);
+ Assert.IsNotNull(testingTarget);
+ Assert.AreEqual("Selected, Focused, Pressed, Disabled", testingTarget.ToString(), "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateCreateStateListLengthGreaterThanOne END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlState Create. StateList contain All.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Create M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateCreateStateListContainAll()
+ {
+ tlog.Debug(tag, $"ControlStateCreateStateListContainAll START");
+
+ ControlState[] states = new ControlState[5];
+ states[0] = ControlState.Normal;
+ states[1] = ControlState.Selected;
+ states[2] = ControlState.All;
+ states[3] = ControlState.Pressed;
+ states[4] = ControlState.Disabled;
+ var testingTarget = ControlState.Create(states);
+ Assert.IsNotNull(testingTarget);
+ Assert.AreEqual("All", testingTarget.ToString(), "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateCreateStateListContainAll END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlState Contains.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Contains M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateContains()
+ {
+ tlog.Debug(tag, $"ControlStateContains START");
+
+ ControlState[] states = new ControlState[5];
+ states[0] = ControlState.Normal;
+ states[1] = ControlState.Selected;
+ states[2] = ControlState.Focused;
+ states[3] = ControlState.Pressed;
+ states[4] = ControlState.Disabled;
+ var testingTarget = ControlState.Create(states);
+
+ Assert.AreEqual(false, testingTarget.Contains(ControlState.All), "Should be equal!");
+ Assert.AreEqual(true, testingTarget.Contains(ControlState.Selected), "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateContains END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlState Contains. IsCombined is false.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Contains M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateContainsWithFalseIsCombined()
+ {
+ tlog.Debug(tag, $"ControlStateContainsWithFalseIsCombined START");
+
+ ControlState[] states = new ControlState[1];
+ states[0] = ControlState.Normal;
+ var testingTarget = ControlState.Create(states);
+
+ Assert.AreEqual(true, testingTarget.Contains(ControlState.Normal), "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateContainsWithFalseIsCombined END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ControlState Contains. State is null.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.Contains M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateContainsWithNullState()
+ {
+ tlog.Debug(tag, $"ControlStateContainsWithNullState START");
+
+ ControlState state = ControlState.Create("Focused");
+
+ try
+ {
+ state.Contains(null);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ControlStateContainsWithNullState END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ControlState ==. Both null.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.== M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateEquivalentWithBothNullVaule()
+ {
+ tlog.Debug(tag, $"ControlStateEquivalentWithBothNullVaule START");
+
+ Assert.True(null == null);
+
+ tlog.Debug(tag, $"ControlStateEquivalentWithBothNullVaule END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ControlState ==. Right null.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.== M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateEquivalentWithOneNullValue()
+ {
+ tlog.Debug(tag, $"ControlStateEquivalentWithOneNullValue START");
+
+ Assert.False(null == ControlState.Focused);
+ Assert.True(null != ControlState.Focused);
+
+ tlog.Debug(tag, $"ControlStateEquivalentWithOneNullValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlState subtraction.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.- M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateSubtraction()
+ {
+ tlog.Debug(tag, $"ControlStateSubtraction START");
+
+ var result = ControlState.Focused - ControlState.Focused;
+ Assert.AreEqual("Normal", result.ToString(), "Should be equal!");
+
+ result = ControlState.Focused - ControlState.Pressed;
+ Assert.AreEqual("Focused", result.ToString(), "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateSubtraction END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlState subtraction. IsCombined")]
+ [Property("SPEC", "Tizen.NUI.ControlState.- M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateSubtractionWithTrueIsCombined()
+ {
+ tlog.Debug(tag, $"ControlStateSubtractionWithTrueIsCombined START");
+
+ ControlState[] states1 = new ControlState[2];
+ states1[0] = ControlState.Selected;
+ states1[1] = ControlState.Focused;
+ var testingTarget1 = ControlState.Create(states1);
+
+ ControlState[] states2 = new ControlState[2];
+ states2[0] = ControlState.Pressed;
+ states2[1] = ControlState.Focused;
+ var testingTarget2 = ControlState.Create(states2);
+
+ var result = testingTarget1 - testingTarget2;
+ Assert.AreEqual("Selected", result.ToString(), "Should be equal!");
+
+ ControlState[] states3 = new ControlState[2];
+ states3[0] = ControlState.Selected;
+ states3[1] = ControlState.Focused;
+ var testingTarget3 = ControlState.Create(states3);
+
+ ControlState[] states4 = new ControlState[2];
+ states4[0] = ControlState.Pressed;
+ states4[1] = ControlState.Disabled;
+ var testingTarget4 = ControlState.Create(states4);
+
+ result = testingTarget3 - testingTarget4;
+ Assert.AreEqual("Selected, Focused", result.ToString(), "Should be equal!");
+
+ tlog.Debug(tag, $"ControlStateSubtractionWithTrueIsCombined END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ControlState subtraction. lhs is null.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.- M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateSubtractionWithNullFirstParameter()
+ {
+ tlog.Debug(tag, $"ControlStateSubtractionWithNullFirstParameter START");
+
+ try
+ {
+ var result = null - ControlState.Normal;
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ControlStateSubtractionWithNullFirstParameter END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ControlState subtraction. rhs is null.")]
+ [Property("SPEC", "Tizen.NUI.ControlState.- M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlStateSubtractionWithNullSecondParameter()
+ {
+ tlog.Debug(tag, $"ControlStateSubtractionWithNullSecondParameter START");
+
+ try
+ {
+ var result = ControlState.Normal - null;
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ControlStateSubtractionWithNullSecondParameter END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/CustomView")]
+ public class PublicCustomViewTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyCustomView : CustomView
+ {
+ public MyCustomView(string typeName, CustomViewBehaviour behaviour) : base(typeName, behaviour)
+ { }
+
+ public void OnAccessibilityDoAction(string name)
+ {
+ base.AccessibilityDoAction(name);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomView constructor.")]
+ [Property("SPEC", "Tizen.NUI.CustomView.CustomView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomViewConstructor()
+ {
+ tlog.Debug(tag, $"CustomViewConstructor START");
+
+ ViewStyle style = new ViewStyle()
+ {
+ Padding = new Extents(3, 3, 3, 3),
+ };
+
+ var testingTarget = new CustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault, style);
+ Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
+ Assert.IsInstanceOf<CustomView>(testingTarget, "Should be an instance of CustomView type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CustomViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomView FocusNavigationSupport.")]
+ [Property("SPEC", "Tizen.NUI.CustomView.FocusNavigationSupport A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomViewFocusNavigationSupport()
+ {
+ tlog.Debug(tag, $"CustomViewFocusNavigationSupport START");
+
+ ViewStyle style = new ViewStyle()
+ {
+ Padding = new Extents(3, 3, 3, 3),
+ };
+
+ var testingTarget = new CustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault, style);
+ Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
+ Assert.IsInstanceOf<CustomView>(testingTarget, "Should be an instance of CustomView type.");
+
+ Assert.AreEqual(false, testingTarget.FocusNavigationSupport, "Should be equal!");
+
+ testingTarget.FocusNavigationSupport = true;
+ Assert.AreEqual(true, testingTarget.FocusNavigationSupport, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CustomViewFocusNavigationSupport END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomView FocusGroup.")]
+ [Property("SPEC", "Tizen.NUI.CustomView.FocusGroup A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomViewFocusGroup()
+ {
+ tlog.Debug(tag, $"CustomViewFocusGroup START");
+
+ ViewStyle style = new ViewStyle()
+ {
+ Padding = new Extents(3, 3, 3, 3),
+ };
+
+ var testingTarget = new CustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault, style);
+ Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
+ Assert.IsInstanceOf<CustomView>(testingTarget, "Should be an instance of CustomView type.");
+
+ Assert.AreEqual(false, testingTarget.FocusGroup, "Should be equal!");
+
+ testingTarget.FocusGroup = true;
+ Assert.AreEqual(true, testingTarget.FocusGroup, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CustomViewFocusGroup END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomView AccessibilityDoAction.")]
+ [Property("SPEC", "Tizen.NUI.CustomView.AccessibilityDoAction M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomViewAccessibilityDoAction()
+ {
+ tlog.Debug(tag, $"CustomViewAccessibilityDoAction START");
+
+ var testingTarget = new MyCustomView("CustomView", CustomViewBehaviour.RequiresKeyboardNavigationSupport);
+ Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
+ Assert.IsInstanceOf<CustomView>(testingTarget, "Should be an instance of CustomView type.");
+
+ testingTarget.OnAccessibilityDoAction("activate");
+
+ testingTarget.OnAccessibilityDoAction("ReadingSkipped");
+
+ testingTarget.OnAccessibilityDoAction("ReadingCancelled");
+
+ testingTarget.OnAccessibilityDoAction("ReadingStopped");
+
+ testingTarget.OnAccessibilityDoAction("ReadingPaused");
+
+ testingTarget.OnAccessibilityDoAction("ReadingResumed");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CustomViewAccessibilityDoAction END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/FlexContainer")]
+ public class PublicFlexContainerTest
+ {
+ 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("FlexContainer constructor.")]
+ [Property("SPEC", "Tizen.NUI.FlexContainer.FlexContainer C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FlexContainerConstructor()
+ {
+ tlog.Debug(tag, $"FlexContainerConstructor START");
+
+ var testingTarget = new FlexContainer();
+ Assert.IsNotNull(testingTarget, "Can't create success object FlexContainer");
+ Assert.IsInstanceOf<FlexContainer>(testingTarget, "Should be an instance of FlexContainer type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"FlexContainerConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FlexContainer ContentDirection.")]
+ [Property("SPEC", "Tizen.NUI.FlexContainer.ContentDirection A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FlexContainerContentDirection()
+ {
+ tlog.Debug(tag, $"FlexContainerContentDirection START");
+
+ var testingTarget = new FlexContainer();
+ Assert.IsNotNull(testingTarget, "Can't create success object FlexContainer");
+ Assert.IsInstanceOf<FlexContainer>(testingTarget, "Should be an instance of FlexContainer type.");
+
+ testingTarget.ContentDirection = FlexContainer.ContentDirectionType.Inherit;
+ Assert.AreEqual(FlexContainer.ContentDirectionType.Inherit, testingTarget.ContentDirection, "Should be equal!");
+
+ testingTarget.ContentDirection = FlexContainer.ContentDirectionType.LTR;
+ Assert.AreEqual(FlexContainer.ContentDirectionType.LTR, testingTarget.ContentDirection, "Should be equal!");
+
+ testingTarget.ContentDirection = FlexContainer.ContentDirectionType.RTL;
+ Assert.AreEqual(FlexContainer.ContentDirectionType.RTL, testingTarget.ContentDirection, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"FlexContainerContentDirection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FlexContainer FlexDirection.")]
+ [Property("SPEC", "Tizen.NUI.FlexContainer.FlexDirection A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FlexContainerFlexDirection()
+ {
+ tlog.Debug(tag, $"FlexContainerFlexDirection START");
+
+ var testingTarget = new FlexContainer();
+ Assert.IsNotNull(testingTarget, "Can't create success object FlexContainer");
+ Assert.IsInstanceOf<FlexContainer>(testingTarget, "Should be an instance of FlexContainer type.");
+
+ testingTarget.FlexDirection = FlexContainer.FlexDirectionType.Column;
+ Assert.AreEqual(FlexContainer.FlexDirectionType.Column, testingTarget.FlexDirection, "Should be equal!");
+
+ testingTarget.FlexDirection = FlexContainer.FlexDirectionType.ColumnReverse;
+ Assert.AreEqual(FlexContainer.FlexDirectionType.ColumnReverse, testingTarget.FlexDirection, "Should be equal!");
+
+ testingTarget.FlexDirection = FlexContainer.FlexDirectionType.Row;
+ Assert.AreEqual(FlexContainer.FlexDirectionType.Row, testingTarget.FlexDirection, "Should be equal!");
+
+ testingTarget.FlexDirection = FlexContainer.FlexDirectionType.RowReverse;
+ Assert.AreEqual(FlexContainer.FlexDirectionType.RowReverse, testingTarget.FlexDirection, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"FlexContainerFlexDirection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FlexContainer FlexWrap.")]
+ [Property("SPEC", "Tizen.NUI.FlexContainer.FlexWrap A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FlexContainerFlexWrap()
+ {
+ tlog.Debug(tag, $"FlexContainerFlexWrap START");
+
+ var testingTarget = new FlexContainer();
+ Assert.IsNotNull(testingTarget, "Can't create success object FlexContainer");
+ Assert.IsInstanceOf<FlexContainer>(testingTarget, "Should be an instance of FlexContainer type.");
+
+ testingTarget.FlexWrap = FlexContainer.WrapType.NoWrap;
+ Assert.AreEqual(FlexContainer.WrapType.NoWrap, testingTarget.FlexWrap, "Should be equal!");
+
+ testingTarget.FlexWrap = FlexContainer.WrapType.Wrap;
+ Assert.AreEqual(FlexContainer.WrapType.Wrap, testingTarget.FlexWrap, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"FlexContainerFlexWrap END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FlexContainer JustifyContent.")]
+ [Property("SPEC", "Tizen.NUI.FlexContainer.JustifyContent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FlexContainerJustifyContent()
+ {
+ tlog.Debug(tag, $"FlexContainerJustifyContent START");
+
+ var testingTarget = new FlexContainer();
+ Assert.IsNotNull(testingTarget, "Can't create success object FlexContainer");
+ Assert.IsInstanceOf<FlexContainer>(testingTarget, "Should be an instance of FlexContainer type.");
+
+ testingTarget.JustifyContent = FlexContainer.Justification.JustifyCenter;
+ Assert.AreEqual(FlexContainer.Justification.JustifyCenter, testingTarget.JustifyContent, "Should be equal!");
+
+ testingTarget.JustifyContent = FlexContainer.Justification.JustifyFlexEnd;
+ Assert.AreEqual(FlexContainer.Justification.JustifyFlexEnd, testingTarget.JustifyContent, "Should be equal!");
+
+ testingTarget.JustifyContent = FlexContainer.Justification.JustifyFlexStart;
+ Assert.AreEqual(FlexContainer.Justification.JustifyFlexStart, testingTarget.JustifyContent, "Should be equal!");
+
+ testingTarget.JustifyContent = FlexContainer.Justification.JustifySpaceAround;
+ Assert.AreEqual(FlexContainer.Justification.JustifySpaceAround, testingTarget.JustifyContent, "Should be equal!");
+
+ testingTarget.JustifyContent = FlexContainer.Justification.JustifySpaceBetween;
+ Assert.AreEqual(FlexContainer.Justification.JustifySpaceBetween, testingTarget.JustifyContent, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"FlexContainerJustifyContent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FlexContainer AlignItems.")]
+ [Property("SPEC", "Tizen.NUI.FlexContainer.AlignItems A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FlexContainerAlignItems()
+ {
+ tlog.Debug(tag, $"FlexContainerAlignItems START");
+
+ var testingTarget = new FlexContainer();
+ Assert.IsNotNull(testingTarget, "Can't create success object FlexContainer");
+ Assert.IsInstanceOf<FlexContainer>(testingTarget, "Should be an instance of FlexContainer type.");
+
+ testingTarget.AlignItems = FlexContainer.Alignment.AlignAuto;
+ Assert.AreEqual(FlexContainer.Alignment.AlignAuto, testingTarget.AlignItems, "Should be equal!");
+
+ testingTarget.AlignItems = FlexContainer.Alignment.AlignCenter;
+ Assert.AreEqual(FlexContainer.Alignment.AlignCenter, testingTarget.AlignItems, "Should be equal!");
+
+ testingTarget.AlignItems = FlexContainer.Alignment.AlignFlexEnd;
+ Assert.AreEqual(FlexContainer.Alignment.AlignFlexEnd, testingTarget.AlignItems, "Should be equal!");
+
+ testingTarget.AlignItems = FlexContainer.Alignment.AlignFlexStart;
+ Assert.AreEqual(FlexContainer.Alignment.AlignFlexStart, testingTarget.AlignItems, "Should be equal!");
+
+ testingTarget.AlignItems = FlexContainer.Alignment.AlignStretch;
+ Assert.AreEqual(FlexContainer.Alignment.AlignStretch, testingTarget.AlignItems, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"FlexContainerAlignItems END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FlexContainer AlignContent.")]
+ [Property("SPEC", "Tizen.NUI.FlexContainer.AlignContent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FlexContainerAlignContent()
+ {
+ tlog.Debug(tag, $"FlexContainerAlignContent START");
+
+ var testingTarget = new FlexContainer();
+ Assert.IsNotNull(testingTarget, "Can't create success object FlexContainer");
+ Assert.IsInstanceOf<FlexContainer>(testingTarget, "Should be an instance of FlexContainer type.");
+
+ testingTarget.AlignContent = FlexContainer.Alignment.AlignAuto;
+ Assert.AreEqual(FlexContainer.Alignment.AlignAuto, testingTarget.AlignContent, "Should be equal!");
+
+ testingTarget.AlignContent = FlexContainer.Alignment.AlignCenter;
+ Assert.AreEqual(FlexContainer.Alignment.AlignCenter, testingTarget.AlignContent, "Should be equal!");
+
+ testingTarget.AlignContent = FlexContainer.Alignment.AlignFlexEnd;
+ Assert.AreEqual(FlexContainer.Alignment.AlignFlexEnd, testingTarget.AlignContent, "Should be equal!");
+
+ testingTarget.AlignContent = FlexContainer.Alignment.AlignFlexStart;
+ Assert.AreEqual(FlexContainer.Alignment.AlignFlexStart, testingTarget.AlignContent, "Should be equal!");
+
+ testingTarget.AlignContent = FlexContainer.Alignment.AlignStretch;
+ Assert.AreEqual(FlexContainer.Alignment.AlignStretch, testingTarget.AlignContent, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"FlexContainerAlignContent END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/ImageView")]
+ public class PublicImageViewTest
+ {
+ private const string tag = "NUITEST";
+ private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ public void OnResourceReady(object sender, ImageView.ResourceReadyEventArgs e)
+ {
+ // not implemented
+ }
+
+ internal class MyImageView : ImageView
+ {
+ public MyImageView() : base()
+ { }
+
+ public void OnResourceLoaded(object sender, ImageView.ResourceLoadedEventArgs e)
+ {
+ // not implemented
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageView constructor.")]
+ [Property("SPEC", "Tizen.NUI.ImageView.ImageView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ImageViewConstructor()
+ {
+ tlog.Debug(tag, $"ImageViewConstructor START");
+
+ var testingTarget = new ImageView(url, true);
+ Assert.IsNotNull(testingTarget, "Can't create success object ImageView");
+ Assert.IsInstanceOf<ImageView>(testingTarget, "Should be an instance of ImageView type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ImageViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageView constructor. With size.")]
+ [Property("SPEC", "Tizen.NUI.ImageView.ImageView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ImageViewConstructorWithSize()
+ {
+ tlog.Debug(tag, $"ImageViewConstructorWithSize START");
+
+ using (Uint16Pair size = new Uint16Pair(40, 60))
+ {
+ var testingTarget = new ImageView(url, size, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object ImageView");
+ Assert.IsInstanceOf<ImageView>(testingTarget, "Should be an instance of ImageView type.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ImageViewConstructorWithSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageView ResourceReady.")]
+ [Property("SPEC", "Tizen.NUI.ImageView.ResourceReady A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ImageViewConstructorResourceReady()
+ {
+ tlog.Debug(tag, $"ImageViewConstructorResourceReady START");
+
+ using (Uint16Pair size = new Uint16Pair(40, 60))
+ {
+ var testingTarget = new ImageView(url, size, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object ImageView");
+ Assert.IsInstanceOf<ImageView>(testingTarget, "Should be an instance of ImageView type.");
+
+ testingTarget.ResourceReady += OnResourceReady;
+ testingTarget.ResourceReady -= OnResourceReady;
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ImageViewConstructorResourceReady END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageView ResourceLoaded.")]
+ [Property("SPEC", "Tizen.NUI.ImageView.ResourceLoaded A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ImageViewConstructorResourceLoaded()
+ {
+ tlog.Debug(tag, $"ImageViewConstructorResourceLoaded START");
+
+ var testingTarget = new MyImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object ImageView");
+ Assert.IsInstanceOf<ImageView>(testingTarget, "Should be an instance of ImageView type.");
+
+ testingTarget.ResourceLoaded += testingTarget.OnResourceLoaded;
+ testingTarget.ResourceLoaded -= testingTarget.OnResourceLoaded;
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ImageViewConstructorResourceLoaded END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageView DownCast.")]
+ [Property("SPEC", "Tizen.NUI.ImageView.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ImageViewConstructorDownCast()
+ {
+ tlog.Debug(tag, $"ImageViewConstructorDownCast START");
+
+ using (BaseHandle handle = new ImageView(url))
+ {
+ var testingTarget = ImageView.DownCast(handle);
+ Assert.IsNotNull(testingTarget, "Can't create success object ImageView");
+ Assert.IsInstanceOf<ImageView>(testingTarget, "Should be an instance of ImageView type.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ImageViewConstructorDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ImageView DownCast. Handle is null.")]
+ [Property("SPEC", "Tizen.NUI.ImageView.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ImageViewConstructorDownCastWithNullHandle()
+ {
+ tlog.Debug(tag, $"ImageViewConstructorDownCast START");
+
+ try
+ {
+ ImageView.DownCast(null);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ImageViewConstructorDownCast END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageView IsResourceReady.")]
+ [Property("SPEC", "Tizen.NUI.ImageView.IsResourceReady M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ImageViewConstructorIsResourceReady()
+ {
+ tlog.Debug(tag, $"ImageViewConstructorIsResourceReady START");
+
+ var testingTarget = new ImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object ImageView");
+ Assert.IsInstanceOf<ImageView>(testingTarget, "Should be an instance of ImageView type.");
+
+ testingTarget.ResourceUrl = url;
+
+ try
+ {
+ testingTarget.IsResourceReady();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ImageViewConstructorIsResourceReady END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageView AlphaMaskURL.")]
+ [Property("SPEC", "Tizen.NUI.ImageView.AlphaMaskURL A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ImageViewConstructorAlphaMaskURL()
+ {
+ tlog.Debug(tag, $"ImageViewConstructorAlphaMaskURL START");
+
+ var testingTarget = new ImageView();
+ Assert.IsNotNull(testingTarget, "Can't create success object ImageView");
+ Assert.IsInstanceOf<ImageView>(testingTarget, "Should be an instance of ImageView type.");
+
+ PropertyMap map = new PropertyMap();
+ map.Insert(ImageView.Property.IMAGE, new PropertyValue(new PropertyMap()));
+ map.Insert(ImageVisualProperty.AlphaMaskURL, new PropertyValue(url));
+
+ testingTarget.Image = map;
+
+ try
+ {
+ var result = testingTarget.AlphaMaskURL;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ImageViewConstructorAlphaMaskURL END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/LottieAnimationView")]
+ public class PublicLottieAnimationViewTest
+ {
+ private const string tag = "NUITEST";
+ private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/picture.png";
+ private string lottieFilePath = 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("LottieAnimationView URL.")]
+ [Property("SPEC", "Tizen.NUI.LottieAnimationView.URL A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieAnimationViewURL()
+ {
+ tlog.Debug(tag, $"LottieAnimationViewURL START");
+
+ using (Uint16Pair size = new Uint16Pair(40, 60))
+ {
+ var testingTarget = new LottieAnimationView(1.0f, true);
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieAnimationView");
+ Assert.IsInstanceOf<LottieAnimationView>(testingTarget, "Should be an instance of LottieAnimationView type.");
+
+ testingTarget.URL = lottieFilePath;
+
+ try
+ {
+ var result = testingTarget.URL;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"LottieAnimationViewURL END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieAnimationView RedrawInScalingDown.")]
+ [Property("SPEC", "Tizen.NUI.LottieAnimationView.RedrawInScalingDown A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieAnimationViewRedrawInScalingDown()
+ {
+ tlog.Debug(tag, $"LottieAnimationViewRedrawInScalingDown START");
+
+ using (Uint16Pair size = new Uint16Pair(40, 60))
+ {
+ var testingTarget = new LottieAnimationView(1.0f, true);
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieAnimationView");
+ Assert.IsInstanceOf<LottieAnimationView>(testingTarget, "Should be an instance of LottieAnimationView type.");
+
+ testingTarget.URL = lottieFilePath;
+
+ PropertyMap map = new PropertyMap();
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image))
+ .Add(ImageVisualProperty.URL, new PropertyValue(url))
+ .Add(ImageVisualProperty.LoopCount, new PropertyValue(2));
+ testingTarget.Image = map;
+
+ testingTarget.RedrawInScalingDown = true;
+ Assert.IsTrue(testingTarget.RedrawInScalingDown);
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"LottieAnimationViewRedrawInScalingDown END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieAnimationView SetMinMaxFrameByMarker.")]
+ [Property("SPEC", "Tizen.NUI.LottieAnimationView.SetMinMaxFrameByMarker M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieAnimationViewSetMinMaxFrameByMarker()
+ {
+ tlog.Debug(tag, $"LottieAnimationViewSetMinMaxFrameByMarker START");
+
+ var testingTarget = new LottieAnimationView();
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieAnimationView");
+ Assert.IsInstanceOf<LottieAnimationView>(testingTarget, "Should be an instance of LottieAnimationView type.");
+
+ testingTarget.URL = lottieFilePath;
+
+ string maker = "startframe: 1; endframe: 10";
+
+ try
+ {
+ testingTarget.SetMinMaxFrameByMarker(maker, null);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"LottieAnimationViewSetMinMaxFrameByMarker END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieAnimationView GetMinMaxFrame.")]
+ [Property("SPEC", "Tizen.NUI.LottieAnimationView.GetMinMaxFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieAnimationViewGetMinMaxFrame()
+ {
+ tlog.Debug(tag, $"LottieAnimationViewGetMinMaxFrame START");
+
+ var testingTarget = new LottieAnimationView();
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieAnimationView");
+ Assert.IsInstanceOf<LottieAnimationView>(testingTarget, "Should be an instance of LottieAnimationView type.");
+
+ testingTarget.URL = lottieFilePath;
+
+ PropertyMap map = new PropertyMap();
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image))
+ .Add(ImageVisualProperty.URL, new PropertyValue(url))
+ .Add(ImageVisualProperty.LoopCount, new PropertyValue(2))
+ .Add(ImageVisualProperty.PlayRange, new PropertyValue(50));
+ testingTarget.Image = map;
+
+ string maker = "startframe: 1; endframe: 10";
+ testingTarget.SetMinMaxFrameByMarker(maker, null);
+
+ try
+ {
+ testingTarget.GetMinMaxFrame();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"LottieAnimationViewGetMinMaxFrame END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieAnimationView Finished.")]
+ [Property("SPEC", "Tizen.NUI.LottieAnimationView.Finished M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieAnimationViewFinished()
+ {
+ tlog.Debug(tag, $"LottieAnimationViewFinished START");
+
+ var testingTarget = new LottieAnimationView();
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieAnimationView");
+ Assert.IsInstanceOf<LottieAnimationView>(testingTarget, "Should be an instance of LottieAnimationView type.");
+
+ testingTarget.URL = lottieFilePath;
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ testingTarget.Finished += OnFinishedEvent;
+ testingTarget.Finished -= OnFinishedEvent;
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"LottieAnimationViewFinished END (OK)");
+ }
+
+ public void OnFinishedEvent(object sender, EventArgs e)
+ {
+ // not implemented
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/TextEditor")]
+ public class PublicTextEditorTest
+ {
+ 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("TextEditor constructor.")]
+ [Property("SPEC", "Tizen.NUI.TextEditor.TextEditor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextEditorConstructor()
+ {
+ tlog.Debug(tag, $"TextEditorConstructor START");
+
+ TextEditorStyle style = new TextEditorStyle()
+ {
+ FontFamily = "BreezeSans",
+ FontStyle = new PropertyMap().Add("weight", new PropertyValue("regular")),
+ };
+
+ var testingTarget = new TextEditor(style);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextEditor");
+ Assert.IsInstanceOf<TextEditor>(testingTarget, "Should be an instance of TextEditor type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextEditorConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditor constructor. With status of Shown.")]
+ [Property("SPEC", "Tizen.NUI.TextEditor.TextEditor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextEditorConstructorWithStatusOfShown()
+ {
+ tlog.Debug(tag, $"TextEditorConstructorWithStatusOfShown START");
+
+ var testingTarget = new TextEditor(false);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextEditor");
+ Assert.IsInstanceOf<TextEditor>(testingTarget, "Should be an instance of TextEditor type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextEditorConstructorWithStatusOfShown END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditor TranslatableText.")]
+ [Property("SPEC", "Tizen.NUI.TextEditor.TranslatableText A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextEditorTranslatableText()
+ {
+ tlog.Debug(tag, $"TextEditorTranslatableText START");
+
+ var testingTarget = new TextEditor();
+ Assert.IsNotNull(testingTarget, "Can't create success object TextEditor");
+ Assert.IsInstanceOf<TextEditor>(testingTarget, "Should be an instance of TextEditor type.");
+
+ testingTarget.TranslatableText = "textEditorTextSid";
+ Assert.AreEqual("textEditorTextSid", testingTarget.TranslatableText, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextEditorTranslatableText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditor TranslatablePlaceholderText.")]
+ [Property("SPEC", "Tizen.NUI.TextEditor.TranslatablePlaceholderText A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextEditorTranslatablePlaceholderText()
+ {
+ tlog.Debug(tag, $"TextEditorTranslatablePlaceholderText START");
+
+ var testingTarget = new TextEditor();
+ Assert.IsNotNull(testingTarget, "Can't create success object TextEditor");
+ Assert.IsInstanceOf<TextEditor>(testingTarget, "Should be an instance of TextEditor type.");
+
+ testingTarget.TranslatablePlaceholderText = "textEditorTextSid";
+ Assert.AreEqual("textEditorTextSid", testingTarget.TranslatablePlaceholderText, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextEditorTranslatablePlaceholderText END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/TextEvent")]
+ public class PublicTextEventTest
+ {
+ 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("TextEvent.AnchorClickedEventArgs Href.")]
+ [Property("SPEC", "Tizen.NUI.TextEvent.AnchorClickedEventArgs.Href A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextEventAnchorClickedEventArgsHref()
+ {
+ tlog.Debug(tag, $"TextEventAnchorClickedEventArgsHref START");
+
+ TextLabel label = new TextLabel()
+ {
+ Text = "hypertext",
+ };
+
+ var testingTarget = new AnchorClickedEventArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object AnchorClickedEventArgs");
+ Assert.IsInstanceOf<AnchorClickedEventArgs>(testingTarget, "Should be an instance of AnchorClickedEventArgs type.");
+
+ testingTarget.Href = Marshal.PtrToStringAnsi(label.SwigCPtr.Handle);
+ Assert.IsNotNull(testingTarget.Href, "Should be not null.");
+
+ label.Dispose();
+ tlog.Debug(tag, $"TextEventAnchorClickedEventArgsHref END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/TextField")]
+ public class PublicTextFieldTest
+ {
+ private const string tag = "NUITEST";
+ private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+
+ internal class MyTextField : TextField
+ {
+ public MyTextField(bool shown) : base(shown)
+ {
+ }
+
+ public ViewStyle OnCreateViewStyle()
+ {
+ return base.CreateViewStyle();
+ }
+
+ public void OnDispose(DisposeTypes type)
+ {
+ base.Dispose(type);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField constructor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TextField C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldConstructor()
+ {
+ tlog.Debug(tag, $"TextFieldConstructor START");
+
+ var testingTarget = new TextField();
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField constructor. With Shown.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TextField C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldConstructorWithShown()
+ {
+ tlog.Debug(tag, $"TextFieldConstructorWithShown START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldConstructorWithShown END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField constructor. With ViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TextField C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldConstructorWithViewStyle()
+ {
+ tlog.Debug(tag, $"TextFieldConstructorWithViewStyle START");
+
+ using (MyTextField textField = new MyTextField(true))
+ {
+ using (ViewStyle style = textField.OnCreateViewStyle())
+ {
+ var testingTarget = new TextField(textField.SwigCPtr.Handle, false, style, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"TextFieldConstructorWithViewStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField constructor. Without ViewStyle.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TextField C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldConstructorWithoutViewStyle()
+ {
+ tlog.Debug(tag, $"TextFieldConstructorWithoutViewStyle START");
+
+ using (TextField textField = new TextField(true))
+ {
+ var testingTarget = new TextField(textField.SwigCPtr.Handle, false, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TextFieldConstructorWithoutViewStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField constructor. With TextField.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TextField C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldConstructorWithTextField()
+ {
+ tlog.Debug(tag, $"TextFieldConstructorWithTextField START");
+
+ using (MyTextField textField = new MyTextField(true))
+ {
+ var testingTarget = new TextField(textField, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TextFieldConstructorWithTextField END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField TranslatableText.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TranslatableText A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldTranslatableText()
+ {
+ tlog.Debug(tag, $"TextFieldTranslatableText START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ if (NUIApplication.MultilingualResourceManager != null)
+ {
+ testingTarget.TranslatableText = "TextFieldTranslatableText";
+ Assert.AreEqual("TextFieldTranslatableText", testingTarget.TranslatableText, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldTranslatableText END (OK)");
+ }
+ else
+ {
+ try
+ {
+ testingTarget.TranslatableText = "TextFieldTranslatableText";
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"TextFieldTranslatableText END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField TranslatablePlaceholderText.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TranslatablePlaceholderText A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldTranslatablePlaceholderText()
+ {
+ tlog.Debug(tag, $"TextFieldTranslatablePlaceholderText START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ if (NUIApplication.MultilingualResourceManager != null)
+ {
+ testingTarget.TranslatablePlaceholderText = "TextFieldTranslatableText";
+ Assert.AreEqual("TextFieldTranslatableText", testingTarget.TranslatablePlaceholderText, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldTranslatablePlaceholderText END (OK)");
+ }
+ else
+ {
+ try
+ {
+ testingTarget.TranslatablePlaceholderText = "TextFieldTranslatableText";
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"TextFieldTranslatablePlaceholderText END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField TranslatablePlaceholderTextFocused.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TranslatablePlaceholderTextFocused A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldTranslatablePlaceholderTextFocused()
+ {
+ tlog.Debug(tag, $"TextFieldTranslatablePlaceholderTextFocused START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ if (NUIApplication.MultilingualResourceManager != null)
+ {
+ testingTarget.TranslatablePlaceholderTextFocused = "TextFieldTranslatableText";
+ Assert.AreEqual("TextFieldTranslatableText", testingTarget.TranslatablePlaceholderTextFocused, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldTranslatablePlaceholderTextFocused END (OK)");
+ }
+ else
+ {
+ try
+ {
+ testingTarget.TranslatablePlaceholderTextFocused = "TextFieldTranslatableText";
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"TextFieldTranslatablePlaceholderTextFocused END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField Text.")]
+ [Property("SPEC", "Tizen.NUI.TextField.Text A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldText()
+ {
+ tlog.Debug(tag, $"TextFieldText START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.Text = "TextFieldText";
+ Assert.AreEqual("TextFieldText", testingTarget.Text, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldText END (OK)");
+
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField PlaceholderText.")]
+ [Property("SPEC", "Tizen.NUI.TextField.PlaceholderText A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldPlaceholderText()
+ {
+ tlog.Debug(tag, $"TextFieldPlaceholderText START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.PlaceholderText = "PlaceholderText";
+ Assert.AreEqual("PlaceholderText", testingTarget.PlaceholderText, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldPlaceholderText END (OK)");
+
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField PlaceholderTextFocused.")]
+ [Property("SPEC", "Tizen.NUI.TextField.PlaceholderTextFocused A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldPlaceholderTextFocused()
+ {
+ tlog.Debug(tag, $"TextFieldPlaceholderTextFocused START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.PlaceholderTextFocused = "PlaceholderTextFocused";
+ Assert.AreEqual("PlaceholderTextFocused", testingTarget.PlaceholderTextFocused, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldPlaceholderTextFocused END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField FontFamily.")]
+ [Property("SPEC", "Tizen.NUI.TextField.FontFamily A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldFontFamily()
+ {
+ tlog.Debug(tag, $"TextFieldFontFamily START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.FontFamily = "BreezeSans";
+ Assert.AreEqual("BreezeSans", testingTarget.FontFamily, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldFontFamily END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField FontStyle.")]
+ [Property("SPEC", "Tizen.NUI.TextField.FontStyle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldFontStyle()
+ {
+ tlog.Debug(tag, $"TextFieldFontFamily START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap fontStyle = new PropertyMap())
+ {
+ fontStyle.Add("weight", new PropertyValue("bold"));
+ fontStyle.Add("width", new PropertyValue("condensed"));
+ fontStyle.Add("slant", new PropertyValue("italic"));
+
+ testingTarget.FontStyle = fontStyle;
+ Assert.IsNotNull(testingTarget.FontStyle, "Should not be null!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldFontFamily END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField PointSize.")]
+ [Property("SPEC", "Tizen.NUI.TextField.PointSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldPointSize()
+ {
+ tlog.Debug(tag, $"TextFieldPointSize START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.PointSize = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.PointSize, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldPointSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField MaxLength.")]
+ [Property("SPEC", "Tizen.NUI.TextField.MaxLength A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldMaxLength()
+ {
+ tlog.Debug(tag, $"TextFieldMaxLength START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.MaxLength = 1000;
+ Assert.AreEqual(1000, testingTarget.MaxLength, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldMaxLength END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField ExceedPolicy.")]
+ [Property("SPEC", "Tizen.NUI.TextField.ExceedPolicy A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldExceedPolicy()
+ {
+ tlog.Debug(tag, $"TextFieldExceedPolicy START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.ExceedPolicy = 1000;
+ Assert.AreEqual(1000, testingTarget.ExceedPolicy, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldExceedPolicy END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField HorizontalAlignment.")]
+ [Property("SPEC", "Tizen.NUI.TextField.HorizontalAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldHorizontalAlignment()
+ {
+ tlog.Debug(tag, $"TextFieldHorizontalAlignment START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.HorizontalAlignment = HorizontalAlignment.End;
+ Assert.AreEqual(HorizontalAlignment.End, testingTarget.HorizontalAlignment, "Should be equal!");
+
+ testingTarget.HorizontalAlignment = HorizontalAlignment.Begin;
+ Assert.AreEqual(HorizontalAlignment.Begin, testingTarget.HorizontalAlignment, "Should be equal!");
+
+ testingTarget.HorizontalAlignment = HorizontalAlignment.Center;
+ Assert.AreEqual(HorizontalAlignment.Center, testingTarget.HorizontalAlignment, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldHorizontalAlignment END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField VerticalAlignment.")]
+ [Property("SPEC", "Tizen.NUI.TextField.VerticalAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldVerticalAlignment()
+ {
+ tlog.Debug(tag, $"TextFieldVerticalAlignment START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.VerticalAlignment = VerticalAlignment.Bottom;
+ Assert.AreEqual(VerticalAlignment.Bottom, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.VerticalAlignment = VerticalAlignment.Top;
+ Assert.AreEqual(VerticalAlignment.Top, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.VerticalAlignment = VerticalAlignment.Center;
+ Assert.AreEqual(VerticalAlignment.Center, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldVerticalAlignment END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField TextColor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.TextColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldTextColor()
+ {
+ tlog.Debug(tag, $"TextFieldTextColor START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.TextColor = new Color(1.0f, 1.0f, 0.8f, 0.0f);
+ Assert.AreEqual(1.0f, testingTarget.TextColor.R, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.TextColor.G, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.TextColor.B, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.TextColor.A, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldTextColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField PlaceholderTextColor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.PlaceholderTextColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldPlaceholderTextColor()
+ {
+ tlog.Debug(tag, $"TextFieldPlaceholderTextColor START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.PlaceholderTextColor = new Vector4(1.0f, 1.0f, 0.8f, 0.0f);
+ Assert.AreEqual(1.0f, testingTarget.PlaceholderTextColor.X, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.PlaceholderTextColor.Y, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.PlaceholderTextColor.Z, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.PlaceholderTextColor.W, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldPlaceholderTextColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField ShadowOffset.")]
+ [Property("SPEC", "Tizen.NUI.TextField.ShadowOffset A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldShadowOffset()
+ {
+ tlog.Debug(tag, $"TextFieldShadowOffset START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.ShadowOffset = new Vector2(1.0f, 0.8f);
+ Assert.AreEqual(1.0f, testingTarget.ShadowOffset.X, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.ShadowOffset.Y, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldShadowOffset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField ShadowColor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.ShadowColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldShadowColor()
+ {
+ tlog.Debug(tag, $"TextFieldShadowColor START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.ShadowColor = new Vector4(1.0f, 1.0f, 0.8f, 0.0f);
+ Assert.AreEqual(1.0f, testingTarget.ShadowColor.X, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.ShadowColor.Y, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.ShadowColor.Z, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.ShadowColor.W, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldShadowColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField PrimaryCursorColor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.PrimaryCursorColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldPrimaryCursorColor()
+ {
+ tlog.Debug(tag, $"TextFieldPrimaryCursorColor START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.PrimaryCursorColor = new Vector4(1.0f, 1.0f, 0.8f, 0.0f);
+ Assert.AreEqual(1.0f, testingTarget.PrimaryCursorColor.X, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.PrimaryCursorColor.Y, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.PrimaryCursorColor.Z, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.PrimaryCursorColor.W, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldPrimaryCursorColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SecondaryCursorColor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SecondaryCursorColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldSecondaryCursorColor()
+ {
+ tlog.Debug(tag, $"TextFieldSecondaryCursorColor START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.SecondaryCursorColor = new Vector4(1.0f, 0.5f, 0.0f, 0.8f);
+ Assert.AreEqual(1.0f, testingTarget.SecondaryCursorColor.X, "Should be equal!");
+ Assert.AreEqual(0.5f, testingTarget.SecondaryCursorColor.Y, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.SecondaryCursorColor.Z, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.SecondaryCursorColor.W, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldSecondaryCursorColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField EnableCursorBlink.")]
+ [Property("SPEC", "Tizen.NUI.TextField.EnableCursorBlink A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldEnableCursorBlink()
+ {
+ tlog.Debug(tag, $"TextFieldEnableCursorBlink START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.EnableCursorBlink = true;
+ Assert.AreEqual(true, testingTarget.EnableCursorBlink, "Should be equal!");
+
+ testingTarget.EnableCursorBlink = false;
+ Assert.AreEqual(false, testingTarget.EnableCursorBlink, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEnableCursorBlink END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField CursorBlinkInterval.")]
+ [Property("SPEC", "Tizen.NUI.TextField.CursorBlinkInterval A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldCursorBlinkInterval()
+ {
+ tlog.Debug(tag, $"TextFieldCursorBlinkInterval START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.CursorBlinkInterval = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.CursorBlinkInterval, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldCursorBlinkInterval END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField CursorBlinkDuration.")]
+ [Property("SPEC", "Tizen.NUI.TextField.CursorBlinkDuration A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldCursorBlinkDuration()
+ {
+ tlog.Debug(tag, $"TextFieldCursorBlinkDuration START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.CursorBlinkDuration = 300;
+ Assert.AreEqual(300, testingTarget.CursorBlinkDuration, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldCursorBlinkDuration END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField CursorWidth.")]
+ [Property("SPEC", "Tizen.NUI.TextField.CursorWidth A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldCursorWidth()
+ {
+ tlog.Debug(tag, $"TextFieldCursorWidth START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.CursorWidth = 4;
+ Assert.AreEqual(4, testingTarget.CursorWidth, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldCursorWidth END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField GrabHandleImage.")]
+ [Property("SPEC", "Tizen.NUI.TextField.GrabHandleImage A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldGrabHandleImage()
+ {
+ tlog.Debug(tag, $"TextFieldGrabHandleImage START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.GrabHandleImage = url;
+ Assert.AreEqual(url, testingTarget.GrabHandleImage, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldGrabHandleImage END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField GrabHandlePressedImage.")]
+ [Property("SPEC", "Tizen.NUI.TextField.GrabHandlePressedImage A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldGrabHandlePressedImage()
+ {
+ tlog.Debug(tag, $"TextFieldGrabHandlePressedImage START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.GrabHandlePressedImage = url;
+ Assert.AreEqual(url, testingTarget.GrabHandlePressedImage, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldGrabHandlePressedImage END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField ScrollThreshold.")]
+ [Property("SPEC", "Tizen.NUI.TextField.ScrollThreshold A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldScrollThreshold()
+ {
+ tlog.Debug(tag, $"TextFieldScrollThreshold START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.ScrollThreshold = 1.0f;
+ Assert.AreEqual(1.0f, testingTarget.ScrollThreshold, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldScrollThreshold END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField ScrollSpeed.")]
+ [Property("SPEC", "Tizen.NUI.TextField.ScrollSpeed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldScrollSpeed()
+ {
+ tlog.Debug(tag, $"TextFieldScrollSpeed START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.ScrollSpeed = 1.0f;
+ Assert.AreEqual(1.0f, testingTarget.ScrollSpeed, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldScrollSpeed END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectionHandleImageLeft.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectionHandleImageLeft A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldSelectionHandleImageLeft()
+ {
+ tlog.Debug(tag, $"TextFieldSelectionHandleImageLeft START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("SelectionHandleImageLeft", new PropertyValue(5.0f));
+
+ testingTarget.SelectionHandleImageLeft = map;
+
+ var result = testingTarget.SelectionHandleImageLeft;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldSelectionHandleImageLeft END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectionHandleImageRight.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectionHandleImageRight A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldSelectionHandleImageRight()
+ {
+ tlog.Debug(tag, $"TextFieldSelectionHandleImageRight START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("SelectionHandleImageLeft", new PropertyValue(5.0f));
+
+ testingTarget.SelectionHandleImageRight = map;
+
+ var result = testingTarget.SelectionHandleImageRight;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldSelectionHandleImageRight END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectionHandlePressedImageLeft.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectionHandlePressedImageLeft A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldSelectionHandlePressedImageLeft()
+ {
+ tlog.Debug(tag, $"TextFieldSelectionHandlePressedImageLeft START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("SelectionHandleImageLeft", new PropertyValue(5.0f));
+
+ testingTarget.SelectionHandlePressedImageLeft = map;
+
+ var result = testingTarget.SelectionHandlePressedImageLeft;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldSelectionHandlePressedImageLeft END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectionHandlePressedImageRight.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectionHandlePressedImageRight A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldSelectionHandlePressedImageRight()
+ {
+ tlog.Debug(tag, $"TextFieldSelectionHandlePressedImageRight START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("SelectionHandleImageLeft", new PropertyValue(5.0f));
+
+ testingTarget.SelectionHandlePressedImageRight = map;
+
+ var result = testingTarget.SelectionHandlePressedImageRight;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldSelectionHandlePressedImageRight END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectionHandleMarkerImageLeft.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectionHandleMarkerImageLeft A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldSelectionHandleMarkerImageLeft()
+ {
+ tlog.Debug(tag, $"TextFieldSelectionHandleMarkerImageLeft START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("SelectionHandleImageLeft", new PropertyValue(5.0f));
+
+ testingTarget.SelectionHandleMarkerImageLeft = map;
+
+ var result = testingTarget.SelectionHandleMarkerImageLeft;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldSelectionHandleMarkerImageLeft END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectionHandleMarkerImageRight.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectionHandleMarkerImageRight A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldSelectionHandleMarkerImageRight()
+ {
+ tlog.Debug(tag, $"TextFieldSelectionHandleMarkerImageRight START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("SelectionHandleImageLeft", new PropertyValue(5.0f));
+
+ testingTarget.SelectionHandleMarkerImageRight = map;
+
+ var result = testingTarget.SelectionHandleMarkerImageRight;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldSelectionHandleMarkerImageRight END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectionHighlightColor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectionHighlightColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldSelectionHighlightColor()
+ {
+ tlog.Debug(tag, $"TextFieldSelectionHighlightColor START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.SelectionHighlightColor = new Vector4(0.3f, 0.5f, 0.8f, 0.0f);
+ Assert.AreEqual(0.3f, testingTarget.SelectionHighlightColor.X, "Should be equal!");
+ Assert.AreEqual(0.5f, testingTarget.SelectionHighlightColor.Y, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.SelectionHighlightColor.Z, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.SelectionHighlightColor.W, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldSelectionHighlightColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField DecorationBoundingBox.")]
+ [Property("SPEC", "Tizen.NUI.TextField.DecorationBoundingBox A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldDecorationBoundingBox()
+ {
+ tlog.Debug(tag, $"TextFieldDecorationBoundingBox START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.DecorationBoundingBox = new Rectangle(3, 5, 8, 10);
+ Assert.AreEqual(3, testingTarget.DecorationBoundingBox.X, "Should be equal!");
+ Assert.AreEqual(5, testingTarget.DecorationBoundingBox.Y, "Should be equal!");
+ Assert.AreEqual(8, testingTarget.DecorationBoundingBox.Width, "Should be equal!");
+ Assert.AreEqual(10, testingTarget.DecorationBoundingBox.Height, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldDecorationBoundingBox END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputMethodSettings.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputMethodSettings A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldInputMethodSettings()
+ {
+ tlog.Debug(tag, $"TextFieldInputMethodSettings START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("InputMethodSettings", new PropertyValue(5.0f));
+
+ testingTarget.InputMethodSettings = map;
+
+ var result = testingTarget.InputMethodSettings;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputMethodSettings END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputColor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TextFieldInputColor()
+ {
+ tlog.Debug(tag, $"TextFieldInputColor START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.InputColor = new Vector4(0.3f, 0.5f, 0.8f, 0.0f);
+ Assert.AreEqual(0.3f, testingTarget.InputColor.X, "Should be equal!");
+ Assert.AreEqual(0.5f, testingTarget.InputColor.Y, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.InputColor.Z, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.InputColor.W, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField EnableMarkup.")]
+ [Property("SPEC", "Tizen.NUI.TextField.EnableMarkup A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldEnableMarkup()
+ {
+ tlog.Debug(tag, $"TextFieldEnableMarkup START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.EnableMarkup = true;
+ Assert.AreEqual(true, testingTarget.EnableMarkup, "Should be equal!");
+
+ testingTarget.EnableMarkup = false;
+ Assert.AreEqual(false, testingTarget.EnableMarkup, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEnableMarkup END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputFontFamily.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputFontFamily A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldInputFontFamily()
+ {
+ tlog.Debug(tag, $"TextFieldInputFontFamily START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.InputFontFamily = "BreezeSans";
+ Assert.AreEqual("BreezeSans", testingTarget.InputFontFamily, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputFontFamily END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputFontStyle.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputFontStyle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldInputFontStyle()
+ {
+ tlog.Debug(tag, $"TextFieldInputFontStyle START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap fontStyle = new PropertyMap())
+ {
+ fontStyle.Add("weight", new PropertyValue("bold"));
+ fontStyle.Add("width", new PropertyValue("condensed"));
+ fontStyle.Add("slant", new PropertyValue("italic"));
+
+ testingTarget.InputFontStyle = fontStyle;
+ Assert.IsNotNull(testingTarget.InputFontStyle, "Should not be null!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputFontStyle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputPointSize.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputPointSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldInputPointSize()
+ {
+ tlog.Debug(tag, $"TextFieldInputPointSize START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.InputPointSize = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.InputPointSize, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputPointSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField Underline.")]
+ [Property("SPEC", "Tizen.NUI.TextField.Underline A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldUnderline()
+ {
+ tlog.Debug(tag, $"TextFieldUnderline START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("Underline", new PropertyValue(5.0f));
+
+ testingTarget.Underline = map;
+
+ var result = testingTarget.Underline;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldUnderline END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputUnderline.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputUnderline A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldInputUnderline()
+ {
+ tlog.Debug(tag, $"TextFieldInputUnderline START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.InputUnderline = "40";
+ Assert.AreEqual("40", testingTarget.InputUnderline, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputUnderline END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField Shadow.")]
+ [Property("SPEC", "Tizen.NUI.TextField.Shadow A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldShadow()
+ {
+ tlog.Debug(tag, $"TextFieldShadow START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("Shadow", new PropertyValue(5.0f));
+
+ testingTarget.Underline = map;
+
+ var result = testingTarget.Shadow;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldShadow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputShadow.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputShadow A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldInputShadow()
+ {
+ tlog.Debug(tag, $"TextFieldInputShadow START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.InputShadow = "40";
+ Assert.AreEqual("40", testingTarget.InputShadow, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputShadow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField Emboss.")]
+ [Property("SPEC", "Tizen.NUI.TextField.Emboss A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldEmboss()
+ {
+ tlog.Debug(tag, $"TextFieldEmboss START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.Emboss = "40";
+ Assert.AreEqual("40", testingTarget.Emboss, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEmboss END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputEmboss.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputEmboss A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldInputEmboss()
+ {
+ tlog.Debug(tag, $"TextFieldInputEmboss START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.InputEmboss = "40";
+ Assert.AreEqual("40", testingTarget.InputEmboss, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputEmboss END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField Outline.")]
+ [Property("SPEC", "Tizen.NUI.TextField.Outline A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldOutline()
+ {
+ tlog.Debug(tag, $"TextFieldOutline START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("Shadow", new PropertyValue(5.0f));
+
+ testingTarget.Outline = map;
+
+ var result = testingTarget.Outline;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldOutline END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField InputOutline.")]
+ [Property("SPEC", "Tizen.NUI.TextField.InputOutline A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldInputOutline()
+ {
+ tlog.Debug(tag, $"TextFieldInputOutline START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.InputOutline = "40";
+ Assert.AreEqual("40", testingTarget.InputOutline, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldInputOutline END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField HiddenInputSettings.")]
+ [Property("SPEC", "Tizen.NUI.TextField.HiddenInputSettings A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldHiddenInputSettings()
+ {
+ tlog.Debug(tag, $"TextFieldHiddenInputSettings START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("HiddenInputSettings", new PropertyValue(5.0f));
+
+ testingTarget.HiddenInputSettings = map;
+
+ var result = testingTarget.HiddenInputSettings;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldHiddenInputSettings END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField PixelSize.")]
+ [Property("SPEC", "Tizen.NUI.TextField.PixelSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldPixelSize()
+ {
+ tlog.Debug(tag, $"TextFieldPixelSize START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.PixelSize = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.PixelSize, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldPixelSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField EnableSelection.")]
+ [Property("SPEC", "Tizen.NUI.TextField.EnableSelection A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldEnableSelection()
+ {
+ tlog.Debug(tag, $"TextFieldEnableSelection START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.EnableSelection = true;
+ Assert.AreEqual(true, testingTarget.EnableSelection, "Should be equal!");
+
+ testingTarget.EnableSelection = false;
+ Assert.AreEqual(false, testingTarget.EnableSelection, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEnableSelection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField EnableGrabHandle.")]
+ [Property("SPEC", "Tizen.NUI.TextField.EnableGrabHandle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldEnableGrabHandle()
+ {
+ tlog.Debug(tag, $"TextFieldEnableGrabHandle START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.EnableGrabHandle = true;
+ Assert.AreEqual(true, testingTarget.EnableGrabHandle, "Should be equal!");
+
+ testingTarget.EnableGrabHandle = false;
+ Assert.AreEqual(false, testingTarget.EnableGrabHandle, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEnableGrabHandle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField EnableGrabHandlePopup.")]
+ [Property("SPEC", "Tizen.NUI.TextField.EnableGrabHandlePopup A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldEnableGrabHandlePopup()
+ {
+ tlog.Debug(tag, $"TextFieldEnableGrabHandlePopup START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.EnableGrabHandlePopup = true;
+ Assert.AreEqual(true, testingTarget.EnableGrabHandlePopup, "Should be equal!");
+
+ testingTarget.EnableGrabHandlePopup = false;
+ Assert.AreEqual(false, testingTarget.EnableGrabHandlePopup, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEnableGrabHandlePopup END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField GrabHandleColor.")]
+ [Property("SPEC", "Tizen.NUI.TextField.GrabHandleColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldGrabHandleColor()
+ {
+ tlog.Debug(tag, $"TextFieldGrabHandleColor START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.GrabHandleColor = new Color(1.0f, 1.0f, 0.8f, 0.0f);
+ Assert.AreEqual(1.0f, testingTarget.GrabHandleColor.R, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.GrabHandleColor.G, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.GrabHandleColor.B, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.GrabHandleColor.A, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldGrabHandleColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField Placeholder.")]
+ [Property("SPEC", "Tizen.NUI.TextField.Placeholder A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldPlaceholder()
+ {
+ tlog.Debug(tag, $"TextFieldPlaceholder START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("Placeholder", new PropertyValue(5.0f));
+
+ testingTarget.Placeholder = map;
+
+ var result = testingTarget.Placeholder;
+ Assert.IsNotNull(result, "Can't create success object PropertyMap");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldPlaceholder END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField Ellipsis.")]
+ [Property("SPEC", "Tizen.NUI.TextField.Ellipsis A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldEllipsis()
+ {
+ tlog.Debug(tag, $"TextFieldEllipsis START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.Ellipsis = true;
+ Assert.AreEqual(true, testingTarget.Ellipsis, "Should be equal!");
+
+ testingTarget.Ellipsis = false;
+ Assert.AreEqual(false, testingTarget.Ellipsis, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEllipsis END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField EnableShiftSelection.")]
+ [Property("SPEC", "Tizen.NUI.TextField.EnableShiftSelection A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldEnableShiftSelection()
+ {
+ tlog.Debug(tag, $"TextFieldEnableShiftSelection START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.EnableShiftSelection = true;
+ Assert.AreEqual(true, testingTarget.EnableShiftSelection, "Should be equal!");
+
+ testingTarget.EnableShiftSelection = false;
+ Assert.AreEqual(false, testingTarget.EnableShiftSelection, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEnableShiftSelection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField MatchSystemLanguageDirection.")]
+ [Property("SPEC", "Tizen.NUI.TextField.MatchSystemLanguageDirection A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldMatchSystemLanguageDirection()
+ {
+ tlog.Debug(tag, $"TextFieldMatchSystemLanguageDirection START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.MatchSystemLanguageDirection = true;
+ Assert.AreEqual(true, testingTarget.MatchSystemLanguageDirection, "Should be equal!");
+
+ testingTarget.MatchSystemLanguageDirection = false;
+ Assert.AreEqual(false, testingTarget.MatchSystemLanguageDirection, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldMatchSystemLanguageDirection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField FontSizeScale.")]
+ [Property("SPEC", "Tizen.NUI.TextField.FontSizeScale A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldFontSizeScale()
+ {
+ tlog.Debug(tag, $"TextFieldFontSizeScale START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.FontSizeScale = 2.0f;
+ Assert.AreEqual(2.0f, testingTarget.FontSizeScale, "Should be equal!");
+
+ testingTarget.FontSizeScale = Tizen.NUI.FontSizeScale.UseSystemSetting;
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldFontSizeScale END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectWholeText.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectWholeText M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldSelectWholeText()
+ {
+ tlog.Debug(tag, $"TextFieldSelectWholeText START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ try
+ {
+ testingTarget.SelectWholeText();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"TextFieldSelectWholeText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField SelectNone.")]
+ [Property("SPEC", "Tizen.NUI.TextField.SelectNone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldSelectNone()
+ {
+ tlog.Debug(tag, $"TextFieldSelectNone START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ try
+ {
+ testingTarget.SelectNone();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"TextFieldSelectNone END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextField Dispose.")]
+ [Property("SPEC", "Tizen.NUI.TextField.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldDispose()
+ {
+ tlog.Debug(tag, $"TextFieldDispose START");
+
+ var testingTarget = new MyTextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"TextFieldDispose END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/TextLabelEvent")]
+ public class PublicTextLabelEventTest
+ {
+ 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("TextLabelEvent.AnchorClicked.")]
+ [Property("SPEC", "Tizen.NUI.TextLabelEvent.AnchorClicked A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextLabelEventAnchorClicked()
+ {
+ tlog.Debug(tag, $"TextLabelEventAnchorClicked START");
+
+ TextLabel label = new TextLabel()
+ {
+ Text = "hypertext",
+ };
+
+ label.AnchorClicked += MyOnAnchorClicked;
+ label.AnchorClicked -= MyOnAnchorClicked;
+
+ label.Dispose();
+ tlog.Debug(tag, $"TextLabelEventAnchorClicked END (OK)");
+ }
+
+ private void MyOnAnchorClicked(object sender, AnchorClickedEventArgs e)
+ {
+ var label = sender as TextLabel;
+ e.Href = Marshal.PtrToStringAnsi(label.SwigCPtr.Handle);
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/TextLabelSelectorData")]
+ public class PublicTextLabelSelectorDataTest
+ {
+ 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("TextLabelSelectorData Reset.")]
+ [Property("SPEC", "Tizen.NUI.TextLabelSelectorData.Reset M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextLabelSelectorDataReset()
+ {
+ tlog.Debug(tag, $"TextLabelSelectorDataReset START");
+
+ var testingTarget = new TextLabelSelectorData();
+ Assert.IsNotNull(testingTarget, "Can't create success object TextLabelSelectorData");
+ Assert.IsInstanceOf<TextLabelSelectorData>(testingTarget, "Should be an instance of TextLabelSelectorData type.");
+
+ TextLabel textLabel = new TextLabel()
+ {
+ Text = "PublicTextLabelSelectorDataTest",
+ FontFamily = "BreezeSans",
+ TextColor = Color.Green,
+ PointSize = 15.0f,
+ PixelSize = 0.3f
+ };
+
+ try
+ {
+ testingTarget.Reset(textLabel);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"TextLabelSelectorDataReset END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/TextUtils")]
+ class PublicTextUtilsTest
+ {
+ 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("TextUtils.RendererParameters constructor.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.RendererParameters C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersConstructor()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersConstructor START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters Text.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.RendererParameters A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersText()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersText START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.Text = "RendererParameters";
+ Assert.AreEqual("RendererParameters", testingTarget.Text, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters HorizontalAlignment.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.HorizontalAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersHorizontalAlignment()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersHorizontalAlignment START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.HorizontalAlignment = HorizontalAlignment.Begin;
+ Assert.AreEqual(HorizontalAlignment.Begin, testingTarget.HorizontalAlignment, "Should be equal!");
+
+ testingTarget.HorizontalAlignment = HorizontalAlignment.Center;
+ Assert.AreEqual(HorizontalAlignment.Center, testingTarget.HorizontalAlignment, "Should be equal!");
+
+ testingTarget.HorizontalAlignment = HorizontalAlignment.End;
+ Assert.AreEqual(HorizontalAlignment.End, testingTarget.HorizontalAlignment, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersHorizontalAlignment END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters VerticalAlignment.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.VerticalAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersVerticalAlignment()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersVerticalAlignment START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.VerticalAlignment = VerticalAlignment.Bottom;
+ Assert.AreEqual(VerticalAlignment.Bottom, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.VerticalAlignment = VerticalAlignment.Top;
+ Assert.AreEqual(VerticalAlignment.Top, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.VerticalAlignment = VerticalAlignment.Center;
+ Assert.AreEqual(VerticalAlignment.Center, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersVerticalAlignment END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters FontFamily.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.FontFamily A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersFontFamily()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontFamily START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.FontFamily = "BreezeSans";
+ Assert.AreEqual("BreezeSans", testingTarget.FontFamily, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontFamily END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters FontWeight.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.FontWeight A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersFontWeight()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontWeight START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.FontWeight = "demiLight";
+ Assert.AreEqual("demiLight", testingTarget.FontWeight, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontWeight END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters FontWidth.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.FontWidth A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersFontWidth()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontWidth START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.FontWidth = "condensed";
+ Assert.AreEqual("condensed", testingTarget.FontWidth, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontWidth END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters FontSlant.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.FontSlant A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersFontSlant()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontSlant START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.FontSlant = "italic";
+ Assert.AreEqual("italic", testingTarget.FontSlant, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontSlant END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters Layout.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.Layout A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersLayout()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersLayout START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.Layout = TextLayout.MultiLine;
+ Assert.AreEqual(TextLayout.MultiLine, testingTarget.Layout, "Should be equal!");
+
+ testingTarget.Layout = TextLayout.Circular;
+ Assert.AreEqual(TextLayout.Circular, testingTarget.Layout, "Should be equal!");
+
+ testingTarget.Layout = TextLayout.SingleLine;
+ Assert.AreEqual(TextLayout.SingleLine, testingTarget.Layout, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters CircularAlignment.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.CircularAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersCircularAlignment()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersCircularAlignment START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.CircularAlignment = CircularAlignment.End;
+ Assert.AreEqual(CircularAlignment.End, testingTarget.CircularAlignment, "Should be equal!");
+
+ testingTarget.CircularAlignment = CircularAlignment.Center;
+ Assert.AreEqual(CircularAlignment.Center, testingTarget.CircularAlignment, "Should be equal!");
+
+ testingTarget.CircularAlignment = CircularAlignment.Begin;
+ Assert.AreEqual(CircularAlignment.Begin, testingTarget.CircularAlignment, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersCircularAlignment END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters TextColor.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.TextColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersTextColor()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersTextColor START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.TextColor = new Vector4(0.3f, 0.8f, 1.0f, 0.0f);
+ Assert.AreEqual(0.3f, testingTarget.TextColor.R, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.TextColor.G, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.TextColor.B, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.TextColor.A, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersTextColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters FontSize.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.FontSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersFontSize()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontSize START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.FontSize = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.FontSize, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersFontSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters TextWidth.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.TextWidth A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersTextWidth()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersTextWidth START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.TextWidth = 32;
+ Assert.AreEqual(32, testingTarget.TextWidth, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersTextWidth END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters TextHeight.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.TextHeight A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersTextHeight()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersTextHeight START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.TextHeight = 16;
+ Assert.AreEqual(16, testingTarget.TextHeight, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersTextHeight END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters Radius.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.Radius A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersRadius()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersRadius START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.Radius = 16;
+ Assert.AreEqual(16, testingTarget.Radius, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersRadius END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters BeginAngle.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.BeginAngle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersBeginAngle()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersBeginAngle START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.BeginAngle = 30.0f;
+ Assert.AreEqual(30.0f, testingTarget.BeginAngle, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersBeginAngle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters IncrementAngle.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.IncrementAngle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersIncrementAngle()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersIncrementAngle START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.IncrementAngle = 5.0f;
+ Assert.AreEqual(5.0f, testingTarget.IncrementAngle, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersIncrementAngle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters EllipsisEnabled.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.EllipsisEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersEllipsisEnabled()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersEllipsisEnabled START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.Layout = TextLayout.SingleLine;
+
+ testingTarget.EllipsisEnabled = true;
+ Assert.AreEqual(true, testingTarget.EllipsisEnabled, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersEllipsisEnabled END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters MarkupEnabled.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.MarkupEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersMarkupEnabled()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersMarkupEnabled START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.Layout = TextLayout.SingleLine;
+
+ testingTarget.MarkupEnabled = true;
+ Assert.AreEqual(true, testingTarget.MarkupEnabled, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersMarkupEnabled END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters IsTextColorSet.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.IsTextColorSet A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersIsTextColorSet()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersIsTextColorSet START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.TextColor = Color.Cyan;
+ Assert.AreEqual(true, testingTarget.IsTextColorSet, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersIsTextColorSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters MinLineSize.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.MinLineSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersMinLineSize()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersMinLineSize START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.MinLineSize = 1.5f;
+ Assert.AreEqual(1.5f, testingTarget.MinLineSize, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersMinLineSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.RendererParameters Padding.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.RendererParameters.Padding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRendererParametersPadding()
+ {
+ tlog.Debug(tag, $"TextUtilsRendererParametersPadding START");
+
+ var testingTarget = new RendererParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object RendererParameters");
+ Assert.IsInstanceOf<RendererParameters>(testingTarget, "Should be an instance of RendererParameters type.");
+
+ testingTarget.Padding = new Extents(4, 4, 4, 4);
+ Assert.AreEqual(4, testingTarget.Padding.Start, "Should be equal!");
+ Assert.AreEqual(4, testingTarget.Padding.End, "Should be equal!");
+ Assert.AreEqual(4, testingTarget.Padding.Top, "Should be equal!");
+ Assert.AreEqual(4, testingTarget.Padding.Bottom, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsRendererParametersPadding END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.EmbeddedItemInfo constructor.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.EmbeddedItemInfo.EmbeddedItemInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsEmbeddedItemInfoConstructor()
+ {
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoConstructor START");
+
+ var testingTarget = new EmbeddedItemInfo();
+ Assert.IsNotNull(testingTarget, "Can't create success object EmbeddedItemInfo");
+ Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.EmbeddedItemInfo CharacterIndex.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.EmbeddedItemInfo.CharacterIndex A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsEmbeddedItemInfoCharacterIndex()
+ {
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoCharacterIndex START");
+
+ var testingTarget = new EmbeddedItemInfo();
+ Assert.IsNotNull(testingTarget, "Can't create success object EmbeddedItemInfo");
+ Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
+
+ testingTarget.CharacterIndex = 911;
+ Assert.AreEqual(911, testingTarget.CharacterIndex, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoCharacterIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.EmbeddedItemInfo GlyphIndex.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.EmbeddedItemInfo.GlyphIndex A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsEmbeddedItemInfoGlyphIndex()
+ {
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoGlyphIndex START");
+
+ var testingTarget = new EmbeddedItemInfo();
+ Assert.IsNotNull(testingTarget, "Can't create success object EmbeddedItemInfo");
+ Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
+
+ testingTarget.GlyphIndex = 911;
+ Assert.AreEqual(911, testingTarget.GlyphIndex, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoGlyphIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.EmbeddedItemInfo Position.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.EmbeddedItemInfo.Position A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsEmbeddedItemInfoPosition()
+ {
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoPosition START");
+
+ var testingTarget = new EmbeddedItemInfo();
+ Assert.IsNotNull(testingTarget, "Can't create success object EmbeddedItemInfo");
+ Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
+
+ testingTarget.Position = new Vector2(100.0f, 200.0f);
+ Assert.AreEqual(100.0f, testingTarget.Position.X, "Should be equal!");
+ Assert.AreEqual(200.0f, testingTarget.Position.Y, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.EmbeddedItemInfo Size.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.EmbeddedItemInfo.Size A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsEmbeddedItemInfoSize()
+ {
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoSize START");
+
+ var testingTarget = new EmbeddedItemInfo();
+ Assert.IsNotNull(testingTarget, "Can't create success object EmbeddedItemInfo");
+ Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
+
+ testingTarget.Size = new Size(100.0f, 200.0f);
+ Assert.AreEqual(100.0f, testingTarget.Size.Width, "Should be equal!");
+ Assert.AreEqual(200.0f, testingTarget.Size.Height, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.EmbeddedItemInfo RotatedSize.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.EmbeddedItemInfo.RotatedSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsEmbeddedItemInfoRotatedSize()
+ {
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoRotatedSize START");
+
+ var testingTarget = new EmbeddedItemInfo();
+ Assert.IsNotNull(testingTarget, "Can't create success object EmbeddedItemInfo");
+ Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
+
+ testingTarget.RotatedSize = new Size(100.0f, 200.0f);
+ Assert.AreEqual(100.0f, testingTarget.RotatedSize.Width, "Should be equal!");
+ Assert.AreEqual(200.0f, testingTarget.RotatedSize.Height, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoRotatedSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.EmbeddedItemInfo Angle.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.EmbeddedItemInfo.Angle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsEmbeddedItemInfoAngle()
+ {
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoAngle START");
+
+ var testingTarget = new EmbeddedItemInfo();
+ Assert.IsNotNull(testingTarget, "Can't create success object EmbeddedItemInfo");
+ Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
+
+ testingTarget.Angle = new Degree(30.0f);
+ Assert.AreEqual(30.0f, testingTarget.Angle.Value, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoAngle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.EmbeddedItemInfo ColorBlendingMode.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.EmbeddedItemInfo.ColorBlendingMode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsEmbeddedItemInfoColorBlendingModee()
+ {
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoColorBlendingModee START");
+
+ var testingTarget = new EmbeddedItemInfo();
+ Assert.IsNotNull(testingTarget, "Can't create success object EmbeddedItemInfo");
+ Assert.IsInstanceOf<EmbeddedItemInfo>(testingTarget, "Should be an instance of EmbeddedItemInfo type.");
+
+ testingTarget.ColorBlendingMode = Tizen.NUI.ColorBlendingMode.Multiply;
+ Assert.AreEqual(Tizen.NUI.ColorBlendingMode.Multiply, testingTarget.ColorBlendingMode, "Should be equal!");
+
+ testingTarget.ColorBlendingMode = Tizen.NUI.ColorBlendingMode.None;
+ Assert.AreEqual(Tizen.NUI.ColorBlendingMode.None, testingTarget.ColorBlendingMode, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsEmbeddedItemInfoColorBlendingModee END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.ShadowParameters constructor.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.ShadowParameters.ShadowParameters C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsShadowParametersConstructor()
+ {
+ tlog.Debug(tag, $"TextUtilsShadowParametersConstructor START");
+
+ var testingTarget = new ShadowParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object ShadowParameters");
+ Assert.IsInstanceOf<ShadowParameters>(testingTarget, "Should be an instance of ShadowParameters type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsShadowParametersConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.ShadowParameters Input.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.ShadowParameters.Input A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsShadowParametersInput()
+ {
+ tlog.Debug(tag, $"TextUtilsShadowParametersInput START");
+
+ var testingTarget = new ShadowParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object ShadowParameters");
+ Assert.IsInstanceOf<ShadowParameters>(testingTarget, "Should be an instance of ShadowParameters type.");
+
+ testingTarget.Input = new PixelBuffer(30, 50, PixelFormat.A8);
+ Assert.AreEqual(30, testingTarget.Input.GetWidth(), "Should be equal!");
+ Assert.AreEqual(50, testingTarget.Input.GetHeight(), "Should be equal!");
+ Assert.AreEqual(PixelFormat.A8, testingTarget.Input.GetPixelFormat(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsShadowParametersInput END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.ShadowParameters TextColor.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.ShadowParameters.TextColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsShadowParametersTextColor()
+ {
+ tlog.Debug(tag, $"TextUtilsShadowParametersTextColor START");
+
+ var testingTarget = new ShadowParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object ShadowParameters");
+ Assert.IsInstanceOf<ShadowParameters>(testingTarget, "Should be an instance of ShadowParameters type.");
+
+ testingTarget.TextColor = new Vector4(0.3f, 0.8f, 1.0f, 0.0f);
+ Assert.AreEqual(0.3f, testingTarget.TextColor.R, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.TextColor.G, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.TextColor.B, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.TextColor.A, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsShadowParametersTextColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.ShadowParameters Color.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.ShadowParameters.Color A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsShadowParametersColor()
+ {
+ tlog.Debug(tag, $"TextUtilsShadowParametersColor START");
+
+ var testingTarget = new ShadowParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object ShadowParameters");
+ Assert.IsInstanceOf<ShadowParameters>(testingTarget, "Should be an instance of ShadowParameters type.");
+
+ testingTarget.Input = new PixelBuffer(30, 50, PixelFormat.A8);
+
+ testingTarget.Color = new Vector4(0.3f, 0.8f, 1.0f, 0.0f);
+ Assert.AreEqual(0.3f, testingTarget.Color.R, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.Color.G, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.Color.B, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.Color.A, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsShadowParametersColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.ShadowParameters Offset.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.ShadowParameters.Offset A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsShadowParametersOffset()
+ {
+ tlog.Debug(tag, $"TextUtilsShadowParametersOffset START");
+
+ var testingTarget = new ShadowParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object ShadowParameters");
+ Assert.IsInstanceOf<ShadowParameters>(testingTarget, "Should be an instance of ShadowParameters type.");
+
+ testingTarget.Offset = new Vector2(0.3f, 0.8f);
+ Assert.AreEqual(0.3f, testingTarget.Offset.X, "Should be equal!");
+ Assert.AreEqual(0.8f, testingTarget.Offset.Y, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsShadowParametersOffset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils.ShadowParameters blendShadow.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.ShadowParameters.blendShadow A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsShadowParametersblendShadow()
+ {
+ tlog.Debug(tag, $"TextUtilsShadowParametersblendShadow START");
+
+ var testingTarget = new ShadowParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object ShadowParameters");
+ Assert.IsInstanceOf<ShadowParameters>(testingTarget, "Should be an instance of ShadowParameters type.");
+
+ testingTarget.blendShadow = true;
+
+ try
+ {
+ var result = testingTarget.blendShadow;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsShadowParametersblendShadow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils Render.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.Render M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsRender()
+ {
+ tlog.Debug(tag, $"TextUtilsRender START");
+
+ TextLabel label = new TextLabel()
+ {
+ Size = new Size(50, 20),
+ Text = "TextUtilsGetLastCharacterIndex"
+ };
+
+ RendererParameters textParameters = new RendererParameters();
+ textParameters.Text = label.Text;
+ textParameters.TextWidth = (uint)label.Size.Width;
+ textParameters.TextHeight = (uint)label.Size.Height;
+ textParameters.Layout = TextLayout.MultiLine;
+ textParameters.EllipsisEnabled = true;
+
+ EmbeddedItemInfo[] embeddedItemLayout = new EmbeddedItemInfo[3];
+
+ var result = TextUtils.Render(textParameters, ref embeddedItemLayout);
+ Assert.IsNotNull(result, "Can't create success object PixelBuffer");
+ Assert.IsInstanceOf<PixelBuffer>(result, "Should be an instance of PixelBuffer type.");
+
+ tlog.Debug(tag, $"TextUtilsRender END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils CreateShadow.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.CreateShadow M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsCreateShadow()
+ {
+ tlog.Debug(tag, $"TextUtilsCreateShadow START");
+
+ var testingTarget = new ShadowParameters();
+ Assert.IsNotNull(testingTarget, "Can't create success object ShadowParameters");
+ Assert.IsInstanceOf<ShadowParameters>(testingTarget, "Should be an instance of ShadowParameters type.");
+
+ testingTarget.Input = new PixelBuffer(30, 50, PixelFormat.A8);
+ testingTarget.blendShadow = true;
+
+ var result = TextUtils.CreateShadow(testingTarget);
+ Assert.IsNotNull(result, "Can't create success object PixelBuffer");
+ Assert.IsInstanceOf<PixelBuffer>(result, "Should be an instance of PixelBuffer type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsCreateShadow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils ConvertToRgba8888.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.ConvertToRgba8888 M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsConvertToRgba8888()
+ {
+ tlog.Debug(tag, $"TextUtilsConvertToRgba8888 START");
+
+ var testingTarget = TextUtils.ConvertToRgba8888(new PixelBuffer(30, 50, PixelFormat.A8), new Vector4(0.3f, 0.8f, 1.0f, 0.0f), true);
+ Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer");
+ Assert.IsInstanceOf<PixelBuffer>(testingTarget, "Should be an instance of PixelBuffer type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextUtilsConvertToRgba8888 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils UpdateBuffer.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.UpdateBuffer M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsUpdateBuffer()
+ {
+ tlog.Debug(tag, $"TextUtilsUpdateBuffer START");
+
+ try
+ {
+ TextUtils.UpdateBuffer(new PixelBuffer(30, 50, PixelFormat.A8), new PixelBuffer(60, 100, PixelFormat.A8), 70, 90, true);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"TextUtilsUpdateBuffer END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils GetLastCharacterIndex.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.GetLastCharacterIndex M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsGetLastCharacterIndex()
+ {
+ tlog.Debug(tag, $"TextUtilsGetLastCharacterIndex START");
+
+ TextLabel label = new TextLabel()
+ {
+ Size = new Size(50, 20),
+ Text = "TextUtilsGetLastCharacterIndex"
+ };
+
+ RendererParameters textParameters = new RendererParameters();
+ textParameters.Text = label.Text;
+ textParameters.TextWidth = (uint)label.Size.Width;
+ textParameters.TextHeight = (uint)label.Size.Height;
+ textParameters.Layout = TextLayout.MultiLine;
+ textParameters.EllipsisEnabled = true;
+
+ var testingTarget = TextUtils.GetLastCharacterIndex(textParameters);
+ Assert.IsNotNull(testingTarget, "Can't create success object PropertyArray");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "Should be an instance of PropertyArray type.");
+
+ tlog.Debug(tag, $"TextUtilsGetLastCharacterIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextUtils GetFontSizeScale.")]
+ [Property("SPEC", "Tizen.NUI.TextUtils.GetFontSizeScale M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextUtilsGetFontSizeScale()
+ {
+ tlog.Debug(tag, $"TextUtilsGetFontSizeScale START");
+
+ try
+ {
+ var defaultV = TextUtils.GetFontSizeScale(Tizen.System.SystemSettings.FontSize);
+ Assert.AreEqual(1.0f, defaultV, "Should be equal!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ var giant = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Giant);
+ Assert.AreEqual(2.5f, giant, "Should be equal!");
+
+ var huge = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Huge);
+ Assert.AreEqual(1.9f, huge, "Should be equal!");
+
+ var large = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Large);
+ Assert.AreEqual(1.5f, large, "Should be equal!");
+
+ var normal = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Normal);
+ Assert.AreEqual(1.0f, normal, "Should be equal!");
+
+ var small = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Small);
+ Assert.AreEqual(0.8f, small, "Should be equal!");
+
+ tlog.Debug(tag, $"TextUtilsGetFontSizeScale END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/ViewAccessibility")]
+ public class PublicViewAccessibilityTest
+ {
+ private const string tag = "NUITEST";
+ private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/picture.png";
+ private string lottiePath = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/lottie.json";
+
+ internal class MyAddressCollection : AddressCollection
+ {
+ public MyAddressCollection(IntPtr collection) : base(collection)
+ { }
+
+ public void OnReleaseHandle()
+ {
+ base.ReleaseHandle();
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.Address constructor.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.Address.Address C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAddressConstructor()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAddressConstructor START");
+
+ var testingTarget = new Address("ViewAccessibility", lottiePath);
+ Assert.IsNotNull(testingTarget, "Can't create success object Address");
+ Assert.IsInstanceOf<Address>(testingTarget, "Should be an instance of Address type.");
+
+ tlog.Debug(tag, $"ViewAccessibilityAddressConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.AddressCollection constructor.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.AddressCollection.Address C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAddressCollectionConstructor()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionConstructor START");
+
+ using (View view = new ImageView())
+ {
+ var testingTarget = new AddressCollection(Interop.ControlDevel.DaliToolkitDevelControlNewGetAccessibilityRelations(view.SwigCPtr));
+ Assert.IsNotNull(testingTarget, "Can't create success object AddressCollection");
+ Assert.IsInstanceOf<AddressCollection>(testingTarget, "Should be an instance of AddressCollection type.");
+ }
+
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.AddressCollection IsInvalid.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.AddressCollection.IsInvalid A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAddressCollectionIsInvalid()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionIsInvalid START");
+
+ using (View view = new ImageView())
+ {
+ var testingTarget = new AddressCollection(Interop.ControlDevel.DaliToolkitDevelControlNewGetAccessibilityRelations(view.SwigCPtr));
+ Assert.IsNotNull(testingTarget, "Can't create success object AddressCollection");
+ Assert.IsInstanceOf<AddressCollection>(testingTarget, "Should be an instance of AddressCollection type.");
+
+ Assert.IsFalse(testingTarget.IsInvalid);
+ }
+
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionIsInvalid END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.AddressCollection GetRelationSize.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.AddressCollection.GetRelationSize M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAddressCollectionGetRelationSize()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionGetRelationSize START");
+
+ using (View view = new ImageView())
+ {
+ var testingTarget = new AddressCollection(Interop.ControlDevel.DaliToolkitDevelControlNewGetAccessibilityRelations(view.SwigCPtr));
+ Assert.IsNotNull(testingTarget, "Can't create success object AddressCollection");
+ Assert.IsInstanceOf<AddressCollection>(testingTarget, "Should be an instance of AddressCollection type.");
+
+ try
+ {
+ testingTarget.GetRelationSize(AccessibilityRelationType.DetailsFor);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionGetRelationSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.AddressCollection GetAddressAt.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.AddressCollection.GetAddressAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAddressCollectionGetAddressAt()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionGetAddressAt START");
+
+ using (View view = new ImageView())
+ {
+ var testingTarget = new AddressCollection(Interop.ControlDevel.DaliToolkitDevelControlNewGetAccessibilityRelations(view.SwigCPtr));
+ Assert.IsNotNull(testingTarget, "Can't create success object AddressCollection");
+ Assert.IsInstanceOf<AddressCollection>(testingTarget, "Should be an instance of AddressCollection type.");
+
+ try
+ {
+ var result = testingTarget.GetAddressAt(AccessibilityRelationType.Details, 19);
+ Assert.IsNotNull(result, "Can't create success object Address");
+ Assert.IsInstanceOf<Address>(result, "Should be an instance of Address type.");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionGetAddressAt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.AddressCollection ReleaseHandle.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.AddressCollection.ReleaseHandle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAddressCollectionReleaseHandle()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionReleaseHandle START");
+
+ using (View view = new ImageView())
+ {
+ var testingTarget = new MyAddressCollection(Interop.ControlDevel.DaliToolkitDevelControlNewGetAccessibilityRelations(view.SwigCPtr));
+ Assert.IsNotNull(testingTarget, "Can't create success object AddressCollection");
+ Assert.IsInstanceOf<AddressCollection>(testingTarget, "Should be an instance of AddressCollection type.");
+
+ try
+ {
+ testingTarget.OnReleaseHandle();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ViewAccessibilityAddressCollectionReleaseHandle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.AccessibilityRange StartOffset.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.AccessibilityRange.StartOffset A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAccessibilityRangeStartOffset()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAccessibilityRangeStartOffset START");
+
+ var testingTarget = new AccessibilityRange();
+ Assert.IsNotNull(testingTarget, "Can't create success object AccessibilityRange");
+ Assert.IsInstanceOf<AccessibilityRange>(testingTarget, "Should be an instance of AccessibilityRange type.");
+
+ testingTarget.StartOffset = 10;
+ Assert.AreEqual(10, testingTarget.StartOffset, "Should be equal!");
+
+ tlog.Debug(tag, $"ViewAccessibilityAccessibilityRangeStartOffset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.AccessibilityRange EndOffset.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.AccessibilityRange.EndOffset A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAccessibilityRangeEndOffset()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAccessibilityRangeEndOffset START");
+
+ var testingTarget = new AccessibilityRange();
+ Assert.IsNotNull(testingTarget, "Can't create success object AccessibilityRange");
+ Assert.IsInstanceOf<AccessibilityRange>(testingTarget, "Should be an instance of AccessibilityRange type.");
+
+ testingTarget.EndOffset = 30;
+ Assert.AreEqual(30, testingTarget.EndOffset, "Should be equal!");
+
+ tlog.Debug(tag, $"ViewAccessibilityAccessibilityRangeEndOffset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.AccessibilityRange Content.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.AccessibilityRange.Content A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityAccessibilityRangeContent()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityAccessibilityRangeContent START");
+
+ var testingTarget = new AccessibilityRange();
+ Assert.IsNotNull(testingTarget, "Can't create success object AccessibilityRange");
+ Assert.IsInstanceOf<AccessibilityRange>(testingTarget, "Should be an instance of AccessibilityRange type.");
+
+ testingTarget.Content = "TextLabel";
+ Assert.AreEqual("TextLabel", testingTarget.Content, "Should be equal!");
+
+ tlog.Debug(tag, $"ViewAccessibilityAccessibilityRangeContent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.View.RemoveAccessibilityAttribute.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.RemoveAccessibilityAttribute A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityViewRemoveAccessibilityAttribute()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityViewRemoveAccessibilityAttribute START");
+
+ var testingTarget = new View();
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+ testingTarget.AppendAccessibilityAttribute("MyView", "test");
+
+ try
+ {
+ testingTarget.RemoveAccessibilityAttribute("MyView");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ViewAccessibilityViewRemoveAccessibilityAttribute END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.View.ClearAccessibilityAttributes.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.ClearAccessibilityAttributes A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityViewClearAccessibilityAttributes()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityViewClearAccessibilityAttributes START");
+
+ var testingTarget = new View();
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+ testingTarget.AppendAccessibilityAttribute("MyView", "test");
+
+ try
+ {
+ testingTarget.ClearAccessibilityAttributes();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ViewAccessibilityViewClearAccessibilityAttributes END (OK)");
+ }
+ }
+}
view.Unparent();
view.Dispose();
- tlog.Debug(tag, $"ViewAnimateBackgroundColor END ");
+ tlog.Debug(tag, $"ViewAnimateBackgroundColor END (OK)");
}
[Test]
view.Unparent();
view.Dispose();
- tlog.Debug(tag, $"ViewAnimateColor END ");
+ tlog.Debug(tag, $"ViewAnimateColor END (OK)");
}
[Test]
{
view.Unparent();
view.Dispose();
- tlog.Debug(tag, $"ViewAddArgumentNull END ");
+ tlog.Debug(tag, $"ViewAddArgumentNull END (OK)");
}
}
Assert.IsNotNull(view, "should be not null");
Assert.IsFalse(view.HasFocus(), "should be false!");
- tlog.Debug(tag, $"ViewHasFocus END ");
+ tlog.Debug(tag, $"ViewHasFocus END (OK)");
}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/ViewSelectorData")]
+ public class PublicViewSelectorDataTest
+ {
+ 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("ViewSelectorData ClearBackground.")]
+ [Property("SPEC", "Tizen.NUI.ViewSelectorData.ClearBackground M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewSelectorDataClearBackground()
+ {
+ tlog.Debug(tag, $"ViewSelectorDataClearBackground START");
+
+ var testingTarget = new ViewSelectorData();
+ Assert.IsNotNull(testingTarget, "Can't create success object ViewSelectorData");
+ Assert.IsInstanceOf<ViewSelectorData>(testingTarget, "Should be an instance of ViewSelectorData type.");
+
+ View view = new View()
+ {
+ BackgroundColor = Color.Cyan,
+ BackgroundImage = path,
+ };
+
+ try
+ {
+ testingTarget.ClearBackground(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ViewSelectorDataClearBackground END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewSelectorData ClearShadow.")]
+ [Property("SPEC", "Tizen.NUI.ViewSelectorData.ClearShadow M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewSelectorDataClearShadow()
+ {
+ tlog.Debug(tag, $"ViewSelectorDataClearShadow START");
+
+ var testingTarget = new ViewSelectorData();
+ Assert.IsNotNull(testingTarget, "Can't create success object ViewSelectorData");
+ Assert.IsInstanceOf<ViewSelectorData>(testingTarget, "Should be an instance of ViewSelectorData type.");
+
+ View view = new View()
+ {
+ ImageShadow = new ImageShadow(path, new Vector2(20, 30), new Vector2(30, 40)),
+ BoxShadow = new Shadow(1.5f, Color.CadetBlue, null, null)
+ };
+
+ try
+ {
+ testingTarget.ClearShadow(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ViewSelectorDataClearShadow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewSelectorData Reset.")]
+ [Property("SPEC", "Tizen.NUI.ViewSelectorData.Reset M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewSelectorReset()
+ {
+ tlog.Debug(tag, $"ViewSelectorReset START");
+
+ var testingTarget = new ViewSelectorData();
+ Assert.IsNotNull(testingTarget, "Can't create success object ViewSelectorData");
+ Assert.IsInstanceOf<ViewSelectorData>(testingTarget, "Should be an instance of ViewSelectorData type.");
+
+ View view = new View()
+ {
+ BackgroundColor = Color.Cyan,
+ BackgroundImage = path,
+ ImageShadow = new ImageShadow(path, new Vector2(20, 30), new Vector2(30, 40)),
+ BoxShadow = new Shadow(1.5f, Color.CadetBlue, null, null),
+ Opacity = 0.2f
+ };
+
+ try
+ {
+ testingTarget.Reset(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ViewSelectorReset END (OK)");
+ }
+ }
+}