--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/Builder")]
+ public class InternalBuilderTest
+ {
+ private const string tag = "NUITEST";
+ private string path = 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("Builder constructor.")]
+ [Property("SPEC", "Tizen.NUI.Builder.Builder C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderConstructor()
+ {
+ tlog.Debug(tag, $"BuilderConstructor START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder Quit.")]
+ [Property("SPEC", "Tizen.NUI.Builder.Quit A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderQuit()
+ {
+ tlog.Debug(tag, $"BuilderQuit START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ testingTarget.Quit += MyOnQuit;
+ testingTarget.Quit -= MyOnQuit;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderQuit END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder AddConstants.")]
+ [Property("SPEC", "Tizen.NUI.Builder.AddConstants M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderAddConstants()
+ {
+ tlog.Debug(tag, $"BuilderAddConstants START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("Size", new PropertyValue(new Size(20, 30)));
+ map.Add("Posision", new PropertyValue(new Position(100, 200)));
+
+ try
+ {
+ testingTarget.AddConstants(map);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderAddConstants END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder AddConstant.")]
+ [Property("SPEC", "Tizen.NUI.Builder.AddConstant M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderAddConstant()
+ {
+ tlog.Debug(tag, $"BuilderAddConstant START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ try
+ {
+ testingTarget.AddConstant("Size", new PropertyValue(new Size(20, 30)));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderAddConstant END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder GetConstants.")]
+ [Property("SPEC", "Tizen.NUI.Builder.GetConstants M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderGetConstants()
+ {
+ tlog.Debug(tag, $"BuilderGetConstants START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("Size", new PropertyValue(new Size(20, 30)));
+ map.Add("Posision", new PropertyValue(new Position(100, 200)));
+
+ testingTarget.AddConstants(map);
+
+ var result = testingTarget.GetConstants();
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an Instance of PropertyMap!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderGetConstants END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder GetConstan.")]
+ [Property("SPEC", "Tizen.NUI.Builder.GetConstan M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderGetConstan()
+ {
+ tlog.Debug(tag, $"BuilderGetConstan START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ testingTarget.AddConstant("Opacity", new PropertyValue(0.5f));
+
+ var result = testingTarget.GetConstant("Opacity");
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(result, "Should be an Instance of PropertyValue!");
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderGetConstan END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder LoadFromFile.")]
+ [Property("SPEC", "Tizen.NUI.Builder.LoadFromFile M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderLoadFromFile()
+ {
+ tlog.Debug(tag, $"BuilderLoadFromFile START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ try
+ {
+ testingTarget.LoadFromFile(path);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderLoadFromFile END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Builder LoadFromFile. Parse failed.")]
+ [Property("SPEC", "Tizen.NUI.Builder.LoadFromFile M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderLoadFromFileParseFailed()
+ {
+ tlog.Debug(tag, $"BuilderLoadFromFileParseFailed START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ try
+ {
+ testingTarget.LoadFromFile(Tizen.Applications.Application.Current.DirectoryInfo.Resource + "index.xml");
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderLoadFromFileParseFailed END (OK)");
+ Assert.Fail("Caught InvalidOperationException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder LoadFromString.")]
+ [Property("SPEC", "Tizen.NUI.Builder.LoadFromString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderLoadFromString()
+ {
+ tlog.Debug(tag, $"BuilderLoadFromString START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ try
+ {
+ testingTarget.LoadFromString("{\"sites\": [{ \"name\":\"caurse\" , \"url\":\"www.runoob.com\" }]}", Builder.UIFormat.JSON);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderLoadFromString END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("Builder Create.")]
+ //[Property("SPEC", "Tizen.NUI.Builder.Create M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void BuilderCreate()
+ //{
+ // tlog.Debug(tag, $"BuilderCreate START");
+
+ // var testingTarget = new Builder();
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ // try
+ // {
+ // testingTarget.Create("{\"View\" : [\"Size\" : \"\"]}");
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // testingTarget = null;
+ // tlog.Debug(tag, $"BuilderCreate END (OK)");
+ //}
+
+ private void MyOnQuit(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/Camera")]
+ public class InternalCameraTest
+ {
+ 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("Camera constructor.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Camera C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraConstructor()
+ {
+ tlog.Debug(tag, $"CameraConstructor START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera constructor. With Vector2.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Camera C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraConstructorWithVector2()
+ {
+ tlog.Debug(tag, $"CameraConstructorWithVector2 START");
+
+ using (Vector2 size = new Vector2(50, 80))
+ {
+ var testingTarget = new Camera(size);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraConstructorWithVector2 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera constructor. With Camera.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Camera C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraConstructorWithCamera()
+ {
+ tlog.Debug(tag, $"CameraConstructorWithCamera START");
+
+ using (Camera camera = new Camera())
+ {
+ var testingTarget = new Camera(camera);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraConstructorWithCamera END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera DownCast.")]
+ [Property("SPEC", "Tizen.NUI.Camera.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraDownCast()
+ {
+ tlog.Debug(tag, $"CameraDownCast START");
+
+ using (Camera camera = new Camera())
+ {
+ var testingTarget = Camera.DownCast(camera);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Camera DownCast. With null.")]
+ [Property("SPEC", "Tizen.NUI.Camera.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraDownCastWithNull()
+ {
+ tlog.Debug(tag, $"CameraDownCastWithNull START");
+
+ try
+ {
+ var testingTarget = Camera.DownCast(null);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"CameraDownCastWithNull END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera Assign.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraAssign()
+ {
+ tlog.Debug(tag, $"CameraAssign START");
+
+ using (Camera camera = new Camera())
+ {
+ var testingTarget = camera.Assign(camera);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetType.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetType()
+ {
+ tlog.Debug(tag, $"CameraSetType START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetType(Tizen.NUI.CameraType.FreeLook);
+ Assert.AreEqual(Tizen.NUI.CameraType.FreeLook, testingTarget.GetType(), "Should be equal!");
+
+ testingTarget.SetType(Tizen.NUI.CameraType.LookAtTarget);
+ Assert.AreEqual(Tizen.NUI.CameraType.LookAtTarget, testingTarget.GetType(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetProjectionMode.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetProjectionMode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetProjectionMode()
+ {
+ tlog.Debug(tag, $"CameraSetProjectionMode START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetProjectionMode(ProjectionMode.OrthographicProjection);
+ Assert.AreEqual(ProjectionMode.OrthographicProjection, testingTarget.GetProjectionMode(), "Should be equal!");
+
+ testingTarget.SetProjectionMode(ProjectionMode.PerspectiveProjection);
+ Assert.AreEqual(ProjectionMode.PerspectiveProjection, testingTarget.GetProjectionMode(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetProjectionMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetFieldOfView.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetFieldOfView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void CameraSetFieldOfView()
+ {
+ tlog.Debug(tag, $"CameraSetFieldOfView START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetFieldOfView(0.5f);
+ Assert.AreEqual(0.5f, testingTarget.GetFieldOfView(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetFieldOfView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetAspectRatio.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetAspectRatio M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void CameraSetAspectRatio()
+ {
+ tlog.Debug(tag, $"CameraSetAspectRatio START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetAspectRatio(0.5f);
+ Assert.AreEqual(0.5f, testingTarget.GetAspectRatio(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetAspectRatio END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetNearClippingPlane.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetNearClippingPlane M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetNearClippingPlane()
+ {
+ tlog.Debug(tag, $"CameraSetNearClippingPlane START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetNearClippingPlane(0.5f);
+ Assert.AreEqual(0.5f, testingTarget.GetNearClippingPlane(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetNearClippingPlane END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetFarClippingPlane.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetFarClippingPlane M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetFarClippingPlane()
+ {
+ tlog.Debug(tag, $"CameraSetFarClippingPlane START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetFarClippingPlane(0.5f);
+ Assert.AreEqual(0.5f, testingTarget.GetFarClippingPlane(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetFarClippingPlane END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetTargetPosition.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetTargetPosition M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void CameraSetTargetPosition()
+ {
+ tlog.Debug(tag, $"CameraSetTargetPosition START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ using (Vector3 position = new Vector3(0.3f, 0.8f, 0.0f))
+ {
+ testingTarget.SetTargetPosition(position);
+
+ var result = testingTarget.GetTargetPosition();
+ Assert.AreEqual(0.3f, result.X, "Should be equal!");
+ Assert.AreEqual(0.8f, result.Y, "Should be equal!");
+ Assert.AreEqual(0.0f, result.Z, "Should be equal!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetTargetPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera GetInvertYAxis.")]
+ [Property("SPEC", "Tizen.NUI.Camera.GetInvertYAxis M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void CameraGetInvertYAxis()
+ {
+ tlog.Debug(tag, $"CameraGetInvertYAxis START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetInvertYAxis(true);
+ Assert.AreEqual(true, testingTarget.GetInvertYAxis(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraGetInvertYAxis END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetPerspectiveProjection.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetPerspectiveProjection M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetPerspectiveProjection()
+ {
+ tlog.Debug(tag, $"CameraSetPerspectiveProjection START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ using (Vector2 size = new Vector2(80, 50))
+ {
+ try
+ {
+ testingTarget.SetPerspectiveProjection(size);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetPerspectiveProjection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetOrthographicProjection.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetOrthographicProjection M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetOrthographicProjection()
+ {
+ tlog.Debug(tag, $"CameraSetOrthographicProjection START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ using (Vector2 size = new Vector2(80, 50))
+ {
+ try
+ {
+ testingTarget.SetOrthographicProjection(size);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetOrthographicProjection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetOrthographicProjection. With Float.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetOrthographicProjection M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetOrthographicProjectionWithFloat()
+ {
+ tlog.Debug(tag, $"CameraSetOrthographicProjectionWithFloat START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ try
+ {
+ testingTarget.SetOrthographicProjection(0.3f, 0.0f, 0.5f, 0.2f, 0.3f, 1.0f);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetOrthographicProjectionWithFloat END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera Type.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Type A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraType()
+ {
+ tlog.Debug(tag, $"CameraType START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Type = "FreeLook";
+ Assert.AreEqual("FREE_LOOK", testingTarget.Type, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera ProjectionMode.")]
+ [Property("SPEC", "Tizen.NUI.Camera.ProjectionMode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraProjectionMode()
+ {
+ tlog.Debug(tag, $"CameraProjectionMode START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.ProjectionMode = "PerspectiveProjection";
+ Assert.AreEqual("PERSPECTIVE_PROJECTION", testingTarget.ProjectionMode, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraProjectionMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera FieldOfView.")]
+ [Property("SPEC", "Tizen.NUI.Camera.FieldOfView A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraFieldOfView()
+ {
+ tlog.Debug(tag, $"CameraFieldOfView START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.FieldOfView = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.FieldOfView, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraFieldOfView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera AspectRatio.")]
+ [Property("SPEC", "Tizen.NUI.Camera.AspectRatio A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraAspectRatio()
+ {
+ tlog.Debug(tag, $"CameraAspectRatio START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.AspectRatio = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.AspectRatio, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraAspectRatio END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera NearPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.NearPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraNearPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraNearPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.NearPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.NearPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraNearPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera FarPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.FarPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraFarPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraFarPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.FarPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.FarPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraFarPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera LeftPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.LeftPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraLeftPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraLeftPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.LeftPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.LeftPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraLeftPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera RightPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.RightPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraRightPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraRightPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.RightPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.RightPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraRightPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera TopPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.TopPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraTopPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraTopPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.TopPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.TopPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraTopPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera BottomPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.BottomPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraBottomPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraBottomPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.BottomPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.BottomPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraBottomPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera TargetPosition.")]
+ [Property("SPEC", "Tizen.NUI.Camera.TargetPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraTargetPosition()
+ {
+ tlog.Debug(tag, $"CameraTargetPosition START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.TargetPosition = new Vector3(0.3f, 0.5f, 0.0f);
+ Assert.AreEqual(0.3f, testingTarget.TargetPosition.X, "Should be equal!");
+ Assert.AreEqual(0.5f, testingTarget.TargetPosition.Y, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.TargetPosition.Z, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraTargetPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera ProjectionMatrix.")]
+ [Property("SPEC", "Tizen.NUI.Camera.ProjectionMatrix A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraProjectionMatrix()
+ {
+ tlog.Debug(tag, $"CameraProjectionMatrix START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ var result = testingTarget.ProjectionMatrix;
+ Assert.AreEqual(1, result.GetXAxis().X, "Should be equal!");
+ Assert.AreEqual(0, result.GetXAxis().Y, "Should be equal!");
+ Assert.AreEqual(0, result.GetXAxis().Z, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraProjectionMatrix END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera ViewMatrix.")]
+ [Property("SPEC", "Tizen.NUI.Camera.ViewMatrix A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraViewMatrix()
+ {
+ tlog.Debug(tag, $"CameraViewMatrix START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ var result = testingTarget.ViewMatrix;
+ Assert.AreEqual(1, result.GetXAxis().X, "Should be equal!");
+ Assert.AreEqual(0, result.GetXAxis().Y, "Should be equal!");
+ Assert.AreEqual(0, result.GetXAxis().Z, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraViewMatrix END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera InvertYAxis.")]
+ [Property("SPEC", "Tizen.NUI.Camera.InvertYAxis A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraInvertYAxis()
+ {
+ tlog.Debug(tag, $"CameraInvertYAxis START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.InvertYAxis = true;
+ Assert.AreEqual(true, testingTarget.InvertYAxis, "Should be equal!");
+
+ testingTarget.InvertYAxis = false;
+ Assert.AreEqual(false, testingTarget.InvertYAxis, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraInvertYAxis END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ColorCutQuantizer")]
+ public class InternalColorCutQuantizerTest
+ {
+ 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("ColorCutQuantizer FromBitmap .")]
+ [Property("SPEC", "Tizen.NUI.ColorCutQuantizer.FromBitmap M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorCutQuantizerFromBitmap()
+ {
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmap START");
+
+ using (PixelBuffer pixelBuffer = new PixelBuffer(100, 200, PixelFormat.RGBA8888))
+ {
+ using (Rectangle region = new Rectangle())
+ {
+ var testingTarget = ColorCutQuantizer.FromBitmap(pixelBuffer, region, 255);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorCutQuantizer>(testingTarget, "Should be an Instance of ColorCutQuantizer!");
+ }
+ }
+
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmap END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorCutQuantizer FromBitmap. MaxColor < 1.")]
+ [Property("SPEC", "Tizen.NUI.ColorCutQuantizer.FromBitmap M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorCutQuantizerFromBitmapWithMaxColorLessThan1()
+ {
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmapWithMaxColorLessThan1 START");
+
+ using (PixelBuffer pixelBuffer = new PixelBuffer(100, 200, PixelFormat.RGBA8888))
+ {
+ using (Rectangle region = new Rectangle())
+ {
+ try
+ {
+ ColorCutQuantizer.FromBitmap(pixelBuffer, region, 0);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmapWithMaxColorLessThan1 END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorCutQuantizer FromBitmap. Region is null.")]
+ [Property("SPEC", "Tizen.NUI.ColorCutQuantizer.FromBitmap M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorCutQuantizerFromBitmapWithNullRegion()
+ {
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmapWithNullRegion START");
+
+ using (PixelBuffer pixelBuffer = new PixelBuffer(1, 2, PixelFormat.A8))
+ {
+ using (Rectangle region = null)
+ {
+ var testingTarget = ColorCutQuantizer.FromBitmap(pixelBuffer, region, 255);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorCutQuantizer>(testingTarget, "Should be an Instance of ColorCutQuantizer!");
+ }
+ }
+
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmapWithNullRegion END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorCutQuantizer GetQuantizedColors .")]
+ [Property("SPEC", "Tizen.NUI.ColorCutQuantizer.GetQuantizedColors M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorCutQuantizerGetQuantizedColors()
+ {
+ tlog.Debug(tag, $"ColorCutQuantizerGetQuantizedColors START");
+
+ using (PixelBuffer pixelBuffer = new PixelBuffer(100, 200, PixelFormat.A8))
+ {
+ using (Rectangle region = new Rectangle())
+ {
+ var testingTarget = ColorCutQuantizer.FromBitmap(pixelBuffer, region, 255);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorCutQuantizer>(testingTarget, "Should be an Instance of ColorCutQuantizer!");
+
+ try
+ {
+ testingTarget.GetQuantizedColors();
+ tlog.Debug(tag, "quantizedColors : " + testingTarget.GetQuantizedColors());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+ }
+
+ tlog.Debug(tag, $"ColorCutQuantizerGetQuantizedColors END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ColorHistogram")]
+ public class InternalColorHistogramTest
+ {
+ 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("ColorHistogram constructor.")]
+ [Property("SPEC", "Tizen.NUI.ColorHistogram.ColorHistogram C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorHistogramConstructor()
+ {
+ tlog.Debug(tag, $"ColorHistogramConstructor START");
+
+ int[] pixels = new int[3] { 16, 4, 20 };
+ var testingTarget = new ColorHistogram(pixels);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorHistogram>(testingTarget, "Should be an Instance of ColorHistogram!");
+
+ tlog.Debug(tag, $"ColorHistogramConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorHistogram GetNumberOfColors.")]
+ [Property("SPEC", "Tizen.NUI.ColorHistogram.GetNumberOfColors M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorHistogramGetNumberOfColors()
+ {
+ tlog.Debug(tag, $"ColorHistogramGetNumberOfColors START");
+
+ int[] pixels = new int[3] { 16, 4, 20 };
+ var testingTarget = new ColorHistogram(pixels);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorHistogram>(testingTarget, "Should be an Instance of ColorHistogram!");
+
+ try
+ {
+ testingTarget.GetNumberOfColors();
+ tlog.Debug(tag, "numberColors :" + testingTarget.GetNumberOfColors());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ColorHistogramGetNumberOfColors END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorHistogram GetColors.")]
+ [Property("SPEC", "Tizen.NUI.ColorHistogram.GetColors M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorHistogramGetColors()
+ {
+ tlog.Debug(tag, $"ColorHistogramGetColors START");
+
+ int[] pixels = new int[3] { 16, 4, 20 };
+ var testingTarget = new ColorHistogram(pixels);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorHistogram>(testingTarget, "Should be an Instance of ColorHistogram!");
+
+ try
+ {
+ testingTarget.GetColors();
+ tlog.Debug(tag, "colors :" + testingTarget.GetColors());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ColorHistogramGetColors END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorHistogram GetColorCounts.")]
+ [Property("SPEC", "Tizen.NUI.ColorHistogram.GetColorCounts M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorHistogramGetColorCounts()
+ {
+ tlog.Debug(tag, $"ColorHistogramGetColorCounts START");
+
+ int[] pixels = new int[3] { 16, 4, 20 };
+ var testingTarget = new ColorHistogram(pixels);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorHistogram>(testingTarget, "Should be an Instance of ColorHistogram!");
+
+ try
+ {
+ testingTarget.GetColorCounts();
+ tlog.Debug(tag, "colorCounts :" + testingTarget.GetColorCounts());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ColorHistogramGetColorCounts END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ColorUtils")]
+ public class InternalColorUtilsTest
+ {
+ 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("ColorUtils RgbToXyz.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.RgbToXyz M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsRgbToXyz()
+ {
+ tlog.Debug(tag, $"ColorUtilsRgbToXyz START");
+
+ try
+ {
+ double[] outXyz = new double[3];
+ ColorUtils.RgbToXyz(10, 8, 133, outXyz);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught Exception: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsRgbToXyz END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorUtils RgbToXyz.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.RgbToXyz M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsRgbToXyzWithArgumentException()
+ {
+ tlog.Debug(tag, $"ColorUtilsRgbToXyzWithArgumentException START");
+
+ try
+ {
+ double[] outXyz = new double[2];
+ ColorUtils.RgbToXyz(10, 8, 133, outXyz);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorUtilsRgbToXyzWithArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils CalculateLuminance.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateLuminance M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateLuminance()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateLuminance START");
+
+ try
+ {
+ ColorUtils.CalculateLuminance(115);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught Exception: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsCalculateLuminance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils CalculateContrast.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateContrast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateContrast()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateContrast START");
+
+ try
+ {
+ ColorUtils.CalculateContrast(30, -2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsCalculateContrast END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorUtils CalculateContrast. ArgumentException.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateContrast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateContrastArgumentException()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateContrastArgumentException START");
+
+ try
+ {
+ ColorUtils.CalculateContrast(25, 0);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorUtilsCalculateContrastArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils SetAlphaComponent.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.SetAlphaComponent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsSetAlphaComponent()
+ {
+ tlog.Debug(tag, $"ColorUtilsSetAlphaComponent START");
+
+ try
+ {
+ ColorUtils.SetAlphaComponent(25, 111);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught Exception: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsSetAlphaComponent END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorUtils SetAlphaComponent. ArgumentException")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.SetAlphaComponent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsSetAlphaComponentArgumentException()
+ {
+ tlog.Debug(tag, $"ColorUtilsSetAlphaComponentArgumentException START");
+
+ try
+ {
+ ColorUtils.SetAlphaComponent(25, -1);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorUtilsSetAlphaComponentArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils CalculateMinimumAlpha.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateMinimumAlpha M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateMinimumAlpha()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateMinimumAlpha START");
+
+ try
+ {
+ ColorUtils.CalculateMinimumAlpha(25, -2, 0.3f);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught Exception: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsCalculateMinimumAlpha END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorUtils CalculateMinimumAlpha. ArgumentException")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateMinimumAlpha M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateMinimumAlphaArgumentException()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateMinimumAlphaArgumentException START");
+
+ try
+ {
+ ColorUtils.CalculateMinimumAlpha(25, 0, 0.3f);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorUtilsCalculateMinimumAlphaArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils HslToRgb.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.HslToRgb M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsHslToRgb()
+ {
+ tlog.Debug(tag, $"ColorUtilsHslToRgb START");
+
+ try
+ {
+ float[] hsl0 = { 10.0f, 200.0f, 500.0f };
+ ColorUtils.HslToRgb(hsl0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl1 = { 60.0f, 210.0f, 510.0f };
+ ColorUtils.HslToRgb(hsl1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl2 = { 120.0f, 220.0f, 520.0f };
+ ColorUtils.HslToRgb(hsl2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl3 = { 180.0f, 230.0f, 530.0f };
+ ColorUtils.HslToRgb(hsl3);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl4 = { 240.0f, 240.0f, 540.0f };
+ ColorUtils.HslToRgb(hsl4);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl5 = { 300.0f, 250.0f, 550.0f };
+ ColorUtils.HslToRgb(hsl5);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl6 = { 360.0f, 260.0f, 560.0f };
+ ColorUtils.HslToRgb(hsl6);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsHslToRgb END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils GetBytesPerPixel.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.GetBytesPerPixel M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsGetBytesPerPixel()
+ {
+ tlog.Debug(tag, $"ColorUtilsGetBytesPerPixel START");
+
+ var result = ColorUtils.GetBytesPerPixel(PixelFormat.RGBA4444);
+ Assert.AreEqual(2, result, "Should be equal!");
+
+ result = ColorUtils.GetBytesPerPixel(PixelFormat.RGB888);
+ Assert.AreEqual(3, result, "Should be equal!");
+
+ result = ColorUtils.GetBytesPerPixel(PixelFormat.BGR8888);
+ Assert.AreEqual(4, result, "Should be equal!");
+
+ result = ColorUtils.GetBytesPerPixel(0);
+ Assert.AreEqual(0, result, "Should be equal!");
+
+ tlog.Debug(tag, $"ColorUtilsGetBytesPerPixel END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ConnectionTracker")]
+ public class InternalConnectionTrackerTest
+ {
+ 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("ConnectionTracker constructor.")]
+ [Property("SPEC", "Tizen.NUI.ConnectionTracker.ConnectionTracker C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ConnectionTrackerConstructor()
+ {
+ tlog.Debug(tag, $"ConnectionTrackerConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ConnectionTracker(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ConnectionTracker>(testingTarget, "Should be an Instance of ConnectionTracker!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ConnectionTrackerConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ConnectionTracker GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ConnectionTracker.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ConnectionTrackerGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ConnectionTrackerGetConnectionCount START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ConnectionTracker(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ConnectionTracker>(testingTarget, "Should be an Instance of ConnectionTracker!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ConnectionTrackerGetConnectionCount END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ConnectionTrackerInterface")]
+ public class InternalConnectionTrackerInterfaceTest
+ {
+ private const string tag = "NUITEST";
+ private delegate bool dummyCallback(IntPtr pageTurnSignal);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+
+ internal class MyConnectionTrackerInterface : ConnectionTrackerInterface
+ {
+ public MyConnectionTrackerInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ConnectionTrackerInterface constructor.")]
+ [Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.ConnectionTrackerInterface C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ConnectionTrackerInterfaceConstructor()
+ {
+ tlog.Debug(tag, $"ConnectionTrackerInterfaceConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ConnectionTrackerInterface(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ConnectionTrackerInterfaceConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ConnectionTrackerInterface getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ConnectionTrackerInterfacegetCPtr()
+ {
+ tlog.Debug(tag, $"ConnectionTrackerInterfacegetCPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new MyConnectionTrackerInterface(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
+
+ try
+ {
+ ConnectionTrackerInterface.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ConnectionTrackerInterfacegetCPtr END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("ConnectionTrackerInterface SignalConnected.")]
+ //[Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.SignalConnected M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void ConnectionTrackerInterfaceSignalConnected()
+ //{
+ // tlog.Debug(tag, $"ConnectionTrackerInterfaceSignalConnected START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new ConnectionTrackerInterface(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
+
+ // try
+ // {
+ // var slotObserver = new SlotObserver(testingTarget.SwigCPtr.Handle, false);
+ // var callback = new SWIGTYPE_p_CallbackBase(testingTarget.SwigCPtr.Handle);
+ // testingTarget.SignalConnected(slotObserver, callback);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"ConnectionTrackerInterfaceSignalConnected END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/CreateWidgetFunction")]
+ public class InternalCreateWidgetFunctionTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyCreateWidgetFunction : CreateWidgetFunction
+ {
+ public MyCreateWidgetFunction() : base()
+ { }
+
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CreateWidgetFunction constructor.")]
+ [Property("SPEC", "Tizen.NUI.CreateWidgetFunction.CreateWidgetFunction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CreateWidgetFunctionConstructor()
+ {
+ tlog.Debug(tag, $"CreateWidgetFunctionConstructor START");
+
+ var testingTarget = new MyCreateWidgetFunction();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CreateWidgetFunction>(testingTarget, "Should be an Instance of CreateWidgetFunction!");
+
+ tlog.Debug(tag, $"CreateWidgetFunctionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CreateWidgetFunction constructor. With IntPtr.")]
+ [Property("SPEC", "Tizen.NUI.CreateWidgetFunction.CreateWidgetFunction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CreateWidgetFunctionConstructorWithIntPtr()
+ {
+ tlog.Debug(tag, $"CreateWidgetFunctionConstructorWithIntPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new CreateWidgetFunction(view.SwigCPtr.Handle);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CreateWidgetFunction>(testingTarget, "Should be an Instance of CreateWidgetFunction!");
+ }
+
+ tlog.Debug(tag, $"CreateWidgetFunctionConstructorWithIntPtr END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/EnvironmentVariable")]
+ public class InternalEnvironmentVariableTest
+ {
+ 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("EnvironmentVariable GetEnvironmentVariable .")]
+ [Property("SPEC", "Tizen.NUI.EnvironmentVariable.GetEnvironmentVariable M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void EnvironmentVariableGetEnvironmentVariable()
+ {
+ tlog.Debug(tag, $"EnvironmentVariableGetEnvironmentVariable START");
+
+ var testingTarget = EnvironmentVariable.GetEnvironmentVariable("path");
+ tlog.Debug(tag, "path : " + testingTarget);
+
+ tlog.Debug(tag, $"EnvironmentVariableGetEnvironmentVariable END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EnvironmentVariable SetEnvironmentVariable .")]
+ [Property("SPEC", "Tizen.NUI.EnvironmentVariable.SetEnvironmentVariable M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void EnvironmentVariableSetEnvironmentVariable()
+ {
+ tlog.Debug(tag, $"EnvironmentVariableSetEnvironmentVariable START");
+
+ EnvironmentVariable.SetEnvironmentVariable("path", Tizen.Applications.Application.Current.DirectoryInfo.Resource);
+ tlog.Debug(tag, "path : " + EnvironmentVariable.GetEnvironmentVariable("path"));
+
+ tlog.Debug(tag, $"EnvironmentVariableSetEnvironmentVariable END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/GaussianBlurViewSignal")]
+ public class InternalGaussianBlurViewSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr gaussianBlurViewSignal);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.GaussianBlurViewSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalConstructor()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new GaussianBlurViewSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalEmpty()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalEmpty START");
+
+ var testingTarget = new GaussianBlurViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalGetConnectionCount START");
+
+ var testingTarget = new GaussianBlurViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalConnect()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalConnect START");
+
+ var testingTarget = new GaussianBlurViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ try
+ {
+ dummyCallback callback = OnDummyCallback;
+ testingTarget.Connect(callback);
+ testingTarget.Disconnect(callback);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalEmit()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new GaussianBlurViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ try
+ {
+ testingTarget.Emit(new GaussianBlurView(view.SwigCPtr.Handle, false));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/Item")]
+ public class InternalItemTest
+ {
+ 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("Item constructor.")]
+ [Property("SPEC", "Tizen.NUI.Item.Item C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructor()
+ {
+ tlog.Debug(tag, $"ItemConstructor START");
+
+ var testingTarget = new Item();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item constructor. With View.")]
+ [Property("SPEC", "Tizen.NUI.Item.Item C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructorWithView()
+ {
+ tlog.Debug(tag, $"ItemConstructorWithView START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new Item(2, view);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemConstructorWithView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item constructor. With Item.")]
+ [Property("SPEC", "Tizen.NUI.Item.Item C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructorWithItem()
+ {
+ tlog.Debug(tag, $"ItemConstructorWithItem START");
+
+ using (View view = new View())
+ {
+ using (Item item = new Item(2, view))
+ {
+ var testingTarget = new Item(item);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemConstructorWithItem END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item first.")]
+ [Property("SPEC", "Tizen.NUI.Item.first A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructorFirst()
+ {
+ tlog.Debug(tag, $"ItemConstructorFirst START");
+
+ using (View view = new View())
+ {
+ using (Item item = new Item(2, view))
+ {
+ var testingTarget = new Item(item);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ Assert.AreEqual(2, testingTarget.first, "should be equal!");
+
+ testingTarget.first = 1;
+ Assert.AreEqual(1, testingTarget.first, "should be equal!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemConstructorFirst END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item second.")]
+ [Property("SPEC", "Tizen.NUI.Item.second A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructorSecond()
+ {
+ tlog.Debug(tag, $"ItemConstructorSecond START");
+
+ using (View view = new View())
+ {
+ using (Item item = new Item(2, view))
+ {
+ var testingTarget = new Item(item);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ var result = testingTarget.second;
+ Assert.IsInstanceOf<View>(testingTarget.second, "Should be an Instance of View!");
+
+ using (View view2 = new View())
+ {
+ testingTarget.second = view2;
+ Assert.IsNotNull(testingTarget.second, "Should be not null!");
+ Assert.IsInstanceOf<View>(testingTarget.second, "Should be an Instance of View!");
+ }
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemConstructorSecond END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemCollection")]
+ public class InternalItemCollectionTest
+ {
+ 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("ItemCollection constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructor()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructor START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.IsFalse(testingTarget.IsFixedSize);
+ Assert.IsFalse(testingTarget.IsReadOnly);
+ Assert.IsFalse(testingTarget.IsSynchronized);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection constructor. With ItemCollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructorWithItemCollection()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructorWithItemCollection START");
+
+ using (ItemCollection itemCollection = new ItemCollection())
+ {
+ var testingTarget = new ItemCollection(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionConstructorWithItemCollection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection constructor. With capacity.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructorWithCapacity()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructorWithCapacity START");
+
+ var testingTarget = new ItemCollection(5);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionConstructorWithCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection constructor. With ICollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructorWithICollection()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructorWithICollection START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.AreEqual(4, testingTarget.Count, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionConstructorWithICollection END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection constructor. With null ICollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructorWithNullICollection()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructorWithNullICollection START");
+
+ global::System.Collections.ICollection c = null;
+
+ try
+ {
+ new ItemCollection(c);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ItemCollectionConstructorWithNullICollection END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Clear.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionClear()
+ {
+ tlog.Debug(tag, $"ItemCollectionClear START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+ tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
+
+
+ try
+ {
+ testingTarget.Clear();
+ tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionClear END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection this.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.this A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionGetVauleByIndex()
+ {
+ tlog.Debug(tag, $"ItemCollectionGetVauleByIndex START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget[2].first = 3;
+ Assert.AreEqual(3, testingTarget[2].first, "Should be equal!");
+
+ try
+ {
+ testingTarget[1] = new Item(testingTarget[2]);
+ Assert.AreEqual(3, testingTarget[1].first, "Should be equal!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionGetVauleByIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Capacity.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Capacity A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCapacity()
+ {
+ tlog.Debug(tag, $"ItemCollectionCapacity START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.AreEqual(4, testingTarget.Capacity, "Should be equal!");
+
+ testingTarget.Capacity = 8;
+ Assert.AreEqual(8, testingTarget.Capacity, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection Capacity. Set exception.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Capacity A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCapacitySetException()
+ {
+ tlog.Debug(tag, $"ItemCollectionCapacitySetException START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.AreEqual(4, testingTarget.Capacity, "Should be equal!");
+
+ try
+ {
+ testingTarget.Capacity = 2;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCapacitySetException END (OK)");
+ Assert.Pass("Caught ArgumentOutOfRangeException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection CopyTo.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyTo()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyTo START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Item[] array = new Item[4];
+
+ try
+ {
+ testingTarget.CopyTo(array);
+ Assert.IsNotNull(array[1], "Should be not null!");
+ Assert.IsInstanceOf<Item>(array[1], "Should be an Instance of Item!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection CopyTo. With arrayIndex.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithArrayIndex()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithArrayIndex START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(new Item[2], 0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithArrayIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection CopyTo. With null array.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithNullArray()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithNullArray START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(null, 0);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithNullArray END (OK)");
+ Assert.Fail("Caught ArgumentNullException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection CopyTo. ArrayIndex < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithArrayIndexLessThan0()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithArrayIndexLessThan0 START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(new Item[2], -1);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithArrayIndexLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection CopyTo. Elements too large.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithLargerElements()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithLargerElements START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Item[] array = new Item[4];
+
+ try
+ {
+ testingTarget.CopyTo(array, 2);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithLargerElements END (OK)");
+ Assert.Fail("Caught ArgumentException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection CopyTo. Index < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithIndexLessThan0()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithIndexLessThan0 START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(-1, new Item[2], 0, 1);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithIndexLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection CopyTo. Count < zero.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithCountLessThan0()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithCountLessThan0 START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(0, new Item[2], 0, -1);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithCountLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection GetEnumerator.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.GetEnumerator M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionGetEnumerator()
+ {
+ tlog.Debug(tag, $"ItemCollectionGetEnumerator START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ var result = testingTarget.GetEnumerator();
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(result, "Should be an Instance of ItemCollectionEnumerator!");
+
+ tlog.Debug(tag, $"ItemCollectionGetEnumerator END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection.ItemCollectionEnumerator constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.ItemCollectionEnumerator C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONTSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorConstructor()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorConstructor START");
+
+ using (ItemCollection itemCollection = new ItemCollection())
+ {
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection.ItemCollectionEnumerator Current. currentIndex == -1.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.Current A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorCurrent()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorCurrent START");
+
+ using (ItemCollection itemCollection = new ItemCollection())
+ {
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ try
+ {
+ tlog.Debug(tag, "Current : " + testingTarget.Current);
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorCurrent END (OK)");
+ Assert.Pass("Caught InvalidOperationException : passed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorCurrent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection.ItemCollectionEnumerator MoveNext.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.MoveNext M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorMoveNext()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorMoveNext START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var itemCollection = new ItemCollection(c);
+ Assert.IsNotNull(itemCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(itemCollection, "Should be an Instance of ItemCollection!");
+
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ try
+ {
+ testingTarget.MoveNext();
+ var result = testingTarget.Current;
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<Item>(result, "Should be an Instance of Item!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorMoveNext END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection.ItemCollectionEnumerator MoveNext. Object is null.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.MoveNext M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorMoveNextNullObject()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorMoveNextNullObject START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var itemCollection = new ItemCollection(c);
+ Assert.IsNotNull(itemCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(itemCollection, "Should be an Instance of ItemCollection!");
+
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ try
+ {
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ var result = testingTarget.Current;
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorMoveNextNullObject END (OK)");
+ Assert.Pass("Caught InvalidOperationException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection.ItemCollectionEnumerator Reset.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.Reset M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorReset()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorReset START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var itemCollection = new ItemCollection(c);
+ Assert.IsNotNull(itemCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(itemCollection, "Should be an Instance of ItemCollection!");
+
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ testingTarget.MoveNext();
+
+ try
+ {
+ testingTarget.Reset();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorReset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection AddRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.AddRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionAddRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionAddRange START");
+
+ using (ItemCollection itemCollection = new ItemCollection(5))
+ {
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ try
+ {
+ testingTarget.AddRange(itemCollection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionAddRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection GetRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.GetRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionGetRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionGetRange START");
+
+ using (ItemCollection itemCollection = new ItemCollection(5))
+ {
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.AddRange(itemCollection);
+
+ try
+ {
+ var result = testingTarget.GetRange(0, 0);
+ Assert.IsInstanceOf<ItemCollection>(result, "Should be an Instance of ItemCollection!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionGetRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Insert.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Insert M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionInsert()
+ {
+ tlog.Debug(tag, $"ItemCollectionInsert START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Insert(4, new Item());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionInsert END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection InsertRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.InsertRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionInsertRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionInsertRange START");
+
+ using (ItemCollection value = new ItemCollection(3))
+ {
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 10;
+
+ try
+ {
+ testingTarget.InsertRange(4, value);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionInsertRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection RemoveAt.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.RemoveAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionRemoveAt()
+ {
+ tlog.Debug(tag, $"ItemCollectionRemoveAt START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.RemoveAt(3);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionRemoveAt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection RemoveRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.RemoveRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionRemoveRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionRemoveRange START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.RemoveRange(1, 2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionRemoveRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Repeat.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Repeat M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionRepeat()
+ {
+ tlog.Debug(tag, $"ItemCollectionRepeat START");
+
+ var testingTarget = ItemCollection.Repeat(new Item(), 6);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.AreEqual(6, testingTarget.Capacity, "Should be equal!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionRepeat END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection SetRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.SetRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionSetRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionSetRange START");
+
+ using (ItemCollection itemCollection = new ItemCollection(5))
+ {
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ try
+ {
+ testingTarget.SetRange(1, itemCollection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionSetRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Reverse.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Reverse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionReverse()
+ {
+ tlog.Debug(tag, $"ItemCollectionReverse START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Reverse();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionReverse END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Reverse. With parameters.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Reverse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionReverseWithParameters()
+ {
+ tlog.Debug(tag, $"ItemCollectionReverseWithParameters START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Reverse(1, 2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionReverseWithParameters END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemFactory")]
+ public class InternalItemFactoryTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyItemFactory : ItemFactory
+ {
+ public MyItemFactory() : base()
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemFactory constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemFactory.ItemFactory C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemFactoryConstructor()
+ {
+ tlog.Debug(tag, $"ItemFactoryConstructor START");
+
+ var testingTarget = new ItemFactory();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemFactory>(testingTarget, "Should be an Instance of ItemFactory!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemFactoryConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemFactory getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.ItemFactory.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemFactorygetCPtr()
+ {
+ tlog.Debug(tag, $"ItemFactorygetCPtr START");
+
+ var testingTarget = new ItemFactory();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemFactory>(testingTarget, "Should be an Instance of ItemFactory!");
+
+ try
+ {
+ ItemFactory.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemFactorygetCPtr END (OK)");
+ }
+
+
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemIdCollection")]
+ public class InternalItemIdCollectionTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyItemIdCollection : ItemIdCollection
+ {
+ public MyItemIdCollection() : base()
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionConstructor()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionConstructor START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ Assert.IsFalse(testingTarget.IsFixedSize);
+ Assert.IsFalse(testingTarget.IsReadOnly);
+ Assert.IsFalse(testingTarget.IsSynchronized);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection constructor. With ItemIdCollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionConstructorWithItemIdCollection()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithItemIdCollection START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var itemIdCollection = new ItemIdCollection(c);
+ Assert.IsNotNull(itemIdCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
+
+ var testingTarget = new ItemIdCollection(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ itemIdCollection.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithItemIdCollection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection constructor. With capacity.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionConstructorWithCapacity()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithCapacity START");
+
+ var testingTarget = new ItemIdCollection(5);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemIdCollection constructor. Null ICollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionConstructorWithNullICollection()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithNullICollection START");
+
+ global::System.Collections.ICollection c = null;
+
+ try
+ {
+ new ItemIdCollection(c);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithNullICollection END (OK)");
+ Assert.Pass("Caught ArgumentNullException : passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectiongetCPtr()
+ {
+ tlog.Debug(tag, $"ItemIdCollectiongetCPtr START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ ItemIdCollection.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectiongetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection this.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.this A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionThis()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionThis START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ tlog.Debug(tag, testingTarget[1].ToString());
+
+ testingTarget[2] = 5;
+ tlog.Debug(tag, testingTarget[2].ToString());
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionThis END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Capacity.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Capacity A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCapacity()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCapacity START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
+
+ testingTarget.Capacity = 5;
+ tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemIdCollection Capacity. Set value < size.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Capacity A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCapacitySetValueLessThanSize()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCapacitySetValueLessThanSize START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ tlog.Debug(tag, "Count : " + testingTarget.Count);
+ tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
+
+ try
+ {
+ testingTarget.Capacity = 3;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCapacitySetValueLessThanSize END (OK)");
+ Assert.Pass("Caught ArgumentOutOfRangeException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyTo()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyTo START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ uint[] array = new uint[4];
+
+ try
+ {
+ testingTarget.CopyTo(array);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionCopyTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. With arrayIndex.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithArrayIndex()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndex START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ uint[] array = new uint[4];
+
+ try
+ {
+ testingTarget.CopyTo(array, 0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. With null array.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithNullArray()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithNullArray START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ testingTarget.CopyTo(null);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithNullArray END (OK)");
+ Assert.Fail("Caught ArgumentNullException : Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. index < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithIndexLessThan0()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithIndexLessThan0 START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ uint[] array = new uint[4];
+ testingTarget.CopyTo(-1, array, 0, testingTarget.Count);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithIndexLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. arrayIndex < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithArrayIndexLessThan0()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndexLessThan0 START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ uint[] array = new uint[4];
+ testingTarget.CopyTo(0, array, -1, testingTarget.Count);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndexLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. count < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithCountLessThan0()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithCountLessThan0 START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ uint[] array = new uint[4];
+ testingTarget.CopyTo(0, array, 0, -1);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithCountLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection GetEnumerator.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.GetEnumerator M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionGetEnumerator()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionGetEnumerator START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ var result = testingTarget.GetEnumerator();
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(result, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ tlog.Debug(tag, $"ItemIdCollectionGetEnumerator END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.ItemIdCollectionEnumerator C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONTSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorConstructor()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorConstructor START");
+
+ using (ItemIdCollection itemIdCollection = new ItemIdCollection())
+ {
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator Current. currentIndex == -1.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.Current A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorCurrent()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorCurrent START");
+
+ using (ItemIdCollection itemCollection = new ItemIdCollection())
+ {
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ try
+ {
+ tlog.Debug(tag, "Current : " + testingTarget.Current);
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorCurrent END (OK)");
+ Assert.Pass("Caught InvalidOperationException : passed!");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator MoveNext.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.MoveNext M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorMoveNext()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNext START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var itemIdCollection = new ItemIdCollection(c);
+ Assert.IsNotNull(itemIdCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
+
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ try
+ {
+ testingTarget.MoveNext();
+ var result = testingTarget.Current;
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<uint>(result, "Should be an Instance of uint!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNext END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator MoveNext. Object is null.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.MoveNext M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorMoveNextNullObject()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNextNullObject START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var itemIdCollection = new ItemIdCollection(c);
+ Assert.IsNotNull(itemIdCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
+
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ try
+ {
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ var result = testingTarget.Current;
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNextNullObject END (OK)");
+ Assert.Pass("Caught InvalidOperationException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator Reset.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.Reset M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorReset()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorReset START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var itemIdCollection = new ItemIdCollection(c);
+ Assert.IsNotNull(itemIdCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
+
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ testingTarget.MoveNext();
+
+ try
+ {
+ testingTarget.Reset();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorReset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Clear.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionClear()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionClear START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+ tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
+
+ try
+ {
+ testingTarget.Clear();
+ tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionClear END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection AddRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.AddRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionAddRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionAddRange START");
+
+ using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
+ {
+ var testingTarget = new ItemIdCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ testingTarget.AddRange(itemIdCollection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionAddRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection GetRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.GetRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionGetRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionGetRange START");
+
+ using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
+ {
+ var testingTarget = new ItemIdCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.AddRange(itemIdCollection);
+
+ try
+ {
+ var result = testingTarget.GetRange(0, 0);
+ Assert.IsInstanceOf<ItemIdCollection>(result, "Should be an Instance of ItemIdCollection!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionGetRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Insert.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Insert M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionInsert()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionInsert START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Insert(4, 5);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionInsert END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection InsertRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.InsertRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionInsertRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionInsertRange START");
+
+ using (ItemIdCollection value = new ItemIdCollection(3))
+ {
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 10;
+
+ try
+ {
+ testingTarget.InsertRange(3, value);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionInsertRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection RemoveAt.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.RemoveAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionRemoveAt()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionRemoveAt START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.RemoveAt(3);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionRemoveAt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection RemoveRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.RemoveRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionRemoveRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionRemoveRange START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.RemoveRange(1, 2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionRemoveRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Repeat.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Repeat M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionRepeat()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionRepeat START");
+
+ var testingTarget = ItemIdCollection.Repeat(6, 4);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ Assert.AreEqual(4, testingTarget.Capacity, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionRepeat END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection SetRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.SetRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionSetRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionSetRange START");
+
+ using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
+ {
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ testingTarget.SetRange(1, itemIdCollection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionSetRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Reverse.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Reverse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionReverse()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionReverse START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Reverse();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionReverse END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Reverse. With parameters.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Reverse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionReverseWithParameters()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionReverseWithParameters START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Reverse(1, 2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionReverseWithParameters END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Contains.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Contains M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionContains()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionContains START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ Assert.IsTrue(testingTarget.Contains(2));
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionContains END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection IndexOf.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.IndexOf M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionIndexOf()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionIndexOf START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ Assert.AreEqual(2, testingTarget.IndexOf(3), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionIndexOf END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection LastIndexOf.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.LastIndexOf M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionLastIndexOf()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionLastIndexOf START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4, 3 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ Assert.AreEqual(4, testingTarget.LastIndexOf(3), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionLastIndexOf END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Remove.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Remove M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionRemove()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionRemove START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4, 3 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ Assert.AreEqual(true, testingTarget.Remove(3), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionRemove END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemLayout")]
+ public class PublicItemLayoutTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyItemLayout : ItemLayout
+ {
+ public MyItemLayout(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemLayout constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemLayout.ItemLayout C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemLayoutConstructor()
+ {
+ tlog.Debug(tag, $"ItemLayoutConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ItemLayout(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemLayout>(testingTarget, "Should be an Instance of ItemLayout!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemLayoutConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemLayout getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.ItemLayout.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemLayoutgetCPtr()
+ {
+ tlog.Debug(tag, $"ItemLayoutgetCPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new MyItemLayout(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemLayout>(testingTarget, "Should be an Instance of ItemLayout!");
+
+ try
+ {
+ ItemLayout.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemLayoutgetCPtr END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemRange")]
+ public class InternalItemRangeTest
+ {
+ 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("ItemRange constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.ItemRange C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeConstructor()
+ {
+ tlog.Debug(tag, $"ItemRangeConstructor START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemRangeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange constructor. With ItemRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.ItemRange C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeConstructorWithItemRange()
+ {
+ tlog.Debug(tag, $"ItemRangeConstructorWithItemRange START");
+
+ using (ItemRange copy = new ItemRange(0, 300))
+ {
+ var testingTarget = new ItemRange(copy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemRangeConstructorWithItemRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange Assign.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeAssign()
+ {
+ tlog.Debug(tag, $"ItemRangeAssign START");
+
+ using (ItemRange range = new ItemRange(0, 300))
+ {
+ using (ItemRange copy = new ItemRange(range))
+ {
+ var testingTarget = range.Assign(copy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemRangeAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange Within.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.Within M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeWithin()
+ {
+ tlog.Debug(tag, $"ItemRangeWithin START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ var result = testingTarget.Within(50);
+ Assert.IsTrue(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemRangeWithin END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange Intersection.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.Intersection M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeIntersection()
+ {
+ tlog.Debug(tag, $"ItemRangeIntersection START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ using (ItemRange second = new ItemRange(300, 500))
+ {
+ var result = testingTarget.Intersection(second);
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(result, "Should be an Instance of ItemRange!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemRangeIntersection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange begin.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.begin A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeBegin()
+ {
+ tlog.Debug(tag, $"ItemRangeBegin START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ Assert.AreEqual(0, testingTarget.begin, "Should be equal!");
+ testingTarget.begin = 100;
+ Assert.AreEqual(100, testingTarget.begin, "Should be equal!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemRangeBegin END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange end.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.end C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeEnd()
+ {
+ tlog.Debug(tag, $"ItemRangeEnd START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ Assert.AreEqual(300, testingTarget.end, "Should be equal!");
+ testingTarget.end = 500;
+ Assert.AreEqual(500, testingTarget.end, "Should be equal!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemRangeEnd END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemView")]
+ public class InternalItemViewTest
+ {
+ 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("ItemView constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.ItemView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewConstructor()
+ {
+ tlog.Debug(tag, $"ItemViewConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ItemView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView constructor. With ItemFactory.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Layout C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewConstructorWithItemFactory()
+ {
+ tlog.Debug(tag, $"ItemViewConstructorWithItemFactory START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewConstructorWithItemFactory END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView Layout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Layout A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewLayout()
+ {
+ tlog.Debug(tag, $"ItemViewLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ using (PropertyArray propertyArray = new PropertyArray())
+ {
+ propertyArray.Add(new PropertyValue(new Size2D(100, 80)));
+ testingTarget.Layout = propertyArray;
+
+ try
+ {
+ testingTarget.Layout = propertyArray;
+ tlog.Debug(tag, "Layout : " + testingTarget.Layout);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView AddLayout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.AddLayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewAddLayout()
+ {
+ tlog.Debug(tag, $"ItemViewAddLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewAddLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView RemoveLayout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.RemoveLayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewRemoveLayout()
+ {
+ tlog.Debug(tag, $"ItemViewRemoveLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
+ tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
+
+ try
+ {
+ testingTarget.RemoveLayout((uint)testingTarget.LayoutPosition);
+ tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewRemoveLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView DownCast.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Layout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewDownCast()
+ {
+ tlog.Debug(tag, $"ItemViewDownCast START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView view = new ItemView(factory))
+ {
+ var testingTarget = ItemView.DownCast(view);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView GetLayout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.GetLayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewGetLayout()
+ {
+ tlog.Debug(tag, $"ItemViewGetLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
+
+ try
+ {
+ testingTarget.GetLayout((uint)testingTarget.LayoutPosition);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewGetLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView GetActiveLayout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.GetActiveLayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewGetActiveLayout()
+ {
+ tlog.Debug(tag, $"ItemViewGetActiveLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
+
+ try
+ {
+ testingTarget.GetActiveLayout();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewGetActiveLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView InsertItem.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.InsertItem M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewInsertItem()
+ {
+ tlog.Debug(tag, $"ItemViewInsertItem START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ try
+ {
+ using (Item item = new Item())
+ {
+ testingTarget.InsertItem(new Item(), 30.0f);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewInsertItem END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView RemoveItem.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.RemoveItem M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewRemoveItem()
+ {
+ tlog.Debug(tag, $"ItemViewRemoveItem START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ using (Item item = new Item())
+ {
+ testingTarget.InsertItem(item, 30.0f);
+
+ var id = testingTarget.GetLayoutCount() - 1;
+ testingTarget.RemoveItem(id, 0.5f);
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewRemoveItem END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SetItemsAnchorPoint.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SetItemsAnchorPoint M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSetItemsAnchorPoint()
+ {
+ tlog.Debug(tag, $"ItemViewSetItemsAnchorPoint START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ using (Vector3 vector = new Vector3(100.0f, 30.0f, 200.0f))
+ {
+ testingTarget.SetItemsAnchorPoint(vector);
+ Assert.AreEqual(100.0f, testingTarget.GetItemsAnchorPoint().X, "Should be equal!");
+ Assert.AreEqual(30.0f, testingTarget.GetItemsAnchorPoint().Y, "Should be equal!");
+ Assert.AreEqual(200.0f, testingTarget.GetItemsAnchorPoint().Z, "Should be equal!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewSetItemsAnchorPoint END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView GetItemsRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.GetItemsRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewGetItemsRange()
+ {
+ tlog.Debug(tag, $"ItemViewGetItemsRange START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ try
+ {
+ using (ItemRange range = new ItemRange(0, 300))
+ {
+ testingTarget.GetItemsRange(range);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewGetItemsRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SetAnchoring.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SetAnchoring M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSetAnchoring()
+ {
+ tlog.Debug(tag, $"ItemViewSetAnchoring START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView itemView = new ItemView(factory))
+ {
+ itemView.SetAnchoring(true);
+ Assert.AreEqual(true, itemView.GetAnchoring(), "Should be equal!");
+
+ itemView.SetAnchoring(false);
+ Assert.AreEqual(false, itemView.GetAnchoring(), "Should be equal!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewSetAnchoring END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SetAnchoringDuration.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SetAnchoringDuration M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSetAnchoringDuration()
+ {
+ tlog.Debug(tag, $"ItemViewSetAnchoringDuration START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView itemView = new ItemView(factory))
+ {
+ itemView.SetAnchoringDuration(30.0f);
+ Assert.AreEqual(30.0f, itemView.GetAnchoringDuration(), "Should be equal!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewSetAnchoringDuration END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView Refresh.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Refresh M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewRefresh()
+ {
+ tlog.Debug(tag, $"ItemViewRefresh START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(factory.SwigCPtr.Handle, true));
+
+ try
+ {
+ testingTarget.Refresh();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewRefresh END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView GetItemId.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.GetItemId M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewGetItemId()
+ {
+ tlog.Debug(tag, $"ItemViewGetItemId START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ View view = new View()
+ {
+ Size = new Size(100, 80)
+ };
+
+ testingTarget.AddLayout(new ItemLayout(view.SwigCPtr.Handle, true));
+
+ try
+ {
+ var result = testingTarget.GetItemId(view);
+ tlog.Debug(tag, "ItemId : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewGetItemId END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SetItemsParentOrigin.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SetItemsParentOrigin M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSetItemsParentOrigin()
+ {
+ tlog.Debug(tag, $"ItemViewSetItemsParentOrigin START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView itemView = new ItemView(factory))
+ {
+ using (Vector3 vector = new Vector3(0.0f, 1.0f, 3.0f))
+ {
+ itemView.SetItemsParentOrigin(vector);
+ Assert.AreEqual(0.0f, itemView.GetItemsParentOrigin().X, "Should be equal!");
+ Assert.AreEqual(1.0f, itemView.GetItemsParentOrigin().Y, "Should be equal!");
+ Assert.AreEqual(3.0f, itemView.GetItemsParentOrigin().Z, "Should be equal!");
+ }
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewSetItemsParentOrigin END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView LayoutActivatedSignal.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.LayoutActivatedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewLayoutActivatedSignal()
+ {
+ tlog.Debug(tag, $"ItemViewLayoutActivatedSignal START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView itemView = new ItemView(factory))
+ {
+ var testingTarget = itemView.LayoutActivatedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VoidSignal>(testingTarget, "Should be an Instance of VoidSignal!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewLayoutActivatedSignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView MinimumSwipeDistance.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.MinimumSwipeDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewMinimumSwipeDistance()
+ {
+ tlog.Debug(tag, $"ItemViewMinimumSwipeDistance START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.MinimumSwipeDistance = 10.0f;
+ Assert.AreEqual(10.0f, testingTarget.MinimumSwipeDistance, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewMinimumSwipeDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView MinimumSwipeSpeed.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.MinimumSwipeSpeed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewMinimumSwipeSpeed()
+ {
+ tlog.Debug(tag, $"ItemViewMinimumSwipeSpeed START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.MinimumSwipeSpeed = 1.0f;
+ Assert.AreEqual(1.0f, testingTarget.MinimumSwipeSpeed, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewMinimumSwipeSpeed END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView WheelScrollDistanceStep.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.WheelScrollDistanceStep A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewWheelScrollDistanceStep()
+ {
+ tlog.Debug(tag, $"ItemViewWheelScrollDistanceStep START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.WheelScrollDistanceStep = 1.0f;
+ Assert.AreEqual(1.0f, testingTarget.WheelScrollDistanceStep, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewWheelScrollDistanceStep END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SnapToItemEnabled.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SnapToItemEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSnapToItemEnabled()
+ {
+ tlog.Debug(tag, $"ItemViewSnapToItemEnabled START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.SnapToItemEnabled = true;
+ Assert.AreEqual(true, testingTarget.SnapToItemEnabled, "Should be equal");
+
+ testingTarget.SnapToItemEnabled = false;
+ Assert.AreEqual(false, testingTarget.SnapToItemEnabled, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewSnapToItemEnabled END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView RefreshInterval.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.RefreshInterval A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewRefreshInterval()
+ {
+ tlog.Debug(tag, $"ItemViewRefreshInterval START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.RefreshInterval = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.RefreshInterval, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewRefreshInterval END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView LayoutPosition.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.LayoutPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewLayoutPosition()
+ {
+ tlog.Debug(tag, $"ItemViewLayoutPosition START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.LayoutPosition = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.LayoutPosition, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewLayoutPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView ScrollSpeed.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.ScrollSpeed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewScrollSpeed()
+ {
+ tlog.Debug(tag, $"ItemViewScrollSpeed START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.ScrollSpeed = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.ScrollSpeed, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewScrollSpeed END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView Overshoot.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Overshoot A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewOvershoot()
+ {
+ tlog.Debug(tag, $"ItemViewOvershoot START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.Overshoot = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.Overshoot, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewOvershoot END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView ScrollDirection.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.ScrollDirection A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewScrollDirection()
+ {
+ tlog.Debug(tag, $"ItemViewScrollDirection START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.ScrollDirection = new Vector2(0.0f, 90.0f);
+ Assert.AreEqual(0.0f, testingTarget.ScrollDirection.X, "Should be equal");
+ Assert.AreEqual(90.0f, testingTarget.ScrollDirection.Y, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewScrollDirection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView LayoutOrientation.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.LayoutOrientation A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewLayoutOrientation()
+ {
+ tlog.Debug(tag, $"ItemViewLayoutOrientation START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.LayoutOrientation = 1;
+ Assert.AreEqual(1, testingTarget.LayoutOrientation, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewLayoutOrientation END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView ScrollContentSize.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.ScrollContentSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewScrollContentSize()
+ {
+ tlog.Debug(tag, $"ItemViewScrollContentSize START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.ScrollContentSize = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.ScrollContentSize, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewScrollContentSize END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageFactory")]
+ public class InternalPageFactoryTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyPageFactory : PageFactory
+ {
+ public MyPageFactory(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageFactory constructor.")]
+ [Property("SPEC", "Tizen.NUI.PageFactory.PageFactory C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageFactoryConstructor()
+ {
+ tlog.Debug(tag, $"PageFactoryConstructor START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new PageFactory(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageFactory>(testingTarget, "Should be an Instance of PageFactory!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageFactoryConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageFactory getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.PageFactory.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageFactorygetCPtr()
+ {
+ tlog.Debug(tag, $"PageFactorygetCPtr START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new MyPageFactory(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageFactory>(testingTarget, "Should be an Instance of PageFactory!");
+
+ try
+ {
+ MyPageFactory.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageFactorygetCPtr END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PagePanSignal")]
+ public class InternalPagePanSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr pagePanSignal);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.PagePanSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignalConstructor()
+ {
+ tlog.Debug(tag, $"PagePanSignalConstructor START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new PagePanSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PagePanSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignaEmpty()
+ {
+ tlog.Debug(tag, $"PagePanSignaEmpty START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new PagePanSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PagePanSignaEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignaGetConnectionCount()
+ {
+ tlog.Debug(tag, $"PagePanSignaGetConnectionCount START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new PagePanSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PagePanSignaGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignaConnect()
+ {
+ tlog.Debug(tag, $"PagePanSignaConnect START");
+
+ var testingTarget = new PagePanSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ try
+ {
+ dummyCallback callback = OnDummyCallback;
+ testingTarget.Connect(callback);
+ testingTarget.Disconnect(callback);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PagePanSignaConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignalEmit()
+ {
+ tlog.Debug(tag, $"PagePanSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PagePanSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ try
+ {
+ testingTarget.Emit(new PageTurnView(view.SwigCPtr.Handle, false));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PagePanSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageTurnLandscapeView")]
+ public class InternalPageTurnLandscapeViewTest
+ {
+ 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("PageTurnLandscapeView constructor.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewConstructor()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView constructor. With PageTurnLandscapeView.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewConstructorWithPageTurnLandscapeView()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewConstructorWithPageTurnLandscapeView START");
+
+ using (View view = new View())
+ {
+ using (PageTurnLandscapeView landscapeView = new PageTurnLandscapeView(view.SwigCPtr.Handle, false))
+ {
+ var testingTarget = new PageTurnLandscapeView(landscapeView);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewConstructorWithPageTurnLandscapeView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewGetCPtr()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewGetCPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ try
+ {
+ PageTurnLandscapeView.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewGetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView DownCast.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewDownCast()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewDownCast START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ try
+ {
+ PageTurnLandscapeView.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView Assign.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewAssign()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewAssign START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ try
+ {
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewAssign END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("PageTurnLandscapeView constructor.")]
+ //[Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void PageTurnLandscapeViewConstructor()
+ //{
+ // tlog.Debug(tag, $"PageTurnLandscapeViewConstructor START");
+
+ // using (View view = new View())
+ // {
+ // using (PageFactory pageFactory = new PageFactory(view.SwigCPtr.Handle, true))
+ // {
+ // using (Vector2 pageSize = new Vector2(100, 50))
+ // {
+ // var testingTarget = new PageTurnLandscapeView(pageFactory, pageSize);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ // testingTarget.Dispose();
+ // }
+ // }
+ // }
+
+ // tlog.Debug(tag, $"PageTurnLandscapeViewConstructor END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageTurnPortraitView")]
+ public class InternalPageTurnPortraitViewTest
+ {
+ 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("PageTurnPortraitView constructor.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.PageTurnPortraitView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewConstructor()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnPortraitView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView constructor. With PageTurnPortraitView.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.PageTurnPortraitView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewConstructorWithPageTurnPortraitView()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewConstructorWithPageTurnPortraitView START");
+
+ using (View view = new View())
+ {
+ using (PageTurnPortraitView portraitView = new PageTurnPortraitView(view.SwigCPtr.Handle, false))
+ {
+ var testingTarget = new PageTurnPortraitView(portraitView);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewConstructorWithPageTurnPortraitView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewGetCPtr()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewGetCPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnPortraitView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ try
+ {
+ PageTurnPortraitView.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewGetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView DownCast.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewDownCast()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewDownCast START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnPortraitView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ try
+ {
+ PageTurnPortraitView.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView Assign.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewAssign()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewAssign START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnPortraitView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ try
+ {
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewAssign END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("PageTurnPortraitView constructor.")]
+ //[Property("SPEC", "Tizen.NUI.PageTurnPortraitView.PageTurnPortraitView C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void PageTurnPortraitViewConstructor()
+ //{
+ // tlog.Debug(tag, $"PageTurnPortraitViewConstructor START");
+
+ // using (View view = new View())
+ // {
+ // using (PageFactory pageFactory = new PageFactory(view.SwigCPtr.Handle, false))
+ // {
+ // using (Vector2 pageSize = new Vector2(100, 50))
+ // {
+ // var testingTarget = new PageTurnPortraitView(pageFactory, pageSize);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ // testingTarget.Dispose();
+ // }
+ // }
+ // }
+
+ // tlog.Debug(tag, $"PageTurnPortraitViewConstructor END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageTurnSignal")]
+ public class InternalPageTurnSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr pageTurnSignal);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.PageTurnSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalConstructor()
+ {
+ tlog.Debug(tag, $"PageTurnSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalEmpty()
+ {
+ tlog.Debug(tag, $"PageTurnSignalEmpty START");
+
+ var testingTarget = new PageTurnSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PageTurnSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"PageTurnSignalGetConnectionCount START");
+
+ var testingTarget = new PageTurnSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PageTurnSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalConnect()
+ {
+ tlog.Debug(tag, $"PageTurnSignalConnect START");
+
+ var testingTarget = new PageTurnSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ try
+ {
+ dummyCallback callback = OnDummyCallback;
+ testingTarget.Connect(callback);
+ testingTarget.Disconnect(callback);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PageTurnSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalEmit()
+ {
+ tlog.Debug(tag, $"PageTurnSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ try
+ {
+ testingTarget.Emit(new PageTurnView(view.SwigCPtr.Handle, false), 1, false);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageTurnView")]
+ public class InternalPageTurnViewTest
+ {
+ 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!");
+ }
+ }
+}