// tlog.Debug(tag, e.Message.ToString());
// Assert.Fail("Caught Exception: Failed!");
// }
-
+
// testingTarget.Dispose();
// tlog.Debug(tag, $"AccessibilityDoGestureSignalEmit END (OK)");
//}
+
+ [Test]
+ [Description("AccessibilityDoGestureSignal SetResult")]
+ [Property("AUTHOR", "dongsug.song@samsung.com")]
+ public void AccessibilityDoGestureSignalSetResult()
+ {
+ tlog.Debug(tag, $"AccessibilityDoGestureSignalSetResult START");
+
+ using (View view = new View())
+ {
+ view.OnWindowSignal();
+
+ AccessibilityDoGestureSignal.SetResult(view.SwigCPtr.Handle, true);
+ var result = AccessibilityDoGestureSignal.GetResult(view.SwigCPtr.Handle);
+ tlog.Debug(tag, "Result : " + result);
+ }
+
+ tlog.Debug(tag, $"AccessibilityDoGestureSignalSetResult END (OK)");
+ }
}
}
application.XamlResources = new Tizen.NUI.Binding.ResourceDictionary();
tlog.Debug(tag, "application.XamlResources : " + application.XamlResources);
+ try
+ {
+ Tizen.NUI.Binding.ResourceDictionary resources = null;
+ application.XamlResources = resources;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
widget.Dispose();
widget = null;
tlog.Debug(tag, $"ApplicationXamlResources END (OK)");
[Test]
[Category("P1")]
+ [Description("BaseObject GetTypeInfo.")]
+ [Property("SPEC", "Tizen.NUI.BaseObject.GetTypeInfo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BaseObjectGetTypeInfo()
+ {
+ tlog.Debug(tag, $"BaseObjectGetTypeInfo START");
+
+ var testingTarget = new BaseObject(Interop.NDalic.GetImplementation(BaseHandle.getCPtr(widget)), false);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<BaseObject>(testingTarget, "should be an instance of BaseObject class!");
+
+ try
+ {
+ testingTarget.GetTypeInfo(new TypeInfo(widget.SwigCPtr.Handle, false));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Cuaght Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"BaseObjectGetTypeInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("BaseObject GetTypeName.")]
[Property("SPEC", "Tizen.NUI.BaseObject.GetTypeName M")]
[Property("SPEC_URL", "-")]
--- /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/Common/EnumHelper")]
+ public class InternalEnumHelperTest
+ {
+ 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("EnumHelper GetValue.")]
+ [Property("SPEC", "Tizen.NUI.EnumHelper.GetValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void EnumHelperGetValue()
+ {
+ tlog.Debug(tag, $"EnumHelperGetValue START");
+
+ var result = EnumHelper.GetValue<VerticalAlignmentType>("Bottom");
+ tlog.Debug(tag, "GetValue : " + result);
+
+ tlog.Debug(tag, $"EnumHelperGetValue END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("EnumHelper GetValue.")]
+ [Property("SPEC", "Tizen.NUI.EnumHelper.GetValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void EnumHelperGetValueArgumentException()
+ {
+ tlog.Debug(tag, $"EnumHelperGetValueArgumentException START");
+
+ try
+ {
+ EnumHelper.GetValue<VerticalAlignmentType>("Right");
+ }
+ catch (ArgumentException)
+ {
+ tlog.Debug(tag, $"EnumHelperGetValueArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException : Passed!");
+ }
+ }
+ }
+}
--- /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/Common/RenderTaskList")]
+ public class InternalRenderTaskListTest
+ {
+ 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("RenderTaskList constructor.")]
+ [Property("SPEC", "Tizen.NUI.RenderTaskList.RenderTaskList C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RenderTaskListConstructor()
+ {
+ tlog.Debug(tag, $"RenderTaskListConstructor START");
+
+ var testingTarget = new RenderTaskList();
+ Assert.IsInstanceOf<RenderTaskList>(testingTarget, "Should return RenderTaskList instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"RenderTaskListConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RenderTaskList DownCast.")]
+ [Property("SPEC", "Tizen.NUI.RenderTaskList.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RenderTaskListDownCast()
+ {
+ tlog.Debug(tag, $"RenderTaskListDownCast START");
+
+ using (RenderTask task = new RenderTask())
+ {
+ try
+ {
+ RenderTaskList.DownCast(task);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"RenderTaskListDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RenderTaskList Assign.")]
+ [Property("SPEC", "Tizen.NUI.RenderTaskList.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RenderTaskListAssign()
+ {
+ tlog.Debug(tag, $"RenderTaskListAssign START");
+
+ using (Animatable ani = new Animatable())
+ {
+ using (RenderTaskList task = new RenderTaskList(ani.SwigCPtr.Handle, false))
+ {
+ var testingTarget = task.Assign(task);
+ Assert.IsNotNull(testingTarget, "Can't create success object RenderTaskList.");
+ Assert.IsInstanceOf<RenderTaskList>(testingTarget, "Should return RenderTaskList instance.");
+
+ tlog.Debug(tag, "GetTaskCount :" + testingTarget.GetTaskCount());
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"RenderTaskListAssign 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/Common/WeakEvent")]
+ public class InternalWeakEventTest
+ {
+ private const string tag = "NUITEST";
+
+ private static event EventHandler<EventArgs> OnChanged;
+ private void OnDummyCallback(object target, EventArgs data) { }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WeakEvent Add.")]
+ //[Property("SPEC", "Tizen.NUI.WeakEvent.Add M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WeakEventAdd()
+ //{
+ // tlog.Debug(tag, $"WeakEventAdd START");
+
+ // var testingTarget = new NUI.WeakEvent<EventHandler<EventArgs>>();
+ // Assert.IsNotNull(testingTarget, "Can't create success object WeakEvent");
+ // Assert.IsInstanceOf<NUI.WeakEvent<EventHandler<EventArgs>>>(testingTarget, "Should be an instance of WeakEvent type.");
+
+ // TChanged += OnDummyCallback;
+
+ // try
+ // {
+ // testingTarget.Add(TChanged);
+ // testingTarget.Remove(TChanged);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // TChanged -= OnDummyCallback;
+ // tlog.Debug(tag, $"WeakEventAdd END (OK)");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("WeakEvent Invoke.")]
+ [Property("SPEC", "Tizen.NUI.WeakEvent.Invoke M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WeakEventInvoke()
+ {
+ tlog.Debug(tag, $"WeakEventInvoke START");
+
+ var testingTarget = new NUI.WeakEvent<EventHandler<EventArgs>>();
+ Assert.IsNotNull(testingTarget, "Can't create success object WeakEvent");
+ Assert.IsInstanceOf<NUI.WeakEvent<EventHandler<EventArgs>>>(testingTarget, "Should be an instance of WeakEvent type.");
+
+ OnChanged += OnDummyCallback;
+ testingTarget.Add(OnChanged);
+
+ try
+ {
+ testingTarget.Invoke(null, new EventArgs());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Remove(OnChanged);
+ OnChanged -= OnDummyCallback;
+ tlog.Debug(tag, $"WeakEventInvoke START");
+ }
+ }
+}
--- /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/Common/WeakEventHandler")]
+ public class InternalWeakEventHandlerTest
+ {
+ private const string tag = "NUITEST";
+ private void OnDummyCallback(object sender, EventArgs e) { }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WeakEventHandler constructor.")]
+ [Property("SPEC", "Tizen.NUI.WeakEventHandler.WeakEventHandler C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WeakEventHandlerConstructor()
+ {
+ tlog.Debug(tag, $"WeakEventHandlerConstructor START");
+
+ EventHandler<EventArgs> callback = OnDummyCallback;
+
+ var testingTarget = new WeakEventHandler<EventArgs>(callback);
+ Assert.IsNotNull(testingTarget, "Can't create success object WeakEventHandler");
+ Assert.IsInstanceOf<WeakEventHandler<EventArgs>>(testingTarget, "Should be an instance of WeakEventHandler type.");
+
+ using (View view = new View())
+ {
+ try
+ {
+ testingTarget.Handler(view, new EventArgs());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"WeakEventHandlerConstructor END (OK)");
+ }
+ }
+}
testingTarget.RegisterProperty("dummy", new PropertyValue(6));
var index = testingTarget.GetPropertyIndex("dummy");
var result = testingTarget.GetPropertyName(index);
- Assert.AreEqual("dummy", result, "should be eaqual.");
+ Assert.AreEqual("dummy", result, "should be equal.");
testingTarget.Dispose();
tlog.Debug(tag, $"AnimatableGetPropertyName END (OK)");
Assert.IsTrue(10001001 == index);
var result = view.GetPropertyType(index);
- Assert.AreEqual(PropertyType.Map, result, "should be eaqual.");
+ Assert.AreEqual(PropertyType.Map, result, "should be equal.");
view.Dispose();
tlog.Debug(tag, $"AnimatableGetGetPropertyType END (OK)");
var index = testingTarget.GetPropertyIndex("dummy");
testingTarget.SetProperty(index, new PropertyValue(8));
testingTarget.GetProperty(index).Get(out int result);
- Assert.AreEqual(8, result, "should be eaqual.");
+ Assert.AreEqual(8, result, "should be equal.");
testingTarget.Dispose();
tlog.Debug(tag, $"AnimatableSetProperty END (OK)");
testingTarget.RegisterProperty("dummy", new PropertyValue(6));
var index = testingTarget.GetPropertyIndex("dummy");
testingTarget.GetProperty(index).Get(out int result);
- Assert.AreEqual(6, result, "should be eaqual.");
+ Assert.AreEqual(6, result, "should be equal.");
testingTarget.Dispose();
tlog.Debug(tag, $"AnimatableRegisterProperty END (OK)");
testingTarget.RegisterProperty("dummy", new PropertyValue(6), PropertyAccessMode.Animatable);
var index = testingTarget.GetPropertyIndex("dummy");
testingTarget.GetProperty(index).Get(out int result);
- Assert.AreEqual(6, result, "should be eaqual.");
+ Assert.AreEqual(6, result, "should be equal.");
testingTarget.Dispose();
tlog.Debug(tag, $"AnimatableRegisterPropertyWithAccessMode END (OK)");
testingTarget.RegisterProperty("dummy", new PropertyValue(6), PropertyAccessMode.Animatable);
var index = testingTarget.GetPropertyIndex("dummy");
testingTarget.GetProperty(index).Get(out int result);
- Assert.AreEqual(6, result, "should be eaqual.");
+ Assert.AreEqual(6, result, "should be equal.");
testingTarget.Dispose();
tlog.Debug(tag, $"AnimatableGetProperty END (OK)");
Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
testingTarget.Dispose();
+ // diposed
+ testingTarget.Dispose();
tlog.Debug(tag, $"TransitionAnimationConstructor END (OK)");
}
}
[Test]
+ [Category("P2")]
+ [Description("TransitionAnimations AddAnimationData")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.AddAnimationData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationAddAnimationDataWithNull()
+ {
+ tlog.Debug(tag, $"TransitionAnimationAddAnimationDataWithNull START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ try
+ {
+ TransitionAnimationData dummy = null;
+ testingTarget.AddAnimationData(dummy);
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationAddAnimationDataWithNull END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
[Category("P1")]
[Description("TransitionAnimations RemoveAnimationData")]
[Property("SPEC", "Tizen.NUI.TransitionAnimations.RemoveAnimationData M")]
DestinationValue = "100, 100",
};
var result = testingTarget.StartTime;
- Assert.AreEqual(300, result, "should be eaqual!");
+ Assert.AreEqual(300, result, "should be equal!");
tlog.Debug(tag, $"TransitionAnimationDataStartTimeGet END (OK)");
}
};
var result = testingTarget.StartTime;
- Assert.AreEqual(300, result, "should be eaqual!");
+ Assert.AreEqual(300, result, "should be equal!");
testingTarget.StartTime = 600;
result = testingTarget.StartTime;
- Assert.AreEqual(600, result, "should be eaqual!");
+ Assert.AreEqual(600, result, "should be equal!");
tlog.Debug(tag, $"TransitionAnimationDataStartTimeSet END (OK)");
}
};
var result = testingTarget.EndTime;
- Assert.AreEqual(600, result, "should be eaqual!");
+ Assert.AreEqual(600, result, "should be equal!");
tlog.Debug(tag, $"TransitionAnimationDataEndTimeGet END (OK)");
}
};
var result = testingTarget.EndTime;
- Assert.AreEqual(600, result, "should be eaqual!");
+ Assert.AreEqual(600, result, "should be equal!");
testingTarget.EndTime = 900;
result = testingTarget.EndTime;
- Assert.AreEqual(900, result, "should be eaqual!");
+ Assert.AreEqual(900, result, "should be equal!");
tlog.Debug(tag, $"TransitionAnimationDataEndTimeSet END (OK)");
}
};
var result = testingTarget.Property;
- Assert.AreEqual("Size", result, "should be eaqual!");
+ Assert.AreEqual("Size", result, "should be equal!");
tlog.Debug(tag, $"TransitionAnimationDataPropertyGet END (OK)");
}
};
var result = testingTarget.Property;
- Assert.AreEqual("Size", result, "should be eaqual!");
+ Assert.AreEqual("Size", result, "should be equal!");
testingTarget.Property = "Position";
result = testingTarget.Property;
- Assert.AreEqual("Position", result, "should be eaqual!");
+ Assert.AreEqual("Position", result, "should be equal!");
tlog.Debug(tag, $"TransitionAnimationDataPropertySet END (OK)");
}
};
var result = testingTarget.DestinationValue;
- Assert.AreEqual("100, 100", result, "should be eaqual!");
+ Assert.AreEqual("100, 100", result, "should be equal!");
tlog.Debug(tag, $"TransitionAnimationDataDestinationValueGet END (OK)");
}
};
var result = testingTarget.DestinationValue;
- Assert.AreEqual("100, 100", result, "should be eaqual!");
+ Assert.AreEqual("100, 100", result, "should be equal!");
testingTarget.Property = "Position";
testingTarget.DestinationValue = "0.3f, 0.9f, 0.0f";
result = testingTarget.DestinationValue;
- Assert.AreEqual("0.3f, 0.9f, 0.0f", result, "should be eaqual!");
+ Assert.AreEqual("0.3f, 0.9f, 0.0f", result, "should be equal!");
tlog.Debug(tag, $"TransitionAnimationDataDestinationValueSet END (OK)");
}
Assert.IsInstanceOf<TransitionData>(testingTarget, "should be an instance of TransitionData class!");
var result = testingTarget.Count();
- Assert.AreEqual(1, result, "should be eaqual!");
+ Assert.AreEqual(1, result, "should be equal!");
testingTarget.Dispose();
tlog.Debug(tag, $"TransitionDataCount END (OK)");
Assert.IsInstanceOf<TransitionData>(testingTarget, "should be an instance of TransitionData class!");
var result = testingTarget.GetAnimatorAt(0);
- Assert.AreEqual(3, result.Count(), "should be eaqual!");
+ Assert.AreEqual(3, result.Count(), "should be equal!");
testingTarget.Dispose();
tlog.Debug(tag, $"TransitionDataGetAnimatorAt END (OK)");
testingTarget.AnimatedTarget = view;
var result = testingTarget.AnimatedTarget;
- Assert.AreEqual(30, result.SizeWidth, "should be eaqual!");
- Assert.AreEqual(50, result.SizeHeight, "should be eaqual!");
+ Assert.AreEqual(30, result.SizeWidth, "should be equal!");
+ Assert.AreEqual(50, result.SizeHeight, "should be equal!");
testingTarget.Dispose();
tlog.Debug(tag, $"TransitionOptionsAnimatedTargetGet END (OK)");
testingTarget.AnimatedTarget = view;
var result = testingTarget.AnimatedTarget;
- Assert.AreEqual(30, result.SizeWidth, "should be eaqual!");
- Assert.AreEqual(50, result.SizeHeight, "should be eaqual!");
+ Assert.AreEqual(30, result.SizeWidth, "should be equal!");
+ Assert.AreEqual(50, result.SizeHeight, "should be equal!");
testingTarget.Dispose();
tlog.Debug(tag, $"TransitionOptionsAnimatedTargetSet END (OK)");
};
view.TransitionOptions.TransitionTag = "default";
var result = view.TransitionOptions.TransitionTag;
- Assert.AreEqual("default", result, "should be eaqual!");
+ Assert.AreEqual("default", result, "should be equal!");
view.Dispose();
tlog.Debug(tag, $"TransitionOptionsTransitionTagGet END (OK)");
};
view.TransitionOptions.TransitionTag = "default";
var result = view.TransitionOptions.TransitionTag;
- Assert.AreEqual("default", result, "should be eaqual!");
+ Assert.AreEqual("default", result, "should be equal!");
view.Dispose();
tlog.Debug(tag, $"TransitionOptionsTransitionTagSet END (OK)");
testingTarget.ForwardAnimation = forwordAnimation;
var result = testingTarget.ForwardAnimation;
- Assert.AreEqual(300, result.DurationMilliSeconds, "should be eaqual!");
+ Assert.AreEqual(300, result.DurationMilliSeconds, "should be equal!");
view.Dispose();
forwordAnimation.Dispose();
testingTarget.ForwardAnimation = forwordAnimation;
var result = testingTarget.ForwardAnimation;
- Assert.AreEqual(300, result.DurationMilliSeconds, "should be eaqual!");
+ Assert.AreEqual(300, result.DurationMilliSeconds, "should be equal!");
view.Dispose();
forwordAnimation.Dispose();
testingTarget.BackwardAnimation = backwordAnimation;
var result = testingTarget.BackwardAnimation;
- Assert.AreEqual(300, result.DurationMilliSeconds, "should be eaqual!");
+ Assert.AreEqual(300, result.DurationMilliSeconds, "should be equal!");
view.Dispose();
backwordAnimation.Dispose();
testingTarget.BackwardAnimation = backwordAnimation;
var result = testingTarget.BackwardAnimation;
- Assert.AreEqual(300, result.DurationMilliSeconds, "should be eaqual!");
+ Assert.AreEqual(300, result.DurationMilliSeconds, "should be equal!");
view.Dispose();
backwordAnimation.Dispose();
Assert.IsNotNull(testingTarget, "Should be not null.");
Assert.IsInstanceOf<NUIApplication>(testingTarget, "Should be an instance of NUIApplication type.");
+ tlog.Debug(tag, "ApplicationHandle : " + testingTarget.ApplicationHandle);
+
pos.Dispose();
size.Dispose();
testingTarget.Dispose();
{
tlog.Debug(tag, $"NUIApplicationConstructorForImeWindow START");
- var application = new NUIApplication("stylesheet", NUIApplication.WindowMode.Opaque, WindowType.Ime);
- Assert.IsNotNull(application, "NUIApplication Should return NUIApplication instance.");
+ Size2D windowSize = new Size2D(100, 50);
+ Position2D windowPosition = new Position2D(20, 30);
+ var testingTarget = new NUIApplication("", NUIApplication.WindowMode.Opaque, windowSize, windowPosition, WindowType.Dialog);
+ Assert.IsNotNull(testingTarget, "Should be not null.");
Assert.IsInstanceOf<NUIApplication>(testingTarget, "Should be an instance of NUIApplication type.");
windowSize.Dispose();
tlog.Debug(tag, $"LottieAnimationViewFinished END (OK)");
}
- public void OnFinishedEvent(object sender, EventArgs e)
- {
- // not implemented
+ [Test]
+ [Category("P1")]
+ [Description("LottieAnimationView VisualEvent.")]
+ [Property("SPEC", "Tizen.NUI.LottieAnimationView.VisualEvent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieAnimationViewVisualEvent()
+ {
+ tlog.Debug(tag, $"LottieAnimationViewVisualEvent START");
+
+ var testingTarget = new LottieAnimationView();
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieAnimationView");
+ Assert.IsInstanceOf<LottieAnimationView>(testingTarget, "Should be an instance of LottieAnimationView type.");
+
+ testingTarget.URL = lottieFilePath;
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);
+
+ testingTarget.VisualEvent += OnVisualEvent;
+ testingTarget.VisualEvent -= OnVisualEvent;
+
+ NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"LottieAnimationViewVisualEvent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieFrameInfo constructor.")]
+ [Property("SPEC", "Tizen.NUI.LottieFrameInfo.LottieFrameInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieFrameInfoConstructor()
+ {
+ tlog.Debug(tag, $"LottieFrameInfoConstructor START");
+
+ var testingTarget = new LottieFrameInfo(0, 10);
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieFrameInfo");
+ Assert.IsInstanceOf<LottieFrameInfo>(testingTarget, "Should be an instance of LottieFrameInfo type.");
+
+ var result = testingTarget.StartFrame;
+ Assert.AreEqual(0, result, "should be equal!");
+
+ result = testingTarget.EndFrame;
+ Assert.AreEqual(10, result, "should be equal!");
+
+ tlog.Debug(tag, $"LottieFrameInfoConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieFrameInfo constructor.")]
+ [Property("SPEC", "Tizen.NUI.LottieFrameInfo.LottieFrameInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieFrameInfoConstructorWithStillImageFrame()
+ {
+ tlog.Debug(tag, $"LottieFrameInfoConstructorWithStillImageFrame START");
+
+ var testingTarget = new LottieFrameInfo(300);
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieFrameInfo");
+ Assert.IsInstanceOf<LottieFrameInfo>(testingTarget, "Should be an instance of LottieFrameInfo type.");
+
+ var result = testingTarget.IsStillImage();
+ tlog.Debug(tag, "IsStillImage : " + result);
+
+ tlog.Debug(tag, $"LottieFrameInfoConstructorWithStillImageFrame END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieFrameInfo constructor.")]
+ [Property("SPEC", "Tizen.NUI.LottieFrameInfo.LottieFrameInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieFrameInfoConstructorWithPair()
+ {
+ tlog.Debug(tag, $"LottieFrameInfoConstructorWithPair START");
+
+ LottieFrameInfo testingTarget = (0, 10);
+ Assert.IsNotNull(testingTarget, "Can't create success object LottieFrameInfo");
+ Assert.IsInstanceOf<LottieFrameInfo>(testingTarget, "Should be an instance of LottieFrameInfo type.");
+
+ tlog.Debug(tag, $"LottieFrameInfoConstructorWithPair END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("LottieFrameInfo constructor.")]
+ [Property("SPEC", "Tizen.NUI.LottieFrameInfo.LottieFrameInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LottieFrameInfoConstructorWithString()
+ {
+ tlog.Debug(tag, $"LottieFrameInfoConstructorWithString START");
+
+ LottieFrameInfo dummy1 = "0, 10";
+ Assert.IsNotNull(dummy1, "Can't create success object LottieFrameInfo");
+ Assert.IsInstanceOf<LottieFrameInfo>(dummy1, "Should be an instance of LottieFrameInfo type.");
+
+ // length == 1
+ LottieFrameInfo dummy2 = "10";
+ Assert.IsNotNull(dummy2, "Can't create success object LottieFrameInfo");
+ Assert.IsInstanceOf<LottieFrameInfo>(dummy2, "Should be an instance of LottieFrameInfo type.");
+
+ tlog.Debug(tag, $"LottieFrameInfoConstructorWithString END (OK)");
+ }
+
+ public void OnFinishedEvent(object sender, EventArgs e) { }
+
+ private void OnVisualEvent(object sender, LottieAnimationView.VisualEventSignalArgs e) { }
}
}
[Test]
[Category("P1")]
[Description("ViewAccessibility.View.RemoveAccessibilityAttribute.")]
- [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.RemoveAccessibilityAttribute A")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.RemoveAccessibilityAttribute M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ViewAccessibilityViewRemoveAccessibilityAttribute()
{
Assert.Fail("Caught Exception: Failed!");
}
+ testingTarget.Dispose();
tlog.Debug(tag, $"ViewAccessibilityViewRemoveAccessibilityAttribute END (OK)");
}
[Test]
[Category("P1")]
[Description("ViewAccessibility.View.ClearAccessibilityAttributes.")]
- [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.ClearAccessibilityAttributes A")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.ClearAccessibilityAttributes MR")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ViewAccessibilityViewClearAccessibilityAttributes()
{
Assert.Fail("Caught Exception: Failed!");
}
+ testingTarget.Dispose();
tlog.Debug(tag, $"ViewAccessibilityViewClearAccessibilityAttributes END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.View.ClearAccessibilityHighlight.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.ClearAccessibilityHighlight M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityViewClearAccessibilityHighlight()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityViewClearAccessibilityHighlight START");
+
+ var testingTarget = new View();
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+ testingTarget.AccessibilityHighlightable = true;
+
+ try
+ {
+ var result = testingTarget.ClearAccessibilityHighlight();
+ tlog.Debug(tag, "ClearAccessibilityHighlight : " + result);
+
+ result = testingTarget.GrabAccessibilityHighlight();
+ tlog.Debug(tag, "GrabAccessibilityHighlight : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ViewAccessibilityViewClearAccessibilityHighlight END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.View.AppendAccessibilityRelation.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.AppendAccessibilityRelation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityViewAppendAccessibilityRelation()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityViewAppendAccessibilityRelation START");
+
+ var testingTarget = new View()
+ {
+ Size = new Size2D(100, 100),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.TopCenter,
+ BackgroundColor = Color.AquaMarine,
+ };
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+ using (View child = new View())
+ {
+ try
+ {
+ testingTarget.AppendAccessibilityRelation(child, AccessibilityRelationType.MemberOf);
+ var result = testingTarget.GetAccessibilityRelations();
+ tlog.Debug(tag, "AccessibilityRelations : " + result);
+
+ testingTarget.RemoveAccessibilityRelation(child, AccessibilityRelationType.MemberOf);
+ testingTarget.ClearAccessibilityRelations();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ViewAccessibilityViewAppendAccessibilityRelation END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ViewAccessibility.View.AppendAccessibilityRelation.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.AppendAccessibilityRelation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityViewAppendAccessibilityRelationNullValue()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityViewAppendAccessibilityRelationNullValue START");
+
+ var testingTarget = new View()
+ {
+ Size = new Size2D(100, 100),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.TopCenter,
+ BackgroundColor = Color.AquaMarine,
+ };
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+ View child = null;
+ try
+ {
+ testingTarget.AppendAccessibilityRelation(child, AccessibilityRelationType.MemberOf);
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ViewAccessibilityViewAppendAccessibilityRelationNullValue END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.View.SetAccessibilityReadingInfoTypes.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.SetAccessibilityReadingInfoTypes M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityViewSetAccessibilityReadingInfoTypes()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityViewSetAccessibilityReadingInfoTypes START");
+
+ var testingTarget = new View()
+ {
+ Size = new Size2D(100, 100),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.TopCenter,
+ BackgroundColor = Color.AquaMarine,
+ };
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+
+ testingTarget.SetAccessibilityReadingInfoTypes(AccessibilityReadingInfoTypes.Description);
+ var result = testingTarget.GetAccessibilityReadingInfoTypes();
+ tlog.Debug(tag, "AccessibilityReadingInfoTypes : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ViewAccessibilityViewSetAccessibilityReadingInfoTypes END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.View.NotifyAccessibilityStatesChange.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.NotifyAccessibilityStatesChange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityViewNotifyAccessibilityStatesChange()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityViewNotifyAccessibilityStatesChange START");
+
+ var testingTarget = new View()
+ {
+ Size = new Size2D(100, 100),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.TopCenter,
+ BackgroundColor = Color.AquaMarine,
+ };
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+ testingTarget.NotifyAccessibilityStatesChange(AccessibilityStates.Busy, true);
+ var result = testingTarget.GetAccessibilityStates();
+ tlog.Debug(tag, "AccessibilityStates : " + result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ViewAccessibilityViewNotifyAccessibilityStatesChange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewAccessibility.View.RegisterPopup.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibility.View.RegisterPopup M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityRegisterPopup()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityRegisterPopup START");
+
+ var testingTarget = new View()
+ {
+ Size = new Size2D(100, 100),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.TopCenter,
+ BackgroundColor = Color.AquaMarine,
+ };
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+ try
+ {
+ testingTarget.RegisterPopup();
+ testingTarget.RemovePopup();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ViewAccessibilityRegisterPopup 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("public/BaseComponents/ViewAccessibilityProperties")]
+ public class PublicViewAccessibilityPropertiesTest
+ {
+ 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("ViewAccessibilityProperties AccessibilityName.")]
+ [Property("SPEC", "Tizen.NUI.ViewAccessibilityProperties.AccessibilityName A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewAccessibilityProperties()
+ {
+ tlog.Debug(tag, $"ViewAccessibilityProperties START");
+
+ var view = new View()
+ {
+ Size = new Size2D(100, 100),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.TopCenter,
+ BackgroundColor = Color.AquaMarine,
+ };
+ NUIApplication.GetDefaultWindow().Add(view);
+
+ view.AccessibilityName = "accessibiliy";
+ Assert.AreEqual("accessibiliy", view.AccessibilityName, "Should be equal!");
+
+ view.AccessibilityDescription = "view's accessibility";
+ Assert.AreEqual("view's accessibility", view.AccessibilityDescription, "Should be equal!");
+
+ view.AccessibilityTranslationDomain = "0, 100";
+ Assert.AreEqual("0, 100", view.AccessibilityTranslationDomain, "Should be equal!");
+
+ Role role = new Role();
+ view.AccessibilityRole = role;
+ tlog.Debug(tag, "Role : " + view.AccessibilityRole);
+
+ view.AccessibilityHighlightable = true;
+ Assert.AreEqual(true, view.AccessibilityHighlightable, "Should be equal!");
+
+ view.AutomationId = "automation";
+ Assert.AreEqual("automation", view.AutomationId, "Should be equal!");
+
+ NUIApplication.GetDefaultWindow().Remove(view);
+
+ view.Unparent();
+ view.Dispose();
+ tlog.Debug(tag, $"ViewAccessibilityProperties END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/ViewEvent")]
+ public class PublicViewEventTest
+ {
+ private const string tag = "NUITEST";
+
+ private bool OnKeyEvent(object source, View.KeyEventArgs e)
+ {
+ return true;
+ }
+
+ private bool OnInterceptTouchEvent(object source, View.TouchEventArgs e)
+ {
+ return true;
+ }
+
+ private bool OnWheelEvent(object source, View.WheelEventArgs e)
+ {
+ return true;
+ }
+
+ private bool OnHoverEvent(object source, View.HoverEventArgs e)
+ {
+ return true;
+ }
+
+ private bool OnTouchEvent(object source, View.TouchEventArgs e)
+ {
+ return true;
+ }
+
+ private void OnBackgroundResourceLoaded(object sender, View.BackgroundResourceLoadedEventArgs e) { }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewEvent KeyEvent.")]
+ [Property("SPEC", "Tizen.NUI.ViewEvent.KeyEvent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewEventKeyEvent()
+ {
+ tlog.Debug(tag, $"ViewEventKeyEvent START");
+
+ var testingTarget = new View();
+ Assert.IsNotNull(testingTarget, "Can't create success object View");
+ Assert.IsInstanceOf<View>(testingTarget, "Should be an instance of View type.");
+
+ testingTarget.KeyEvent += OnKeyEvent;
+ testingTarget.KeyEvent -= OnKeyEvent;
+
+ testingTarget.InterceptTouchEvent += OnInterceptTouchEvent;
+ testingTarget.InterceptTouchEvent -= OnInterceptTouchEvent;
+
+ testingTarget.TouchEvent += OnTouchEvent;
+ testingTarget.TouchEvent -= OnTouchEvent;
+
+ testingTarget.HoverEvent += OnHoverEvent;
+ testingTarget.HoverEvent -= OnHoverEvent;
+
+ testingTarget.WheelEvent += OnWheelEvent;
+ testingTarget.WheelEvent -= OnWheelEvent;
+
+ testingTarget.BackgroundResourceLoaded += OnBackgroundResourceLoaded;
+ testingTarget.BackgroundResourceLoaded -= OnBackgroundResourceLoaded;
+
+ tlog.Debug(tag, $"ViewEventKeyEvent END (OK)");
+ }
+ }
+}
tlog.Debug(tag, $"ViewHasFocus END (OK)");
}
+ [Test]
+ [Description("View.RotateBy method")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewRotateBy()
+ {
+ tlog.Debug(tag, $"ViewRotateBy START");
+
+ var view = new View()
+ {
+ Size = new Size2D(200, 200),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.CenterRight,
+ PivotPoint = PivotPoint.CenterRight,
+ BackgroundColor = Color.Azure,
+ Focusable = true,
+ };
+ NUIApplication.GetDefaultWindow().Add(view);
+
+ try
+ {
+ using (Degree degree = new Degree(0.3f))
+ {
+ using (Vector3 axis = new Vector3(1.0f, 1.0f, 0.0f))
+ {
+ view.RotateBy(degree, axis);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ NUIApplication.GetDefaultWindow().Remove(view);
+ view.Dispose();
+ tlog.Debug(tag, $"ViewRotateBy END (OK)");
+ }
+
+ [Test]
+ [Description("View.RotateBy method")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewRotateByRadian()
+ {
+ tlog.Debug(tag, $"ViewRotateByRadian START");
+
+ var view = new View()
+ {
+ Size = new Size2D(200, 200),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.CenterRight,
+ PivotPoint = PivotPoint.CenterRight,
+ BackgroundColor = Color.Azure,
+ Focusable = true,
+ };
+ NUIApplication.GetDefaultWindow().Add(view);
+
+ try
+ {
+ using (Radian angle = new Radian(0.3f))
+ {
+ using (Vector3 axis = new Vector3(1.0f, 1.0f, 0.0f))
+ {
+ view.RotateBy(angle, axis);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ NUIApplication.GetDefaultWindow().Remove(view);
+ view.Dispose();
+ tlog.Debug(tag, $"ViewRotateByRadian END (OK)");
+ }
+ [Test]
+ [Description("View.Rotation method")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewRotateByRotation()
+ {
+ tlog.Debug(tag, $"ViewRotateByRotation START");
+
+ var view = new View()
+ {
+ Size = new Size2D(200, 200),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.CenterRight,
+ PivotPoint = PivotPoint.CenterRight,
+ BackgroundColor = Color.Azure,
+ Focusable = true,
+ };
+ NUIApplication.GetDefaultWindow().Add(view);
+
+ try
+ {
+ using (Radian angle = new Radian(0.3f))
+ {
+ using (Vector3 axis = new Vector3(1.0f, 1.0f, 0.0f))
+ {
+ using (Rotation relativeRotation = new Rotation(angle, axis))
+ {
+ view.RotateBy(relativeRotation);
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ NUIApplication.GetDefaultWindow().Remove(view);
+ view.Dispose();
+ tlog.Debug(tag, $"ViewRotateByRotation END (OK)");
+ }
+
+ [Test]
+ [Description("View.ScaleBy method")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewScaleBy()
+ {
+ tlog.Debug(tag, $"ViewScaleBy START");
+
+ var view = new View()
+ {
+ Size = new Size2D(200, 200),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = ParentOrigin.CenterRight,
+ PivotPoint = PivotPoint.CenterRight,
+ BackgroundColor = Color.Azure,
+ Focusable = true,
+ };
+ NUIApplication.GetDefaultWindow().Add(view);
+
+ try
+ {
+ using (Vector3 relativeScale = new Vector3(1.0f, 1.0f, 0.0f))
+ {
+ view.ScaleBy(relativeScale);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ NUIApplication.GetDefaultWindow().Remove(view);
+ view.Dispose();
+ tlog.Debug(tag, $"ViewScaleBy END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"ExtentsBottom END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents CopyFrom")]
+ [Property("SPEC", "Tizen.NUI.Extents.CopyFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsCopyFrom()
+ {
+ tlog.Debug(tag, $"ExtentsCopyFrom START");
+
+ var testingTarget = new Extents();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(0, testingTarget.Top, "Should be equal!");
+
+ using (Extents extents = new Extents(20, 20, 20, 20))
+ {
+ testingTarget.CopyFrom(extents);
+ Assert.AreEqual(20, testingTarget.Top, "Should be equal!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsCopyFrom END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Extents CopyFrom")]
+ [Property("SPEC", "Tizen.NUI.Extents.CopyFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsCopyFromNullExtents()
+ {
+ tlog.Debug(tag, $"ExtentsCopyFromNullExtents START");
+
+ var testingTarget = new Extents();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(0, testingTarget.Top, "Should be equal!");
+
+ try
+ {
+ Extents extents = null;
+ testingTarget.CopyFrom(extents);
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsCopyFromNullExtents END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents Clone")]
+ [Property("SPEC", "Tizen.NUI.Extents.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsClone()
+ {
+ tlog.Debug(tag, $"ExtentsClone START");
+
+ using (Extents extents = new Extents(20, 20, 20, 20))
+ {
+ var testingTarget = extents.Clone();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+ }
+
+ tlog.Debug(tag, $"ExtentsClone END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents Assign")]
+ [Property("SPEC", "Tizen.NUI.Extents.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsAssign()
+ {
+ tlog.Debug(tag, $"ExtentsAssign START");
+
+ var testingTarget = new Extents();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(0, testingTarget.Top, "Should be equal!");
+
+ using (Extents extents = new Extents(20, 20, 20, 20))
+ {
+ testingTarget.Assign(extents);
+ Assert.AreEqual(20, testingTarget.Top, "Should be equal!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsAssign END (OK)");
+ }
}
}
dummy.SingleValue = 4.0f;
testingTarget.Add(dummy);
+ // keyValue.KeyString != null
+ //KeyValue dummy2 = new KeyValue()
+ //{
+ // KeyString = "myKey"
+ //};
+ //testingTarget.Add(dummy2);
+
Assert.AreEqual(1, testingTarget.Count(), "Add with string and PropertyValue parameter function does not work");
+
dummy.Dispose();
+ //dummy2.Dispose();
testingTarget.Dispose();
tlog.Debug(tag, $"PropertyMapAddWithKeyValue END (OK)");
}
[Test]
+ [Category("P2")]
+ [Description("PropertyMap Add. With null KeyValue")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "KeyValue")]
+ public void PropertyMapAddNullKeyValue()
+ {
+ tlog.Debug(tag, $"PropertyMapAddNullKeyValue START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ try
+ {
+ KeyValue dummy = null;
+ testingTarget.Add(dummy);
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapAddNullKeyValue END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
[Category("P1")]
[Description("PropertyMap GetValue")]
[Property("SPEC", "Tizen.NUI.PropertyMap.GetValue M")]
[Test]
[Category("P1")]
+ [Description("PropertyValue constructor with Matrix3")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithMatrix3()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithMatrix3 START");
+
+ using (Matrix3 matrix = new Matrix3())
+ {
+ var testingTarget = new PropertyValue(matrix);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PropertyValueConstructorWithMatrix3 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Matrix")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithMatrix()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithMatrix START");
+
+ using (Matrix matrix = new Matrix())
+ {
+ var testingTarget = new PropertyValue(matrix);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PropertyValueConstructorWithMatrix END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with AngleAxis")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithAngleAxis()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithAngleAxis START");
+
+ using (AngleAxis angleAxis = new AngleAxis())
+ {
+ var testingTarget = new PropertyValue(angleAxis);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PropertyValueConstructorWithAngleAxis END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("PropertyValue CreateFromObject")]
[Property("SPEC", "Tizen.NUI.PropertyValue.CreateFromObject M")]
[Property("SPEC_URL", "-")]
var result = testingTarget.Get(rectangle);
Assert.IsTrue(result);
- Assert.AreEqual(1, rectangle.X, "should be eaqual.");
- Assert.AreEqual(2, rectangle.Y, "should be eaqual.");
- Assert.AreEqual(3, rectangle.Width, "should be eaqual.");
- Assert.AreEqual(4, rectangle.Height, "should be eaqual.");
+ Assert.AreEqual(1, rectangle.X, "should be equal.");
+ Assert.AreEqual(2, rectangle.Y, "should be equal.");
+ Assert.AreEqual(3, rectangle.Width, "should be equal.");
+ Assert.AreEqual(4, rectangle.Height, "should be equal.");
rectangle.Dispose();
testingTarget.Dispose();
var result = testingTarget.Get(position);
Assert.IsTrue(result);
- Assert.AreEqual(1, position.X, "should be eaqual.");
- Assert.AreEqual(2, position.Y, "should be eaqual.");
- Assert.AreEqual(3, position.Z, "should be eaqual.");
+ Assert.AreEqual(1, position.X, "should be equal.");
+ Assert.AreEqual(2, position.Y, "should be equal.");
+ Assert.AreEqual(3, position.Z, "should be equal.");
position.Dispose();
testingTarget.Dispose();
var result = testingTarget.Get(position);
Assert.IsTrue(result);
- Assert.AreEqual(1, position.X, "should be eaqual.");
- Assert.AreEqual(2, position.Y, "should be eaqual.");
+ Assert.AreEqual(1, position.X, "should be equal.");
+ Assert.AreEqual(2, position.Y, "should be equal.");
position.Dispose();
testingTarget.Dispose();
var result = testingTarget.Get(vector);
Assert.IsTrue(result);
- Assert.AreEqual(10, vector.X, "should be eaqual.");
- Assert.AreEqual(20, vector.Y, "should be eaqual.");
- Assert.AreEqual(30, vector.Z, "should be eaqual.");
- Assert.AreEqual(40, vector.W, "should be eaqual.");
+ Assert.AreEqual(10, vector.X, "should be equal.");
+ Assert.AreEqual(20, vector.Y, "should be equal.");
+ Assert.AreEqual(30, vector.Z, "should be equal.");
+ Assert.AreEqual(40, vector.W, "should be equal.");
vector.Dispose();
testingTarget.Dispose();
var result = testingTarget.Get(extents);
Assert.IsTrue(result);
- Assert.AreEqual(1, extents.Start, "should be eaqual.");
- Assert.AreEqual(2, extents.End, "should be eaqual.");
- Assert.AreEqual(3, extents.Top, "should be eaqual.");
- Assert.AreEqual(4, extents.Bottom, "should be eaqual.");
+ Assert.AreEqual(1, extents.Start, "should be equal.");
+ Assert.AreEqual(2, extents.End, "should be equal.");
+ Assert.AreEqual(3, extents.Top, "should be equal.");
+ Assert.AreEqual(4, extents.Bottom, "should be equal.");
extents.Dispose();
testingTarget.Dispose();
Radian angle = new Radian(20.0f);
Vector3 axis = new Vector3(0, 0, 0);
rotation.GetAxisAngle(axis, angle);
- Assert.AreEqual(0.27f, float.Parse(axis.X.ToString("F2")), "shoule be eaqual.");
- Assert.AreEqual(0.53f, float.Parse(axis.Y.ToString("F2")), "shoule be eaqual.");
- Assert.AreEqual(0.80f, float.Parse(axis.Z.ToString("F2")), "shoule be eaqual.");
+ Assert.AreEqual(0.27f, float.Parse(axis.X.ToString("F2")), "shoule be equal.");
+ Assert.AreEqual(0.53f, float.Parse(axis.Y.ToString("F2")), "shoule be equal.");
+ Assert.AreEqual(0.80f, float.Parse(axis.Z.ToString("F2")), "shoule be equal.");
testingTarget.Dispose();
rotation.Dispose();
string result = "";
testingTarget.Get(out result);
- Assert.AreEqual("DALI", result, "should be eaqual.");
+ Assert.AreEqual("DALI", result, "should be equal.");
testingTarget.Dispose();
tlog.Debug(tag, $"PropertyValueGetPropertyStringValue END (OK)");
float temp = 0.0f;
testingTarget[0].Get(out temp);
- Assert.AreEqual(3.0f, temp, "should be eaqual.");
+ Assert.AreEqual(3.0f, temp, "should be equal.");
testingTarget.Dispose();
propertyValue.Dispose();
PropertyValue propertyValue = propertyMap[2];
float temp = 0.0f;
propertyValue.Get(out temp);
- Assert.AreEqual(400.0f, temp, "should be eaqual.");
+ Assert.AreEqual(400.0f, temp, "should be equal.");
testingTarget.Dispose();
dummy.Dispose();
tlog.Debug(tag, $"RotationDispose END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Rotation Rotate.")]
+ [Property("SPEC", "Tizen.NUI.Rotate. M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RotationRotate()
+ {
+ tlog.Debug(tag, $"RotationRotate START");
+
+ var testingTarget = new Rotation(new Radian(new Degree(180.0f)), new Vector3(1.0f, 0.0f, 0.0f));
+ Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
+ Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
+
+ using (Vector3 vec = new Vector3(0.0f, 1.0f, 0.0f))
+ {
+ var result = testingTarget.Rotate(vec);
+ Assert.IsNotNull(result, "Can't create success object Vector3");
+ Assert.IsInstanceOf<Vector3>(result, "Should return Vector3 instance.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"RotationRotate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Rotation Rotate.")]
+ [Property("SPEC", "Tizen.NUI.Rotate. M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RotationRotateWithVector4()
+ {
+ tlog.Debug(tag, $"RotationRotateWithVector4 START");
+
+ var testingTarget = new Rotation(new Radian(new Degree(180.0f)), new Vector3(0.0f, 1.0f, 0.0f));
+ Assert.IsNotNull(testingTarget, "Can't create success object Rotation");
+ Assert.IsInstanceOf<Rotation>(testingTarget, "Should return Rotation instance.");
+
+ using (Vector4 vec = new Vector4(1.0f, 0.0f, 0.0f, 0.0f))
+ {
+ var result = testingTarget.Rotate(vec);
+ Assert.IsNotNull(result, "Can't create success object Vector4");
+ Assert.IsInstanceOf<Vector4>(result, "Should return Vector4 instance.");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"RotationRotateWithVector4 END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"SizeConstructorWithFloat END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Size GetSizeFromPtr.")]
+ [Property("SPEC", "Tizen.NUI.Size.GetSizeFromPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SizeGetSizeFromPtr()
+ {
+ tlog.Debug(tag, $"SizeGetSizeFromPtr START");
+
+ using (Size size = new Size(100, 50))
+ {
+ var testingTarget = Size.GetSizeFromPtr(size.SwigCPtr.Handle);
+ Assert.AreEqual(100, testingTarget.Width, "Should be equal!");
+ Assert.AreEqual(50, testingTarget.Height, "Should be equal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"SizeGetSizeFromPtr END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"Size2DGetHashCode END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Size2D Clone.")]
+ [Property("SPEC", "Tizen.NUI.Size2D.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Size2DClone()
+ {
+ tlog.Debug(tag, $"Size2DClone START");
+
+ using (Size2D size2d = new Size2D(100, 50))
+ {
+ try
+ {
+ size2d.Clone();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"Size2DClone END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Size2D GetSize2DFromPtr.")]
+ [Property("SPEC", "Tizen.NUI.Size2D.GetSize2DFromPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Size2DGetSize2DFromPtr()
+ {
+ tlog.Debug(tag, $"Size2DGetSize2DFromPtr START");
+
+ using (Size size = new Size(100, 50))
+ {
+ var testingTarget = Size2D.GetSize2DFromPtr(size.SwigCPtr.Handle);
+ Assert.AreEqual(100, testingTarget.Width, "Should be equal!");
+ Assert.AreEqual(50, testingTarget.Height, "Should be equal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"Size2DGetSize2DFromPtr END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"Vector2GetHashCode END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Vector2 Clone")]
+ [Property("SPEC", "Tizen.NUI.Vector2.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Vector2Clone()
+ {
+ tlog.Debug(tag, $"Vector2Clone START");
+
+ using (Vector2 vec = new Vector2(20, 20))
+ {
+ var testingTarget = vec.Clone();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Vector2>(testingTarget, "should be an instance of testing target class!");
+ }
+
+ tlog.Debug(tag, $"Vector2Clone END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Vector2 AsFloat")]
+ [Property("SPEC", "Tizen.NUI.Vector2.AsFloat M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Vector2AsFloat()
+ {
+ tlog.Debug(tag, $"Vector2AsFloat START");
+
+ using (Vector2 vec = new Vector2(20, 20))
+ {
+ var testingTarget = vec.AsFloat();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Tizen.NUI.SWIGTYPE_p_float>(testingTarget, "should be an instance of testing target class!");
+ }
+
+ tlog.Debug(tag, $"Vector2AsFloat END (OK)");
+ }
}
}
testingTarget.Dispose();
tlog.Debug(tag, $"Vector4Dot END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Vector4 Clone")]
+ [Property("SPEC", "Tizen.NUI.Vector4.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Vector4Clone()
+ {
+ tlog.Debug(tag, $"Vector4Clone START");
+
+ using (Vector4 vec = new Vector4(20, 20, 20, 20))
+ {
+ var testingTarget = vec.Clone();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Vector4>(testingTarget, "should be an instance of testing target class!");
+ }
+
+ tlog.Debug(tag, $"Vector4Clone END (OK)");
+ }
}
}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Rendering/Geometry")]
+ public class PublicGeometryTest
+ {
+ 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("Geometry AddVertexBuffer.")]
+ [Property("SPEC", "Tizen.NUI.Geometry.AddVertexBuffer M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GeometryAddVertexBuffer()
+ {
+ tlog.Debug(tag, $"GeometryAddVertexBuffer START");
+
+ var testingTarget = new Geometry();
+ Assert.IsNotNull(testingTarget, "Return a null object of Geometry");
+ Assert.IsInstanceOf<Geometry>(testingTarget, "Should be an instance of Geometry type.");
+
+ using (PropertyMap vertexFormat = new PropertyMap())
+ {
+ vertexFormat.Add("aPositionCircle", new PropertyValue((int)PropertyType.Vector2));
+
+ using (VertexBuffer buffer = new VertexBuffer(vertexFormat))
+ {
+ var result = testingTarget.AddVertexBuffer(buffer);
+ Assert.AreEqual(0, result, "Should be equal!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"GeometryAddVertexBuffer END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Rendering/VertexBuffer")]
+ public class PublicVertexBufferTest
+ {
+ 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("VertexBuffer constructor.")]
+ [Property("SPEC", "Tizen.NUI.VertexBuffer.VertexBuffer C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VertexBufferConstructor()
+ {
+ tlog.Debug(tag, $"VertexBufferConstructor START");
+
+ using (PropertyMap vertexFormat = new PropertyMap())
+ {
+ vertexFormat.Add("aPositionCircle", new PropertyValue((int)PropertyType.Vector2));
+
+ var testingTarget = new VertexBuffer(vertexFormat);
+ Assert.IsNotNull(testingTarget, "Return a null object of VertexBuffer");
+ Assert.IsInstanceOf<VertexBuffer>(testingTarget, "Should be an instance of VertexBuffer type.");
+
+ tlog.Debug(tag, "getCPtr : " + VertexBuffer.getCPtr(testingTarget));
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VertexBufferConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VertexBuffer SetData.")]
+ [Property("SPEC", "Tizen.NUI.VertexBuffer.SetData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VertexBufferSetData()
+ {
+ tlog.Debug(tag, $"VertexBufferSetData START");
+
+ using (PropertyMap vertexFormat = new PropertyMap())
+ {
+ vertexFormat.Add("aPositionCircle", new PropertyValue((int)PropertyType.Vector2));
+
+ var testingTarget = new VertexBuffer(vertexFormat);
+ Assert.IsNotNull(testingTarget, "Return a null object of VertexBuffer");
+ Assert.IsInstanceOf<VertexBuffer>(testingTarget, "Should be an instance of VertexBuffer type.");
+
+ Int32[] val = new Int32[2] { 100, 50 };
+ try
+ {
+ testingTarget.SetData(val);
+ var result = testingTarget.GetSize();
+ Assert.AreEqual(2, result, "Should be equal!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VertexBufferSetData END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("VertexBuffer SetData.")]
+ [Property("SPEC", "Tizen.NUI.VertexBuffer.SetData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VertexBufferSetDataNullValue()
+ {
+ tlog.Debug(tag, $"VertexBufferSetDataNullValue START");
+
+ using (PropertyMap vertexFormat = new PropertyMap())
+ {
+ vertexFormat.Add("aPositionCircle", new PropertyValue((int)PropertyType.Vector2));
+
+ var testingTarget = new VertexBuffer(vertexFormat);
+ Assert.IsNotNull(testingTarget, "Return a null object of VertexBuffer");
+ Assert.IsInstanceOf<VertexBuffer>(testingTarget, "Should be an instance of VertexBuffer type.");
+
+ Int32[] val = null;
+ try
+ {
+ testingTarget.SetData(val);
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"VertexBufferSetDataNullValue END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+ }
+ }
+}
try
{
testingTarget.StartTransition(true);
+ testingTarget.PauseTransition();
+ testingTarget.ResumeTransition();
}
catch (Exception e)
{
tlog.Debug(tag, $"CubeTransitionEffectStartTransition END (OK)");
}
- //[Test]
- //[Category("P1")]
- //[Description("CubeTransitionEffect PauseTransition.")]
- //[Property("SPEC", "Tizen.NUI.CubeTransitionEffect.PauseTransition M")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "MR")]
- //[Property("AUTHOR", "guowei.wang@samsung.com")]
- //public async Task CubeTransitionEffectPauseTransition()
- //{
- // tlog.Debug(tag, $"CubeTransitionEffectPauseTransition START");
-
- // var testingTarget = new CubeTransitionWaveEffect(20, 10);
- // Assert.IsNotNull(testingTarget, "Can't create success object CubeTransitionEffect");
- // Assert.IsInstanceOf<CubeTransitionEffect>(testingTarget, "Should be an instance of CubeTransitionEffect type.");
-
- // testingTarget.SetTransitionDuration(300);
-
- // testingTarget.SetCurrentTexture(LoadStageFillingTexture(currentpath));
- // testingTarget.SetTargetTexture(LoadStageFillingTexture(targetpath));
- // testingTarget.StartTransition(true);
-
- // await Task.Delay(50);
-
- // try
- // {
- // testingTarget.PauseTransition();
- // }
- // catch (Exception e)
- // {
- // tlog.Debug(tag, e.Message.ToString());
- // Assert.Fail("Caught Exception: Failed!");
- // }
-
- // testingTarget.ResumeTransition();
- // testingTarget.StopTransition();
-
- // testingTarget?.Dispose();
- // tlog.Debug(tag, $"CubeTransitionEffectPauseTransition END (OK)");
- //}
-
- //[Test]
- //[Category("P1")]
- //[Description("CubeTransitionEffect ResumeTransition.")]
- //[Property("SPEC", "Tizen.NUI.CubeTransitionEffect.ResumeTransition M")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "MR")]
- //[Property("AUTHOR", "guowei.wang@samsung.com")]
- //public async Task CubeTransitionEffectResumeTransition()
- //{
- // tlog.Debug(tag, $"CubeTransitionEffectResumeTransition START");
-
- // var testingTarget = new CubeTransitionWaveEffect(20, 10);
- // Assert.IsNotNull(testingTarget, "Can't create success object CubeTransitionEffect");
- // Assert.IsInstanceOf<CubeTransitionEffect>(testingTarget, "Should be an instance of CubeTransitionEffect type.");
-
- // testingTarget.SetTransitionDuration(300);
-
- // testingTarget.SetCurrentTexture(LoadStageFillingTexture(currentpath));
- // testingTarget.SetTargetTexture(LoadStageFillingTexture(targetpath));
- // testingTarget.StartTransition(true);
-
- // await Task.Delay(50);
- // testingTarget.PauseTransition();
-
- // try
- // {
- // testingTarget.ResumeTransition();
- // }
- // catch (Exception e)
- // {
- // tlog.Debug(tag, e.Message.ToString());
- // Assert.Fail("Caught Exception: Failed!");
- // }
-
- // testingTarget.StopTransition();
-
- // testingTarget?.Dispose();
- // tlog.Debug(tag, $"CubeTransitionEffectResumeTransition END (OK)");
- //}
-
[Test]
[Category("P1")]
[Description("CubeTransitionEffect TransitionCompleted.")]
tlog.Debug(tag, $"CubeTransitionFoldEffectConstructor END (OK)");
}
+ [Test]
+ [Category("P1")]
+ [Description("TransitionCompletedEventArgs CubeTransitionEffect.")]
+ [Property("SPEC", "Tizen.NUI.CubeTransitionFoldEffect.TransitionCompletedEventArgs CubeTransitionEffect A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionCompletedEventArgsCubeTransitionEffect()
+ {
+ tlog.Debug(tag, $"TransitionCompletedEventArgsCubeTransitionEffect START");
+
+ var testingTarget = new Tizen.NUI.CubeTransitionEffect.TransitionCompletedEventArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object CubeTransitionEffect");
+ Assert.IsInstanceOf<Tizen.NUI.CubeTransitionEffect.TransitionCompletedEventArgs>(testingTarget, "Should be an instance of TransitionCompletedEventArgs type.");
+
+ using (CubeTransitionWaveEffect effect = new CubeTransitionWaveEffect(20, 10))
+ {
+ testingTarget.CubeTransitionEffect = effect;
+ tlog.Debug(tag, "CubeTransitionEffect : " + testingTarget.CubeTransitionEffect);
+ }
+
+ using (Texture texture = new Texture(new NativeImageSource(100, 50, NativeImageSource.ColorDepth.Bits16)))
+ {
+ testingTarget.CubeTransitonTexture = texture;
+ tlog.Debug(tag, "CubeTransitonTexture : " + testingTarget.CubeTransitonTexture);
+ }
+
+ tlog.Debug(tag, $"TransitionCompletedEventArgsCubeTransitionEffect END (OK)");
+ }
+
private void OnCubeEffectCompleted(object sender, CubeTransitionEffect.TransitionCompletedEventArgs args)
{
OnTransitionCompletedFlag = true;
tlog.Debug(tag, $"FontClientAssign END (OK)");
}
- //[Test]
- //[Category("P1")]
- //[Description("FontClient GetDpi.")]
- //[Property("SPEC", "Tizen.NUI.FontClient.GetDpi M")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "MR")]
- //[Property("AUTHOR", "guowei.wang@samsung.com")]
- //public void FontClientGetDpi()
- //{
- // tlog.Debug(tag, $"FontClientGetDpi START");
-
- // var testingTarget = new FontClient(FontClient.Instance);
- // Assert.IsNotNull(testingTarget, "Return a null object of FontClient");
- // Assert.IsInstanceOf<FontClient>(testingTarget, "Should be an instance of FontClient type.");
-
- // testingTarget.SetDpi(50, 60);
-
- // try
- // {
- // var horizontalDpi = new SWIGTYPE_p_unsigned_int(testingTarget.GetBaseHandleCPtrHandleRef.Handle);
- // var verticalDpi = new SWIGTYPE_p_unsigned_int(new FontClient().GetBaseHandleCPtrHandleRef.Handle);
- // testingTarget.GetDpi(horizontalDpi, verticalDpi);
- // }
- // catch (Exception e)
- // {
- // tlog.Debug(tag, e.Message.ToString());
- // Assert.Fail("Caught Exception: Failed");
- // }
-
- // testingTarget.Dispose();
- // tlog.Debug(tag, $"FontClientGetDpi END (OK)");
- //}
+ [Test]
+ [Category("P1")]
+ [Description("FontClient GetDpi.")]
+ [Property("SPEC", "Tizen.NUI.FontClient.GetDpi M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FontClientGetDpi()
+ {
+ tlog.Debug(tag, $"FontClientGetDpi START");
+
+ Size size = new Size(1920, 1080);
+ FontClient.Instance.SetDpi((uint)size.Width, (uint)size.Height);
+
+ try
+ {
+ var horizontalDpi = new SWIGTYPE_p_unsigned_int(size.SwigCPtr.Handle);
+ var verticalDpi = new SWIGTYPE_p_unsigned_int(size.SwigCPtr.Handle);
+ FontClient.Instance.GetDpi(horizontalDpi, verticalDpi);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed");
+ }
+
+ tlog.Debug(tag, $"FontClientGetDpi END (OK)");
+ }
[Test]
[Category("P1")]
{
label.EnableMarkup = true;
label.Text = "PublicPageUtilTest";
- var result = testingTarget.SetText(label, "MyPageUtil");
+ var result = testingTarget.SetText(label, "My PageUtil");
Assert.IsNotNull(result);
}
testingTarget.Dispose();
tlog.Debug(tag, $"TextPageUtilGetText END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("TextPageUtil PageData.")]
+ [Property("SPEC", "Tizen.NUI.TextPageUtil.PageData A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextPageUtilPageData()
+ {
+ tlog.Debug(tag, $"TextPageUtilPageData START");
+
+ var testingTarget = new PageData();
+
+ testingTarget.PreviousTag = "previous";
+ tlog.Debug(tag, "PreviousTag : " + testingTarget.PreviousTag);
+
+ testingTarget.EndTag = "end";
+ tlog.Debug(tag, "EndTag : " + testingTarget.EndTag);
+
+ testingTarget.StartOffset = 0;
+ tlog.Debug(tag, "StartOffset : " + testingTarget.StartOffset);
+
+ testingTarget.EndOffset = 2;
+ tlog.Debug(tag, "EndOffset : " + testingTarget.EndOffset);
+
+ tlog.Debug(tag, $"TextPageUtilPageData END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextPageUtil TagData.")]
+ [Property("SPEC", "Tizen.NUI.TextPageUtil.TagData A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextPageUtilTagData()
+ {
+ tlog.Debug(tag, $"TextPageUtilTagData START");
+
+ var testingTarget = new TagData();
+
+ testingTarget.TagName = "tag";
+ tlog.Debug(tag, "TagName : " + testingTarget.TagName);
+
+ testingTarget.AttributeName = "size";
+ tlog.Debug(tag, "AttributName : " + testingTarget.AttributeName);
+
+ testingTarget.IsEndTag = true;
+ tlog.Debug(tag, "IsEndTag" + testingTarget.IsEndTag);
+
+ tlog.Debug(tag, $"TextPageUtilTagData END (OK)");
+ }
}
}
[Test]
[Category("P1")]
+ [Description("VisualFactory constructor.")]
+ [Property("SPEC", "Tizen.NUI.VisualFactory.VisualFactory C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VisualFactoryConstructor()
+ {
+ tlog.Debug(tag, $"VisualFactoryConstructor START");
+
+ var testingTarget = new VisualFactory();
+ Assert.IsInstanceOf<VisualFactory>(testingTarget, "CreateVisual Should return VisualFactory instance.");
+
+ testingTarget?.Dispose();
+ tlog.Debug(tag, $"VisualFactoryConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("VisualFactory CreateVisual.")]
[Property("SPEC", "Tizen.NUI.VisualFactory.CreateVisual M")]
[Property("SPEC_URL", "-")]
testingTarget.PositionPolicy = VisualTransformPolicyType.Relative;
Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicy, "Retrieved PositionPolicy should be equal to set value");
+ // default
+ try
+ {
+ testingTarget.PositionPolicy = (VisualTransformPolicyType)3;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
testingTarget.Dispose();
tlog.Debug(tag, $"VisualMapPositionPolicy END (OK)");
}
testingTarget.PositionPolicyX = VisualTransformPolicyType.Relative;
Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicyX, "Retrieved PositionPolicyX should be equal to set value");
+ // default
+ try
+ {
+ testingTarget.PositionPolicyX = (VisualTransformPolicyType)3;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
testingTarget.Dispose();
tlog.Debug(tag, $"VisualMapPositionPolicyX END (OK)");
}
testingTarget.PositionPolicyY = VisualTransformPolicyType.Relative;
Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.PositionPolicyY, "Retrieved PositionPolicyY should be equal to set value");
+ // default
+ try
+ {
+ testingTarget.PositionPolicyY = (VisualTransformPolicyType)3;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
testingTarget.Dispose();
tlog.Debug(tag, $"VisualMapPositionPolicyY END (OK)");
}
testingTarget.SizePolicy = VisualTransformPolicyType.Relative;
Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicy, "Retrieved SizePolicy should be equal to set value");
+ // default
+ try
+ {
+ testingTarget.SizePolicy = (VisualTransformPolicyType)3;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
testingTarget.Dispose();
tlog.Debug(tag, $"VisualMapSizePolicy END (OK)");
}
testingTarget.SizePolicyWidth = VisualTransformPolicyType.Relative;
Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicyWidth, "Retrieved SizePolicyWidth should be equal to set value");
+ // default
+ try
+ {
+ testingTarget.SizePolicyWidth = (VisualTransformPolicyType)3;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
testingTarget.Dispose();
tlog.Debug(tag, $"VisualMapSizePolicyWidth END (OK)");
}
testingTarget.SizePolicyHeight = VisualTransformPolicyType.Relative;
Assert.AreEqual(VisualTransformPolicyType.Relative, testingTarget.SizePolicyHeight, "Retrieved SizePolicyHeight should be equal to set value");
+ // default
+ try
+ {
+ testingTarget.SizePolicyHeight = (VisualTransformPolicyType)3;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
testingTarget.Dispose();
tlog.Debug(tag, $"VisualMapSizePolicyHeight END (OK)");
}
[Test]
[Category("P1")]
+ [Description("VisualMap VisualFittingMode.")]
+ [Property("SPEC", "Tizen.NUI.VisualMap.VisualFittingMode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VisualMapVisualFittingModeWithNullMode()
+ {
+ tlog.Debug(tag, $"VisualMapVisualFittingModeWithNullMode START");
+
+ TextVisual tVisual = new TextVisual();
+ Assert.AreEqual(VisualFittingModeType.FitKeepAspectRatio, tVisual.VisualFittingMode, "should be equal!");
+
+ BorderVisual bvisual = new BorderVisual();
+ Assert.AreEqual(VisualFittingModeType.Fill, bvisual.VisualFittingMode, "should be equal!");
+
+ tVisual.Dispose();
+ bvisual.Dispose();
+ tlog.Debug(tag, $"VisualMapVisualFittingModeWithNullMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("VisualMap CornerRadius.")]
[Property("SPEC", "Tizen.NUI.VisualMap.CornerRadius A")]
[Property("SPEC_URL", "-")]
var testingTarget = new MyVisualMap();
Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
-
+
+ testingTarget.VisualFittingMode = VisualFittingModeType.Fill;
+ testingTarget.CornerRadius = new Vector4(0.8f, 0.8f, 0.8f, 0.8f);
+
PropertyMap propertyMap = testingTarget.OutputVisualMap;
- Assert.AreEqual(0, propertyMap.Count(), "Retrieved PropertyMap count should be 0");
+ Assert.AreEqual(2, propertyMap.Count(), "Retrieved PropertyMap count should be 0");
Assert.True(flagComposingPropertyMap, "ComposingPropertyMap overrided method not invoked.");
testingTarget.Dispose();
tlog.Debug(tag, $"VisualMapComposingPropertyMap END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("VisualMap BorderlineWidth.")]
+ [Property("SPEC", "Tizen.NUI.VisualMap.BorderlineWidth A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VisualMapBorderlineWidth()
+ {
+ tlog.Debug(tag, $"VisualMapBorderlineWidth START");
+
+ var testingTarget = new VisualMap();
+ Assert.IsNotNull(testingTarget, "Can't create success object VisualMap");
+ Assert.IsInstanceOf<VisualMap>(testingTarget, "Should be an instance of VisualMap type.");
+
+ testingTarget.BorderlineWidth = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.BorderlineWidth, "should be equal!");
+
+ testingTarget.BorderlineColor = new Vector4(1.0f, 1.0f, 1.0f, 0.0f);
+ Assert.AreEqual(1.0f, testingTarget.BorderlineColor.R, "should be equal!");
+
+ testingTarget.BorderlineOffset = 0.2f;
+ Assert.AreEqual(0.2f, testingTarget.BorderlineOffset, "should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"VisualMapBorderlineWidth END (OK)");
+ }
}
}
tlog.Debug(tag, $"GLWindowWindowSize END (OK)");
}
- //[Test]
- //[Category("P1")]
- //[Description("GLWindow SetEglConfig")]
- //[Property("SPEC", "Tizen.NUI.GLWindow.SetEglConfig M")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "MR")]
- //public void GLWindowSetEglConfig()
- //{
- // tlog.Debug(tag, $"GLWindowSetEglConfig START");
-
- // var testingTarget = new GLWindow();
- // Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
- // Assert.IsInstanceOf<GLWindow>(testingTarget, "Should be an instance of GLWindow type.");
-
- // try
- // {
- // testingTarget.SetEglConfig(true, true, 10, GLESVersion.Version20);
- // }
- // catch (Exception e)
- // {
- // tlog.Debug(tag, e.Message.ToString());
- // Assert.Fail("Caught Exception: Failed!");
- // }
-
- // testingTarget.Destroy();
- // tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)");
- //}
+ [Test]
+ [Category("P2")]
+ [Description("GLWindow WindowSize")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.WindowSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowWindowSizeNullValue()
+ {
+ tlog.Debug(tag, $"GLWindowWindowSizeNullValue START");
+
+ var testingTarget = new GLWindow();
+ Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "Should be an instance of GLWindow type.");
+
+ try
+ {
+ Size2D size2d = null;
+ testingTarget.WindowSize = size2d;
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Destroy();
+ tlog.Debug(tag, $"GLWindowWindowSizeNullValue END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow SetEglConfig")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.SetEglConfig M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowSetEglConfig()
+ {
+ tlog.Debug(tag, $"GLWindowSetEglConfig START");
+
+ var testingTarget = new GLWindow();
+ Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "Should be an instance of GLWindow type.");
+
+ try
+ {
+ testingTarget.SetEglConfig(true, true, 10, GLESVersion.Version20);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Destroy();
+ tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)");
+ }
[Test]
[Category("P1")]
}
[Test]
+ [Category("P2")]
+ [Description("GLWindow SetAvailableOrientations")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.SetAvailableOrientations M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowSetAvailableOrientationsNullValue()
+ {
+ tlog.Debug(tag, $"GLWindowSetAvailableOrientationsNullValue START");
+
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ var testingTarget = new GLWindow(name, rectangle, true);
+
+ try
+ {
+ List<GLWindow.GLWindowOrientation> list = null;
+ testingTarget.SetAvailableOrientations(list);
+ }
+ catch (ArgumentNullException)
+ {
+ testingTarget.Destroy();
+ tlog.Debug(tag, $"GLWindowSetAvailableOrientationsNullValue END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
[Category("P1")]
[Description("GLWindow RenderOnce")]
[Property("SPEC", "Tizen.NUI.GLWindow.RenderOnce M")]
tlog.Debug(tag, $"GLWindowRegisterGlCallback END (OK)");
}
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow RenderingMode")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.RenderingMode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowRenderingMode()
+ {
+ tlog.Debug(tag, $"GLWindowRenderingMode START");
+
+ var testingTarget = new GLWindow();
+ Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "Should be an instance of GLWindow type.");
+
+ testingTarget.RenderingMode = GLRenderingMode.Continuous;
+ tlog.Debug(tag, "RenderingMode : " + testingTarget.RenderingMode);
+
+ testingTarget.Destroy();
+ tlog.Debug(tag, $"GLWindowRenderingMode END (OK)");
+ }
+
public void GLInit() { }
public int GLRenderFrame() { return 0; }
public void GLTerminate() { }