From b07d7953a6214265f493039a3ac1143688308d02 Mon Sep 17 00:00:00 2001 From: "guowei.wang" Date: Fri, 23 Sep 2022 12:02:51 +0800 Subject: [PATCH] [NUI][NUI.Devel] Update line coverage TCs of NUI.Devel. --- .../Tizen.NUI.Devel.Tests.csproj | 28 +- .../testcase/internal/Animation/TSConstraint.cs | 204 +++ .../internal/Application/TSComponentApplication.cs | 31 + .../internal/Common/TSAuthenticationSignalType.cs | 40 +- .../internal/Common/TSDaliEnumConstants.cs | 41 + .../testcase/internal/Common/TSDaliException.cs | 13 +- .../internal/Common/TSListEventSignalType.cs | 23 + .../testcase/internal/Common/TSUint16Pair.cs | 50 + .../testcase/internal/Common/TSVectorVector2.cs | 408 ++++++ .../testcase/internal/Common/TSViewImpl.cs | 77 ++ .../testcase/internal/Common/TSViewWrapperImpl.cs | 2 - .../internal/Common/TSVisualEventSignal.cs | 23 + .../internal/EXaml/Action/TSGetValueAction.cs | 38 + .../internal/EXaml/Action/TSGetValueListAction.cs | 84 ++ .../testcase/internal/EXaml/Action/TSRootAction.cs | 122 ++ .../EXaml/Operation/TSAddToCollectionObject.cs | 66 + .../EXaml/Operation/TSAddToCollectionProperty.cs | 66 + .../EXaml/Operation/TSAddToResourceDictionary.cs | 68 + .../EXaml/Operation/TSCreateArrayObject.cs | 67 + .../internal/EXaml/Operation/TSCreateDPObject.cs | 101 ++ .../EXaml/Operation/TSCreateDataTemplate.cs | 68 + .../internal/EXaml/Operation/TSCreateObject.cs | 67 + .../internal/EXaml/Operation/TSGatherAssembly.cs | 66 + .../EXaml/Operation/TSGatherBindableProperties.cs | 67 + .../internal/EXaml/Operation/TSGatherEvent.cs | 100 ++ .../internal/EXaml/Operation/TSGatherMethod.cs | 70 ++ .../internal/EXaml/Operation/TSGatherProperty.cs | 67 + .../internal/EXaml/Operation/TSGatherType.cs | 107 ++ .../internal/EXaml/Operation/TSGetEnumObject.cs | 66 + .../EXaml/Operation/TSGetObjectByProperty.cs | 67 + .../Operation/TSGetObjectConvertedFromString.cs | 65 + .../internal/EXaml/Operation/TSGetStaticObject.cs | 68 + .../internal/EXaml/Operation/TSGetTypeObject.cs | 66 + .../internal/EXaml/Operation/TSRegisterXName.cs | 101 ++ .../internal/EXaml/Operation/TSSetBinding.cs | 68 + .../EXaml/Operation/TSSetDynamicResource.cs | 68 + .../internal/EXaml/Operation/TSSetProperty.cs | 70 ++ .../internal/FrameBroker/TSDefaultFrameBroker.cs | 14 +- .../internal/FrameBroker/TSFrameBrokerBase.cs | 38 +- .../internal/FrameProvider/TSFrameProvider.cs | 52 + .../FrameProvider/TSSafeFrameProviderHandle.cs | 55 + .../internal/Transition/TSFadeTransitionItem.cs | 67 + .../internal/Transition/TSScaleTransitionItem.cs | 63 + .../internal/Transition/TSSlideTransitionItem.cs | 33 + .../internal/Transition/TSTransitionGroupItem.cs | 10 + .../internal/Transition/TSTransitionItemBase.cs | 2 - .../testcase/internal/Utility/TSItemView.cs | 36 + .../internal/Widget/TSWidgetApplication.cs | 114 +- .../Window/TSWindowAccessibilityHighlightEvent.cs | 67 + .../XamlBinding/TSRotationTypeConverter.cs | 92 ++ .../testcase/internal/images/TSImageLoading.cs | 442 ++++++- .../public/Accessibility/TSAccessibility.cs | 25 + .../testcase/public/Animation/TSAnimation.cs | 102 ++ .../public/Application/TSNUIApplication.cs | 134 ++ .../public/Application/TSNUIFrameComponent.cs | 33 + .../testcase/public/Application/TSWatchTime.cs | 47 + .../public/BaseComponents/TSAnimatedImageView.cs | 29 + .../testcase/public/BaseComponents/TSGLView.cs | 146 +++ .../testcase/public/BaseComponents/TSImageView.cs | 127 +- .../testcase/public/BaseComponents/TSTextEditor.cs | 39 + .../public/BaseComponents/TSTextEditorEvent.cs | 7 + .../public/BaseComponents/TSTextLabelEvent.cs | 28 +- .../testcase/public/BaseComponents/TSVideoView.cs | 242 ++++ .../testcase/public/BaseComponents/TSView.cs | 26 + .../testcase/public/BaseComponents/TSViewEvent.cs | 281 +++++ .../public/BaseComponents/TSViewPublicMethods.cs | 75 ++ .../testcase/public/Common/TSColor.cs | 3 +- .../testcase/public/Common/TSLayer.cs | 33 + .../testcase/public/Common/TSPosition.cs | 125 ++ .../testcase/public/Common/TSPropertyMap.cs | 158 +++ .../public/Common/TSPropertyNotification.cs | 6 + .../testcase/public/Common/TSRelativeVector2.cs | 31 + .../testcase/public/Common/TSRelativeVector3.cs | 32 + .../testcase/public/Common/TSStyleManager.cs | 51 +- .../testcase/public/Common/TSVector2.cs | 27 + .../testcase/public/DragAndDrop/TSDragAndDrop.cs | 49 + .../testcase/public/DragAndDrop/TSDragEvent.cs | 106 ++ .../testcase/public/EXaml/TSEXamlExtensions.cs | 1 - .../testcase/public/Events/TSGestureDetector.cs | 23 + .../public/Events/TSGestureDetectorManager.cs | 4 +- .../testcase/public/Events/TSPanGestureDetector.cs | 565 +++++++-- .../testcase/public/Events/TSTapGesture.cs | 109 +- .../testcase/public/Events/TSTouch.cs | 57 +- .../testcase/public/Images/TSNativeImageQueue.cs | 153 +++ .../testcase/public/Images/TSPixelBuffer.cs | 22 + .../testcase/public/Images/TSPixelData.cs | 29 +- .../testcase/public/Input/TSAutofillContainer.cs | 382 ------ .../public/Input/TSFocusChangingEventArgs.cs | 120 ++ .../testcase/public/Input/TSFocusManager.cs | 430 +++++-- .../testcase/public/Utility/TSDpTypeConverter.cs | 120 ++ .../public/Utility/TSGraphicsTypeExtensions.cs | 131 ++ .../public/Utility/TSGraphicsTypeManager.cs | 71 ++ .../public/Utility/TSPointTypeConverter.cs | 127 ++ .../testcase/public/Utility/TSScrollView.cs | 236 +++- .../testcase/public/Utility/TSSpTypeConverter.cs | 111 ++ .../testcase/public/Widget/TSWidget.cs | 1 + .../testcase/public/Widget/TSWidgetView.cs | 2 +- .../testcase/public/Window/TSBorderWindow.cs | 107 ++ .../testcase/public/Window/TSDefaultBorder.cs | 334 +++++ .../testcase/public/Window/TSGLWindow.cs | 1 - .../testcase/public/Window/TSGLWindowEvent.cs | 104 ++ .../testcase/public/Window/TSWindow.cs | 1328 ++++++++++++++++++-- .../public/Window/TSWindowAuxiliaryMessag.cs | 141 +++ .../testcase/public/Window/TSWindowEvent.cs | 302 ++++- .../testcase/public/Window/TSWindowHandle.cs | 113 ++ .../public/Xaml/TSXamlFilePathAttribute.cs | 20 + .../public/XamlBinding/TSFloatGraphicsTypeConve.cs | 69 + .../public/XamlBinding/TSIntGraphicsTypeConvert.cs | 80 ++ .../public/XamlBinding/TSPointSizeTypeConverter.cs | 93 ++ .../public/XamlBinding/TSSizeTypeConverter.cs | 2 +- .../testcase/public/XamlBinding/TSXamlStyle.cs | 42 +- 111 files changed, 10314 insertions(+), 966 deletions(-) create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Animation/TSConstraint.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSVectorVector2.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSRootAction.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToCollectionObject.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToCollectionProperty.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToResourceDictionary.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateArrayObject.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateDPObject.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateDataTemplate.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateObject.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherAssembly.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherBindableProperties.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherEvent.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherMethod.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherProperty.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherType.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetEnumObject.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetObjectByProperty.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetObjectConvertedFromString.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetStaticObject.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetTypeObject.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSRegisterXName.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetBinding.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetDynamicResource.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetProperty.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameProvider/TSFrameProvider.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameProvider/TSSafeFrameProviderHandle.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Window/TSWindowAccessibilityHighlightEvent.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/XamlBinding/TSRotationTypeConverter.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSGLView.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSVideoView.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/DragAndDrop/TSDragAndDrop.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/DragAndDrop/TSDragEvent.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSNativeImageQueue.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSFocusChangingEventArgs.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSDpTypeConverter.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSGraphicsTypeExtensions.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSPointTypeConverter.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSSpTypeConverter.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSBorderWindow.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSDefaultBorder.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowAuxiliaryMessag.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowHandle.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSFloatGraphicsTypeConve.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSIntGraphicsTypeConvert.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSPointSizeTypeConverter.cs diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/Tizen.NUI.Devel.Tests.csproj b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/Tizen.NUI.Devel.Tests.csproj index e5616e2..6e5a408 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/Tizen.NUI.Devel.Tests.csproj +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/Tizen.NUI.Devel.Tests.csproj @@ -3,7 +3,7 @@ Exe - tizen90 + netcoreapp2.1 Tizen @@ -30,15 +30,10 @@ - - - - - @@ -52,7 +47,6 @@ - @@ -97,21 +91,9 @@ MSBuild:Compile - - MSBuild:Compile - - - MSBuild:Compile - MSBuild:Compile - - MSBuild:Compile - - - MSBuild:Compile - MSBuild:Compile @@ -121,9 +103,6 @@ MSBuild:Compile - - MSBuild:Compile - MSBuild:Compile @@ -157,9 +136,6 @@ MSBuild:Compile - - MSBuild:Compile - @@ -169,7 +145,7 @@ - + Runtime diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Animation/TSConstraint.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Animation/TSConstraint.cs new file mode 100755 index 0000000..a9fba0d --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Animation/TSConstraint.cs @@ -0,0 +1,204 @@ +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/Animation/Constraint")] + public class InternalAnimationConstraintTest + { + 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("Constraint constructor")] + [Property("SPEC", "Tizen.NUI.Constraint.Constraint C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ConstraintConstructor() + { + tlog.Debug(tag, $"ConstraintConstructor START"); + + using (Animatable ani = new Animatable()) + { + var testingTarget = new Constraint((global::System.IntPtr)ani.SwigCPtr, false); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ConstraintConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Constraint Apply")] + [Property("SPEC", "Tizen.NUI.Constraint.Apply M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ConstraintApply() + { + tlog.Debug(tag, $"ConstraintApply START"); + + using (Animatable ani = new Animatable()) + { + var testingTarget = new Constraint((global::System.IntPtr)ani.SwigCPtr, false); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + try + { + testingTarget.Apply(); + } + catch (Exception e) + { + Assert.Fail("Caught Exception" + e.ToString()); + } + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ConstraintApply END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Constraint Remove")] + [Property("SPEC", "Tizen.NUI.Constraint.Remove M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ConstraintRemove() + { + tlog.Debug(tag, $"ConstraintRemove START"); + + using (Animatable ani = new Animatable()) + { + var testingTarget = new Constraint((global::System.IntPtr)ani.SwigCPtr, false); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + try + { + testingTarget.Remove(); + } + catch (Exception e) + { + Assert.Fail("Caught Exception" + e.ToString()); + } + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ConstraintRemove END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Constraint RemoveAction")] + [Property("SPEC", "Tizen.NUI.Constraint.Remove A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ConstraintRemoveAction() + { + tlog.Debug(tag, $"ConstraintRemoveAction START"); + + using (Animatable ani = new Animatable()) + { + var testingTarget = new Constraint((global::System.IntPtr)ani.SwigCPtr, false); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + tlog.Info(tag, "Default RemoveAction: " + testingTarget.RemoveAction); + + testingTarget.RemoveAction = Tizen.NUI.Constraint.RemoveActionType.Discard; // // set(private?) + tlog.Info(tag, "RemoveAction : " + testingTarget.RemoveAction); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ConstraintRemoveAction END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Constraint GetTargetObject")] + [Property("SPEC", "Tizen.NUI.Constraint.GetTargetObject M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ConstraintGetTargetObject() + { + tlog.Debug(tag, $"ConstraintGetTargetObject START"); + + using (Animatable ani = new Animatable()) + { + var testingTarget = new Constraint((global::System.IntPtr)ani.SwigCPtr, false); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + try + { + var result = testingTarget.GetTargetObject(); + Assert.IsNotNull(result, "should be not null"); + Assert.IsInstanceOf(result, "should be an instance of BaseHandle class!"); + } + catch (Exception e) + { + Assert.Fail("Caught Exception" + e.ToString()); + } + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ConstraintGetTargetObject END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Constraint GetTargetPropert")] + [Property("SPEC", "Tizen.NUI.Constraint.GetTargetPropert M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ConstraintGetTargetPropert() + { + tlog.Debug(tag, $"ConstraintGetTargetPropert START"); + + using (Animatable ani = new Animatable()) + { + var testingTarget = new Constraint((global::System.IntPtr)ani.SwigCPtr, false); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + var result = testingTarget.GetTargetPropert(); + tlog.Debug(tag, "GetTargetPropert : " + result); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ConstraintGetTargetPropert END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Application/TSComponentApplication.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Application/TSComponentApplication.cs index 28d5ac9..96df2fa 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Application/TSComponentApplication.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Application/TSComponentApplication.cs @@ -181,5 +181,36 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); tlog.Debug(tag, $"ComponentApplicationAssign END (OK)"); } + + [Test] + [Category("P1")] + [Description("ComponentApplication Connect.")] + [Property("SPEC", "Tizen.NUI.ComponentApplication.Connect M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ComponentApplicationConnect() + { + tlog.Debug(tag, $"ComponentApplicationConnect START"); + + var testingTarget = new ComponentApplication(widget.SwigCPtr.Handle, false); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + 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, $"ComponentApplicationConnect END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSAuthenticationSignalType.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSAuthenticationSignalType.cs index 5a242fd..b263b54 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSAuthenticationSignalType.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSAuthenticationSignalType.cs @@ -31,29 +31,29 @@ namespace Tizen.NUI.Devel.Tests { tlog.Info(tag, "Destroy() is called!"); } - - // [Test] - // [Category("P1")] - // [Description("AuthenticationSignalType constructor.")] - // [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.AuthenticationSignalType C")] - // [Property("SPEC_URL", "-")] - // [Property("CRITERIA", "CONSTR")] - // [Property("AUTHOR", "guowei.wang@samsung.com")] - // public void AuthenticationSignalTypeConstructor() - // { - // tlog.Debug(tag, $"AuthenticationSignalTypeConstructor START"); - // using (View view = new View()) - // { - // var testingTarget = new AuthenticationSignalType(view.SwigCPtr.Handle, false); - // Assert.IsNotNull(testingTarget, "Should be not null!"); - // Assert.IsInstanceOf(testingTarget, "Should be an Instance of AuthenticationSignalType!"); + [Test] + [Category("P1")] + [Description("AuthenticationSignalType constructor.")] + [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.AuthenticationSignalType C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void AuthenticationSignalTypeConstructor() + { + tlog.Debug(tag, $"AuthenticationSignalTypeConstructor START"); - // testingTarget.Dispose(); - // } + using (View view = new View()) + { + var testingTarget = new AuthenticationSignalType(view.SwigCPtr.Handle, false); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of AuthenticationSignalType!"); - // tlog.Debug(tag, $"AuthenticationSignalTypeConstructor END (OK)"); - // } + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"AuthenticationSignalTypeConstructor END (OK)"); + } // [Test] // [Category("P1")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSDaliEnumConstants.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSDaliEnumConstants.cs index 2ced3ae..5c02cc8 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSDaliEnumConstants.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSDaliEnumConstants.cs @@ -28,6 +28,47 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("DaliEnumConstants Property.")] + [Property("SPEC", "Tizen.NUI.DaliEnumConstants.Property A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void DaliEnumConstantsProperty() + { + tlog.Debug(tag, $"DaliEnumConstantsProperty START"); + + var Content = Tizen.NUI.Constants.Tooltip.Property.Content; + tlog.Debug(tag, "Content : " + Content); + + var Layout = Tizen.NUI.Constants.Tooltip.Property.Layout; + tlog.Debug(tag, "Layout : " + Layout); + + var WaitTime = Tizen.NUI.Constants.Tooltip.Property.WaitTime; + tlog.Debug(tag, "WaitTime : " + WaitTime); + + var Background = Tizen.NUI.Constants.Tooltip.Property.Background; + tlog.Debug(tag, "Background : " + Background); + + var Tail = Tizen.NUI.Constants.Tooltip.Property.Tail; + tlog.Debug(tag, "Tail : " + Tail); + + var Position = Tizen.NUI.Constants.Tooltip.Property.Position; + tlog.Debug(tag, "Position : " + Position); + + var HoverPointOffset = Tizen.NUI.Constants.Tooltip.Property.HoverPointOffset; + tlog.Debug(tag, "HoverPointOffset : " + HoverPointOffset); + + var MovementThreshold = Tizen.NUI.Constants.Tooltip.Property.MovementThreshold; + tlog.Debug(tag, "MovementThreshold : " + MovementThreshold); + + var DisappearOnMovement = Tizen.NUI.Constants.Tooltip.Property.DisappearOnMovement; + tlog.Debug(tag, "DisappearOnMovement : " + DisappearOnMovement); + + tlog.Debug(tag, $"DaliEnumConstantsBackgroundProperty END (OK)"); + } + + [Test] + [Category("P1")] [Description("DaliEnumConstants BackgroundProperty.")] [Property("SPEC", "Tizen.NUI.DaliEnumConstants.BackgroundProperty A")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSDaliException.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSDaliException.cs index 1747c0e..3e8ec64 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSDaliException.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSDaliException.cs @@ -59,8 +59,17 @@ namespace Tizen.NUI.Devel.Tests var testingTarget = new DaliException("China", "Chinese speaking!"); Assert.IsNotNull(testingTarget, "Can't create success object DaliException."); Assert.IsInstanceOf(testingTarget, "Should return DaliException instance."); - - tlog.Debug(tag, "location : " + testingTarget.location); + + try + { + testingTarget.location = "Chinese speaking!"; + tlog.Debug(tag, "location : " + testingTarget.location); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } testingTarget.Dispose(); tlog.Debug(tag, $"DaliExceptionLocation END (OK)"); diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSListEventSignalType.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSListEventSignalType.cs index c71e308..7f424f4 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSListEventSignalType.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSListEventSignalType.cs @@ -25,5 +25,28 @@ namespace Tizen.NUI.Devel.Tests { tlog.Info(tag, "Destroy() is called!"); } + + [Test] + [Category("P1")] + [Description("ListEventSignalType constructor.")] + [Property("SPEC", "Tizen.NUI.ListEventSignalType.ListEventSignalType C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ListEventSignalTypeConstructor() + { + tlog.Debug(tag, $"ListEventSignalTypeConstructor START"); + + using (View view = new View()) + { + var testingTarget = new ListEventSignalType (view.SwigCPtr.Handle, false); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of ListEventSignalType !"); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ListEventSignalTypeConstructor END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSUint16Pair.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSUint16Pair.cs index 0b2a4e5..03d59bf 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSUint16Pair.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSUint16Pair.cs @@ -241,5 +241,55 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); tlog.Debug(tag, $"Uint16PairGreaterThan END (OK)"); } + + [Test] + [Category("P1")] + [Description("Uint16Pair ==.")] + [Property("SPEC", "Tizen.NUI.Uint16Pair.EqualTo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void Uint16PairEqualTo() + { + tlog.Debug(tag, $"Uint16PairEqualTo START"); + + var testingTarget = new Uint16Pair(1, 2); + Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Uint16Pair type."); + + using (Uint16Pair obj = testingTarget) + { + Assert.IsTrue(testingTarget == obj); + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"Uint16PairEqualTo END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Uint16Pair !=.")] + [Property("SPEC", "Tizen.NUI.Uint16Pair.NotEqualTo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void Uint16PairNotEqualTo() + { + tlog.Debug(tag, $"Uint16PairNotEqualTo START"); + + var testingTarget = new Uint16Pair(1, 2); + Assert.IsNotNull(testingTarget, "Can't create success object Uint16Pair"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Uint16Pair type."); + + using (Uint16Pair obj = new Uint16Pair(1, 0)) + { + Assert.IsTrue(testingTarget != obj); + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"Uint16PairNotEqualTo END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSVectorVector2.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSVectorVector2.cs new file mode 100755 index 0000000..116e007 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSVectorVector2.cs @@ -0,0 +1,408 @@ +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/VectorVector2")] + public class InternalCommonVectorVector2Test + { + 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("VectorVector2 contructor.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.VectorVector2 C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Contructor() + { + tlog.Debug(tag, $"VectorVector2Contructor START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + testingTarget.Dispose(); + tlog.Debug(tag, $"VectorVector2Contructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 contructor. With VectorVector2.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.VectorVector2 C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2ContructorWithVectorVector2() + { + tlog.Debug(tag, $"VectorVector2ContructorWithVectorVector2 START"); + + using (VectorVector2 vector = new VectorVector2()) + { + var testingTarget = new VectorVector2(vector); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"VectorVector2ContructorWithVectorVector2 END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Assign.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Assign M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Assign() + { + tlog.Debug(tag, $"VectorVector2Assign START"); + + using (VectorVector2 vector = new VectorVector2()) + { + var testingTarget = vector.Assign(vector); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"VectorVector2Assign END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Begin.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Begin M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Begin() + { + tlog.Debug(tag, $"VectorVector2Begin START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + var result = testingTarget.Begin(); + tlog.Debug(tag, "Begin :" + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"VectorVector2Begin END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 End.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.End M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2End() + { + tlog.Debug(tag, $"VectorVector2End START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + var result = testingTarget.End(); + tlog.Debug(tag, "End :" + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"VectorVector2End END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 PushBack.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.PushBack M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2PushBack() + { + tlog.Debug(tag, $"VectorVector2PushBack START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + try + { + testingTarget.PushBack(new Vector2()); + var result = testingTarget.ValueOfIndex(0); + tlog.Debug(tag, "ValueOfIndex :" + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"VectorVector2PushBack END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Insert.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Insert M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Insert() + { + tlog.Debug(tag, $"VectorVector2Insert START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + try + { + testingTarget.Insert(testingTarget.Begin(), new Vector2(30, 40)); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"VectorVector2Insert END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Reserve.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Reserve M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Reserve() + { + tlog.Debug(tag, $"VectorVector2Reverse START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + try + { + testingTarget.Reserve(1); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"VectorVector2Reserve END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Resize.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Resize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Resize() + { + tlog.Debug(tag, $"VectorVector2Resize START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + try + { + testingTarget.Resize(1); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"VectorVector2Resize END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Resize. With Vector2.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Resize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2ResizeWithVector2() + { + tlog.Debug(tag, $"VectorVector2ResizeWithVector2 START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + try + { + testingTarget.Resize(1, new Vector2()); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"VectorVector2ResizeWithVector2 END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Swap.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Swap M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Swap() + { + tlog.Debug(tag, $"VectorVector2Swap START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + try + { + using (VectorVector2 vector = new VectorVector2()) + { + testingTarget.Swap(vector); + } + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"VectorVector2Swap END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Clear.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Clear M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Clear() + { + tlog.Debug(tag, $"VectorVector2Clear START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + testingTarget.Insert(testingTarget.Begin(), new Vector2(30, 40)); + tlog.Debug(tag, "Size : " + testingTarget.Size()); + + try + { + testingTarget.Clear(); + tlog.Debug(tag, "Size : " + testingTarget.Size()); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"VectorVector2Clear END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 Release.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.Release M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2Release() + { + tlog.Debug(tag, $"VectorVector2Release START"); + + var testingTarget = new VectorVector2(); + Assert.IsNotNull(testingTarget, "Can't create success object VectorVector2."); + Assert.IsInstanceOf(testingTarget, "Should return VectorVector2 instance."); + + testingTarget.Insert(testingTarget.Begin(), new Vector2(30, 40)); + tlog.Debug(tag, "Size : " + testingTarget.Size()); + + try + { + testingTarget.Release(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"VectorVector2Release END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VectorVector2 BaseType.")] + [Property("SPEC", "Tizen.NUI.VectorVector2.BaseType A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VectorVector2BaseType() + { + tlog.Debug(tag, $"VectorVector2BaseType START"); + + try + { + var result = VectorVector2.BaseType; + tlog.Debug(tag, "BaseType : " + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"VectorVector2BaseType END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSViewImpl.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSViewImpl.cs index 26c284f..5870cd0 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSViewImpl.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSViewImpl.cs @@ -247,6 +247,83 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("ViewImpl OnInitialize.")] + [Property("SPEC", "Tizen.NUI.ViewImpl.OnInitialize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewImplOnInitialize() + { + tlog.Debug(tag, $"ViewImplOnInitialize START"); + + using (ViewWrapperImpl impl = new ViewWrapperImpl(CustomViewBehaviour.ViewBehaviourDefault)) + { + var testingTarget = new ViewWrapper("CustomView", impl); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.viewWrapperImpl.OnInitialize(); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ViewImplOnInitialize (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewImpl OnKeyInputFocusGained.")] + [Property("SPEC", "Tizen.NUI.ViewImpl.OnKeyInputFocusGained M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewImplOnKeyInputFocusGained() + { + tlog.Debug(tag, $"ViewImplOnKeyInputFocusGained START"); + + using (ViewWrapperImpl impl = new ViewWrapperImpl(CustomViewBehaviour.ViewBehaviourDefault)) + { + var testingTarget = new ViewWrapper("CustomView", impl); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.viewWrapperImpl.OnKeyInputFocusGained(); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ViewImplOnKeyInputFocusGained (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewImpl OnKeyInputFocusLost.")] + [Property("SPEC", "Tizen.NUI.ViewImpl.OnKeyInputFocusLost M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewImplOnKeyInputFocusLost() + { + tlog.Debug(tag, $"ViewImplOnKeyInputFocusLost START"); + + using (ViewWrapperImpl impl = new ViewWrapperImpl(CustomViewBehaviour.ViewBehaviourDefault)) + { + var testingTarget = new ViewWrapper("CustomView", impl); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.viewWrapperImpl.OnKeyInputFocusLost(); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ViewImplOnKeyInputFocusLost (OK)"); + } + [Test] + [Category("P1")] [Description("ViewImpl KeyEventSignal.")] [Property("SPEC", "Tizen.NUI.ViewImpl.KeyEventSignal M")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSViewWrapperImpl.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSViewWrapperImpl.cs index 2a06a54..7805a7e 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSViewWrapperImpl.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSViewWrapperImpl.cs @@ -43,8 +43,6 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); testingTarget.Dispose(); - // disposed - testingTarget.Dispose(); tlog.Debug(tag, $"ViewWrapperImplConstructor END (OK)"); } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSVisualEventSignal.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSVisualEventSignal.cs index 0f69bb3..dda45f2 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSVisualEventSignal.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Common/TSVisualEventSignal.cs @@ -39,6 +39,29 @@ namespace Tizen.NUI.Devel.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "guowei.wang@samsung.com")] + public void VisualEventSignalConstructorWithParameters() + { + tlog.Debug(tag, $"VisualEventSignalConstructorWithParameters START"); + + using (View view = new View()) + { + var testingTarget = new VisualEventSignal(view.SwigCPtr.Handle, false); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of VisualEventSignal!"); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"VisualEventSignalConstructorWithParameters END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VisualEventSignal constructor.")] + [Property("SPEC", "Tizen.NUI.VisualEventSignal.VisualEventSignal C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] public void VisualEventSignalConstructor() { tlog.Debug(tag, $"VisualEventSignalConstructor START"); diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSGetValueAction.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSGetValueAction.cs index c8b1636..c170645 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSGetValueAction.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSGetValueAction.cs @@ -83,5 +83,43 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"EXamlGetValueActionInit END (OK)"); } + + [Test] + [Category("P1")] + [Description("GetValueAction DealChar, ('\"' != sign)")] + [Property("SPEC", "Tizen.NUI.EXaml.GetValueAction.DealChar M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGetValueActionDealChar2() + { + tlog.Debug(tag, $"EXamlGetValueActionDealChar2 START"); + + var testingTarget = new Tizen.NUI.EXaml.GetValueAction('\'', new MyAction()); + Assert.IsNotNull(testingTarget, "Can't create success object GetValueAction"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GetValueAction type."); + + try + { + testingTarget.DealChar(' '); + } + catch (Exception e) + { + tlog.Error(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + try + { + testingTarget.DealChar('('); + } + catch (Exception e) + { + tlog.Error(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGetValueActionDealChar2 END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSGetValueListAction.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSGetValueListAction.cs index cc08dff..4aeea1e 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSGetValueListAction.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSGetValueListAction.cs @@ -83,5 +83,89 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"EXamlGetValueListActionInit END (OK)"); } + + [Test] + [Category("P1")] + [Description("GetValueListAction OnActive.")] + [Property("SPEC", "Tizen.NUI.EXaml.GetValueListAction.OnActive M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGetValueListActionOnActive() + { + tlog.Debug(tag, $"EXamlGetValueListActionOnActive START"); + + var testingTarget = new Tizen.NUI.EXaml.GetValueListAction(')', new MyAction()); + Assert.IsNotNull(testingTarget, "Can't create success object GetValueListAction"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GetValueListAction type."); + + try + { + testingTarget.OnActive(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGetValueListActionOnActive END (OK)"); + } + + [Test] + [Category("P1")] + [Description("GetValueListAction DealChar.")] + [Property("SPEC", "Tizen.NUI.EXaml.GetValueListAction.DealChar M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGetValueListActionDealChar() + { + tlog.Debug(tag, $"EXamlGetValueListActionDealChar START"); + + var testingTarget = new Tizen.NUI.EXaml.GetValueListAction(')', new MyAction()); + Assert.IsNotNull(testingTarget, "Can't create success object GetValueListAction"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GetValueListAction type."); + + try + { + testingTarget.DealChar(' '); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + try + { + testingTarget.DealChar('('); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + try + { + testingTarget.DealChar('m'); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + try + { + testingTarget.DealChar(')'); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGetValueListActionDealChar END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSRootAction.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSRootAction.cs new file mode 100755 index 0000000..8abd99e --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Action/TSRootAction.cs @@ -0,0 +1,122 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Action/RootAction")] + public class InternalRootActionTest + { + private const string tag = "NUITEST"; + + internal class MyRootAction : Tizen.NUI.EXaml.Action + { + public void Init() { } + + public void OnActive() { } + + EXaml.Action EXaml.Action.DealChar(char c) + { + return this; + } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("RootAction constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.RootAction.RootAction C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlRootActionConstructor() + { + tlog.Debug(tag, $"EXamlRootActionConstructor START"); + + var globalDataList = new GlobalDataList(); + + var testingTarget = new Tizen.NUI.EXaml.RootAction(globalDataList); + Assert.IsNotNull(testingTarget, "Can't create success object RootAction"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of RootAction type."); + + tlog.Debug(tag, $"EXamlRootActionConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("RootAction Init.")] + [Property("SPEC", "Tizen.NUI.EXaml.RootAction.Init M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlRootActionInit() + { + tlog.Debug(tag, $"EXamlRootActionInit START"); + + var globalDataList = new GlobalDataList(); + + var testingTarget = new Tizen.NUI.EXaml.RootAction(globalDataList); + Assert.IsNotNull(testingTarget, "Can't create success object RootAction"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of RootAction type."); + + try + { + testingTarget.Init(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlRootActionInit END (OK)"); + } + + [Test] + [Category("P1")] + [Description("RootAction DealChar.")] + [Property("SPEC", "Tizen.NUI.EXaml.RootAction.DealChar M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlRootActionDealChar() + { + tlog.Debug(tag, $"EXamlRootActionDealChar START"); + + var globalDataList = new GlobalDataList(); + + var testingTarget = new Tizen.NUI.EXaml.RootAction(globalDataList); + Assert.IsNotNull(testingTarget, "Can't create success object RootAction"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of RootAction type."); + + try + { + testingTarget.DealChar('('); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlRootActionDealChar END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToCollectionObject.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToCollectionObject.cs new file mode 100755 index 0000000..09d0a11 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToCollectionObject.cs @@ -0,0 +1,66 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/AddToCollectionObject ")] + public class InternalOperationAddToCollectionObjectTest + { + private const string tag = "NUITEST"; + + internal class MyAddToCollectionObject : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("AddToCollectionObject constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.AddToCollectionObject.AddToCollectionObject C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlAddToCollectionObjectConstructor() + { + tlog.Debug(tag, $"EXamlAddToCollectionObjectConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(new {}); + + var testingTarget = new Tizen.NUI.EXaml.AddToCollectionObject(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object AddToCollectionObject"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of AddToCollectionObject type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + tlog.Debug(tag, $"EXamlAddToCollectionObjectConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToCollectionProperty.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToCollectionProperty.cs new file mode 100755 index 0000000..c26daeb --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToCollectionProperty.cs @@ -0,0 +1,66 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/AddToCollectionProperty ")] + public class InternalOperationAddToCollectionPropertyTest + { + private const string tag = "NUITEST"; + + internal class MyAddToCollectionProperty : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("AddToCollectionProperty constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.AddToCollectionProperty.AddToCollectionProperty C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlAddToCollectionPropertyConstructor() + { + tlog.Debug(tag, $"EXamlAddToCollectionPropertyConstructor START"); + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(new {}); + + var testingTarget = new Tizen.NUI.EXaml.AddToCollectionProperty(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object AddToCollectionProperty"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of AddToCollectionProperty type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlAddToCollectionPropertyConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToResourceDictionary.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToResourceDictionary.cs new file mode 100755 index 0000000..a435537 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSAddToResourceDictionary.cs @@ -0,0 +1,68 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/AddToResourceDictionary ")] + public class InternalOperationAddToResourceDictionaryTest + { + private const string tag = "NUITEST"; + + internal class MyAddToResourceDictionary : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("AddToResourceDictionary constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.AddToResourceDictionary.AddToResourceDictionary C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlAddToResourceDictionaryConstructor() + { + tlog.Debug(tag, $"EXamlAddToResourceDictionaryConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + operationInfo.Add(new {}); + + var testingTarget = new Tizen.NUI.EXaml.AddToResourceDictionary(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object AddToResourceDictionary"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of AddToResourceDictionary type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlAddToResourceDictionaryConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateArrayObject.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateArrayObject.cs new file mode 100755 index 0000000..cd511e8 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateArrayObject.cs @@ -0,0 +1,67 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/CreateArrayObject ")] + public class InternalOperationCreateArrayObjectTest + { + private const string tag = "NUITEST"; + + internal class MyCreateArrayObject : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("CreateArrayObject constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.CreateArrayObject.CreateArrayObject C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlCreateArrayObjectConstructor() + { + tlog.Debug(tag, $"EXamlCreateArrayObjectConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(new {}); + + var testingTarget = new Tizen.NUI.EXaml.CreateArrayObject(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object CreateArrayObject"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of CreateArrayObject type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlCreateArrayObjectConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateDPObject.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateDPObject.cs new file mode 100755 index 0000000..1f4fd9c --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateDPObject.cs @@ -0,0 +1,101 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/CreateDPObject ")] + public class InternalOperationCreateDPObjectTest + { + private const string tag = "NUITEST"; + + internal class MyCreateDPObject : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("CreateDPObject constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.CreateDPObject.CreateDPObject C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlCreateDPObjectConstructor() + { + tlog.Debug(tag, $"EXamlCreateDPObjectConstructor START"); + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add("str"); + operationInfo.Add(-4); + + var testingTarget = new Tizen.NUI.EXaml.CreateDPObject(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object CreateDPObject"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of CreateDPObject type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlCreateDPObjectConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("CreateDPObject Do.")] + [Property("SPEC", "Tizen.NUI.EXaml.CreateDPObject.Do M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlCreateDPObjectDo() + { + tlog.Debug(tag, $"EXamlCreateDPObjectDo START"); + + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add("str"); + operationInfo.Add(-4); + + var testingTarget = new Tizen.NUI.EXaml.CreateDPObject(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object CreateDPObject"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of CreateDPObject type."); + + try + { + testingTarget.Do(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlCreateDPObjectDo END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateDataTemplate.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateDataTemplate.cs new file mode 100755 index 0000000..66836ba --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateDataTemplate.cs @@ -0,0 +1,68 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/CreateDataTemplate ")] + public class InternalOperationCreateDataTemplateTest + { + private const string tag = "NUITEST"; + + internal class MyCreateDataTemplate : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("CreateDataTemplate constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.CreateDataTemplate.GatherEvent C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlCreateDataTemplateConstructor() + { + tlog.Debug(tag, $"EXamlCreateDataTemplateConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + operationInfo.Add(3); + + var testingTarget = new Tizen.NUI.EXaml.CreateDataTemplate(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object CreateDataTemplate"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of CreateDataTemplate type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlCreateDataTemplateConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateObject.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateObject.cs new file mode 100755 index 0000000..9b75fdc --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSCreateObject.cs @@ -0,0 +1,67 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/CreateObject ")] + public class InternalOperationCreateObjectTest + { + private const string tag = "NUITEST"; + + internal class MyCreateObject : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("CreateObject constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.CreateObject.CreateObject C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlCreateObjectConstructor() + { + tlog.Debug(tag, $"EXamlCreateObjectConstructor START"); + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + operationInfo.Add(new {}); + + var testingTarget = new Tizen.NUI.EXaml.CreateObject(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object CreateObject"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of CreateObject type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlCreateObjectConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherAssembly.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherAssembly.cs new file mode 100755 index 0000000..2502a96 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherAssembly.cs @@ -0,0 +1,66 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GatherAssembly ")] + public class InternalOperationGatherAssemblyTest + { + private const string tag = "NUITEST"; + + internal class MyGatherAssembly : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + + [Test] + [Category("P1")] + [Description("GatherAssembly constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GatherAssembly.GatherAssembly C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGatherAssemblyConstructor() + { + tlog.Debug(tag, $"EXamlGatherAssemblyConstructor START"); + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + + var testingTarget = new Tizen.NUI.EXaml.GatherAssembly(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GatherAssembly"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GatherAssembly type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGatherAssemblyConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherBindableProperties.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherBindableProperties.cs new file mode 100755 index 0000000..50506fb --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherBindableProperties.cs @@ -0,0 +1,67 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GatherBindableProperties ")] + public class InternalOperationGatherBindablePropertiesTest + { + private const string tag = "NUITEST"; + + internal class MyGatherBindableProperties : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GatherBindableProperties constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GatherBindableProperties.GatherBindableProperties C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGatherBindablePropertiesConstructor() + { + tlog.Debug(tag, $"EXamlGatherBindablePropertiesConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.GatherBindableProperties(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GatherBindableProperties"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GatherBindableProperties type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGatherBindablePropertiesConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherEvent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherEvent.cs new file mode 100755 index 0000000..50f0e25 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherEvent.cs @@ -0,0 +1,100 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GatherEvent ")] + public class InternalOperationGatherEventTest + { + private const string tag = "NUITEST"; + + internal class MyGatherEvent : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GatherEvent constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GatherEvent.GatherEvent C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGatherEventConstructor() + { + tlog.Debug(tag, $"EXamlGatherEventConstructor START"); + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.GatherEvent(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GatherEvent"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GatherEvent type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGatherEventConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("GatherEvent Do.")] + [Property("SPEC", "Tizen.NUI.EXaml.GatherEvent.Do M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGatherEventDo() + { + tlog.Debug(tag, $"EXamlGatherEventDo START"); + + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.GatherEvent(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GatherEvent"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GatherEvent type."); + + try + { + testingTarget.Do(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Pass("Caught Exception : Passed!"); + } + + tlog.Debug(tag, $"EXamlGatherEventDo END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherMethod.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherMethod.cs new file mode 100755 index 0000000..590d9e4 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherMethod.cs @@ -0,0 +1,70 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GatherMethod ")] + public class InternalOperationGatherMethodTest + { + private const string tag = "NUITEST"; + + internal class MyGatherMethod : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GatherMethod constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GatherMethod.GatherMethod C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGatherMethodConstructor() + { + tlog.Debug(tag, $"EXamlGatherMethodConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + List list = new List(); + operationInfo.Add(list); + + var testingTarget = new Tizen.NUI.EXaml.GatherMethod(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GatherMethod"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GatherMethod type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGatherMethodConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherProperty.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherProperty.cs new file mode 100755 index 0000000..b7d43fc --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherProperty.cs @@ -0,0 +1,67 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GatherProperty ")] + public class InternalOperationGatherPropertyTest + { + private const string tag = "NUITEST"; + + internal class MyGatherProperty : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GatherProperty constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GatherProperty.GatherProperty C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGatherPropertyConstructor() + { + tlog.Debug(tag, $"EXamlGatherPropertyConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.GatherProperty(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GatherProperty"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GatherProperty type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGatherPropertyConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherType.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherType.cs new file mode 100755 index 0000000..1265fa2 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGatherType.cs @@ -0,0 +1,107 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GatherType ")] + public class InternalOperationGatherTypeTest + { + private const string tag = "NUITEST"; + + internal class MyGatherType : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GatherType constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GatherType.GatherType C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGatherTypeConstructor() + { + tlog.Debug(tag, $"EXamlGatherTypeConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + List list = new List(); + operationInfo.Add(list); + + var testingTarget = new Tizen.NUI.EXaml.GatherType(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GatherType"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GatherType type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGatherTypeConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("GatherType Do.")] + [Property("SPEC", "Tizen.NUI.EXaml.GatherType.Do M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGatherTypeDo() + { + tlog.Debug(tag, $"EXamlGatherTypeDo START"); + + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + List list = new List(); + operationInfo.Add(list); + + var testingTarget = new Tizen.NUI.EXaml.GatherType(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GatherType"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GatherType type."); + + try + { + testingTarget.Do(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Pass("Caught Exception : Passed!"); + } + + tlog.Debug(tag, $"EXamlGatherTypeDo END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetEnumObject.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetEnumObject.cs new file mode 100755 index 0000000..94d8514 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetEnumObject.cs @@ -0,0 +1,66 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GetEnumObject ")] + public class InternalOperationGetEnumObjectTest + { + private const string tag = "NUITEST"; + + internal class MyGetEnumObject : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GetEnumObject constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GetEnumObject.GetEnumObject C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGetEnumObjectConstructor() + { + tlog.Debug(tag, $"EXamlGetEnumObjectConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.GetEnumObject(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GetEnumObject"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GetEnumObject type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + tlog.Debug(tag, $"EXamlGetEnumObjectConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetObjectByProperty.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetObjectByProperty.cs new file mode 100755 index 0000000..b709f03 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetObjectByProperty.cs @@ -0,0 +1,67 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GetObjectByProperty ")] + public class InternalOperationGetObjectByPropertyTest + { + private const string tag = "NUITEST"; + + internal class MyGetObjectByProperty : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GetObjectByProperty constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GetObjectByProperty.GetObjectByProperty C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGetObjectByPropertyConstructor() + { + tlog.Debug(tag, $"EXamlGetObjectByPropertyConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.GetObjectByProperty(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GetObjectByProperty"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GetObjectByProperty type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGetObjectByPropertyConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetObjectConvertedFromString.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetObjectConvertedFromString.cs new file mode 100755 index 0000000..7e8a2c4 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetObjectConvertedFromString.cs @@ -0,0 +1,65 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GetObjectConvertedFromString ")] + public class InternalOperationGetObjectConvertedFromStringTest + { + private const string tag = "NUITEST"; + + internal class MyGetObjectConvertedFromString : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GetObjectConvertedFromString constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GetObjectConvertedFromString.GetObjectConvertedFromString C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGetObjectConvertedFromStringConstructor() + { + tlog.Debug(tag, $"EXamlGetObjectConvertedFromStringConstructor START"); + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.GetObjectConvertedFromString(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GetObjectConvertedFromString"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GetObjectConvertedFromString type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + tlog.Debug(tag, $"EXamlGetObjectConvertedFromStringConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetStaticObject.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetStaticObject.cs new file mode 100755 index 0000000..c35684c --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetStaticObject.cs @@ -0,0 +1,68 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GetStaticObject ")] + public class InternalOperationGetStaticObjectTest + { + private const string tag = "NUITEST"; + + internal class MyGetStaticObject : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GetStaticObject constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GetStaticObject.GetStaticObject C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGetStaticObjectConstructor() + { + tlog.Debug(tag, $"EXamlGetStaticObjectConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + operationInfo.Add(3); + + var testingTarget = new Tizen.NUI.EXaml.GetStaticObject(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GetStaticObject"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GetStaticObject type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGetStaticObjectConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetTypeObject.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetTypeObject.cs new file mode 100755 index 0000000..b8593bb --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSGetTypeObject.cs @@ -0,0 +1,66 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/GetTypeObject ")] + public class InternalOperationGetTypeObjectTest + { + private const string tag = "NUITEST"; + + internal class MyGetTypeObject : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GetTypeObject constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.GetTypeObject.GetTypeObject C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlGetTypeObjectConstructor() + { + tlog.Debug(tag, $"EXamlGetTypeObjectConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + + var testingTarget = new Tizen.NUI.EXaml.GetTypeObject(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object GetTypeObject"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GetTypeObject type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlGetTypeObjectConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSRegisterXName.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSRegisterXName.cs new file mode 100755 index 0000000..f6c46fd --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSRegisterXName.cs @@ -0,0 +1,101 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/RegisterXName ")] + public class InternalOperationRegisterXNameTest + { + private const string tag = "NUITEST"; + + internal class MyRegisterXName : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("RegisterXName constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.RegisterXName.RegisterXName C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlRegisterXNameConstructor() + { + tlog.Debug(tag, $"EXamlRegisterXNameConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.RegisterXName(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object RegisterXName"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of RegisterXName type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlRegisterXNameConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("RegisterXName Do.")] + [Property("SPEC", "Tizen.NUI.EXaml.RegisterXName.Do M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlRegisterXNameDo() + { + tlog.Debug(tag, $"EXamlRegisterXNameDo START"); + + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + var testingTarget = new Tizen.NUI.EXaml.RegisterXName(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object RegisterXName"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of RegisterXName type."); + + try + { + testingTarget.Do(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlRegisterXNameDo END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetBinding.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetBinding.cs new file mode 100755 index 0000000..6ae1723 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetBinding.cs @@ -0,0 +1,68 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/SetBinding ")] + public class InternalOperationSetBindingTest + { + private const string tag = "NUITEST"; + + internal class MySetBinding : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("SetBinding constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.SetBinding.SetBinding C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlSetBindingConstructor() + { + tlog.Debug(tag, $"EXamlSetBindingConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + operationInfo.Add(3); + + var testingTarget = new Tizen.NUI.EXaml.SetBinding(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object SetBinding"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of SetBinding type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlSetBindingConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetDynamicResource.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetDynamicResource.cs new file mode 100755 index 0000000..0f8347e --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetDynamicResource.cs @@ -0,0 +1,68 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/SetDynamicResource ")] + public class InternalOperationSetDynamicResourceTest + { + private const string tag = "NUITEST"; + + internal class MySetDynamicResource : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("SetDynamicResource constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.SetDynamicResource.SetDynamicResource C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlSetDynamicResourceConstructor() + { + tlog.Debug(tag, $"EXamlSetDynamicResourceConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + operationInfo.Add(3); + + var testingTarget = new Tizen.NUI.EXaml.SetDynamicResource(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object SetDynamicResource"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of SetDynamicResource type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlSetDynamicResourceConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetProperty.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetProperty.cs new file mode 100755 index 0000000..90d0daa --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/EXaml/Operation/TSSetProperty.cs @@ -0,0 +1,70 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.EXaml; +using System.Collections.Generic; +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/EXaml/Operation/SetProperty ")] + public class InternalOperationSetPropertyTest + { + private const string tag = "NUITEST"; + + internal class MySetProperty : Tizen.NUI.EXaml.Operation + { + public void Do() { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("SetProperty constructor.")] + [Property("SPEC", "Tizen.NUI.EXaml.SetProperty.SetProperty C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void EXamlSetPropertyConstructor() + { + tlog.Debug(tag, $"EXamlSetPropertyConstructor START"); + + try + { + var globalDataList = new GlobalDataList(); + List operationInfo = new List(); + + operationInfo.Add(1); + operationInfo.Add(2); + + List list = new List(); + operationInfo.Add(list); + + var testingTarget = new Tizen.NUI.EXaml.SetProperty(globalDataList, operationInfo); + Assert.IsNotNull(testingTarget, "Can't create success object SetProperty"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of SetProperty type."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"EXamlSetPropertyConstructor END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameBroker/TSDefaultFrameBroker.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameBroker/TSDefaultFrameBroker.cs index d66c16d..5b66897 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameBroker/TSDefaultFrameBroker.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameBroker/TSDefaultFrameBroker.cs @@ -4,7 +4,7 @@ using NUnit.Framework.TUnit; using Tizen.NUI.Components; using Tizen.NUI.BaseComponents; using System.Collections.Generic; - +using Tizen.NUI; namespace Tizen.NUI.Devel.Tests { using tlog = Tizen.Log; @@ -76,15 +76,11 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"DefaultFrameBrokerConstructor START"); - using (Window window = new Window(new Rectangle(0, 0, 1920, 1080), false)) - { - var testingTarget = new DefaultFrameBroker(window); - Assert.IsNotNull(testingTarget, "Can't create success object CustomView"); - Assert.IsInstanceOf(testingTarget, "Should be an instance of DefaultFrameBroker type."); - - testingTarget.Dispose(); - } + var testingTarget = new DefaultFrameBroker(Window.Instance); + Assert.IsNotNull(testingTarget, "Can't create success object CustomView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of DefaultFrameBroker type."); + testingTarget.Dispose(); tlog.Debug(tag, $"DefaultFrameBrokerConstructor END (OK)"); } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameBroker/TSFrameBrokerBase.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameBroker/TSFrameBrokerBase.cs index a3d11c5..a81eb91 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameBroker/TSFrameBrokerBase.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameBroker/TSFrameBrokerBase.cs @@ -4,6 +4,7 @@ using NUnit.Framework.TUnit; using Tizen.NUI.Components; using Tizen.NUI.BaseComponents; using System.Collections.Generic; +using Tizen.Applications; namespace Tizen.NUI.Devel.Tests { @@ -31,33 +32,30 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P2")] - [Description("FrameBrokerBase SendLaunchRequest.")] + [Description("FrameBrokerBase SendLaunchRequest. With null.")] [Property("SPEC", "Tizen.NUI.FrameBrokerBase.SendLaunchRequest M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] [Property("AUTHOR", "guowei.wang@samsung.com")] - public void FrameBrokerBaseSendLaunchRequestNullAppControl() + public void FrameBrokerBaseSendLaunchRequestWithNull() { - tlog.Debug(tag, $"FrameBrokerBaseSendLaunchRequestNullAppControl START"); + tlog.Debug(tag, $"FrameBrokerBaseSendLaunchRequestWithNull START"); - //using (Window window = new Window(new Rectangle(0, 0, 100, 200), false)) - //{ - var testingTarget = new DefaultFrameBroker(Window.Instance); - Assert.IsNotNull(testingTarget, "Can't create success object CustomView"); - Assert.IsInstanceOf(testingTarget, "Should be an instance of DefaultFrameBroker type."); + var testingTarget = new DefaultFrameBroker(Window.Instance); + Assert.IsNotNull(testingTarget, "Can't create success object CustomView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of DefaultFrameBroker type."); - try - { - testingTarget.SendLaunchRequest(null); - } - catch (Exception e) - { - testingTarget.Dispose(); - tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, $"FrameBrokerBaseSendLaunchRequestNullAppControl END (OK)"); - Assert.Pass("Caught ArgumentException : Passed!"); - } - //} + try + { + testingTarget.SendLaunchRequest(null); + } + catch (Exception e) + { + testingTarget.Dispose(); + tlog.Debug(tag, e.Message.ToString()); + tlog.Debug(tag, $"FrameBrokerBaseSendLaunchRequestWithNull END (OK)"); + Assert.Pass("Caught ArgumentException : Passed!"); + } } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameProvider/TSFrameProvider.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameProvider/TSFrameProvider.cs new file mode 100755 index 0000000..187feed --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameProvider/TSFrameProvider.cs @@ -0,0 +1,52 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using System.Collections.Generic; +using Tizen.Applications; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/FrameProvider/FrameProvider")] + public class InternalFrameProviderTest + { + 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("FrameProvider FrameProvider.")] + [Property("SPEC", "Tizen.NUI.FrameProvider.FrameProvider M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void FrameProviderWithWindow() + { + tlog.Debug(tag, $"FrameProviderWithWindow START"); + + var testingTarget = new FrameProvider(Window.Instance); + Assert.IsNotNull(testingTarget, "Can't create success object FrameProvider"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FrameProvider type."); + + testingTarget.Dispose(); + + tlog.Debug(tag, $"FrameProviderWithWindow END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameProvider/TSSafeFrameProviderHandle.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameProvider/TSSafeFrameProviderHandle.cs new file mode 100755 index 0000000..ab350f3 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/FrameProvider/TSSafeFrameProviderHandle.cs @@ -0,0 +1,55 @@ +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("internal/FrameBroker/SafeFrameProviderHandle")] + public class InternalSafeFrameProviderHandleTest + { + 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("SafeFrameProviderHandle constructor.")] + [Property("SPEC", "Tizen.NUI.SafeFrameProviderHandle.SafeFrameProviderHandle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SafeFrameProviderHandleConstructor() + { + tlog.Debug(tag, $"SafeFrameProviderHandleConstructor START"); + + using (Animation ani = new Animation(300)) + { + ani.SetDefaultAlphaFunction(new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseInSquare)); + + var testingTarget = new SafeFrameProviderHandle(ani.SwigCPtr.Handle, false); + Assert.IsNotNull(testingTarget, "Can't create success object CustomView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of SafeFrameProviderHandle type."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"SafeFrameProviderHandleConstructor END (OK)"); + } + } +} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSFadeTransitionItem.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSFadeTransitionItem.cs index 53ca3a1..b4f1cfe 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSFadeTransitionItem.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSFadeTransitionItem.cs @@ -56,5 +56,72 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"FadeTransitionItemConstructor END (OK)"); } + + [Test] + [Category("P1")] + [Description("FadeTransitionItem constructor.")] + [Property("SPEC", "Tizen.NUI.FadeTransitionItem.FadeTransitionItem C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void FadeTransitionItemConstructorWithIntPtr() + { + tlog.Debug(tag, $"FadeTransitionItemConstructorWithIntPtr START"); + + using (View view = new View() { Size = new Size(100, 200) }) + { + using (FadeTransitionItem item = new FadeTransitionItem(view.SwigCPtr.Handle, false)) + { + var testingTarget = new FadeTransitionItem(item); + Assert.IsNotNull(testingTarget, "Can't create success object FadeTransitionItem."); + Assert.IsInstanceOf(testingTarget, "Should return FadeTransitionItem instance."); + + testingTarget.Dispose(); + } + } + + tlog.Debug(tag, $"FadeTransitionItemConstructorWithIntPtr END (OK)"); + } + + + [Test] + [Category("P1")] + [Description("FadeTransitionItem Assign.")] + [Property("SPEC", "Tizen.NUI.FadeTransitionItem.Assign M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void FadeTransitionItemAssign() + { + tlog.Debug(tag, $"FadeTransitionItemAssign START"); + + using (View view = new View()) + { + using (TimePeriod timePeriod = new TimePeriod(300)) + { + using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default)) + { + var testingTarget = new FadeTransitionItem(view, 0.8f, true, timePeriod, alphaFunction); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of FadeTransitionItem!"); + + try + { + testingTarget.Assign(testingTarget); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + } + } + } + + tlog.Debug(tag, $"FadeTransitionItemAssign END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSScaleTransitionItem.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSScaleTransitionItem.cs index f07c53f..d52a0db 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSScaleTransitionItem.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSScaleTransitionItem.cs @@ -56,5 +56,68 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"ScaleTransitionItemConstructor END (OK)"); } + + [Test] + [Category("P1")] + [Description("ScaleTransitionItem constructor with Vector.")] + [Property("SPEC", "Tizen.NUI.ScaleTransitionItem.with Vector C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ScaleTransitionItemConstructorwithVector() + { + tlog.Debug(tag, $"ScaleTransitionItemConstructorwithVector START"); + + using (View view = new View() { Size = new Size(100, 200) }) + { + using (TimePeriod timePeriod = new TimePeriod(300)) + { + using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default)) + { + var testingTarget = new ScaleTransitionItem(view, new Vector2(0.0f, 0.0f), true, timePeriod, alphaFunction); + Assert.IsNotNull(testingTarget, "Can't create success object ScaleTransitionItem."); + Assert.IsInstanceOf(testingTarget, "Should return ScaleTransitionItem instance."); + + testingTarget.Dispose(); + } + } + } + + tlog.Debug(tag, $"ScaleTransitionItemConstructorwithVector END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ScaleTransitionItem Assign.")] + [Property("SPEC", "Tizen.NUI.ScaleTransitionItem.Assign M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ScaleTransitionItemAssign() + { + tlog.Debug(tag, $"ScaleTransitionItemAssign START"); + + using (View view = new View()) + { + var testingTarget = new ScaleTransitionItem(view.SwigCPtr.Handle, false); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of ScaleTransitionItem!"); + + try + { + testingTarget.Assign(testingTarget); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ScaleTransitionItemAssign END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSSlideTransitionItem.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSSlideTransitionItem.cs index 88b034f..0062b55 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSSlideTransitionItem.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSSlideTransitionItem.cs @@ -59,5 +59,38 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"SlideTransitionItemConstructor END (OK)"); } + + [Test] + [Category("P1")] + [Description("SlideTransitionItem Assign.")] + [Property("SPEC", "Tizen.NUI.SlideTransitionItem.Assign M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SlideTransitionItemAssign() + { + tlog.Debug(tag, $"SlideTransitionItemAssign START"); + + using (View view = new View()) + { + var testingTarget = new SlideTransitionItem(view.SwigCPtr.Handle, false); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of SlideTransitionItem!"); + + try + { + testingTarget.Assign(testingTarget); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"SlideTransitionItemAssign END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSTransitionGroupItem.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSTransitionGroupItem.cs index af0b02a..608f271 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSTransitionGroupItem.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSTransitionGroupItem.cs @@ -62,6 +62,16 @@ namespace Tizen.NUI.Devel.Tests var result = testingTarget.GetTransitionAt(0); tlog.Debug(tag, "GetTransitionAt : " + result); + + try + { + testingTarget.TransitionWithChild = false; + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } testingTarget.Dispose(); } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSTransitionItemBase.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSTransitionItemBase.cs index d18c318..33975fa 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSTransitionItemBase.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Transition/TSTransitionItemBase.cs @@ -69,8 +69,6 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should be an Instance of TransitionItemBase!"); testingTarget.Dispose(); - // disposed - testingTarget.Dispose(); } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Utility/TSItemView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Utility/TSItemView.cs index 437b8c8..6c2dab2 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Utility/TSItemView.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Utility/TSItemView.cs @@ -310,6 +310,42 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("ItemView InsertItems.")] + [Property("SPEC", "Tizen.NUI.ItemView.InsertItems M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ItemViewInsertItems() + { + tlog.Debug(tag, $"ItemViewInsertItems START"); + + using (ItemFactory factory = new ItemFactory()) + { + var testingTarget = new ItemView(factory); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of ItemView!"); + + try + { + using (ItemCollection newItems = new ItemCollection()) + { + testingTarget.InsertItems(new ItemCollection(), 30.0f); + } + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ItemViewInsertItems END (OK)"); + } + + [Test] + [Category("P1")] [Description("ItemView RemoveItem.")] [Property("SPEC", "Tizen.NUI.ItemView.RemoveItem M")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Widget/TSWidgetApplication.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Widget/TSWidgetApplication.cs index fe3eb27..4098926 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Widget/TSWidgetApplication.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Widget/TSWidgetApplication.cs @@ -14,6 +14,7 @@ namespace Tizen.NUI.Devel.Tests public class InternalWidgetApplicationTest { private const string tag = "NUITEST"; + private Widget widget = null; internal class MyWidgetApplication : WidgetApplication { @@ -30,11 +31,16 @@ namespace Tizen.NUI.Devel.Tests public void Init() { tlog.Info(tag, "Init() is called!"); + + widget = new Widget(); } [TearDown] public void Destroy() { + widget.Dispose(); + widget = null; + tlog.Info(tag, "Destroy() is called!"); } @@ -49,17 +55,13 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"WidgetApplicationConstructor START"); - Widget widget = new Widget(); - var testingTarget = new WidgetApplication(widget.GetIntPtr(), false); Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); - widget.Dispose(); - widget = null; - testingTarget.Dispose(); testingTarget = null; + tlog.Debug(tag, $"WidgetApplicationConstructor END (OK)"); } @@ -74,24 +76,16 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"WidgetApplicationConstructorWithWidgetApplication START"); - Widget widget = new Widget(); - - WidgetApplication widgetApplication = new WidgetApplication(widget.GetIntPtr(), false); - Assert.IsNotNull(widgetApplication, "Can't create success object WidgetApplication"); - Assert.IsInstanceOf(widgetApplication, "Should be an instance of WidgetApplication type."); - - var testingTarget = new WidgetApplication(widgetApplication); - Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); - Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); - - widget.Dispose(); - widget = null; + using (WidgetApplication widgetApplication = new WidgetApplication(widget.GetIntPtr(), false)) + { + var testingTarget = new WidgetApplication(widgetApplication); + Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); - widgetApplication.Dispose(); - widgetApplication = null; + testingTarget.Dispose(); + testingTarget = null; + } - testingTarget.Dispose(); - testingTarget = null; tlog.Debug(tag, $"WidgetApplicationConstructorWithWidgetApplication END (OK)"); } @@ -106,24 +100,16 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"WidgetApplicationAssign START"); - Widget widget = new Widget(); - - WidgetApplication widgetApplication = new WidgetApplication(widget.GetIntPtr(), false); - Assert.IsNotNull(widgetApplication, "Can't create success object WidgetApplication"); - Assert.IsInstanceOf(widgetApplication, "Should be an instance of WidgetApplication type."); - - var testingTarget = widgetApplication.Assign(widgetApplication); - Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); - Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); - - widget.Dispose(); - widget = null; + using (WidgetApplication widgetApplication = new WidgetApplication(widget.GetIntPtr(), false)) + { + var testingTarget = widgetApplication.Assign(widgetApplication); + Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); - widgetApplication.Dispose(); - widgetApplication = null; + testingTarget.Dispose(); + testingTarget = null; + } - testingTarget.Dispose(); - testingTarget = null; tlog.Debug(tag, $"WidgetApplicationAssign END (OK)"); } @@ -138,8 +124,6 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"WidgetApplicationReleaseSwigCPtr START"); - Widget widget = new Widget(); - var testingTarget = new MyWidgetApplication(widget.GetIntPtr(), false); Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); @@ -156,6 +140,7 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); testingTarget = null; + tlog.Debug(tag, $"WidgetApplicationReleaseSwigCPtr END (OK)"); } @@ -205,8 +190,6 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"WidgetApplicationRegisterWidgetInfo START"); - Widget widget = new Widget(); - var testingTarget = new WidgetApplication(widget.GetIntPtr(), false); Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); @@ -224,11 +207,9 @@ namespace Tizen.NUI.Devel.Tests Assert.Fail("Caught Exception: Failed!"); } - widget.Dispose(); - widget = null; - testingTarget.Dispose(); testingTarget = null; + tlog.Debug(tag, $"WidgetApplicationRegisterWidgetInfo END (OK)"); } @@ -243,11 +224,11 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"WidgetApplicationWidgetCreateFunction START"); - tlog.Debug(tag, "WidgetApplication.Instance : " + WidgetApplication.Instance); + var instance = WidgetApplication.Instance; + tlog.Debug(tag, "WidgetApplication.Instance : " + instance); try { - Widget widget = new Widget(); global::System.IntPtr widgetPtr = widget.GetIntPtr(); WidgetApplication.WidgetCreateFunction(ref widgetPtr); } @@ -271,8 +252,6 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"WidgetApplicationWidgetInfo START"); - Widget widget = new Widget(); - var testingTarget = new WidgetApplication(widget.GetIntPtr(), false); Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); @@ -281,15 +260,46 @@ namespace Tizen.NUI.Devel.Tests { typeof(Widget), "w1@org.tizen.WidgetApp"} }; testingTarget.RegisterWidgetInfo(widgetInfo); - tlog.Debug(tag, "testingTarget.WidgetInfo : " + testingTarget.WidgetInfo); - - widget.Dispose(); - widget = null; + var info = testingTarget.WidgetInfo; + tlog.Debug(tag, "testingTarget.WidgetInfo : " + info); testingTarget.Dispose(); testingTarget = null; tlog.Debug(tag, $"WidgetApplicationWidgetInfo END (OK)"); } + + [Test] + [Category("P1")] + [Description("WidgetApplication AddWidgetInfo.")] + [Property("SPEC", "Tizen.Applications.WidgetApplication.AddWidgetInfo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WidgetApplicationAddWidgetInfo() + { + tlog.Debug(tag, $"WidgetApplicationAddWidgetInfo START"); + + var testingTarget = new WidgetApplication(widget.GetIntPtr(), false); + Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of WidgetApplication type."); + + global::System.Collections.Generic.Dictionary widgetInfo = new global::System.Collections.Generic.Dictionary(){ + { typeof(Widget), "w1@org.tizen.WidgetApp"} }; + + try + { + testingTarget.AddWidgetInfo(widgetInfo); + } + catch(Exception e) + { + Assert.Pass("Catch exception: " + e.Message.ToString()); + } + + testingTarget.Dispose(); + testingTarget = null; + + tlog.Debug(tag, $"WidgetApplicationAddWidgetInfo END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Window/TSWindowAccessibilityHighlightEvent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Window/TSWindowAccessibilityHighlightEvent.cs new file mode 100755 index 0000000..428eaf6 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/Window/TSWindowAccessibilityHighlightEvent.cs @@ -0,0 +1,67 @@ +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("internal/Window/WindowAccessibilityHighlightEvent")] + public class InternalWindowAccessibilityHighlightEventTest + { + private const string tag = "NUITEST"; + + private delegate bool dummyCallback(IntPtr signal); + 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("WindowAccessibilityHighlightEvent GetConnectionCount.")] + [Property("SPEC", "Tizen.NUI.WindowAccessibilityHighlightEvent.GetConnectionCount M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WindowAccessibilityHighlightEventGetConnectionCount() + { + tlog.Debug(tag, $"WindowAccessibilityHighlightEventGetConnectionCount START"); + + var testingTarget = new WindowAccessibilityHighlightEvent(Window.Instance); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of WindowAccessibilityHighlightEvent!"); + + try + { + var result = testingTarget.GetConnectionCount(); + tlog.Debug(tag, "Connection count : " + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"WindowAccessibilityHighlightEventGetConnectionCount END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/XamlBinding/TSRotationTypeConverter.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/XamlBinding/TSRotationTypeConverter.cs new file mode 100755 index 0000000..f9c9be7 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/XamlBinding/TSRotationTypeConverter.cs @@ -0,0 +1,92 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using System.Reflection; +using System.Collections.Generic; +using Tizen.NUI.Binding; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("internal/XamlBinding/RotationTypeConverter")] + public class InternalRotationTypeConverterTest + { + 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("RotationTypeConverter constructor")] + [Property("SPEC", "Tizen.NUI.Binding.RotationTypeConverter.RotationTypeConverter C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + public void PositionTypeConverterConstructor() + { + tlog.Debug(tag, $"PositionTypeConverterConstructor START"); + + try + { + var testingTarget = new RotationTypeConverter(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString() + ", Failed!"); + } + + tlog.Debug(tag, $"PositionTypeConverterConstructor END"); + } + + [Test] + [Category("P1")] + [Description("RotationTypeConverter ConvertToString")] + [Property("SPEC", "Tizen.NUI.Binding.RotationTypeConverter.ConvertToString M")] + [Property("SPEC_URL", "MR")] + [Property("CRITERIA", "CONSTR")] + public void RotationTypeConverterConvertFromInvariantString() + { + tlog.Debug(tag, $"RotationTypeConverterConvertFromInvariantString START"); + + var testingTarget = new RotationTypeConverter(); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of RotationTypeConverter!"); + + try + { + testingTarget.ConvertFromInvariantString("D:23, 0, 0, 1"); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString() + ", Failed!"); + } + + try + { + using (Rotation obj = new Rotation()) + { + testingTarget.ConvertToString(obj); + } + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString() + ", Failed!"); + } + + tlog.Debug(tag, $"RotationTypeConverterConvertFromInvariantString END"); + } + } +} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/images/TSImageLoading.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/images/TSImageLoading.cs index 5d710e0..b3ef6dc 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/images/TSImageLoading.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/internal/images/TSImageLoading.cs @@ -63,10 +63,111 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] - [Description("ImageLoading LoadImageFromBuffer.")] + [Description("ImageLoading LoadImageFromFile, with orientationCorrection.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromFile M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType ,SamplingModeType, bool")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingLoadImageFromFileWithOrientationCorrection() + { + tlog.Debug(tag, $"ImageLoadingLoadImageFromFileWithOrientationCorrection START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.LoadImageFromFile(imageurl,size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingLoadImageFromFileWithOrientationCorrection END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading LoadImageFromFile, with samplingMode.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromFile M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType ,SamplingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingLoadImageFromFileWithSamplingMode() + { + tlog.Debug(tag, $"ImageLoadingLoadImageFromFileWithSamplingMode START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.LoadImageFromFile(imageurl,size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingLoadImageFromFileWithSamplingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading LoadImageFromFile3, with fittingMode")] + [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromFile M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingLoadImageFromFileWithFittingMode() + { + tlog.Debug(tag, $"ImageLoadingLoadImageFromFileWithFittingMode START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.LoadImageFromFile(imageurl,size2d, FittingModeType.ScaleToFill); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingLoadImageFromFileWithFittingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading LoadImageFromFile, with Size.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromFile M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingLoadImageFromFileWithSize() + { + tlog.Debug(tag, $"ImageLoadingLoadImageFromFileWithSize START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.LoadImageFromFile(imageurl,size2d); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingLoadImageFromFileWithSize END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading LoadImageFromBuffer, with orientationCorrection.")] [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromBuffer M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] + [Property("COVPARAM", "Stream, Size2D, FittingModeType, SamplingModeType, bool")] [Property("AUTHOR", "guowei.wang@samsung.com")] [Obsolete] public void ImageLoadingLoadImageFromBufferWithOrientationCorrection() @@ -86,6 +187,214 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrection END (OK)"); } + + [Test] + [Category("P1")] + [Description("ImageLoading LoadImageFromBuffer, with samplingMode.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromBuffer M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "Stream, Size2D, FittingModeType, SamplingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingLoadImageFromBufferWithSamplingMode() + { + tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSamplingMode START"); + + var stream = FileToStream(imageurl); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSamplingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading LoadImageFromBuffer, with fittingMode.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromBuffer3 M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "Stream, Size2D, FittingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingLoadImageFromBufferWithFittingMode() + { + tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithFittingMode START"); + + var stream = FileToStream(imageurl); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithFittingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading LoadImageFromBuffer, with size.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromBuffer M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "Stream, Size2D")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingLoadImageFromBufferWithSize() + { + tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSize START"); + + var stream = FileToStream(imageurl); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSize END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading LoadImageFromBuffer.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.LoadImageFromBuffer M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "Stream")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingLoadImageFromBufferWithOrientationCorrection1() + { + tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrection1 START"); + + var stream = FileToStream(imageurl); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.LoadImageFromBuffer(stream); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrection1 END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading GetClosestImageSize, with orientationCorrection.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.GetClosestImageSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType, SamplingModeType, bool")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingGetClosestImageSizeWithOrientationCorrection() + { + tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithOrientationCorrection START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.GetClosestImageSize("picture", size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return Size2D instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithOrientationCorrection END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading GetClosestImageSize, with samplingMode.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.GetClosestImageSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType, SamplingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingGetClosestImageSizeWithSamplingMode() + { + tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithSamplingMode START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.GetClosestImageSize("picture", size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return Size2D instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithSamplingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading GetClosestImageSize, with fittingMode.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.GetClosestImageSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingGetClosestImageSizeWithFittingMode() + { + tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithFittingMode START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.GetClosestImageSize("picture", size2d, FittingModeType.ScaleToFill); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return Size2D instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithFittingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading GetClosestImageSize, with size.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.GetClosestImageSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingGetClosestImageSizeWithSize2D() + { + tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithSize2D START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.GetClosestImageSize("picture", size2d); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return Size2D instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithSize2D END (OK)"); + } [Test] [Category("P1")] @@ -93,6 +402,7 @@ namespace Tizen.NUI.Devel.Tests [Property("SPEC", "Tizen.NUI.ImageLoading.GetClosestImageSize M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string")] [Property("AUTHOR", "guowei.wang@samsung.com")] [Obsolete] public void ImageLoadingGetClosestImageSize() @@ -104,6 +414,7 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should return Size2D instance."); testingTarget.Dispose(); + tlog.Debug(tag, $"ImageLoadingGetClosestImageSize END (OK)"); } @@ -124,6 +435,7 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should return Size2D instance."); testingTarget.Dispose(); + tlog.Debug(tag, $"ImageLoadingGetOriginalImageSize END (OK)"); } @@ -139,13 +451,139 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronously START"); - var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path); Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); testingTarget.Dispose(); + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronously END (OK)"); } + + [Test] + [Category("P1")] + [Description("ImageLoading DownloadImageSynchronously, with orientationCorrection.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.DownloadImageSynchronously5Type M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType, SamplingModeType, bool")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingDownloadImageSynchronouslyWithOrientationCorrection() + { + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithOrientationCorrection START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithOrientationCorrection END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading DownloadImageSynchronously, with samplingMode.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.DownloadImageSynchronously M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType, SamplingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingDownloadImageSynchronouslyWithSamplingMode() + { + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithSamplingMode START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path,size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithSamplingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading DownloadImageSynchronously, with fittingMode.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.DownloadImageSynchronously M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D, FittingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingDownloadImageSynchronouslyWithFittingMode() + { + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithFittingMode START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path,size2d, FittingModeType.ScaleToFill); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithFittingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading DownloadImageSynchronously, with Uri.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.DownloadImageSynchronously M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "Uri, Size2D, FittingModeType")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingDownloadImageSynchronouslyWithUri() + { + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithUri START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + Uri uri = new Uri("file://"); + var testingTarget = ImageLoading.DownloadImageSynchronously(uri, size2d, FittingModeType.ScaleToFill); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithUri END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageLoading DownloadImageSynchronously, with size.")] + [Property("SPEC", "Tizen.NUI.ImageLoading.DownloadImageSynchronously M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "string, Size2D")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageLoadingDownloadImageSynchronouslyWithSize() + { + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithSize START"); + + using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) + { + var testingTarget = ImageLoading.DownloadImageSynchronously(bmp_path, size2d); + Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); + Assert.IsInstanceOf(testingTarget, "Should return PixelBuffer instance."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"ImageLoadingDownloadImageSynchronouslyWithSize END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Accessibility/TSAccessibility.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Accessibility/TSAccessibility.cs index bdc06e8..ee26fd0 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Accessibility/TSAccessibility.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Accessibility/TSAccessibility.cs @@ -53,6 +53,31 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("Accessibility IsScreenReaderEnabled.")] + [Property("SPEC", "Tizen.NUI.Accessibility.IsScreenReaderEnabled A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void AccessibilityIsScreenReaderEnabled() + { + tlog.Debug(tag, $"AccessibilityIsScreenReaderEnabled START"); + + try + { + var result = Accessibility.Accessibility.IsScreenReaderEnabled; + tlog.Debug(tag, "IsScreenReaderEnabled : " + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"AccessibilityIsScreenReaderEnabled END (OK)"); + } + + [Test] + [Category("P1")] [Description("Accessibility Say.")] [Property("SPEC", "Tizen.NUI.Accessibility.Say M")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Animation/TSAnimation.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Animation/TSAnimation.cs index 0602f50..35b8f95 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Animation/TSAnimation.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Animation/TSAnimation.cs @@ -85,6 +85,108 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"AnimationDownCast END (OK)"); } + + [Test] + [Category("P1")] + [Description("Animation GetCurrentProgress")] + [Property("SPEC", "Tizen.NUI.Animation.GetCurrentProgress M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void AnimationGetCurrentProgress() + { + tlog.Debug(tag, $"AnimationGetCurrentProgress START"); + + var testingTarget = new Animation(2000); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of Animation class!"); + + try + { + testingTarget.SetCurrentProgress(0.3f); + + var result = testingTarget.GetCurrentProgress(); + tlog.Debug(tag, "Current progress : " + result); + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Catch exception: Failed!"); + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"AnimationGetCurrentProgress END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Animation GetSpeedFactor")] + [Property("SPEC", "Tizen.NUI.Animation.GetSpeedFactor M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void AnimationGetSpeedFactor() + { + tlog.Debug(tag, $"AnimationGetSpeedFactor START"); + + var testingTarget = new Animation(2000); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of Animation class!"); + + try + { + testingTarget.SetSpeedFactor(0.3f); + + var result = testingTarget.GetSpeedFactor(); + tlog.Debug(tag, "Speed factor : " + result); + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Pass("Catch exception: Failed!"); + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"AnimationGetSpeedFactor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Animation PlayRange")] + [Property("SPEC", "Tizen.NUI.Animation.PlayRange M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void AnimationPlayRange() + { + tlog.Debug(tag, $"AnimationGetPlayRange START"); + + var testingTarget = new Animation(2000); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of Animation class!"); + + using (Vector2 vec = new Vector2(0.0f, 1.0f)) + { + try + { + testingTarget.PlayRange = vec; + + var result = testingTarget.PlayRange; + Assert.AreEqual(0.0f, result.X, "Should be equal!"); + Assert.AreEqual(1.0f, result.Y, "Should be equal!"); + } + catch(Exception e) + { + Assert.Pass("Catch exception: " + e.Message.ToString()); + } + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"AnimationGetPlayRange END (OK)"); + } [Test] [Category("P2")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSNUIApplication.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSNUIApplication.cs index 63036ad..58aeb3d 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSNUIApplication.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSNUIApplication.cs @@ -36,6 +36,26 @@ namespace Tizen.NUI.Devel.Tests { base.OnLocaleChanged(e); } + + public void MyOnRegionFormatChanged(RegionFormatChangedEventArgs e) + { + base.OnRegionFormatChanged(e); + } + + public void MyOnLowMemory(LowMemoryEventArgs e) + { + base.OnLowMemory(e); + } + + public void MyOnLowBattery(LowBatteryEventArgs e) + { + base.OnLowBattery(e); + } + + public void MyExit() + { + base.Exit(); + } } [SetUp] @@ -425,5 +445,119 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"NUIApplicationOnTerminate END (OK)"); } + + [Test] + [Category("P1")] + [Description("NUIApplication OnRegionFormatChanged")] + [Property("SPEC", "Tizen.NUI.NUIApplication.OnRegionFormatChanged M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void NUIApplicationOnRegionFormatChanged() + { + tlog.Debug(tag, $"NUIApplicationOnRegionFormatChanged START"); + + var testingTarget = new MyNUIApplication(); + Assert.IsNotNull(testingTarget, "Should be not null."); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + try + { + testingTarget.MyOnRegionFormatChanged(new RegionFormatChangedEventArgs("Shanghai")); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"NUIApplicationOnRegionFormatChanged END (OK)"); + } + + [Test] + [Category("P1")] + [Description("NUIApplication OnLowMemory")] + [Property("SPEC", "Tizen.NUI.NUIApplication.OnLowMemory M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void NUIApplicationOnLowMemory() + { + tlog.Debug(tag, $"NUIApplicationOnLowMemory START"); + + var testingTarget = new MyNUIApplication(); + Assert.IsNotNull(testingTarget, "Should be not null."); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + try + { + LowMemoryStatus status = LowMemoryStatus.None; + testingTarget.MyOnLowMemory(new LowMemoryEventArgs (status)); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"NUIApplicationOnLowMemory END (OK)"); + } + + [Test] + [Category("P1")] + [Description("NUIApplication OnLowBattery")] + [Property("SPEC", "Tizen.NUI.NUIApplication.OnLowBattery M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void NUIApplicationOnLowBattery() + { + tlog.Debug(tag, $"NUIApplicationOnLowBattery START"); + + var testingTarget = new MyNUIApplication(); + Assert.IsNotNull(testingTarget, "Should be not null."); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + try + { + LowBatteryStatus status = LowBatteryStatus.None; + testingTarget.MyOnLowBattery(new LowBatteryEventArgs (status)); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"NUIApplicationOnLowBattery END (OK)"); + } + + [Test] + [Category("P1")] + [Description("NUIApplication Exit")] + [Property("SPEC", "Tizen.NUI.NUIApplication.Exit M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void NUIApplicationExit() + { + tlog.Debug(tag, $"NUIApplicationExit START"); + + var testingTarget = new MyNUIApplication(); + Assert.IsNotNull(testingTarget, "Should be not null."); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + try + { + testingTarget.MyExit(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"NUIApplicationExit END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSNUIFrameComponent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSNUIFrameComponent.cs index 978c4f6..53413af 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSNUIFrameComponent.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSNUIFrameComponent.cs @@ -51,6 +51,11 @@ namespace Tizen.NUI.Devel.Tests { base.OnDestroy(); } + + public void MyCreateWindowInfo() + { + base.CreateWindowInfo(); + } } [SetUp] @@ -203,6 +208,34 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("NUIFrameComponent CreateWindowInfo.")] + [Property("SPEC", "Tizen.NUI.NUIFrameComponent.CreateWindowInfo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void NUIFrameComponentCreateWindowInfo() + { + tlog.Debug(tag, $"NUIFrameComponentCreateWindowInfo START"); + + var testingTarget = new MyNUIFrameComponent(); + Assert.IsNotNull(testingTarget, "Should be not null."); + Assert.IsInstanceOf(testingTarget, "Should be an instance of NUIFrameComponent type."); + + try + { + testingTarget.MyCreateWindowInfo(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + tlog.Debug(tag, $"NUIFrameComponentCreateWindowInfo END (OK)"); + } + + [Test] + [Category("P1")] [Description("NUIFrameComponent OnPause.")] [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnPause M")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSWatchTime.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSWatchTime.cs index 6319be9..38311dc 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSWatchTime.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Application/TSWatchTime.cs @@ -15,6 +15,18 @@ namespace Tizen.NUI.Devel.Tests { private const string tag = "NUITEST"; + private bool IsWearable() + { + string value; + + var result = Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out value); + if (result && value.Equals("wearable")) + return true; + + return false; + } + + [SetUp] public void Init() { @@ -52,6 +64,41 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("WatchTime DaylightSavingTimeStatus.")] + [Property("SPEC", "Tizen.NUI.WatchTime.DaylightSavingTimeStatus C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WatchTimeDaylightSavingTimeStatus() + { + tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus START"); + + if (IsWearable()) + { + var testingTarget = new WatchTime(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of WatchTime type."); + + try + { + var result = testingTarget.DaylightSavingTimeStatus; + Assert.AreEqual(false, result, "Should be default value."); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Pass("Caught Exception: Passed!"); + } + testingTarget.Dispose(); + } + else + Assert.Pass("Not supported profile!"); + + tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus END (OK)"); + } + + [Test] + [Category("P1")] [Description("WatchTime GetWatchTimeFromPtr.")] [Property("SPEC", "Tizen.NUI.WatchTime.GetWatchTimeFromPtr M")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSAnimatedImageView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSAnimatedImageView.cs index 17b07b2..da7748a 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSAnimatedImageView.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSAnimatedImageView.cs @@ -223,6 +223,35 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("AnimatedImageView SetValues.")] + [Property("SPEC", "Tizen.NUI.AnimatedImageView.SetValues A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void AnimatedImageViewSetValues() + { + tlog.Debug(tag, $"AnimatedImageViewSetValues START"); + + var testingTarget = new AnimatedImageView(); + Assert.IsNotNull(testingTarget, "Can't create success object AnimatedImageView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of AnimatedImageView type."); + + try + { + testingTarget.SetValues(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"AnimatedImageViewSetValues END (OK)"); + } + + [Test] + [Category("P1")] [Description("AnimatedImageView StopBehavior.")] [Property("SPEC", "Tizen.NUI.AnimatedImageView.StopBehavior A")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSGLView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSGLView.cs new file mode 100755 index 0000000..7cd4c22 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSGLView.cs @@ -0,0 +1,146 @@ +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/GLView ")] + public class PublicGLViewTest + { + private const string tag = "NUITEST"; + + public void ViewResize(int w, int h) { } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("GLView constructor.")] + [Property("SPEC", "Tizen.NUI.GLView .GLView C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void GLViewConstructor() + { + tlog.Debug(tag, $"GLViewConstructor START"); + + try + { + var testingTarget = new GLView(GLView.ColorFormat.RGBA8888); + Assert.IsNotNull(testingTarget, "Can't create success object GLView "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GLView type."); + + testingTarget.Dispose(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"GLViewConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("GLView RenderingMode")] + [Property("SPEC", "Tizen.NUI.GLView.RenderingMode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void GLViewRenderingMode() + { + tlog.Debug(tag, $"GLViewRenderingMode START"); + + try + { + var testingTarget = new GLView(GLView.ColorFormat.RGBA8888); + Assert.IsNotNull(testingTarget, "Can't create success object GLView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GLView type."); + + testingTarget.RenderingMode = GLRenderingMode.OnDemand; + var result = testingTarget.RenderingMode; + Assert.AreEqual(GLRenderingMode.OnDemand, result, "Should be equal!"); + + testingTarget.Dispose(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"GLViewRenderingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("GLView RenderOnce")] + [Property("SPEC", "Tizen.NUI.GLView.RenderOnce M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void GLViewRenderOnce() + { + tlog.Debug(tag, $"GLViewRenderOnce START"); + + var testingTarget = new GLView(GLView.ColorFormat.RGBA8888); + Assert.IsNotNull(testingTarget, "Can't create success object GLView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GLView type."); + + try + { + testingTarget.RenderOnce(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"GLViewRenderOnce END (OK)"); + } + + [Test] + [Category("P1")] + [Description("GLView SetResizeCallback")] + [Property("SPEC", "Tizen.NUI.GLView.SetResizeCallback M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void GLViewSetResizeCallback() + { + tlog.Debug(tag, $"GLViewSetResizeCallback START"); + + var testingTarget = new GLView(GLView.ColorFormat.RGBA8888); + Assert.IsNotNull(testingTarget, "Can't create success object GLView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of GLView type."); + + try + { + testingTarget.SetResizeCallback(ViewResize); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"GLViewSetResizeCallback END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSImageView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSImageView.cs index 873274a..74cf42c 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSImageView.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSImageView.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; namespace Tizen.NUI.Devel.Tests { + using static Tizen.NUI.BaseComponents.ImageView; using tlog = Tizen.Log; [TestFixture] @@ -227,7 +228,36 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P2")] - [Description("ImageView SetImage. Url is null.")] + [Description("ImageView MaskingMode.")] + [Property("SPEC", "Tizen.NUI.ImageView.MaskingMode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageViewMaskingMode() + { + tlog.Debug(tag, $"ImageViewMaskingMode START"); + + ViewStyle style = new ViewStyle() + { + Color = Color.Cyan, + }; + + var testingTarget = new ImageView(style); + Assert.IsNotNull(testingTarget, "Can't create success object ImageView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ImageView type."); + + testingTarget.MaskingMode = MaskingModeType.MaskingOnLoading; + var result = testingTarget.MaskingMode; + Assert.AreEqual(MaskingModeType.MaskingOnLoading, result, "Should be equal!"); + + testingTarget.Dispose(); + tlog.Debug(tag, $"ImageViewIsResourceReady END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageView SetImage.")] [Property("SPEC", "Tizen.NUI.ImageView.SetImage M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -248,12 +278,47 @@ namespace Tizen.NUI.Devel.Tests try { + testingTarget.SetImage(url); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ImageViewSetImage END (OK)"); + } + + [Test] + [Category("P2")] + [Description("ImageView SetImage. Url is null.")] + [Property("SPEC", "Tizen.NUI.ImageView.SetImage M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ImageViewSetImageWithNull() + { + tlog.Debug(tag, $"ImageViewSetImageWithNull START"); + + ViewStyle style = new ViewStyle() + { + Color = Color.Cyan, + }; + + var testingTarget = new ImageView(style); + Assert.IsNotNull(testingTarget, "Can't create success object ImageView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ImageView type."); + + try + { testingTarget.SetImage(null); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, $"ImageViewSetImage END (OK)"); + tlog.Debug(tag, $"ImageViewSetImageWithNull END (OK)"); Assert.Pass("Caught ArgumentNullException: Passed!"); } } @@ -288,6 +353,64 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"ImageViewIsResourceReady END (OK)"); } + [Test] + [Category("P1")] + [Description("ImageView ApplyCornerRadius.")] + [Property("SPEC", "Tizen.NUI.ImageView.ApplyCornerRadius M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ImageViewApplyCornerRadius() + { + tlog.Debug(tag, $"ImageViewApplyCornerRadius START"); + + var testingTarget = new ImageView(); + Assert.IsNotNull(testingTarget, "Can't create success object ImageView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ImageView type."); + + try + { + testingTarget.ApplyCornerRadius(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ImageViewApplyCornerRadius END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ImageView ApplyBorderline.")] + [Property("SPEC", "Tizen.NUI.ImageView.ApplyBorderline M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ImageViewApplyBorderline() + { + tlog.Debug(tag, $"ImageViewApplyBorderline START"); + + var testingTarget = new ImageView(); + Assert.IsNotNull(testingTarget, "Can't create success object ImageView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ImageView type."); + + try + { + testingTarget.ApplyBorderline(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ImageViewApplyBorderline END (OK)"); + } + [Test] [Category("P1")] [Description("ImageView AlphaMaskURL.")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextEditor.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextEditor.cs index 0915bbb..bba0766 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextEditor.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextEditor.cs @@ -341,6 +341,45 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("TextEditor SetInputFontStyle.")] + [Property("SPEC", "Tizen.NUI.TextEditor.SetInputFontStyle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "bowon.ryu@samsung.com")] + public void TextEditorSetInputFontStyle() + { + tlog.Debug(tag, $"TextEditorSetInputFontStyle START"); + + var testingTarget = new TextEditor(true); + Assert.IsNotNull(testingTarget, "Can't create success object TextEditor"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TextEditor type."); + + var setFontStyle = new Tizen.NUI.Text.FontStyle() + { + Width = FontWidthType.Expanded, + Weight = FontWeightType.Bold, + Slant = FontSlantType.Italic, + }; + + try + { + testingTarget.SetInputFontStyle(setFontStyle); + + var fontStyle = testingTarget.GetInputFontStyle(); + Assert.AreEqual(FontWidthType.Expanded, fontStyle.Width, "Sholud be equal!"); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"TextEditorSetInputFontStyle END (OK)"); + } + + [Test] + [Category("P1")] [Description("TextEditor GetShadow.")] [Property("SPEC", "Tizen.NUI.TextEditor.GetShadow M")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextEditorEvent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextEditorEvent.cs index eca92c8..af4a6f6 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextEditorEvent.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextEditorEvent.cs @@ -55,6 +55,9 @@ namespace Tizen.NUI.Devel.Tests testingTarget.SelectionStarted += OnSelectionStarted; testingTarget.SelectionStarted -= OnSelectionStarted; + + testingTarget.InputFiltered += OnInputFiltered; + testingTarget.InputFiltered -= OnInputFiltered; testingTarget.Dispose(); tlog.Debug(tag, $"TextEditorEventEvents END (OK)"); @@ -120,5 +123,9 @@ namespace Tizen.NUI.Devel.Tests { selectionStartedFlag = true; } + + private void OnInputFiltered(object sender, InputFilteredEventArgs e) + { + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextLabelEvent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextLabelEvent.cs index 420c1f3..fd20b34 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextLabelEvent.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSTextLabelEvent.cs @@ -15,7 +15,9 @@ namespace Tizen.NUI.Devel.Tests public class PublicTextLabelEventTest { private const string tag = "NUITEST"; - + + private void MyTextFitChanged(object sender, EventArgs e) {} + [SetUp] public void Init() { @@ -56,5 +58,29 @@ namespace Tizen.NUI.Devel.Tests var label = sender as TextLabel; e.Href = Marshal.PtrToStringAnsi(label.SwigCPtr.Handle); } + + + [Test] + [Category("P1")] + [Description("TextLabelEvent.TextFitChanged.")] + [Property("SPEC", "Tizen.NUI.TextLabelEvent.TextFitChanged A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void TextLabelEventTextFitChanged() + { + tlog.Debug(tag, $"TextLabelEventTextFitChanged START"); + + TextLabel label = new TextLabel() + { + Text = "hypertext", + }; + + label.TextFitChanged += MyTextFitChanged; + label.TextFitChanged -= MyTextFitChanged; + + label.Dispose(); + tlog.Debug(tag, $"TextLabelEventTextFitChanged END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSVideoView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSVideoView.cs new file mode 100755 index 0000000..8572f5f --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSVideoView.cs @@ -0,0 +1,242 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/BaseComponents/VideoView ")] + public class PublicBaseComponentsVideoViewTest + { + 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("VideoView constructor.")] + [Property("SPEC", "Tizen.NUI.VideoView .VideoView C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void publicBaseComponentsVideoViewConstructor() + { + tlog.Debug(tag, $"publicBaseComponentsVideoViewConstructor START"); + + try + { + var testingTarget = new VideoView(); + Assert.IsNotNull(testingTarget, "Can't create success object VideoView "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of VideoView type."); + + testingTarget.Dispose(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"publicBaseComponentsVideoViewConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VideoView Finished.")] + [Property("SPEC", "Tizen.NUI.VideoView .Finished M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void publicBaseComponentsVideoViewFinished() + { + tlog.Debug(tag, $"publicBaseComponentsVideoViewFinished START"); + + try + { + var testingTarget = new VideoView(); + Assert.IsNotNull(testingTarget, "Can't create success object VideoView "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of VideoView type."); + + testingTarget.Finished += OnFinished; + testingTarget.Finished -= OnFinished; + + testingTarget.Dispose(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"publicBaseComponentsVideoViewFinished END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VideoView FinishedSignal.")] + [Property("SPEC", "Tizen.NUI.VideoView .FinishedSignal M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void publicBaseComponentsVideoViewFinishedSignal() + { + tlog.Debug(tag, $"publicBaseComponentsVideoViewFinishedSignal START"); + try + { + var testingTarget = new VideoView(); + Assert.IsNotNull(testingTarget, "Can't create success object VideoView "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of VideoView type."); + + testingTarget.FinishedSignal(); + + testingTarget.Dispose(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"publicBaseComponentsVideoViewFinishedSignal END (OK)"); + } + + + [Test] + [Category("P1")] + [Description("VideoView Underlay.")] + [Property("SPEC", "Tizen.NUI.VideoView .Underlay A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void publicBaseComponentsVideoViewUnderlay() + { + tlog.Debug(tag, $"publicBaseComponentsVideoViewUnderlay START"); + + try + { + var testingTarget = new VideoView(); + Assert.IsNotNull(testingTarget, "Can't create success object VideoView "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of VideoView type."); + + testingTarget.Underlay = true; + var result = testingTarget.Underlay; + Assert.IsTrue(testingTarget.Underlay); + + testingTarget.Dispose(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"publicBaseComponentsVideoViewUnderlay END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VideoView Muted.")] + [Property("SPEC", "Tizen.NUI.VideoView .Muted A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void publicBaseComponentsVideoViewMuted() + { + tlog.Debug(tag, $"publicBaseComponentsVideoViewMuted START"); + + try + { + var testingTarget = new VideoView(); + Assert.IsNotNull(testingTarget, "Can't create success object VideoView "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of VideoView type."); + + testingTarget.Muted = true; + tlog.Debug(tag, "Muted : " + testingTarget.Muted); + + testingTarget.Dispose(); + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Catch exception: Failed!"); + } + + tlog.Debug(tag, $"publicBaseComponentsVideoViewMuted END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VideoView Looping.")] + [Property("SPEC", "Tizen.NUI.VideoView .Looping M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void publicBaseComponentsVideoViewLooping() + { + tlog.Debug(tag, $"publicBaseComponentsVideoViewLooping START"); + + try + { + var testingTarget = new VideoView(); + Assert.IsNotNull(testingTarget, "Can't create success object VideoView "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of VideoView type."); + + testingTarget.Looping = true; + tlog.Debug(tag, "Looping : " + testingTarget.Looping); + + testingTarget.Dispose(); + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Catch exception: Failed!"); + } + + tlog.Debug(tag, $"publicBaseComponentsVideoViewLooping END (OK)"); + } + + [Test] + [Category("P1")] + [Description("VideoView NativeHandle.")] + [Property("SPEC", "Tizen.NUI.VideoView .NativeHandle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void publicBaseComponentsVideoViewNativeHandle() + { + tlog.Debug(tag, $"publicBaseComponentsVideoViewNativeHandle START"); + + try + { + var testingTarget = new VideoView(); + Assert.IsNotNull(testingTarget, "Can't create success object VideoView "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of VideoView type."); + + var result = testingTarget.NativeHandle; + Assert.IsInstanceOf(result, "Should be an instance of SafeHandle"); + + testingTarget.Dispose(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"publicBaseComponentsVideoViewNativeHandle END (OK)"); + } + + public void OnFinished(object sender, VideoView.FinishedEventArgs e) { } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSView.cs index 0099058..1f265df 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSView.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSView.cs @@ -277,5 +277,31 @@ namespace Tizen.NUI.Devel.Tests view.Dispose(); tlog.Debug(tag, $"ViewFocusableChildren END (OK)"); } + + [Test] + [Category("P1")] + [Description("View SetDefaultGrabTouchAfterLeave.")] + [Property("SPEC", "Tizen.NUI.View.SetDefaultGrabTouchAfterLeave A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("COVPARAM", "")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void BaseComponentsViewSetDefaultGrabTouchAfterLeave() + { + tlog.Debug(tag, $"BaseComponentsViewSetDefaultGrabTouchAfterLeave START"); + + try + { + View.SetDefaultGrabTouchAfterLeave(true); + View.SetDefaultAllowOnlyOwnTouch(true); + } + catch (Exception e) + { + tlog.Info(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"BaseComponentsViewSetDefaultGrabTouchAfterLeave END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSViewEvent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSViewEvent.cs index f17dd76..3b3651a 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSViewEvent.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSViewEvent.cs @@ -89,5 +89,286 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"ViewEventKeyEvent END (OK)"); } + + [Test] + [Category("P1")] + [Description("ViewEvent InterceptTouchSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.InterceptTouchSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventInterceptTouchSignal() + { + tlog.Debug(tag, $"ViewEventInterceptTouchSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.InterceptTouchSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventInterceptTouchSignal END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewEvent TouchSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.TouchSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventTouchSignal() + { + tlog.Debug(tag, $"ViewEventTouchSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.TouchSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventTouchSignal END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewEvent HoveredSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.HoveredSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventHoveredSignal() + { + tlog.Debug(tag, $"ViewEventHoveredSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.HoveredSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventHoveredSignal END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewEvent WheelEventSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.WheelEventSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventWheelEventSignal() + { + tlog.Debug(tag, $"ViewEventWheelEventSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.WheelEventSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventWheelEventSignal END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewEvent OffWindowSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.OffWindowSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventOffWindowSignal() + { + tlog.Debug(tag, $"ViewEventOffWindowSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.OffWindowSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventOffWindowSignal END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewEvent OnRelayoutSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.OnRelayoutSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventOnRelayoutSignal() + { + tlog.Debug(tag, $"ViewEventOnRelayoutSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.OnRelayoutSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventOnRelayoutSignal END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewEvent ResourcesLoadedSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.ResourcesLoadedSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventResourcesLoadedSignal() + { + tlog.Debug(tag, $"ViewEventResourcesLoadedSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.ResourcesLoadedSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventResourcesLoadedSignal END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewEvent KeyEventSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.KeyEventSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventKeyEventSignal() + { + tlog.Debug(tag, $"ViewEventKeyEventSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.KeyEventSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventKeyEventSignal END (OK)"); + } + + + [Test] + [Category("P1")] + [Description("ViewEvent KeyInputFocusGainedSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.KeyInputFocusGainedSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventKeyInputFocusGainedSignal() + { + tlog.Debug(tag, $"ViewEventKeyInputFocusGainedSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.KeyInputFocusGainedSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventKeyInputFocusGainedSignal END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ViewEvent KeyInputFocusLostSignal.")] + [Property("SPEC", "Tizen.NUI.ViewEvent.KeyInputFocusLostSignal A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewEventKeyKeyInputFocusLostSignal() + { + tlog.Debug(tag, $"ViewEventKeyKeyInputFocusLostSignal START"); + + var testingTarget = new View(); + Assert.IsNotNull(testingTarget, "Can't create success object View"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of View type."); + + try + { + testingTarget.KeyInputFocusLostSignal(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"ViewEventKeyKeyInputFocusLostSignal END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSViewPublicMethods.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSViewPublicMethods.cs index 712b479..6126671 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSViewPublicMethods.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/BaseComponents/TSViewPublicMethods.cs @@ -333,6 +333,43 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"ViewScaleBy END (OK)"); } + [Test] + [Category("P1")] + [Description("View.ObjectDump")] + [Property("SPEC", "Tizen.NUI.View.ObjectDump M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ViewObjectDump() + { + tlog.Debug(tag, $"ViewObjectDump 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 + { + view.ObjectDump(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + NUIApplication.GetDefaultWindow().Remove(view); + view.Dispose(); + tlog.Debug(tag, $"ViewObjectDump END (OK)"); + } + [Test] [Category("P1")] [Description("View.FindDescendantByID")] @@ -369,5 +406,43 @@ namespace Tizen.NUI.Devel.Tests view.Dispose(); tlog.Debug(tag, $"ViewFindDescendantByID END (OK)"); } + + [Test] + [Category("P1")] + [Description("View.FindChildByID")] + [Property("SPEC", "Tizen.NUI.View.FindChildByID M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void ViewFindChildByID() + { + tlog.Debug(tag, $"ViewFindChildByID START"); + + var view = new View() + { + Size = new Size2D(200, 200), + }; + NUIApplication.GetDefaultWindow().Add(view); + + var child = new View() + { + Size = new Size2D(100, 100), + PositionUsesPivotPoint = true, + ParentOrigin = ParentOrigin.CenterRight, + PivotPoint = PivotPoint.CenterRight, + BackgroundColor = Color.Azure, + Focusable = true, + }; + + view.Add(child); + + var result = view.FindChildByID(child.ID); + Assert.IsNotNull(result, "should be not null"); + + NUIApplication.GetDefaultWindow().Remove(view); + view.Dispose(); + tlog.Debug(tag, $"ViewFindChildByID END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSColor.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSColor.cs index ce5ffe1..49adff4 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSColor.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSColor.cs @@ -1062,7 +1062,8 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf(testingTarget, "Should return Color instance."); - Assert.AreEqual(0, testingTarget.GetHashCode()); + var result = testingTarget.GetHashCode(); + tlog.Debug(tag, "GetHashCode : " + result); testingTarget.Dispose(); tlog.Debug(tag, $"ColorGetHashCode END (OK)"); diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSLayer.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSLayer.cs index 333cd5c..15a6935 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSLayer.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSLayer.cs @@ -389,5 +389,38 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); tlog.Debug(tag, $"LayerBehavior END (OK)"); } + + [Test] + [Category("P1")] + [Description("Layer AddViewToLayerList.")] + [Property("SPEC", "Tizen.NUI.Layer.AddViewToLayerList M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void LayerAddViewToLayerList() + { + tlog.Debug(tag, $"LayerAddViewToLayerList START"); + + var testingTarget = new Layer(); + Assert.IsNotNull(testingTarget, "null handle"); + Assert.IsInstanceOf(testingTarget, "Should return Layer instance."); + + using (View view = new View()) + { + try + { + testingTarget.AddViewToLayerList(view); + testingTarget.RemoveViewFromLayerList(view); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"LayerAddViewToLayerList END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPosition.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPosition.cs index 4506017..4b56d96 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPosition.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPosition.cs @@ -660,6 +660,108 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"PositionPivotPointBottomRight END (OK)"); } + [Test] + [Category("P1")] + [Description("Position XAxis.")] + [Property("SPEC", "Tizen.NUI.Position.XAxis A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PositionXAxis() + { + tlog.Debug(tag, $"PositionXAxis START"); + + var result = Position.XAxis; + tlog.Debug(tag, "XAxis : " + result); + + tlog.Debug(tag, $"PositionXAxis END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Position YAxis.")] + [Property("SPEC", "Tizen.NUI.Position.YAxis A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PositionYAxis() + { + tlog.Debug(tag, $"PositionYAxis START"); + + var result = Position.YAxis; + tlog.Debug(tag, "YAxis : " + result); + + tlog.Debug(tag, $"PositionYAxis END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Position ZAxis.")] + [Property("SPEC", "Tizen.NUI.Position.ZAxis A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PositionZAxis() + { + tlog.Debug(tag, $"PositionZAxis START"); + + var result = Position.ZAxis; + tlog.Debug(tag, "ZAxis : " + result); + + tlog.Debug(tag, $"PositionZAxis END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Position NegativeXAxis.")] + [Property("SPEC", "Tizen.NUI.Position.NegativeXAxis A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PositionNegativeXAxis() + { + tlog.Debug(tag, $"PositionNegativeXAxis START"); + + var result = Position.NegativeXAxis; + tlog.Debug(tag, "NegativeXAxis : " + result); + + tlog.Debug(tag, $"PositionNegativeXAxis END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Position NegativeYAxis.")] + [Property("SPEC", "Tizen.NUI.Position.NegativeYAxis A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PositionNegativeYAxis() + { + tlog.Debug(tag, $"PositionNegativeYAxis START"); + + var result = Position.NegativeYAxis; + tlog.Debug(tag, "NegativeYAxis : " + result); + + tlog.Debug(tag, $"PositionNegativeYAxis END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Position NegativeZAxis.")] + [Property("SPEC", "Tizen.NUI.Position.NegativeZAxis A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PositionNegativeZAxis() + { + tlog.Debug(tag, $"PositionNegativeZAxis START"); + + var result = Position.NegativeZAxis; + tlog.Debug(tag, "NegativeZAxis : " + result); + + tlog.Debug(tag, $"PositionNegativeZAxis END (OK)"); + } + [Test] [Category("P1")] [Description("Position this[uint index].")] @@ -1019,6 +1121,29 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); tlog.Debug(tag, $"PositionImplicitConvertPositionToVector3 END (OK)"); } + + [Test] + [Category("P1")] + [Description("Position implicit. Convert Position to Position2D .")] + [Property("SPEC", "Tizen.NUI.Position.implicit M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PositionImplicitConvertPositionToPosition2D() + { + tlog.Debug(tag, $"PositionImplicitConvertPositionToPosition2D START"); + + var testingTarget = new Position(10.0f, 20.0f, 30.0f); + Assert.IsNotNull(testingTarget, "null handle"); + Assert.IsInstanceOf(testingTarget, "Should return Position instance."); + + Position2D position2d = testingTarget; + Assert.AreEqual(10.0f, position2d.X, "Should be equal."); + Assert.AreEqual(20.0f, position2d.Y, "Should be equal."); + + testingTarget.Dispose(); + tlog.Debug(tag, $"PositionImplicitConvertPositionToPosition2D END (OK)"); + } [Test] [Category("P1")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPropertyMap.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPropertyMap.cs index 4807c65..eadcd54 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPropertyMap.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPropertyMap.cs @@ -329,6 +329,164 @@ namespace Tizen.NUI.Devel.Tests } [Test] + [Category("P2")] + [Description("PropertyMap Remove. With null PropertyKey ")] + [Property("SPEC", "Tizen.NUI.PropertyMap.Remove M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR MCST")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Property("COVPARAM", "KeyValue")] + public void PropertyMapRemoveNullPropertyKey() + { + tlog.Debug(tag, $"PropertyMapRemoveNullPropertyKey START"); + + var testingTarget = new PropertyMap(); + Assert.IsNotNull(testingTarget, "should not be null."); + Assert.IsInstanceOf(testingTarget, "should be an instance of PropertyMap class!"); + + try + { + PropertyKey key = null; + var result = testingTarget.Remove(key); + } + catch (ArgumentNullException) + { + testingTarget.Dispose(); + tlog.Debug(tag, $"PropertyMapRemoveNullPropertyKey END (OK)"); + Assert.Pass("Caught ArgumentNullException : Passed!"); + } + } + + [Test] + [Category("P2")] + [Description("PropertyMap Remove. With int PropertyKey ")] + [Property("SPEC", "Tizen.NUI.PropertyMap.Remove M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR MCST")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Property("COVPARAM", "KeyValue")] + public void PropertyMapRemoveIntPropertyKey() + { + tlog.Debug(tag, $"PropertyMapRemoveIntPropertyKey START"); + + var testingTarget = new PropertyMap(); + Assert.IsNotNull(testingTarget, "should not be null."); + Assert.IsInstanceOf(testingTarget, "should be an instance of PropertyMap class!"); + + testingTarget.Add(1, new PropertyValue(100)); + + var result = testingTarget.Remove(new PropertyKey(1)); + tlog.Debug(tag, "Remove result : " + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"PropertyMapRemoveIntPropertyKey END (OK)"); + } + + [Test] + [Category("P2")] + [Description("PropertyMap Remove. With String PropertyKey ")] + [Property("SPEC", "Tizen.NUI.PropertyMap.Remove M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR MCST")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Property("COVPARAM", "KeyValue")] + public void PropertyMapRemoveStringPropertyKey() + { + tlog.Debug(tag, $"PropertyMapRemoveStringPropertyKey START"); + + var testingTarget = new PropertyMap(); + Assert.IsNotNull(testingTarget, "should not be null."); + Assert.IsInstanceOf(testingTarget, "should be an instance of PropertyMap class!"); + + testingTarget.Add("nui", new PropertyValue("dali")); + + var result = testingTarget.Remove(new PropertyKey("nui")); + tlog.Debug(tag, "Remove result : " + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"PropertyMapRemoveStringPropertyKey END (OK)"); + } + + [Test] + [Category("P2")] + [Description("PropertyMap Contains. With null PropertyKey ")] + [Property("SPEC", "Tizen.NUI.PropertyMap.Contains M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR MCST")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Property("COVPARAM", "KeyValue")] + public void PropertyMapContainsNullPropertyKey() + { + tlog.Debug(tag, $"PropertyMapContainsNullPropertyKey START"); + + var testingTarget = new PropertyMap(); + Assert.IsNotNull(testingTarget, "should not be null."); + Assert.IsInstanceOf(testingTarget, "should be an instance of PropertyMap class!"); + + try + { + PropertyKey key = null; + var result3 = testingTarget.Contains(key); + } + catch (ArgumentNullException) + { + testingTarget.Dispose(); + tlog.Debug(tag, $"PropertyMapContainsNullPropertyKey END (OK)"); + Assert.Pass("Caught ArgumentNullException : Passed!"); + } + } + + [Test] + [Category("P2")] + [Description("PropertyMap Contains. With Int PropertyKey ")] + [Property("SPEC", "Tizen.NUI.PropertyMap.Contains M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR MCST")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Property("COVPARAM", "KeyValue")] + public void PropertyMapContainsIntPropertyKey() + { + tlog.Debug(tag, $"PropertyMapContainsIntPropertyKey START"); + + var testingTarget = new PropertyMap(); + Assert.IsNotNull(testingTarget, "should not be null."); + Assert.IsInstanceOf(testingTarget, "should be an instance of PropertyMap class!"); + + testingTarget.Add(1, new PropertyValue(100)); + + var result = testingTarget.Contains(new PropertyKey(1)); + tlog.Debug(tag, "Contains : " + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"PropertyMapContainsIntPropertyKey END (OK)"); + } + + [Test] + [Category("P2")] + [Description("PropertyMap Contains. With String PropertyKey ")] + [Property("SPEC", "Tizen.NUI.PropertyMap.Contains M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR MCST")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Property("COVPARAM", "KeyValue")] + public void PropertyMapContainsStringPropertyKey() + { + tlog.Debug(tag, $"PropertyMapContainsStringPropertyKey START"); + + var testingTarget = new PropertyMap(); + Assert.IsNotNull(testingTarget, "should not be null."); + Assert.IsInstanceOf(testingTarget, "should be an instance of PropertyMap class!"); + + testingTarget.Add("nui", new PropertyValue("dali")); + + var result = testingTarget.Contains(new PropertyKey("nui")); + tlog.Debug(tag, "Contains : " + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"PropertyMapContainsStringPropertyKey END (OK)"); + } + + [Test] [Category("P1")] [Description("PropertyMap GetValue")] [Property("SPEC", "Tizen.NUI.PropertyMap.GetValue M")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPropertyNotification.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPropertyNotification.cs index 86ea525..2b1030f 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPropertyNotification.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSPropertyNotification.cs @@ -337,6 +337,12 @@ namespace Tizen.NUI.Devel.Tests { flag = true; }; + + testingTarget.Notified -= (obj, e) => + { + flag = false; + }; + view.Position = new Position(300.0f, 0.0f, 0.0f); await Task.Delay(200); diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSRelativeVector2.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSRelativeVector2.cs index a5920d3..653a454 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSRelativeVector2.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSRelativeVector2.cs @@ -70,6 +70,37 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"RelativeVector2ConstructorWithFloat END (OK)"); } + [Test] + [Category("P1")] + [Description("RelativeVector2 XY. With Float.")] + [Property("SPEC", "Tizen.NUI.RelativeVector2.XY. With Float. C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "Single, Single")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void RelativeVector2XYWithFloat() + { + tlog.Debug(tag, $"RelativeVector2XYWithFloat START"); + + var testingTarget = new RelativeVector2(0.5f, 0.6f); + Assert.IsNotNull(testingTarget, "Can't create success object RelativeVector2"); + Assert.IsInstanceOf(testingTarget, "Should return Vector2 instance."); + + try + { + testingTarget.X = 0.1f; + testingTarget.Y = 0.9f; + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"RelativeVector2XYWithFloat END (OK)"); + } + [Test] [Category("P1")] [Description("RelativeVector2 constructor. With RelativeVector3.")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSRelativeVector3.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSRelativeVector3.cs index f9450ad..2de0209 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSRelativeVector3.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSRelativeVector3.cs @@ -71,6 +71,38 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); tlog.Debug(tag, $"RelativeVector3ConstructorWithFloat END (OK)"); } + + [Test] + [Category("P1")] + [Description("RelativeVector3 XYZ With Float.")] + [Property("SPEC", "Tizen.NUI.RelativeVector3.XYZ With Float M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "Single, Single, Single")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void RelativeVector3XYZWithFloat() + { + tlog.Debug(tag, $"RelativeVector3XYZWithFloat START"); + + var testingTarget = new RelativeVector3(0.5f, 0.6f, 0.7f); + Assert.IsNotNull(testingTarget, "Can't create success object RelativeVector3"); + Assert.IsInstanceOf(testingTarget, "Should return Vector3 instance."); + + try + { + testingTarget.X = 0.1f; + testingTarget.Y = 0.5f; + testingTarget.Z = 0.9f; + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"RelativeVector3XYZWithFloat END (OK)"); + } [Test] [Category("P1")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSStyleManager.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSStyleManager.cs index 0098893..98f0242 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSStyleManager.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSStyleManager.cs @@ -19,7 +19,7 @@ namespace Tizen.NUI.Devel.Tests private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Test_Style_Manager.json"; [Obsolete] - private void StyleManager_StyleChanged(object sender, StyleManager.StyleChangedEventArgs e) + private void OnStyleChanged(object sender, StyleManager.StyleChangedEventArgs e) { flag = true; } @@ -171,21 +171,60 @@ namespace Tizen.NUI.Devel.Tests [Property("CRITERIA", "EVL")] [Property("AUTHOR", "guowei.wang@samsung.com")] [Obsolete] - public void StyleManagerStyleChanged() + public async Task StyleManagerStyleChanged() { tlog.Debug(tag, $"StyleManagerStyleChanged START"); + flag = false; var testingTarget = StyleManager.Get(); Assert.IsNotNull(testingTarget, "The value of Get return should not be null"); Assert.IsInstanceOf(testingTarget, "Should be an instance of StyleManager type."); + + try + { + testingTarget.StyleChanged += OnStyleChanged; + testingTarget.StyleChanged -= OnStyleChanged; + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } - testingTarget.StyleChanged += StyleManager_StyleChanged; - testingTarget.ApplyTheme(path); - - Assert.IsTrue(flag, "StyleChanged is not be called"); + testingTarget.ApplyTheme(path); + await Task.Delay(200); + tlog.Error(tag, "StyleChanged : " + flag); testingTarget.Dispose(); tlog.Debug(tag, $"StyleManagerStyleChanged END (OK)"); } + + [Test] + [Category("P1")] + [Description("StyleManager ApplyDefaultTheme.")] + [Property("SPEC", "Tizen.NUI.StyleManager.ApplyDefaultTheme E")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "EVL")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void StyleManagerApplyDefaultTheme() + { + tlog.Debug(tag, $"StyleManagerApplyDefaultTheme START"); + + var testingTarget = StyleManager.Get(); + Assert.IsNotNull(testingTarget, "The value of Get return should not be null"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of StyleManager type."); + + try + { + testingTarget.ApplyDefaultTheme(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"StyleManagerApplyDefaultTheme END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSVector2.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSVector2.cs index 71b4bc3..618bce7 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSVector2.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSVector2.cs @@ -72,6 +72,33 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("Vector2 X/Y.")] + [Property("SPEC", "Tizen.NUI.Vector2.X M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void Vector2X() + { + tlog.Debug(tag, $"Vector2X START"); + + var testingTarget = new Vector2(100.0f, 200.0f); + Assert.IsNotNull(testingTarget, "Can't create success object Vector2"); + Assert.IsInstanceOf(testingTarget, "Should return Vector2 instance."); + + testingTarget.X = 200.0f; + Assert.AreEqual(200.0f, testingTarget.X, "Should be equal!"); + + testingTarget.Y = 100.0f; + Assert.AreEqual(100.0f, testingTarget.Y, "Should be equal!"); + + testingTarget.Dispose(); + tlog.Debug(tag, $"Vector2X END (OK)"); + } + + [Test] + [Category("P1")] [Description("Vector2 constructor. With array.")] [Property("SPEC", "Tizen.NUI.Vector2.Vector2 C")] [Property("SPEC_URL", "-")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/DragAndDrop/TSDragAndDrop.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/DragAndDrop/TSDragAndDrop.cs new file mode 100755 index 0000000..d566ae0 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/DragAndDrop/TSDragAndDrop.cs @@ -0,0 +1,49 @@ +using NUnit.Framework; +using NUnit.Framework.TUnit; +using System; +using Tizen.NUI; +using Tizen.NUI.BaseComponents; + + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/DragAndDrop/DragAndDrop")] + class PublicDragAndDropTest + { + 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("DragAndDrop Instance.")] + [Property("SPEC", "Tizen.NUI.DragAndDrop.Instance A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void DragAndDropInstance() + { + tlog.Debug(tag, $"DragAndDropInstance START"); + + var testingTarget= DragAndDrop.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object DragAndDrop "); + Assert.IsInstanceOf(testingTarget, "Should return DragAndDrop instance."); + + testingTarget.Dispose(); + tlog.Debug(tag, $"DragAndDropInstance END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/DragAndDrop/TSDragEvent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/DragAndDrop/TSDragEvent.cs new file mode 100755 index 0000000..725634b --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/DragAndDrop/TSDragEvent.cs @@ -0,0 +1,106 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Binding; +using Tizen.NUI.BaseComponents; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/BaseComponents/TextEvent")] + public class PublicDragEventTest + { + 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("DragData MimeType.")] + [Property("SPEC", "Tizen.NUI.DragData.MimeType A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void DragDataMimeType() + { + tlog.Debug(tag, $"DragDataMimeType START"); + + var testingTarget = new Tizen.NUI.DragData(); + Assert.IsNotNull(testingTarget, "Can't create success object DragData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of testingTarget type."); + + testingTarget.MimeType = "st"; + Assert.AreEqual("st", testingTarget.MimeType, "Should be equal!"); + + tlog.Debug(tag, $"DragDataMimeType END (OK)"); + } + + + [Test] + [Category("P1")] + [Description("DragData Data.")] + [Property("SPEC", "Tizen.NUI.DragData.Data A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void DragDataData() + { + tlog.Debug(tag, $"DragDataData START"); + + var testingTarget = new Tizen.NUI.DragData(); + Assert.IsNotNull(testingTarget, "Can't create success object DragData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of testingTarget type."); + + testingTarget.Data ="st"; + testingTarget.MimeType=null; + + tlog.Debug(tag, $"DragDataData END (OK)"); + } + + [Test] + [Category("P1")] + [Description("DragEvent DragType.")] + [Property("SPEC", "Tizen.NUI.DragEvent.DragType A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void TextDragEventDragData() + { + tlog.Debug(tag, $"DragEventTest DragEvent START"); + + var testingTarget = new Tizen.NUI.DragEvent(); + Assert.IsNotNull(testingTarget, "Can't create success object DragEvent"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of testingTarget type."); + + testingTarget.Position = null; + testingTarget.MimeType = null; + testingTarget.Data = null; + + testingTarget.DragType = DragType.Drop; + testingTarget.MimeType ="st"; + testingTarget.Data ="st"; + + testingTarget.Position = new Position(); + testingTarget.MimeType = "str3"; + testingTarget.Data = "str4"; + + testingTarget.DragType = DragType.Enter; + testingTarget.DragType = DragType.Leave; + testingTarget.DragType = DragType.Move; + + tlog.Debug(tag, $"TextDragEventDragData MimeType END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/EXaml/TSEXamlExtensions.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/EXaml/TSEXamlExtensions.cs index 0eb3636..97ab3b1 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/EXaml/TSEXamlExtensions.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/EXaml/TSEXamlExtensions.cs @@ -200,7 +200,6 @@ namespace Tizen.NUI.Devel.Tests catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, e.StackTrace); Assert.Fail("Caught Exception: Failed!"); } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSGestureDetector.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSGestureDetector.cs index e035af0..98546db 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSGestureDetector.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSGestureDetector.cs @@ -177,5 +177,28 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"GestureDetectorDownCast END (OK)"); Assert.Pass("GestureDetectorDownCast"); } + + [Test] + [Category("P1")] + [Description("GestureDetector Assign")] + [Property("SPEC", "Tizen.NUI.GestureDetector.Assign M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void GestureDetectorAssign() + { + tlog.Debug(tag, $"GestureDetectorAssign START"); + + using (GestureDetector detector = new GestureDetector()) + { + var testingTarget = detector.Assign(detector); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"GestureDetectorAssign END (OK)"); + Assert.Pass("GestureDetectorAssign"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSGestureDetectorManager.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSGestureDetectorManager.cs index 5fa281f..81ed1ce 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSGestureDetectorManager.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSGestureDetectorManager.cs @@ -48,9 +48,8 @@ namespace Tizen.NUI.Devel.Tests } tlog.Debug(tag, $"GestureDetectorManagerConstructor END (OK)"); - Assert.Pass("GestureDetectorManagerConstructor"); } - + [Test] [Category("P2")] [Description("GestureDetectorManager constructor")] @@ -90,7 +89,6 @@ namespace Tizen.NUI.Devel.Tests using (View view = new View()) { var testingTarget = new GestureDetectorManager(view, null); - } } catch (ArgumentNullException e) diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSPanGestureDetector.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSPanGestureDetector.cs index 779be18..085d78f 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSPanGestureDetector.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSPanGestureDetector.cs @@ -44,7 +44,6 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorConstructor END (OK)"); - Assert.Pass("PanGestureDetectorConstructor"); } [Test] @@ -69,15 +68,14 @@ namespace Tizen.NUI.Devel.Tests } tlog.Debug(tag, $"PanGestureDetectorConstructorWithPanGestureDetector END (OK)"); - Assert.Pass("PanGestureDetectorConstructor"); } [Test] [Category("P1")] - [Description("Test DirectionLeft property.")] + [Description("PanGestureDetector DirectionLeft.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.DirectionLeft A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorDirectionLeft() { @@ -88,15 +86,14 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should be an instance of Radian type."); tlog.Debug(tag, $"PanGestureDetectorDirectionLeft END (OK)"); - Assert.Pass("PanGestureDetectorDirectionLeft"); } [Test] [Category("P1")] - [Description("Test DirectionRight property.")] + [Description("PanGestureDetector DirectionRight.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.DirectionRight A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorDirectionRight() { @@ -107,15 +104,14 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should be an instance of Radian type."); tlog.Debug(tag, $"PanGestureDetectorDirectionRight END (OK)"); - Assert.Pass("PanGestureDetectorDirectionLeft"); } [Test] [Category("P1")] - [Description("Test DirectionUp property.")] + [Description("PanGestureDetector DirectionUp.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.DirectionUp A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorDirectionUp() { @@ -126,15 +122,14 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should be an instance of Radian type."); tlog.Debug(tag, $"PanGestureDetectorDirectionUp END (OK)"); - Assert.Pass("PanGestureDetectorDirectionUp"); } [Test] [Category("P1")] - [Description("Test DirectionDown property.")] + [Description("PanGestureDetector DirectionDown.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.DirectionDown A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorDirectionDown() { @@ -145,15 +140,14 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should be an instance of Radian type."); tlog.Debug(tag, $"PanGestureDetectorDirectionDown END (OK)"); - Assert.Pass("PanGestureDetectorDirectionDown"); } [Test] [Category("P1")] - [Description("Test DirectionHorizontal property.")] + [Description("PanGestureDetector DirectionHorizontal.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.DirectionHorizontal A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorDirectionHorizontal() { @@ -164,15 +158,14 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should be an instance of Radian type."); tlog.Debug(tag, $"PanGestureDetectorDirectionHorizontal END (OK)"); - Assert.Pass("PanGestureDetectorDirectionHorizontal"); } [Test] [Category("P1")] - [Description("Test DirectionVertical property.")] + [Description("PanGestureDetector DirectionVertical.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.DirectionVertical A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorDirectionVertical() { @@ -183,15 +176,14 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should be an instance of Radian type."); tlog.Debug(tag, $"PanGestureDetectorDirectionVertical END (OK)"); - Assert.Pass("PanGestureDetectorDirectionVertical"); } [Test] [Category("P1")] - [Description("Test DefaultThreshold property.")] + [Description("PanGestureDetector DefaultThreshold.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.DefaultThreshold A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorDefaultThreshold() { @@ -202,15 +194,14 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(testingTarget, "Should be an instance of Radian type."); tlog.Debug(tag, $"PanGestureDetectorDefaultThreshold END (OK)"); - Assert.Pass("PanGestureDetectorDefaultThreshold"); } [Test] [Category("P1")] - [Description("Test ScreenPosition property.")] + [Description("PanGestureDetector ScreenPosition.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.ScreenPosition A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorScreenPosition() { @@ -220,18 +211,19 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "Can't create success object Hover"); Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); - tlog.Debug(tag, "ScreenPosition : " + testingTarget.ScreenPosition); + var result = testingTarget.ScreenPosition; + Assert.IsInstanceOf(result, "Should be an instance of Vector2 type."); + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorScreenPosition END (OK)"); - Assert.Pass("PanGestureDetectorScreenPosition"); } [Test] [Category("P1")] - [Description("Test ScreenDisplacement property.")] + [Description("PanGestureDetector ScreenDisplacement.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.ScreenDisplacement A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorScreenDisplacement() { @@ -241,18 +233,19 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "Can't create success object Hover"); Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); - tlog.Debug(tag, "ScreenDisplacement : " + testingTarget.ScreenDisplacement); - + var result = testingTarget.ScreenDisplacement; + Assert.IsInstanceOf(result, "Should be an instance of Vector2 type."); + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorScreenDisplacement END (OK)"); - Assert.Pass("PanGestureDetectorScreenDisplacement"); } [Test] [Category("P1")] - [Description("Test ScreenVelocity property.")] + [Description("PanGestureDetector ScreenVelocity.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.ScreenVelocity A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorScreenVelocity() { @@ -262,18 +255,19 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "Can't create success object Hover"); Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); - tlog.Debug(tag, "ScreenVelocity : " + testingTarget.ScreenVelocity); + var result = testingTarget.ScreenVelocity; + Assert.IsInstanceOf(result, "Should be an instance of Vector2 type."); + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorScreenVelocity END (OK)"); - Assert.Pass("PanGestureDetectorScreenVelocity"); } [Test] [Category("P1")] - [Description("Test LocalPosition property.")] + [Description("PanGestureDetector LocalPosition.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.LocalPosition A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorLocalPosition() { @@ -283,18 +277,19 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "Can't create success object Hover"); Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); - tlog.Debug(tag, "LocalPosition : " + testingTarget.LocalPosition); + var result = testingTarget.LocalPosition; + Assert.IsInstanceOf(result, "Should be an instance of Vector2 type."); + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorLocalPosition END (OK)"); - Assert.Pass("PanGestureDetectorLocalPosition"); } [Test] [Category("P1")] - [Description("Test LocalDisplacement property.")] + [Description("PanGestureDetector LocalDisplacement.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.LocalDisplacement A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorLocalDisplacement() { @@ -304,18 +299,19 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "Can't create success object Hover"); Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); - tlog.Debug(tag, "LocalDisplacement : " + testingTarget.LocalDisplacement); + var result = testingTarget.LocalDisplacement; + Assert.IsInstanceOf(result, "Should be an instance of Vector2 type."); + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorLocalDisplacement END (OK)"); - Assert.Pass("PanGestureDetectorLocalDisplacement"); } [Test] [Category("P1")] - [Description("Test LocalVelocity property.")] + [Description("PanGestureDetector LocalVelocity.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.LocalVelocity A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorLocalVelocity() { @@ -325,32 +321,37 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "Can't create success object Hover"); Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); - tlog.Debug(tag, "LocalVelocity : " + testingTarget.LocalVelocity); + var result = testingTarget.LocalVelocity; + Assert.IsInstanceOf(result, "Should be an instance of Vector2 type."); + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorLocalVelocity END (OK)"); - Assert.Pass("PanGestureDetectorLocalVelocity"); } [Test] [Category("P1")] - [Description("Test Panning property.")] + [Description("PanGestureDetector Panning.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.Panning A")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] + [Property("CRITERIA", "PRO")] [Property("AUTHOR", "guowei.wang@samsung.com")] public void PanGestureDetectorPanning() { tlog.Debug(tag, $"PanGestureDetectorPanning START"); - PanGestureDetector a1 = new PanGestureDetector(); - bool b1 = a1.Panning; + + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); + + var result = testingTarget.Panning; + tlog.Debug(tag, "Panning : " + result); tlog.Debug(tag, $"PanGestureDetectorPanning END (OK)"); - Assert.Pass("PanGestureDetectorPanning"); } [Test] [Category("P1")] - [Description("Test SetMinimumTouchesRequired property.")] + [Description("PanGestureDetector SetMinimumTouchesRequired.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.SetMinimumTouchesRequired M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -358,17 +359,28 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorSetMinimumTouchesRequired() { tlog.Debug(tag, $"PanGestureDetectorSetMinimumTouchesRequired START"); - PanGestureDetector a1 = new PanGestureDetector(); - a1.SetMinimumTouchesRequired(2); - + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); + + try + { + testingTarget.SetMinimumTouchesRequired(2); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorSetMinimumTouchesRequired END (OK)"); - Assert.Pass("PanGestureDetectorSetMinimumTouchesRequired"); } [Test] [Category("P1")] - [Description("Test SetMaximumTouchesRequired property.")] + [Description("PanGestureDetector SetMaximumTouchesRequired.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.SetMaximumTouchesRequired M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -376,16 +388,57 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorSetMaximumTouchesRequired() { tlog.Debug(tag, $"PanGestureDetectorSetMaximumTouchesRequired START"); - PanGestureDetector a1 = new PanGestureDetector(); - a1.SetMaximumTouchesRequired(4); - + + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); + + try + { + testingTarget.SetMaximumTouchesRequired(4); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorSetMaximumTouchesRequired END (OK)"); - Assert.Pass("PanGestureDetectorSetMaximumTouchesRequired"); } [Test] [Category("P1")] - [Description("Test GetMinimumTouchesRequired property.")] + [Description("PanGestureDetector SetMaximumMotionEventAge.")] + [Property("SPEC", "Tizen.NUI.PanGestureDetector.SetMaximumMotionEventAge M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PanGestureDetectorSetMaximumMotionEventAge() + { + tlog.Debug(tag, $"PanGestureDetectorSetMaximumMotionEventAge START"); + + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); + + try + { + testingTarget.SetMaximumMotionEventAge(4); + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"PanGestureDetectorSetMaximumMotionEventAge END (OK)"); + } + + [Test] + [Category("P1")] + [Description("PanGestureDetector GetMinimumTouchesRequired.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.GetMinimumTouchesRequired M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -393,18 +446,29 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorGetMinimumTouchesRequired() { tlog.Debug(tag, $"PanGestureDetectorGetMinimumTouchesRequired START"); - PanGestureDetector a1 = new PanGestureDetector(); - a1.SetMinimumTouchesRequired(4); - a1.GetMinimumTouchesRequired(); - + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); + + try + { + testingTarget.SetMinimumTouchesRequired(4); + testingTarget.GetMinimumTouchesRequired(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorGetMinimumTouchesRequired END (OK)"); - Assert.Pass("PanGestureDetectorSetMaximumTouchesRequired"); } [Test] [Category("P1")] - [Description("Test GetMaximumTouchesRequired property.")] + [Description("PanGestureDetector GetMaximumTouchesRequired.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.GetMaximumTouchesRequired M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -412,18 +476,59 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorGetMaximumTouchesRequired() { tlog.Debug(tag, $"PanGestureDetectorGetMaximumTouchesRequired START"); - PanGestureDetector a1 = new PanGestureDetector(); - a1.SetMaximumTouchesRequired(4); - a1.GetMaximumTouchesRequired(); - + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); + + try + { + testingTarget.SetMaximumTouchesRequired(4); + testingTarget.GetMaximumTouchesRequired(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorGetMaximumTouchesRequired END (OK)"); - Assert.Pass("PanGestureDetectorSetMaximumTouchesRequired"); } + + [Test] + [Category("P1")] + [Description("PanGestureDetector GetMaximumMotionEventAge.")] + [Property("SPEC", "Tizen.NUI.PanGestureDetector.GetMaximumMotionEventAge M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PanGestureDetectorGetMaximumMotionEventAge() + { + tlog.Debug(tag, $"PanGestureDetectorGetMaximumMotionEventAge START"); + + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); + + try + { + testingTarget.SetMaximumMotionEventAge(16); + testingTarget.GetMaximumMotionEventAge(); + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"PanGestureDetectorGetMaximumMotionEventAge END (OK)"); + } [Test] [Category("P1")] - [Description("Test AddAngle property.")] + [Description("PanGestureDetector AddAngle.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.AddAngle M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -431,18 +536,44 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorAddAngle() { tlog.Debug(tag, $"PanGestureDetectorAddAngle START"); - PanGestureDetector a1 = new PanGestureDetector(); - Radian angle = new Radian(4); - Radian threshold = new Radian(15); - a1.AddAngle(angle); - a1.AddAngle(angle, threshold); + + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); + + using (Radian angle = new Radian(4)) + { + try + { + testingTarget.AddAngle(angle); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + using (Radian threshold = new Radian(15)) + { + try + { + testingTarget.AddAngle(angle, threshold); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + } + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorAddAngle END (OK)"); - Assert.Pass("PanGestureDetectorAddAngle"); } [Test] [Category("P1")] - [Description("Test AddDirection property.")] + [Description("PanGestureDetector AddDirection.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.AddDirection M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -450,22 +581,44 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorAddDirection() { tlog.Debug(tag, $"PanGestureDetectorAddDirection START"); - PanGestureDetector a1 = new PanGestureDetector(); - Radian angle = new Radian(4); - Radian threshold = new Radian(15); - a1.AddDirection(angle); + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); - a1.AddDirection(angle, threshold); + using (Radian angle = new Radian(4)) + { + try + { + testingTarget.AddDirection(angle); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + using (Radian threshold = new Radian(15)) + { + try + { + testingTarget.AddDirection(angle, threshold); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + } + } - + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorAddDirection END (OK)"); - Assert.Pass("PanGestureDetectorAddDirection"); } [Test] [Category("P1")] - [Description("Test GetAngleCount property.")] + [Description("PanGestureDetector GetAngleCount.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.GetAngleCount M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -473,20 +626,58 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorGetAngleCount() { tlog.Debug(tag, $"PanGestureDetectorGetAngleCount START"); - PanGestureDetector a1 = new PanGestureDetector(); - Radian angle = new Radian(4); - a1.AddAngle(angle); + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); - a1.GetAngleCount(); - + using (Radian angle = new Radian(4)) + { + testingTarget.AddAngle(angle); + var result = testingTarget.GetAngleCount(); + tlog.Debug(tag, "GetAngleCount :" + result); + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorGetAngleCount END (OK)"); - Assert.Pass("PanGestureDetectorAddDirection"); } [Test] [Category("P1")] - [Description("Test ClearAngles property.")] + [Description("PanGestureDetector GetAngle.")] + [Property("SPEC", "Tizen.NUI.PanGestureDetector.GetAngle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PanGestureDetectorGetAngle() + { + tlog.Debug(tag, $"PanGestureDetectorGetAngle START"); + + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); + + using (Radian angle = new Radian(4)) + { + testingTarget.AddAngle(angle); + + try + { + testingTarget.GetAngle(1); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } + + tlog.Debug(tag, $"PanGestureDetectorGetAngle END (OK)"); + } + + [Test] + [Category("P1")] + [Description("PanGestureDetector ClearAngles.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.ClearAngles M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -494,20 +685,33 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorClearAngles() { tlog.Debug(tag, $"PanGestureDetectorClearAngles START"); - PanGestureDetector a1 = new PanGestureDetector(); - Radian angle = new Radian(4); - a1.AddAngle(angle); + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); - a1.ClearAngles(); - + using (Radian angle = new Radian(4)) + { + testingTarget.AddAngle(angle); + + try + { + testingTarget.ClearAngles(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorClearAngles END (OK)"); - Assert.Pass("PanGestureDetectorClearAngles"); } [Test] [Category("P1")] - [Description("Test RemoveAngle property.")] + [Description("PanGestureDetector RemoveAngle.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.RemoveAngle M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -515,21 +719,33 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorRemoveAngle() { tlog.Debug(tag, $"PanGestureDetectorRemoveAngle START"); - PanGestureDetector a1 = new PanGestureDetector(); - Radian angle = new Radian(4); - a1.AddAngle(angle); + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); - a1.RemoveAngle(angle); - + using (Radian angle = new Radian(4)) + { + testingTarget.AddAngle(angle); + + try + { + testingTarget.RemoveAngle(angle); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorRemoveAngle END (OK)"); - Assert.Pass("PanGestureDetectorClearAngles"); } - [Test] [Category("P1")] - [Description("Test RemoveDirection property.")] + [Description("PanGestureDetector RemoveDirection.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.RemoveDirection M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -537,20 +753,33 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorRemoveDirection() { tlog.Debug(tag, $"PanGestureDetectorRemoveDirection START"); - PanGestureDetector a1 = new PanGestureDetector(); - Radian angle = new Radian(4); - a1.AddDirection(angle); + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); - a1.RemoveDirection(angle); - + using (Radian angle = new Radian(4)) + { + testingTarget.AddDirection(angle); + + try + { + testingTarget.RemoveDirection(angle); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorRemoveDirection END (OK)"); - Assert.Pass("PanGestureDetectorClearAngles"); } [Test] [Category("P1")] - [Description("Test SetPanGestureProperties property.")] + [Description("PanGestureDetector SetPanGestureProperties.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.SetPanGestureProperties M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -558,17 +787,26 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorSetPanGestureProperties() { tlog.Debug(tag, $"PanGestureDetectorSetPanGestureProperties START"); - PanGesture pan = new PanGesture(); - PanGestureDetector.SetPanGestureProperties(pan); + using (PanGesture pan = new PanGesture()) + { + try + { + PanGestureDetector.SetPanGestureProperties(pan); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } tlog.Debug(tag, $"PanGestureDetectorSetPanGestureProperties END (OK)"); - Assert.Pass("PanGestureDetectorClearAngles"); } [Test] [Category("P1")] - [Description("Test GetPanGestureDetectorFromPtr property.")] + [Description("PanGestureDetector GetPanGestureDetectorFromPtr.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.GetPanGestureDetectorFromPtr M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] @@ -576,18 +814,66 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorGetPanGestureDetectorFromPtr() { tlog.Debug(tag, $"PanGestureDetectorGetPanGestureDetectorFromPtr START"); - PanGestureDetector a1 = new PanGestureDetector(); - - PanGestureDetector.GetPanGestureDetectorFromPtr(a1.SwigCPtr.Handle); - a1.Dispose(); - + + using (PanGestureDetector detector = new PanGestureDetector()) + { + var testingTarget = PanGestureDetector.GetPanGestureDetectorFromPtr(detector.SwigCPtr.Handle); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); + + testingTarget.Dispose(); + } + tlog.Debug(tag, $"PanGestureDetectorGetPanGestureDetectorFromPtr END (OK)"); - Assert.Pass("PanGestureDetectorGetPanGestureDetectorFromPtr"); + } + + [Test] + [Category("P1")] + [Description("PanGestureDetector DownCast.")] + [Property("SPEC", "Tizen.NUI.PanGestureDetector.DownCast M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PanGestureDetectorDownCast() + { + tlog.Debug(tag, $"PanGestureDetectorDownCast START"); + + using (PanGestureDetector detector = new PanGestureDetector()) + { + var testingTarget = PanGestureDetector.DownCast(detector); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"PanGestureDetectorDownCast END (OK)"); } [Test] [Category("P1")] - [Description("Test Detected property.")] + [Description("PanGestureDetector Assign")] + [Property("SPEC", "Tizen.NUI.PanGestureDetector.Assign M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PanGestureDetectorAssign() + { + tlog.Debug(tag, $"PanGestureDetectorAssign START"); + + using (PanGestureDetector detector = new PanGestureDetector()) + { + var testingTarget = detector.Assign(detector); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PanGestureDetector type."); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"PanGestureDetectorAssign END (OK)"); + } + + [Test] + [Category("P1")] + [Description("PanGestureDetector Detected.")] [Property("SPEC", "Tizen.NUI.PanGestureDetector.Detected A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -595,14 +881,16 @@ namespace Tizen.NUI.Devel.Tests public void PanGestureDetectorDetected() { tlog.Debug(tag, $"PanGestureDetectorDetected START"); - PanGestureDetector a1 = new PanGestureDetector(); - - a1.Detected += OnDetected; - a1.Detected -= OnDetected; - a1.Dispose(); + var testingTarget = new PanGestureDetector(); + Assert.IsNotNull(testingTarget, "Can't create success object DetectedEventArgs."); + Assert.IsInstanceOf(testingTarget, "Should return PanGestureDetector instance."); + + testingTarget.Detected += OnDetected; + testingTarget.Detected -= OnDetected; + + testingTarget.Dispose(); tlog.Debug(tag, $"PanGestureDetectorDetected END (OK)"); - Assert.Pass("PanGestureDetectorDetected"); } private void OnDetected(object obj, PanGestureDetector.DetectedEventArgs e) @@ -623,7 +911,7 @@ namespace Tizen.NUI.Devel.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "guowei.wang@samsung.com")] - public void LongPressGestureDetectedEventArgsView() + public void PanGestureDetectedEventArgsView() { tlog.Debug(tag, $"PanGestureDetectedEventArgsView START"); @@ -645,5 +933,4 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"PanGestureDetectedEventArgsView END (OK)"); } } - } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSTapGesture.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSTapGesture.cs index f2238e3..6cb135d 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSTapGesture.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSTapGesture.cs @@ -36,19 +36,18 @@ namespace Tizen.NUI.Devel.Tests public void TapGestureConstructor() { tlog.Debug(tag, $"TapGestureConstructor START"); - - TapGesture a1 = new TapGesture(); - - a1.Dispose(); - + var testingTarget = new TapGesture(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TapGesture type."); + + testingTarget.Dispose(); tlog.Debug(tag, $"TapGestureConstructor END (OK)"); - Assert.Pass("TapGestureConstructor"); } [Test] [Category("P1")] - [Description("Test NumberOfTaps property.")] + [Description("TapGesture NumberOfTaps.")] [Property("SPEC", "Tizen.NUI.TapGesture.NumberOfTaps A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -56,17 +55,21 @@ namespace Tizen.NUI.Devel.Tests public void TapGestureNumberOfTaps() { tlog.Debug(tag, $"TapGestureNumberOfTaps START"); - TapGesture a1 = new TapGesture(); - uint b1 = a1.NumberOfTaps; - + var testingTarget = new TapGesture(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TapGesture type."); + + var result = testingTarget.NumberOfTaps; + tlog.Debug(tag, "NumberOfTaps : " + result); + + testingTarget.Dispose(); tlog.Debug(tag, $"TapGestureNumberOfTaps END (OK)"); - Assert.Pass("TapGestureNumberOfTaps"); } [Test] [Category("P1")] - [Description("Test NumberOfTouches property.")] + [Description("TapGesture NumberOfTouches.")] [Property("SPEC", "Tizen.NUI.TapGesture.NumberOfTouches A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -74,17 +77,21 @@ namespace Tizen.NUI.Devel.Tests public void TapGestureNumberOfTouches() { tlog.Debug(tag, $"TapGestureNumberOfTouches START"); - TapGesture a1 = new TapGesture(); - uint b1 = a1.NumberOfTouches; - + var testingTarget = new TapGesture(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TapGesture type."); + + var result = testingTarget.NumberOfTouches; + tlog.Debug(tag, "NumberOfTouches : " + result); + + testingTarget.Dispose(); tlog.Debug(tag, $"TapGestureNumberOfTouches END (OK)"); - Assert.Pass("TapGestureNumberOfTouches"); } [Test] [Category("P1")] - [Description("Test ScreenPoint property.")] + [Description("TapGesture ScreenPoint.")] [Property("SPEC", "Tizen.NUI.TapGesture.ScreenPoint A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -92,17 +99,21 @@ namespace Tizen.NUI.Devel.Tests public void TapGestureScreenPoint() { tlog.Debug(tag, $"TapGestureScreenPoint START"); - TapGesture a1 = new TapGesture(); - Vector2 v1 = a1.ScreenPoint; - + var testingTarget = new TapGesture(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TapGesture type."); + + var result = testingTarget.ScreenPoint; + Assert.IsInstanceOf(result, "Should be an instance of Vector2 type."); + + testingTarget.Dispose(); tlog.Debug(tag, $"TapGestureScreenPoint END (OK)"); - Assert.Pass("TapGestureScreenPoint"); } [Test] [Category("P1")] - [Description("Test LocalPoint property.")] + [Description("TapGesture LocalPoint.")] [Property("SPEC", "Tizen.NUI.TapGesture.LocalPoint A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -110,33 +121,61 @@ namespace Tizen.NUI.Devel.Tests public void TapGestureLocalPoint() { tlog.Debug(tag, $"TapGestureLocalPoint START"); - TapGesture a1 = new TapGesture(); - Vector2 v1 = a1.LocalPoint; - + var testingTarget = new TapGesture(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TapGesture type."); + + var result = testingTarget.LocalPoint; + Assert.IsInstanceOf(result, "Should be an instance of Vector2 type."); + + testingTarget.Dispose(); tlog.Debug(tag, $"TapGestureLocalPoint END (OK)"); - Assert.Pass("TapGestureLocalPoint"); } [Test] [Category("P1")] - [Description("Test GetTapGestureFromPtr property.")] - [Property("SPEC", "Tizen.NUI.TapGesture.GetTapGestureFromPtr A")] + [Description("TapGesture SourceType.")] + [Property("SPEC", "Tizen.NUI.TapGesture.SourceType A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "guowei.wang@samsung.com")] + public void TapGestureSourceType() + { + tlog.Debug(tag, $"TapGestureSourceType START"); + + var testingTarget = new TapGesture(); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TapGesture type."); + + var result = testingTarget.SourceType; + tlog.Debug(tag, "SourceType : " + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"TapGestureSourceType END (OK)"); + } + + [Test] + [Category("P1")] + [Description("TapGesture GetTapGestureFromPtr.")] + [Property("SPEC", "Tizen.NUI.TapGesture.GetTapGestureFromPtr M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] public void TapGestureGetTapGestureFromPtr() { tlog.Debug(tag, $"TapGestureGetTapGestureFromPtr START"); - TapGesture a1 = new TapGesture(); - - TapGesture a2 = TapGesture.GetTapGestureFromPtr(a1.SwigCPtr.Handle); - a1.Dispose(); - + using (TapGesture gesture = new TapGesture()) + { + var testingTarget = TapGesture.GetTapGestureFromPtr(gesture.SwigCPtr.Handle); + Assert.IsNotNull(testingTarget, "Can't create success object Hover"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TapGesture type."); + + testingTarget.Dispose(); + } + tlog.Debug(tag, $"TapGestureGetTapGestureFromPtr END (OK)"); - Assert.Pass("TapGestureGetTapGestureFromPtr"); } } - } \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSTouch.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSTouch.cs index b40bb30..dfd476b 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSTouch.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Events/TSTouch.cs @@ -76,6 +76,62 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("Touch GetTime")] + [Property("SPEC", "Tizen.NUI.Touch.GetTime M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void TouchGetTime() + { + tlog.Debug(tag, $"TouchGetTime START"); + + var testingTarget = new Touch(); + Assert.IsNotNull(testingTarget, "Can't create success object Touch"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Touch type."); + + try + { + var result = testingTarget.GetTime(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + testingTarget.Dispose(); + tlog.Debug(tag, $"TouchGetTime END (OK)"); + Assert.Pass("Caught Exception : Passed!"); + } + } + + [Test] + [Category("P1")] + [Description("Touch GetPointCount")] + [Property("SPEC", "Tizen.NUI.Touch.GetPointCount M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void TouchGetPointCount() + { + tlog.Debug(tag, $"TouchGetPointCount START"); + + var testingTarget = new Touch(); + Assert.IsNotNull(testingTarget, "Can't create success object Touch"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Touch type."); + + try + { + var result = testingTarget.GetPointCount(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + testingTarget.Dispose(); + tlog.Debug(tag, $"TouchGetPointCount END (OK)"); + Assert.Pass("Caught Exception : Passed!"); + } + } + + [Test] + [Category("P1")] [Description("Touch GetState")] [Property("SPEC", "Tizen.NUI.Touch.GetState M")] [Property("SPEC_URL", "-")] @@ -348,5 +404,4 @@ namespace Tizen.NUI.Devel.Tests } } } - } \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSNativeImageQueue.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSNativeImageQueue.cs new file mode 100755 index 0000000..fed336d --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSNativeImageQueue.cs @@ -0,0 +1,153 @@ +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/Images/NativeImageQueue")] + public class PublicNativeImageQueueTest + { + 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("NativeImageQueue constructor.")] + [Property("SPEC", "Tizen.NUI.NativeImageQueue.NativeImageQueue C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void NativeImageQueueConstructor() + { + tlog.Debug(tag, $"NativeImageQueueConstructor START"); + + try + { + var testingTarget = new NativeImageQueue(100, 50, NativeImageQueue.ColorFormat.RGBA8888); + Assert.IsNotNull(testingTarget, "Can't create success object NativeImageQueue"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of NativeImageQueue type."); + + testingTarget.Dispose(); + } + catch(Exception e) + { + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"NativeImageQueueConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("NativeImageQueue GenerateUrl.")] + [Property("SPEC", "Tizen.NUI.NativeImageQueue.GenerateUrl M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void NativeImageQueueGenerateUrl() + { + tlog.Debug(tag, $"NativeImageQueueGenerateUrl START"); + + try + { + var testingTarget = new NativeImageQueue(100, 50, NativeImageQueue.ColorFormat.BGRA8888); + Assert.IsNotNull(testingTarget, "Can't create success object NativeImageQueue"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of NativeImageQueue type."); + + var result = testingTarget.GenerateUrl(); + Assert.IsInstanceOf(result, "Should be an instance of ImageUrl type."); + + testingTarget.Dispose(); + } + catch(Exception e) + { + tlog.Error(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + tlog.Debug(tag, $"NativeImageQueueGenerateUrl END (OK)"); + } + + [Test] + [Category("P1")] + [Description("NativeImageQueue CanDequeueBuffer.")] + [Property("SPEC", "Tizen.NUI.NativeImageQueue.CanDequeueBuffer M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void NativeImageQueueCanDequeueBuffer() + { + tlog.Debug(tag, $"NativeImageQueueCanDequeueBuffer START"); + + try + { + var testingTarget = new NativeImageQueue(100, 50, NativeImageQueue.ColorFormat.BGRA8888); + Assert.IsNotNull(testingTarget, "Can't create success object NativeImageQueue"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of NativeImageQueue type."); + + var result = testingTarget.CanDequeueBuffer(); + tlog.Debug(tag, "CanDequeueBuffer : " + result); + + testingTarget.Dispose(); + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + tlog.Debug(tag, $"NativeImageQueueCanDequeueBuffer END (OK)"); + } + + [Test] + [Category("P1")] + [Description("NativeImageQueue DequeueBuffer.")] + [Property("SPEC", "Tizen.NUI.NativeImageQueue.DequeueBuffer M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void NativeImageQueueDequeueBuffer() + { + tlog.Debug(tag, $"NativeImageQueueDequeueBuffer START"); + + var testingTarget = new NativeImageQueue(100, 50, NativeImageQueue.ColorFormat.RGBA8888); + Assert.IsNotNull(testingTarget, "Can't create success object NativeImageQueue"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of NativeImageQueue type."); + + try + { + int width = 4, height = 2, stride = 4; + testingTarget.DequeueBuffer(ref width, ref height, ref stride); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + testingTarget.Dispose(); + + tlog.Debug(tag, $"NativeImageQueueDequeueBuffer END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSPixelBuffer.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSPixelBuffer.cs index 8aa28bf..2fb9b16 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSPixelBuffer.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSPixelBuffer.cs @@ -278,6 +278,28 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"PixelBufferRotate END (OK)"); } + + [Test] + [Category("P1")] + [Description("PixelBuffer GetBrightness.")] + [Property("SPEC", "Tizen.NUI.PixelBuffer.GetBrightness M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PixelBufferGetBrightness() + { + tlog.Debug(tag, $"PixelBufferGetBrightness START"); + + var testingTarget = new PixelBuffer(10, 5, PixelFormat.BGR8888); + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PixelData type."); + + var result = testingTarget.GetBrightness(); + tlog.Debug(tag, "GetBrightness : " + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"PixelBufferGetBrightness END (OK)"); + } [Test] [Category("P1")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSPixelData.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSPixelData.cs index 9e39096..e774ada 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSPixelData.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Images/TSPixelData.cs @@ -35,9 +35,9 @@ namespace Tizen.NUI.Devel.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "CONSTR")] [Property("AUTHOR", "guowei.wang@samsung.com")] - public void PixelDataConstructor() + public void PixelDataConstructorWithReleaseFunction() { - tlog.Debug(tag, $"PixelDataConstructor START"); + tlog.Debug(tag, $"PixelDataConstructorWithReleaseFunction START"); byte[] buffer = new byte[1024]; @@ -47,7 +47,30 @@ namespace Tizen.NUI.Devel.Tests buffer = null; testingTarget.Dispose(); - tlog.Debug(tag, $"PixelDataConstructor END (OK)"); + tlog.Debug(tag, $"PixelDataConstructorWithReleaseFunction END (OK)"); + } + + [Test] + [Category("P1")] + [Description("PixelData constructor.")] + [Property("SPEC", "Tizen.NUI.PixelData.PixelData C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PixelDataConstructor() + { + tlog.Debug(tag, $"PixelDataconstructor START"); + + byte[] buffer = new byte[1024]; + + var testingTarget = new PixelData(buffer, 1024, 100, 150, PixelFormat.L8); + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PixelData type."); + + buffer = null; + testingTarget.Dispose(); + + tlog.Debug(tag, $"PixelDataconstructor END (OK)"); } [Test] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSAutofillContainer.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSAutofillContainer.cs index a27964f..c4e7b9f 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSAutofillContainer.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSAutofillContainer.cs @@ -25,387 +25,5 @@ namespace Tizen.NUI.Devel.Tests { tlog.Info(tag, "Destroy() is called!"); } - - //[Test] - //[Category("P1")] - //[Description("Create a AutofillContainer object.")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.AutofillContainer C")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "CONSTR")] - //[Property("COVPARAM", "")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerConstructor() - //{ - // tlog.Debug(tag, $"AutofillContainerConstructor START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - // AutofillContainer b1 = new AutofillContainer(a1); - - // b1.Dispose(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerConstructor END (OK)"); - // Assert.Pass("AutofillContainerConstructor"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer ServiceEvent")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.ServiceEvent M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerServiceEvent() - //{ - // tlog.Debug(tag, $"AutofillContainerServiceEvent START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.ServiceEvent += OnServiceEvent; - // a1.ServiceEvent -= OnServiceEvent; - // object o1 = new object(); - // AutofillContainer.AuthenticationEventArgs e = new AutofillContainer.AuthenticationEventArgs(); - - // OnServiceEvent(o1, e); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerServiceEvent END (OK)"); - // Assert.Pass("AutofillContainerServiceEvent"); - //} - - //private void OnServiceEvent(object sender, AutofillContainer.AuthenticationEventArgs e) - //{ - // AutofillContainer a1 = new AutofillContainer("myContent"); - // e.AutofillContainer = a1; - // a1 = e.AutofillContainer; - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer ListEvent")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.ListEvent M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerListEvent() - //{ - // tlog.Debug(tag, $"AutofillContainerListEvent START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.ListEvent += OnListEvent; - // a1.ListEvent -= OnListEvent; - // object o1 = new object(); - // AutofillContainer.AuthenticationEventArgs e = new AutofillContainer.AuthenticationEventArgs(); - - // OnServiceEvent(o1, e); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerServiceEvent END (OK)"); - // Assert.Pass("AutofillContainerServiceEvent"); - //} - - //private void OnListEvent(object sender, AutofillContainer.ListEventArgs e) - //{ - // BaseComponents.View v1 = new BaseComponents.View(); - // e.Control = v1; - // v1 = e.Control; - - // v1.Dispose(); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer getCPtr")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.getCPtr M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainergetCPtr() - //{ - // tlog.Debug(tag, $"AutofillContainergetCPtr START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // global::System.Runtime.InteropServices.HandleRef b1 = AutofillContainer.getCPtr(a1); - // global::System.Runtime.InteropServices.HandleRef c1 = AutofillContainer.getCPtr(null); - - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainergetCPtr END (OK)"); - // Assert.Pass("AutofillContainergetCPtr"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer Assign")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.Assign M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerAssign() - //{ - // tlog.Debug(tag, $"AutofillContainerAssign START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - // AutofillContainer b1 = a1; - - // b1.Dispose(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerAssign END (OK)"); - // Assert.Pass("AutofillContainerAssign"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer DownCast")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.DownCast M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerDownCast() - //{ - // tlog.Debug(tag, $"AutofillContainerDownCast START"); - // BaseHandle handle = new BaseHandle(); - // AutofillContainer a1 = AutofillContainer.DownCast(handle); - - // handle.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerDownCast END (OK)"); - // Assert.Pass("AutofillContainerDownCast"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer AddAutofillView")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.AddAutofillView M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerAddAutofillView() - //{ - // tlog.Debug(tag, $"AutofillContainerAddAutofillView START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // BaseComponents.View view = new BaseComponents.View(); - // int propertyIndex = 1; - // string id = "myContainer"; - // string label = "testLabel"; - - // AutofillContainer.ItemHint hint = AutofillContainer.ItemHint.CreditCardExpirationData; - // bool isSensitive = false; - - // a1.AddAutofillView(view, propertyIndex, id, label, hint, isSensitive); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerAddAutofillView END (OK)"); - // Assert.Pass("AutofillContainerAddAutofillView"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer RemoveAutofillItem")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.RemoveAutofillItem M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerRemoveAutofillItem() - //{ - // tlog.Debug(tag, $"AutofillContainerRemoveAutofillItem START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // BaseComponents.View view = new BaseComponents.View(); - // a1.RemoveAutofillItem(view); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerRemoveAutofillItem END (OK)"); - // Assert.Pass("AutofillContainerRemoveAutofillItem"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer SaveAutofillData")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.SaveAutofillData M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerSaveAutofillData() - //{ - // tlog.Debug(tag, $"AutofillContainerSaveAutofillData START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.SaveAutofillData(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerSaveAutofillData END (OK)"); - // Assert.Pass("AutofillContainerSaveAutofillData"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer RequestFillData")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.RequestFillData M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerRequestFillData() - //{ - // tlog.Debug(tag, $"AutofillContainerRequestFillData START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.RequestFillData(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerRequestFillData END (OK)"); - // Assert.Pass("AutofillContainerRequestFillData"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer GetAutofillServiceName")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.GetAutofillServiceName M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerGetAutofillServiceName() - //{ - // tlog.Debug(tag, $"AutofillContainerGetAutofillServiceName START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.GetAutofillServiceName(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerGetAutofillServiceName END (OK)"); - // Assert.Pass("AutofillContainerGetAutofillServiceName"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer GetAutofillServiceMessage")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.GetAutofillServiceMessage M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerGetAutofillServiceMessage() - //{ - // tlog.Debug(tag, $"AutofillContainerGetAutofillServiceMessage START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.GetAutofillServiceMessage(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerGetAutofillServiceMessage END (OK)"); - // Assert.Pass("AutofillContainerGetAutofillServiceMessage"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer GetAutofillServiceImagePath")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.GetAutofillServiceImagePath M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerGetAutofillServiceImagePath() - //{ - // tlog.Debug(tag, $"AutofillContainerGetAutofillServiceImagePath START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.GetAutofillServiceImagePath(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerGetAutofillServiceImagePath END (OK)"); - // Assert.Pass("AutofillContainerGetAutofillServiceImagePath"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer GetListItemCount")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.GetListItemCount M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerGetListItemCount() - //{ - // tlog.Debug(tag, $"AutofillContainerGetListItemCount START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.GetListItemCount(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerGetListItemCount END (OK)"); - // Assert.Pass("AutofillContainerGetListItemCount"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer GetListItem")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.GetListItem M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerGetListItem() - //{ - // tlog.Debug(tag, $"AutofillContainerGetListItem START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.GetListItem(0); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerGetListItem END (OK)"); - // Assert.Pass("AutofillContainerGetListItem"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer SetSelectedItem")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.SetSelectedItem M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerSetSelectedItem() - //{ - // tlog.Debug(tag, $"AutofillContainerSetSelectedItem START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.SetSelectedItem("testContent"); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerSetSelectedItem END (OK)"); - // Assert.Pass("AutofillContainerSetSelectedItem"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer AutofillServiceEventSignal")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.AutofillServiceEventSignal M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerAutofillServiceEventSignal() - //{ - // tlog.Debug(tag, $"AutofillContainerAutofillServiceEventSignal START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.AutofillServiceEventSignal(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerAutofillServiceEventSignal END (OK)"); - // Assert.Pass("AutofillContainerAutofillServiceEventSignal"); - //} - - //[Test] - //[Category("P1")] - //[Description("AutofillContainer AutofillListEventSignal")] - //[Property("SPEC", "Tizen.NUI.AutofillContainer.AutofillListEventSignal M")] - //[Property("SPEC_URL", "-")] - //[Property("CRITERIA", "MR")] - //[Property("AUTHOR", "guowei.wang@samsung.com")] - //public void AutofillContainerAutofillListEventSignal() - //{ - // tlog.Debug(tag, $"AutofillContainerAutofillListEventSignal START"); - // AutofillContainer a1 = new AutofillContainer("myContainer"); - - // a1.AutofillListEventSignal(); - // a1.Dispose(); - - // tlog.Debug(tag, $"AutofillContainerAutofillListEventSignal END (OK)"); - // Assert.Pass("AutofillContainerAutofillListEventSignal"); - //} } } \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSFocusChangingEventArgs.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSFocusChangingEventArgs.cs new file mode 100755 index 0000000..a2c04e6 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSFocusChangingEventArgs.cs @@ -0,0 +1,120 @@ +using NUnit.Framework; +using NUnit.Framework.TUnit; +using System; +using Tizen.NUI; +using Tizen.NUI.BaseComponents; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/Input/FocusChangingEventArgs")] + internal class PublicFocusChangingEventArgsTest + { + 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("Create a FocusChangingEventArgs object.")] + [Property("SPEC", "Tizen.NUI.FocusChangingEventArgs.FocusChangingEventArgs C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void FocusChangingEventArgsConstructor() + { + tlog.Debug(tag, $"FocusChangingEventArgsConstructor START"); + + var testingTarget = new FocusChangingEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusChangingEventArgs type."); + + tlog.Debug(tag, $"FocusChangingEventArgsConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("FocusChangingEventArgs Current")] + [Property("SPEC", "Tizen.NUI.Input.FocusChangingEventArgs Current A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void InputFocusChangingEventArgsCurrent() + { + tlog.Debug(tag, $"InputFocusChangingEventArgsCurrent START"); + + var testingTarget = new FocusChangingEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusChangingEventArgs type."); + + using (View view = new View() { Size = new Size(100, 200) }) + { + testingTarget.Current = view; + + var result = testingTarget.Current; + Assert.AreEqual(100, result.Size.Width, "Should be equal!"); + Assert.AreEqual(200, result.Size.Height, "Should be equal!"); + } + + tlog.Debug(tag, $"InputFocusChangingEventArgsCurrent END (OK)"); + } + + [Test] + [Category("P1")] + [Description("FocusChangingEventArgs Proposed")] + [Property("SPEC", "Tizen.NUI.Input.FocusChangingEventArgs Proposed A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void InputFocusChangingEventArgsProposed() + { + tlog.Debug(tag, $"InputFocusChangingEventArgsProposed START"); + + var testingTarget = new FocusChangingEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusChangingEventArgs type."); + + using (View view = new View() { Size = new Size(100, 200) }) + { + testingTarget.Proposed = view; + + var result = testingTarget.Proposed; + Assert.AreEqual(100, result.Size.Width, "Should be equal!"); + Assert.AreEqual(200, result.Size.Height, "Should be equal!"); + } + + tlog.Debug(tag, $"InputFocusChangingEventArgsProposed END (OK)"); + } + + [Test] + [Category("P1")] + [Description("FocusChangingEventArgs Direction")] + [Property("SPEC", "Tizen.NUI.Input.FocusChangingEventArgs Direction A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void InputFocusChangingEventArgsDirection() + { + tlog.Debug(tag, $"InputFocusChangingEventArgsDirection START"); + + var testingTarget = new FocusChangingEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusChangingEventArgs type."); + + testingTarget.Direction = View.FocusDirection.Down; + tlog.Debug(tag, "Direction : " + testingTarget.Direction); + + tlog.Debug(tag, $"InputFocusChangingEventArgsDirection END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSFocusManager.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSFocusManager.cs index 7ea4718..b5c1341 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSFocusManager.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Input/TSFocusManager.cs @@ -37,12 +37,13 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerConstructor() { tlog.Debug(tag, $"FocusManagerConstructor START"); - FocusManager a1 = new FocusManager(); - - a1.Dispose(); + + var testingTarget = new FocusManager(); + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + testingTarget.Dispose(); tlog.Debug(tag, $"FocusManagerConstructor END (OK)"); - Assert.Pass("FocusManagerConstructor"); } [Test] @@ -52,26 +53,27 @@ namespace Tizen.NUI.Devel.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] public void FocusManagerPreFocusChange() { tlog.Debug(tag, $"FocusManagerPreFocusChange START"); - FocusManager a1 = FocusManager.Instance; - a1.PreFocusChange += A1_PreFocusChange; - a1.PreFocusChange -= A1_PreFocusChange; + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + testingTarget.PreFocusChange += OnPreFocusChange; + testingTarget.PreFocusChange -= OnPreFocusChange; - tlog.Debug(tag, $"112"); object o1 = new object(); FocusManager.PreFocusChangeEventArgs e = new FocusManager.PreFocusChangeEventArgs(); - tlog.Debug(tag, $"113"); - A1_PreFocusChange(o1, e); - tlog.Debug(tag, $"114"); + OnPreFocusChange(o1, e); tlog.Debug(tag, $"FocusManagerPreFocusChange END (OK)"); - Assert.Pass("FocusManagerPreFocusChange"); } - private View A1_PreFocusChange(object o, FocusManager.PreFocusChangeEventArgs e) + [Obsolete] + private View OnPreFocusChange(object o, FocusManager.PreFocusChangeEventArgs e) { View v1 = e.CurrentView; e.CurrentView = v1; @@ -84,7 +86,38 @@ namespace Tizen.NUI.Devel.Tests return v1; } + + [Test] + [Category("P1")] + [Description("FocusManager FocusChanging")] + [Property("SPEC", "Tizen.NUI.FocusManager.FocusChanging A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void FocusManagerFocusChanging() + { + tlog.Debug(tag, $"FocusManagerFocusChanging START"); + + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + try + { + testingTarget.FocusChanging += OnFocusChanging; + testingTarget.FocusChanging -= OnFocusChanging; + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + tlog.Debug(tag, $"FocusManagerFocusChanging END (OK)"); + } + + public void OnFocusChanging(object sender, FocusChangingEventArgs e) { } + [Test] [Category("P1")] [Description("FocusManager FocusChanged")] @@ -95,28 +128,30 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerFocusChanged() { tlog.Debug(tag, $"FocusManagerFocusChanged START"); - FocusManager a1 = FocusManager.Instance; - a1.FocusChanged += A1_FocusChanged; - a1.FocusChanged -= A1_FocusChanged; + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + testingTarget.FocusChanged += OnFocusChanged; + testingTarget.FocusChanged -= OnFocusChanged; object o1 = new object(); FocusManager.FocusChangedEventArgs e = new FocusManager.FocusChangedEventArgs(); - A1_FocusChanged(o1, e); + OnFocusChanged(o1, e); tlog.Debug(tag, $"FocusManagerFocusChanged END (OK)"); - Assert.Pass("FocusManagerFocusChanged"); } - private void A1_FocusChanged(object sender, FocusManager.FocusChangedEventArgs e) + private void OnFocusChanged(object sender, FocusManager.FocusChangedEventArgs e) { - View v1 = e.CurrentView; - e.CurrentView = v1; + View v1 = e.Previous; + e.Previous = v1; - View v2 = e.NextView; - e.NextView = v2; + View v2 = e.Current; + e.Current = v2; } - + [Test] [Category("P1")] [Description("FocusManager FocusGroupChanged")] @@ -127,19 +162,22 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerFocusGroupChanged() { tlog.Debug(tag, $"FocusManagerFocusGroupChanged START"); - FocusManager a1 = FocusManager.Instance; - a1.FocusGroupChanged += A1_FocusGroupChanged; - a1.FocusGroupChanged -= A1_FocusGroupChanged; + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + testingTarget.FocusGroupChanged += OnFocusGroupChanged; + testingTarget.FocusGroupChanged -= OnFocusGroupChanged; + object o1 = new object(); FocusManager.FocusGroupChangedEventArgs e = new FocusManager.FocusGroupChangedEventArgs(); - A1_FocusGroupChanged(o1, e); + OnFocusGroupChanged(o1, e); tlog.Debug(tag, $"FocusManagerFocusGroupChanged END (OK)"); - Assert.Pass("FocusManagerFocusGroupChanged"); } - private void A1_FocusGroupChanged(object sender, FocusManager.FocusGroupChangedEventArgs e) + private void OnFocusGroupChanged(object sender, FocusManager.FocusGroupChangedEventArgs e) { View v1 = e.CurrentView; e.CurrentView = v1; @@ -158,19 +196,22 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerFocusedViewActivated() { tlog.Debug(tag, $"FocusManagerFocusedViewActivated START"); - FocusManager a1 = FocusManager.Instance; - a1.FocusedViewActivated += A1_FocusedViewActivated; - a1.FocusedViewActivated -= A1_FocusedViewActivated; + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + testingTarget.FocusedViewActivated += OnFocusedViewActivated; + testingTarget.FocusedViewActivated -= OnFocusedViewActivated; + object o1 = new object(); FocusManager.FocusedViewActivatedEventArgs e = new FocusManager.FocusedViewActivatedEventArgs(); - A1_FocusedViewActivated(o1, e); + OnFocusedViewActivated(o1, e); tlog.Debug(tag, $"FocusManagerFocusedViewActivated END (OK)"); - Assert.Pass("FocusManagerFocusedViewActivated"); } - private void A1_FocusedViewActivated(object sender, FocusManager.FocusedViewActivatedEventArgs e) + private void OnFocusedViewActivated(object sender, FocusManager.FocusedViewActivatedEventArgs e) { View v1 = e.View; e.View = v1; @@ -183,23 +224,26 @@ namespace Tizen.NUI.Devel.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] public void FocusManagerFocusedViewEnterKeyPressed() { tlog.Debug(tag, $"FocusManagerFocusedViewEnterKeyPressed START"); - FocusManager a1 = FocusManager.Instance; - a1.FocusedViewEnterKeyPressed += A1_FocusedViewEnterKeyPressed; - a1.FocusedViewEnterKeyPressed -= A1_FocusedViewEnterKeyPressed; + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + testingTarget.FocusedViewEnterKeyPressed += OnFocusedViewEnterKeyPressed; + testingTarget.FocusedViewEnterKeyPressed -= OnFocusedViewEnterKeyPressed; object o1 = new object(); FocusManager.FocusedViewActivatedEventArgs e = new FocusManager.FocusedViewActivatedEventArgs(); - A1_FocusedViewEnterKeyPressed(o1, e); + OnFocusedViewEnterKeyPressed(o1, e); tlog.Debug(tag, $"FocusManagerFocusedViewEnterKeyPressed END (OK)"); - Assert.Pass("FocusManagerFocusedViewEnterKeyPressed"); } - private void A1_FocusedViewEnterKeyPressed(object sender, FocusManager.FocusedViewActivatedEventArgs e) + private void OnFocusedViewEnterKeyPressed(object sender, FocusManager.FocusedViewActivatedEventArgs e) { View v1 = e.View; e.View = v1; @@ -215,13 +259,15 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerFocusGroupLoop() { tlog.Debug(tag, $"FocusManagerFocusGroupLoop START"); - FocusManager a1 = FocusManager.Instance; - a1.FocusGroupLoop = true; - bool b1 = a1.FocusGroupLoop; + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + testingTarget.FocusGroupLoop = true; + Assert.AreEqual(true, testingTarget.FocusGroupLoop, "Should be equal!"); tlog.Debug(tag, $"FocusManagerFocusGroupLoop END (OK)"); - Assert.Pass("FocusManagerFocusGroupLoop"); } [Test] @@ -234,30 +280,18 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerFocusIndicator() { tlog.Debug(tag, $"FocusManagerFocusIndicator START"); - View v1 = new View(); - FocusManager a1 = FocusManager.Instance; - a1.FocusIndicator = v1; - v1 = a1.FocusIndicator; - v1.Dispose(); + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); - tlog.Debug(tag, $"FocusManagerFocusIndicator END (OK)"); - Assert.Pass("FocusManagerFocusIndicator"); - } + using (View view = new View()) + { + testingTarget.FocusIndicator = view; + Assert.AreEqual(view, testingTarget.FocusIndicator, "Should be equal!"); + } - [Test] - [Category("P1")] - [Description("FocusManager Instance")] - [Property("SPEC", "Tizen.NUI.FocusManager.Instance A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "guowei.wang@samsung.com")] - public void FocusManagerInstance() - { - tlog.Debug(tag, $"FocusManagerInstance START"); - FocusManager a1 = FocusManager.Instance; - tlog.Debug(tag, $"FocusManagerInstance END (OK)"); - Assert.Pass("FocusManagerInstance"); + tlog.Debug(tag, $"FocusManagerFocusIndicator END (OK)"); } [Test] @@ -271,12 +305,24 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"FocusManagerSetCurrentFocusView START"); - FocusManager a1 = FocusManager.Instance; - View v1 = new View(); - a1.SetCurrentFocusView(v1); + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + using (View view = new View()) + { + try + { + testingTarget.SetCurrentFocusView(view); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } + tlog.Debug(tag, $"FocusManagerSetCurrentFocusView END (OK)"); - Assert.Pass("FocusManagerSetCurrentFocusView"); } [Test] @@ -291,6 +337,8 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"FocusManagerSetCurrentFocusViewWithNull START"); var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); try { @@ -315,11 +363,21 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"FocusManagerGetCurrentFocusView START"); - FocusManager a1 = FocusManager.Instance; - View v1 = a1.GetCurrentFocusView(); + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + try + { + testingTarget.GetCurrentFocusView(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } tlog.Debug(tag, $"FocusManagerGetCurrentFocusView END (OK)"); - Assert.Pass("FocusManagerGetCurrentFocusView"); } [Test] @@ -332,11 +390,22 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerMoveFocus() { tlog.Debug(tag, $"FocusManagerMoveFocus START"); - FocusManager a1 = FocusManager.Instance; - a1.MoveFocus(View.FocusDirection.Up); + + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + try + { + testingTarget.MoveFocus(View.FocusDirection.Up); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } tlog.Debug(tag, $"FocusManagerMoveFocus END (OK)"); - Assert.Pass("FocusManagerMoveFocus"); } [Test] @@ -349,11 +418,27 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerClearFocus() { tlog.Debug(tag, $"FocusManagerClearFocus START"); - FocusManager a1 = FocusManager.Instance; - a1.ClearFocus(); + + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + using (View view = new View() { Size = new Size(100, 200) }) + { + testingTarget.SetCurrentFocusView(view); + + try + { + testingTarget.ClearFocus(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } tlog.Debug(tag, $"FocusManagerClearFocus END (OK)"); - Assert.Pass("FocusManagerClearFocus"); } [Test] @@ -366,11 +451,22 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerMoveFocusBackward() { tlog.Debug(tag, $"FocusManagerMoveFocusBackward START"); - FocusManager a1 = FocusManager.Instance; - a1.MoveFocusBackward(); + + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + try + { + testingTarget.MoveFocusBackward(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } tlog.Debug(tag, $"FocusManagerMoveFocusBackward END (OK)"); - Assert.Pass("FocusManagerMoveFocusBackward"); } [Test] @@ -383,32 +479,26 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerSetAsFocusGroup() { tlog.Debug(tag, $"FocusManagerSetAsFocusGroup START"); - FocusManager a1 = FocusManager.Instance; - View v1 = new View(); - a1.SetAsFocusGroup(v1, true); - - tlog.Debug(tag, $"FocusManagerSetAsFocusGroup END (OK)"); - Assert.Pass("FocusManagerSetAsFocusGroup"); - } - [Test] - [Category("P1")] - [Description("FocusManager IsFocusGroup")] - [Property("SPEC", "Tizen.NUI.FocusManager.IsFocusGroup M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "guowei.wang@samsung.com")] - public void FocusManagerIsFocusGroup() - { - tlog.Debug(tag, $"FocusManagerIsFocusGroup START"); - FocusManager a1 = FocusManager.Instance; + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); - View v1 = new View(); - a1.IsFocusGroup(v1); - v1.Dispose(); + using (View v1 = new View()) + { + try + { + testingTarget.SetAsFocusGroup(v1, true); + Assert.IsTrue(testingTarget.IsFocusGroup(v1)); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } - tlog.Debug(tag, $"FocusManagerIsFocusGroup END (OK)"); - Assert.Pass("FocusManagerIsFocusGroup"); + tlog.Debug(tag, $"FocusManagerSetAsFocusGroup END (OK)"); } [Test] @@ -421,14 +511,25 @@ namespace Tizen.NUI.Devel.Tests public void FocusManagerGetFocusGroup() { tlog.Debug(tag, $"FocusManagerGetFocusGroup START"); - FocusManager a1 = FocusManager.Instance; - View v1 = new View(); - a1.GetFocusGroup(v1); - v1.Dispose(); + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + using (View v1 = new View()) + { + try + { + testingTarget.GetFocusGroup(v1); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } tlog.Debug(tag, $"FocusManagerGetFocusGroup END (OK)"); - Assert.Pass("FocusManagerGetFocusGroup"); } [Test] @@ -442,11 +543,83 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"FocusManagerSetCustomAlgorithm START"); - FocusManager a1 = FocusManager.Instance; - a1.SetCustomAlgorithm(null); + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + try + { + testingTarget.SetCustomAlgorithm(null); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } tlog.Debug(tag, $"FocusManagerSetCustomAlgorithm END (OK)"); - Assert.Pass("FocusManagerSetCustomAlgorithm"); + } + + [Test] + [Category("P1")] + [Description("FocusManager EnableDefaultAlgorithm")] + [Property("SPEC", "Tizen.NUI.FocusManager.EnableDefaultAlgorithm M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void FocusManagerEnableDefaultAlgorithm() + { + tlog.Debug(tag, $"FocusManagerEnableDefaultAlgorithm START"); + + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + try + { + testingTarget.EnableDefaultAlgorithm(true); + var result = testingTarget.IsDefaultAlgorithmEnabled(); + Assert.AreEqual(true, result, "Should be equal!"); + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught exception : Failed!"); + } + + tlog.Debug(tag, $"FocusManagerEnableDefaultAlgorithm END (OK)"); + } + + [Test] + [Category("P1")] + [Description("FocusManager SetFocusFinderRootView")] + [Property("SPEC", "Tizen.NUI.FocusManager.SetFocusFinderRootView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void FocusManagerSetFocusFinderRootView() + { + tlog.Debug(tag, $"FocusManagerSetFocusFinderRootView START"); + + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + try + { + using (View view = new View()) + { + testingTarget.SetFocusFinderRootView(view); + testingTarget.ResetFocusFinderRootView(); + } + } + catch(Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Catch exception: " + e.Message.ToString()); + } + + tlog.Debug(tag, $"FocusManagerSetFocusFinderRootView END (OK)"); } [Test] @@ -471,5 +644,34 @@ namespace Tizen.NUI.Devel.Tests } tlog.Debug(tag, $"FocusManagerGet END (OK)"); } + + + [Test] + [Category("P1")] + [Description("FocusManager GetFocusIndicatorView")] + [Property("SPEC", "Tizen.NUI.FocusManager.GetFocusIndicatorView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void FocusManagerGetFocusIndicatorView() + { + tlog.Debug(tag, $"FocusManagerGetFocusIndicatorView START"); + + var testingTarget = FocusManager.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PixelData"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of FocusManager type."); + + try + { + testingTarget.GetFocusIndicatorView(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + tlog.Debug(tag, $"FocusManagerGetFocusIndicatorView END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSDpTypeConverter.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSDpTypeConverter.cs new file mode 100755 index 0000000..c0069e4 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSDpTypeConverter.cs @@ -0,0 +1,120 @@ +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/Utility/DpTypeConverter ")] + public class PublicDpTypeConverter + { + 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("DpTypeConverter ConvertScriptToPixel.")] + [Property("SPEC", "Tizen.NUI.DpTypeConverter ConvertScriptToPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void DpTypeConverterConvertScriptToPixel() + { + tlog.Debug(tag, $"DpTypeConverterConvertScriptToPixel START"); + + try + { + var testingTarget = DpTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object DpTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of DpTypeConverter type."); + + var result = testingTarget.ConvertScriptToPixel("100dp"); + tlog.Debug(tag, "ConvertScriptToPixel(dp) : " + result); + + result = testingTarget.ConvertScriptToPixel("100px"); + tlog.Debug(tag, "ConvertScriptToPixel(px) : " + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"DpTypeConverterConvertScriptToPixel END (OK)"); + } + + [Test] + [Category("P1")] + [Description("DpTypeConverter ConvertToPixel.")] + [Property("SPEC", "Tizen.NUI.DpTypeConverter ConvertToPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void DpTypeConverterConvertToPixel() + { + tlog.Debug(tag, $"DpTypeConverterConvertToPixel START"); + + try + { + var testingTarget = DpTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object DpTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of DpTypeConverter type."); + + var result = testingTarget.ConvertToPixel(20.0f); + tlog.Debug(tag, "ConvertToPixel : " + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"DpTypeConverterConvertToPixel END (OK)"); + } + + [Test] + [Category("P1")] + [Description("DpTypeConverter ConvertFromPixel.")] + [Property("SPEC", "Tizen.NUI.DpTypeConverter ConvertFromPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void DpTypeConverterConvertFromPixel() + { + tlog.Debug(tag, $"DpTypeConverterConvertFromPixel START"); + + try + { + var testingTarget = DpTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object DpTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of DpTypeConverter type."); + + var result = testingTarget.ConvertFromPixel(30.0f); + tlog.Debug(tag, "ConvertFromPixel : " + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"DpTypeConverterConvertFromPixel END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSGraphicsTypeExtensions.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSGraphicsTypeExtensions.cs new file mode 100755 index 0000000..231f416 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSGraphicsTypeExtensions.cs @@ -0,0 +1,131 @@ +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/Utility/GraphicsTypeExtensions")] + public class PublicGraphicsTypeExtensionsTest + { + 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("GraphicsTypeExtensions DpToPx.")] + [Property("SPEC", "Tizen.NUI.GraphicsTypeExtensions.DpToPx M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void GraphicsTypeExtensionsDpToPx() + { + try + { + float temp0 = GraphicsTypeExtensions.DpToPx(10.0f); + tlog.Debug(tag, "DpToPx : " + temp0); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + float temp1 = GraphicsTypeExtensions.SpToPx(20.0f); + tlog.Debug(tag, "SpToPx : " + temp1); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + float temp2 = GraphicsTypeExtensions.PxToDp(20.0f); + tlog.Debug(tag, "PxToPx : " + temp2); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + float temp3 = GraphicsTypeExtensions.PxToSp(10.0f); + tlog.Debug(tag, "PxToSp : " + temp3); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + int temp4 = GraphicsTypeExtensions.DpToPx(20); + tlog.Debug(tag, "DpToPx : " + temp4); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + int temp5 = GraphicsTypeExtensions.SpToPx(30); + tlog.Debug(tag, "SpToPx : " + temp5); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + int temp6 = GraphicsTypeExtensions.PxToDp(10); + tlog.Debug(tag, "PxToDp : " + temp6); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + int temp7 = GraphicsTypeExtensions.PxToSp(20); + tlog.Debug(tag, "PxToSp : " + temp7); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + tlog.Debug(tag, $"GraphicsTypeExtensionsDpToPx END (OK)"); + } + } +} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSGraphicsTypeManager.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSGraphicsTypeManager.cs index 24dec41..0d71d69 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSGraphicsTypeManager.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSGraphicsTypeManager.cs @@ -83,5 +83,76 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"GraphicsTypeManagerRegisterCustomConverterForDynamicResourceBinding END (OK)"); } + + [Test] + [Category("P1")] + [Description("GraphicsTypeManager ScalingFactor.")] + [Property("SPEC", "Tizen.NUI.GraphicsTypeManager.ScalingFactor M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void GraphicsTypeManagerScalingFactor() + { + tlog.Debug(tag, $"GraphicsTypeManagerScalingFactor START"); + + Tizen.NUI.Binding.TypeConverter converter = new MyTypeConverter(); + + try + { + float temp0 = GraphicsTypeManager.Instance.ScalingFactor; + tlog.Debug(tag, "ScalingFactor : " + temp0); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + int temp1 = GraphicsTypeManager.Instance.Dpi; + tlog.Debug(tag, "Dpi : " + temp1); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + int temp2 = GraphicsTypeManager.Instance.BaselineDpi; + tlog.Debug(tag, "BaselineDpi : " + temp2); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + float temp4 = GraphicsTypeManager.Instance.Density; + tlog.Debug(tag, "Density : " + temp4); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + try + { + float temp5 = GraphicsTypeManager.Instance.ScaledDensity; + tlog.Debug(tag, "ScaledDensity : " + temp5); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + tlog.Debug(tag, $"GraphicsTypeManagerScalingFactor END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSPointTypeConverter.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSPointTypeConverter.cs new file mode 100755 index 0000000..d455bcf --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSPointTypeConverter.cs @@ -0,0 +1,127 @@ +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/Utility/PointTypeConverter ")] + public class PublicPointTypeConverterTest + { + 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("PointTypeConverter Instance.")] + [Property("SPEC", "Tizen.NUI.PointTypeConverter Instance C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PointTypeConverterInstance() + { + tlog.Debug(tag, $"PointTypeConverter Instance START"); + + var testingTarget = PointTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PointTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PointTypeConverter type."); + + tlog.Debug(tag, $"PointTypeConverterInstance END (OK)"); + } + + [Test] + [Category("P1")] + [Description("PointTypeConverter ConvertScriptToPixel.")] + [Property("SPEC", "Tizen.NUI.PointTypeConverter ConvertScriptToPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PointTypeConverterConvertScriptToPixel() + { + tlog.Debug(tag, $"PointTypeConverterConvertScriptToPixel START"); + + var testingTarget = PointTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PointTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PointTypeConverter type."); + + var result = testingTarget.ConvertScriptToPixel("100pt"); + tlog.Debug(tag, "ConvertScriptToPixel(pt)" + result); + + result = testingTarget.ConvertScriptToPixel("105px"); + tlog.Debug(tag, "ConvertScriptToPixel(px)" + result); + + tlog.Debug(tag, $"PointTypeConverterConvertScriptToPixel END (OK)"); + } + + + [Test] + [Category("P1")] + [Description("PointTypeConverter ConvertToPixel.")] + [Property("SPEC", "Tizen.NUI.PointTypeConverter ConvertToPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PointTypeConverterConvertToPixel() + { + tlog.Debug(tag, $"DpTypeConverterConvertToPixel START"); + + var testingTarget = PointTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PointTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PointTypeConverter type."); + + var result = testingTarget.ConvertToPixel(20.0f); + tlog.Debug(tag, "ConvertToPixel : " + result); + + tlog.Debug(tag, $"PointTypeConverterConvertToPixel END (OK)"); + } + + [Test] + [Category("P1")] + [Description("PointTypeConverter ConvertFromPixel.")] + [Property("SPEC", "Tizen.NUI.PointTypeConverter ConvertFromPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void PointTypeConverterConvertFromPixel() + { + tlog.Debug(tag, $"PointTypeConverterConvertFromPixel START"); + + var testingTarget = PointTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object PointTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of PointTypeConverter type."); + + var result0 = testingTarget.ConvertFromPixel(30.0f); + tlog.Debug(tag, "ConvertFromPixel : " + result0); + + var result1 = testingTarget.ConvertDpToPoint(10.0f); + tlog.Debug(tag, "ConvertDpToPoint : " + result1); + + var result2 = testingTarget.ConvertPointToDp(20.0f); + tlog.Debug(tag, "ConvertPointToDp : " + result2); + + var result3 = testingTarget.ConvertSpToPoint(10.0f); + tlog.Debug(tag, "ConvertSpToPoint : " + result3); + + var result4 = testingTarget.ConvertPointToSp(20.0f); + tlog.Debug(tag, "ConvertPointToSp : " + result4); + + tlog.Debug(tag, $"PointTypeConverterConvertFromPixel END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSScrollView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSScrollView.cs index 93c4804..a3ba3ff 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSScrollView.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSScrollView.cs @@ -1273,6 +1273,195 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"ScrollViewScrollToSpecifyDuration END (OK)"); } + [Test] + [Category("P1")] + [Description("ScrollView ScrollTo. With duration and alpha.")] + [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ScrollViewScrollToSpecifyDurationAlpha() + { + tlog.Debug(tag, $"ScrollViewScrollToSpecifyDurationAlpha START"); + + var testingTarget = new ScrollView(); + Assert.IsNotNull(testingTarget, "Can't create success object ScrollView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ScrollView type."); + + try + { + using (Vector2 vector = new Vector2(0.3f, 0.5f)) + { + using (AlphaFunction alpha = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutBack)) + { + testingTarget.ScrollTo(vector, 300, alpha); + } + } + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ScrollViewScrollToSpecifyDurationAlpha END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ScrollView ScrollTo.")] + [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ScrollViewScrollToPage() + { + tlog.Debug(tag, $"ScrollViewScrollToPage START"); + + var testingTarget = new ScrollView(); + Assert.IsNotNull(testingTarget, "Can't create success object ScrollView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ScrollView type."); + + try + { + testingTarget.ScrollTo(1); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ScrollViewScrollToPage END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ScrollView ScrollTo. With Duration.")] + [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ScrollViewScrollToWithDuration() + { + tlog.Debug(tag, $"ScrollViewScrollToWithDuration START"); + + var testingTarget = new ScrollView(); + Assert.IsNotNull(testingTarget, "Can't create success object ScrollView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ScrollView type."); + + try + { + testingTarget.ScrollTo(1, 300); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ScrollViewScrollToWithDuration END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ScrollView ScrollTo. With View.")] + [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ScrollViewScrollToWithView() + { + tlog.Debug(tag, $"ScrollViewScrollToWithView START"); + + var testingTarget = new ScrollView() + { + Size = new Size(Window.Instance.WindowSize.Width / 2, Window.Instance.WindowSize.Height / 3), + }; + Assert.IsNotNull(testingTarget, "Can't create success object ScrollView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ScrollView type."); + + View[] items = new View[10]; + for (int i = 0; i < 10; i++) + { + items[i] = new View() + { + Position = new Position(i * (Window.Instance.WindowSize.Width / 2), 0), + Size = new Size(Window.Instance.WindowSize.Width / 2, Window.Instance.WindowSize.Height / 3) + }; + testingTarget.Add(items[i]); + } + + try + { + testingTarget.ScrollTo(items[8]); + } + catch (Exception e) + { + tlog.Error(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + for (int i = 0; i < 10; i++) + { + items[i].Dispose(); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ScrollViewScrollToWithView END (OK)"); + } + + [Test] + [Category("P1")] + [Description("ScrollView ScrollTo. With (View, Duration).")] + [Property("SPEC", "Tizen.NUI.ScrollView.ScrollTo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ScrollViewScrollToWithViewAndDuration() + { + tlog.Debug(tag, $"ScrollViewScrollToWithViewAndDuration START"); + + var testingTarget = new ScrollView() + { + Size = new Size(Window.Instance.WindowSize.Width / 2, Window.Instance.WindowSize.Height / 3), + }; + Assert.IsNotNull(testingTarget, "Can't create success object ScrollView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ScrollView type."); + + View[] items = new View[10]; + for (int i = 0; i < 10; i++) + { + items[i] = new View() + { + Position = new Position(i * (Window.Instance.WindowSize.Width / 2), 0), + Size = new Size(Window.Instance.WindowSize.Width / 2, Window.Instance.WindowSize.Height / 3) + }; + testingTarget.Add(items[i]); + } + + try + { + testingTarget.ScrollTo(items[8], 300); + } + catch (Exception e) + { + tlog.Error(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + for (int i = 0; i < 10; i++) + { + items[i].Dispose(); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ScrollViewScrollToWithViewAndDuration END (OK)"); + } + [Test] [Category("P1")] [Description("ScrollView ScrollToSnapPoint.")] @@ -1345,7 +1534,7 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); tlog.Debug(tag, $"ScrollViewApplyEffect END (OK)"); } - + [Test] [Category("P1")] [Description("ScrollView RemoveEffect.")] @@ -1390,6 +1579,51 @@ namespace Tizen.NUI.Devel.Tests testingTarget.Dispose(); tlog.Debug(tag, $"ScrollViewRemoveEffect END (OK)"); } + + [Test] + [Category("P1")] + [Description("ScrollView RemoveAllEffects.")] + [Property("SPEC", "Tizen.NUI.ScrollView.RemoveAllEffects M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void ScrollViewRemoveAllEffects() + { + tlog.Debug(tag, $"ScrollViewRemoveAllEffects START"); + + var testingTarget = new ScrollView(); + Assert.IsNotNull(testingTarget, "Can't create success object ScrollView"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ScrollView type."); + + using (Path path = new Path()) + { + using (Vector2 stageSize = Window.Instance.WindowSize) + { + using (Vector3 TABLE_RELATIVE_SIZE = new Vector3(0.95f, 0.9f, 0.8f)) + { + ScrollViewPagePathEffect effect = new ScrollViewPagePathEffect(path, + new Vector3(-1.0f, 0.0f, 0.0f), + ScrollView.Property.ScrollFinalX, + new Vector3(stageSize.X * TABLE_RELATIVE_SIZE.X, stageSize.Y * TABLE_RELATIVE_SIZE.Y, 0.0f), + 3); + testingTarget.ApplyEffect(effect); + + try + { + testingTarget.RemoveAllEffects(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + } + } + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ScrollViewRemoveAllEffects END (OK)"); + } [Test] [Category("P1")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSSpTypeConverter.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSSpTypeConverter.cs new file mode 100755 index 0000000..82d0e8b --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Utility/TSSpTypeConverter.cs @@ -0,0 +1,111 @@ +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/Utility/SpTypeConverter ")] + public class PublicSpTypeConverterTest + { + 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("SpTypeConverter Instance.")] + [Property("SPEC", "Tizen.NUI.SpTypeConverter Instance C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SpTypeConverterInstance() + { + tlog.Debug(tag, $"SpTypeConverterInstance START"); + + var testingTarget = SpTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object SpTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of SpTypeConverter type."); + + tlog.Debug(tag, $"SpTypeConverterInstance END (OK)"); + } + + [Test] + [Category("P1")] + [Description("SpTypeConverter ConvertScriptToPixel.")] + [Property("SPEC", "Tizen.NUI.SpTypeConverter ConvertScriptToPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SpTypeConverterConvertScriptToPixel() + { + tlog.Debug(tag, $"SpTypeConverterConvertScriptToPixel START"); + + var testingTarget = SpTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object SpTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of SpTypeConverter type."); + + var result = testingTarget.ConvertScriptToPixel("100sp"); + tlog.Debug(tag, "ConvertScriptToPixel : " + result); + + tlog.Debug(tag, $"SpTypeConverterConvertScriptToPixel END (OK)"); + } + + [Test] + [Category("P1")] + [Description("SpTypeConverter ConvertToPixel.")] + [Property("SPEC", "Tizen.NUI.SpTypeConverter ConvertToPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SpTypeConverterConvertToPixel() + { + tlog.Debug(tag, $"SpTypeConverterConvertToPixel START"); + + var testingTarget = SpTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object SpTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of SpTypeConverter type."); + + var result = testingTarget.ConvertToPixel(20.0f); + tlog.Debug(tag, "ConvertToPixel : " + result); + + tlog.Debug(tag, $"SpTypeConverterConvertToPixel END (OK)"); + } + + [Test] + [Category("P1")] + [Description("SpTypeConverter ConvertFromPixel.")] + [Property("SPEC", "Tizen.NUI.SpTypeConverter ConvertFromPixel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SpTypeConverterConvertFromPixel() + { + tlog.Debug(tag, $"SpTypeConverterConvertFromPixel START"); + + var testingTarget = SpTypeConverter.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object SpTypeConverter "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of SpTypeConverter type."); + + var result = testingTarget.ConvertFromPixel(30.0f); + tlog.Debug(tag, "ConvertToPixel : " + result); + + tlog.Debug(tag, $"SpTypeConverterConvertFromPixel END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Widget/TSWidget.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Widget/TSWidget.cs index e2fc70a..7d78438 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Widget/TSWidget.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Widget/TSWidget.cs @@ -106,6 +106,7 @@ namespace Tizen.NUI.Devel.Tests try { widget.SetContentInfo("PublicWidgetTest"); + widget.SetUsingKeyEvent(true); } catch (Exception e) { diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Widget/TSWidgetView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Widget/TSWidgetView.cs index c54e632..6fceb68 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Widget/TSWidgetView.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Widget/TSWidgetView.cs @@ -48,7 +48,7 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(widgetView, "Can't create success object WidgetView"); Assert.IsInstanceOf(widgetView, "Should be an instance of WidgetView type."); - tlog.Debug(tag, " widgetView.ID : " + widgetView.ID); + tlog.Debug(tag, "widgetView.WidgetID : " + widgetView.WidgetID); tlog.Debug(tag, "widgetView.InstanceID : " + widgetView.InstanceID); tlog.Debug(tag, "widgetView.ContentInfo : " + widgetView.ContentInfo); tlog.Debug(tag, "widgetView.Title : " + widgetView.Title); diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSBorderWindow.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSBorderWindow.cs new file mode 100755 index 0000000..013596e --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSBorderWindow.cs @@ -0,0 +1,107 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using System.Collections.Generic; +using System.Runtime.InteropServices; + + +namespace Tizen.NUI.Devel.Tests +{ + using static Tizen.NUI.Window; + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/Window/ BorderWindow.cs")] + internal class PublicBorderWindowTest + { + private const string tag = "NUITEST"; + private Window win = null; + + internal class IBorderInterfaceImpl : IBorderInterface + { + public uint BorderLineThickness => 2; + + public uint TouchThickness => 2; + + public float BorderHeight => 3; + + public Size2D MinSize => new Size2D(1, 1); + + public Size2D MaxSize => new Size2D(5, 5); + + public Window BorderWindow + { + get + { + return Window.Instance; + } + set + { + this.BorderWindow = Window.Instance; + } + } + + public bool OverlayMode => true; + + public Window.BorderResizePolicyType ResizePolicy => Window.BorderResizePolicyType.Free; + + public void CreateBorderView(View borderView) { } + + public bool CreateBottomBorderView(View bottomView) { return true; } + + public bool CreateTopBorderView(View topView) { return true; } + + public void Dispose() { } + + public void OnCreated(View borderView) { } + + public void OnMaximize(bool isMaximized) { } + + public void OnMinimize(bool isMinimized) { } + + public void OnOverlayMode(bool enabled) { } + + public void OnRequestResize() { } + + public void OnResized(int width, int height) { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("Window EnableBorder")] + [Property("SPEC", "Tizen.NUI.Window.EnableBorder M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "RM")] + public void BorderWindowEnableBorder() + { + tlog.Debug(tag, $"WindowBorderDestroy START"); + + try + { + var testingTarget = new Window(); + testingTarget.EnableBorder(null, null); + } + catch (Exception e) + { + tlog.Error(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"BorderWindowEnableBorder END (OK)"); + } + } +} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSDefaultBorder.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSDefaultBorder.cs new file mode 100755 index 0000000..34f031f --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSDefaultBorder.cs @@ -0,0 +1,334 @@ +using global::System; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using Tizen.NUI.Components; +using Tizen.NUI.BaseComponents; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/Window/ DefaultBorder.cs")] + internal class PublicDefaultBorderTest + { + private const string tag = "NUITEST"; + + internal class IBorderInterfaceImpl : IBorderInterface + { + public uint BorderLineThickness => 2; + + public uint TouchThickness => 2; + + public float BorderHeight => 3; + + public Size2D MinSize => new Size2D(1, 1); + + public Size2D MaxSize => new Size2D(5, 5); + + public Window BorderWindow + { + get + { + return Window.Instance; + } + set + { + this.BorderWindow = Window.Instance; + } + } + + public bool OverlayMode => true; + + public Window.BorderResizePolicyType ResizePolicy => Window.BorderResizePolicyType.Free; + + public void CreateBorderView(View borderView) { } + + public bool CreateBottomBorderView(View bottomView) { return true; } + + public bool CreateTopBorderView(View topView) { return true; } + + public void Dispose() { } + + public void OnCreated(View borderView) { } + + public void OnMaximize(bool isMaximized) { } + + public void OnMinimize(bool isMinimized) { } + + public void OnOverlayMode(bool enabled) { } + + public void OnRequestResize() { } + + public void OnResized(int width, int height) { } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("Create a DefaultBorder object.")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.contructor C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "")] + public void DefaultBorderConstructor() + { + tlog.Debug(tag, $"DefaultBorderConstructor START"); + + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.Dispose(); + + tlog.Debug(tag, $"DefaultBorderConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("DefaultBorder MaxSize ")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.MaxSize A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void DefaultBorderMaxSize() + { + tlog.Debug(tag, $"DefaultBorderMaxSize START"); + + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "null handle returned"); + Assert.IsInstanceOf(testingTarget, "Should return DefaultBorder instance."); + + testingTarget.MaxSize = new Size2D(100, 100); + Assert.AreEqual(100, testingTarget.MaxSize.Width, "Should be equal!"); + Assert.AreEqual(100, testingTarget.MaxSize.Height, "Should be equal!"); + + testingTarget.Dispose(); + tlog.Debug(tag, $"DefaultBorderMaxSize END (OK)"); + } + + [Test] + [Category("P1")] + [Description(" DefaultBorder CreateTopBorderView.")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.CreateTopBorderView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + public void DefaultBorderCreateTopBorderViewtopView() + { + tlog.Debug(tag, $"DefaultBorderCreateTopBorderViewtopView START"); + + using (View topView = new View() { Size = new Size(Window.Instance.WindowSize.Width, 10) } ) + { + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + var result = testingTarget.CreateTopBorderView(topView); + tlog.Debug(tag, "CreateTopBorderView : " + result); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"DefaultBorderCreateTopBorderViewtopView END (OK)"); + } + + [Test] + [Category("P1")] + [Description(" DefaultBorder CreateBottomBorderView.")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.CreateBottomBorderView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + public void DefaultBorderCreateTopBorderViewbottomView() + { + tlog.Debug(tag, $"DefaultBorderCreateBottomBorderViewbottomView START"); + + using (View bottomView = new View() { Size = new Size(Window.Instance.WindowSize.Width, 10) }) + { + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + var result = testingTarget.CreateBottomBorderView(bottomView); + tlog.Debug(tag, "CreateBottomBorderView : " + result); + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"DefaultBorderCreateBottomBorderViewbottomView END (OK)"); + } + + [Test] + [Category("P1")] + [Description(" DefaultBorder CreateBorderView.")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.CreateBorderView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + public void DefaultBorderCreateBorderView() + { + tlog.Debug(tag, $"DefaultBorderCreateBorderView START"); + + using (View borderView = new View() ) + { + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + try + { + testingTarget.CreateBorderView(borderView); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"DefaultBorderCreateBorderView END (OK)"); + } + + [Test] + [Category("P1")] + [Description(" DefaultBorder CreateBorderView1.")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.CreateBorderView1 M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + public void DefaultBorderCreateBorderView1() + { + tlog.Debug(tag, $"DefaultBorderCreateBorderView1 START"); + + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + try + { + testingTarget.CreateBorderView(null); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"DefaultBorderCreateBorderView END (OK)"); + } + + [Test] + [Category("P1")] + [Description("DefaultBorder OnResized.")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.OnResized M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + public void DefaultBorderOnResized() + { + tlog.Debug(tag, $"DefaultBorderOnResized START"); + + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + try + { + testingTarget.OnResized(50, 50); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"DefaultBorderOnResized END (OK)"); + } + + [Test] + [Category("P1")] + [Description("DefaultBorder OnMaximizeAndOnMinimize.")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.OnMaximizeAndOnMinimize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + public void DefaultBorderOnMaximize() + { + tlog.Debug(tag, $"DefaultBorderOnMaximizeAndOnMinimize START"); + + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + try + { + testingTarget.OnMaximize(true); + testingTarget.OnMaximize(false); + testingTarget.OnMinimize(true); + testingTarget.OnMinimize(false); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"DefaultBorderOnMaximizeAndOnMinimize END (OK)"); + } + + [Test] + [Category("P1")] + [Description("DefaultBorder OnOverlayMode.")] + [Property("SPEC", "Tizen.NUI.DefaultBorder.OnOverlayMode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("COVPARAM", "")] + public void DefaultBorderOnOverlayMode() + { + tlog.Debug(tag, $"DefaultBorderOnOverlayMode START"); + + var testingTarget = new DefaultBorder(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + using (View view = new View()) + { + testingTarget.CreateBorderView(view); + testingTarget.OverlayMode = true; + + try + { + testingTarget.OnOverlayMode(true); + testingTarget.OnOverlayMode(false); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"DefaultBorderOnOverlayMode END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSGLWindow.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSGLWindow.cs index d63f631..f7dbca2 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSGLWindow.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSGLWindow.cs @@ -175,7 +175,6 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"GLWindowHide END (OK)"); } - [Test] [Category("P1")] [Description("GLWindow Raise")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSGLWindowEvent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSGLWindowEvent.cs index 638468f..51497ee 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSGLWindowEvent.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSGLWindowEvent.cs @@ -113,6 +113,33 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] + [Description("GLWindow.ResizedEventArgs WindowSize")] + [Property("SPEC", "Tizen.NUI.GLWindow.ResizedEventArgs.WindowSize A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void GLWindowResizedEventArgsWindowSize() + { + tlog.Debug(tag, $"GLWindowResizedEventArgsWindowSize START"); + + try + { + var testingTarget = new GLWindow.ResizedEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object ResizedEventArgs "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of ResizedEventArgs type."); + + var resultsize = testingTarget.WindowSize; + testingTarget.WindowSize = resultsize; + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + tlog.Debug(tag, $"GLWindowResizedEventArgsWindowSize END (OK)"); + } + + [Test] + [Category("P1")] [Description("GLWindow GLWindowVisibiltyChangedSignalEmit")] [Property("SPEC", "Tizen.NUI.GLWindow.VisibiltyChangedSignalEmit M")] [Property("SPEC_URL", "-")] @@ -133,6 +160,83 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"GLWindowVisibiltyChangedSignalEmit END (OK)"); } + + [Test] + [Category("P1")] + [Description("GLWindowEvent.FocusChangedEventArgs FocusGained.")] + [Property("SPEC", "Tizen.NUI.GLWindowEvent.FocusChangedEventArgs.FocusGained A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void GLWindowEventFocusChangedEventArgsFocusGained() + { + tlog.Debug(tag, $"GLWindowEventFocusChangedEventArgsFocusGained START"); + + var testingTarget = new GLWindow.FocusChangedEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window.GLWindowEvent.FocusChangedEventArgs type."); + + testingTarget.FocusGained = true; + tlog.Debug(tag, "FocusGained : " + testingTarget.FocusGained); + + tlog.Debug(tag, $"GLWindowEventFocusChangedEventArgsFocusGained END (OK)"); + } + + [Test] + [Category("P1")] + [Description("GLWindow.KeyEventArgs Key")] + [Property("SPEC", "Tizen.NUI.GLWindow.KeyEventArgs.Key A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void GLWindowKeyEventArgsKey() + { + tlog.Debug(tag, $"GLWindowKeyEventArgsKey START"); + + try + { + var testingTarget = new GLWindow.KeyEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object KeyEventArgs "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of KeyEventArgs type."); + + var resultKey = testingTarget.Key; + testingTarget.Key = resultKey; + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + tlog.Debug(tag, $"GLWindowKeyEventArgsKey END (OK)"); + } + + [Test] + [Category("P1")] + [Description("GLWindow.TouchEventArgs Touch")] + [Property("SPEC", "Tizen.NUI.GLWindow.TouchEventArgs.Touch A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void GLWindowTouchEventArgsTouch() + { + tlog.Debug(tag, $"GLWindowTouchEventArgsTouch START"); + + try + { + var testingTarget = new GLWindow.TouchEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object TouchEventArgs "); + Assert.IsInstanceOf(testingTarget, "Should be an instance of TouchEventArgs type."); + + var resultTouch = testingTarget.Touch; + testingTarget.Touch = resultTouch; + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception: Failed!"); + } + + tlog.Debug(tag, $"GLWindowTouchEventArgsTouch END (OK)"); + } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs index a30767e..8dec2da 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs @@ -2,6 +2,8 @@ using System; using System.Collections.Generic; using static Tizen.NUI.Window; +using System.Reflection; +using Tizen.NUI.BaseComponents; namespace Tizen.NUI.Devel.Tests { @@ -14,6 +16,7 @@ namespace Tizen.NUI.Devel.Tests private const string tag = "NUITEST"; private Window win = null; private Rectangle rec = null; + private IBorderInterface borderInterface = null; [SetUp] public void Init() @@ -21,7 +24,7 @@ namespace Tizen.NUI.Devel.Tests tlog.Info(tag, "Init() is called!"); rec = new Rectangle(0, 0, 100, 200); - win = new Window(rec); + win = new Window(rec); } [TearDown] @@ -29,7 +32,7 @@ namespace Tizen.NUI.Devel.Tests { rec.Dispose(); if (win != null) - { + { win.Destroy(); win = null; } @@ -49,11 +52,8 @@ namespace Tizen.NUI.Devel.Tests try { - using (Rectangle ps = new Rectangle(0, 0, 150, 250)) - { - win.WindowPositionSize = ps; - tlog.Debug(tag, "WindowPositionSize : " + win.WindowPositionSize); - } + win.WindowPositionSize = rec; + tlog.Debug(tag, "WindowPositionSize : " + win.WindowPositionSize); } catch (Exception e) { @@ -65,6 +65,91 @@ namespace Tizen.NUI.Devel.Tests } [Test] + [Category("P2")] + [Description("Window WindowPositionSize, with null.")] + [Property("SPEC", "Tizen.NUI.Window.WindowPositionSize A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void WindowWindowPositionSizeWithNull() + { + tlog.Debug(tag, $"WindowWindowPositionSizeWithNull START"); + + try + { + Rectangle pointSize = null; + win.WindowPositionSize = pointSize; + } + catch (ArgumentNullException e) + { + tlog.Debug(tag, e.Message.ToString()); + tlog.Debug(tag, $"WindowWindowPositionSizeWithNull END (OK)"); + Assert.Pass("Caught Exception : Failed!"); + } + } + + [Test] + [Category("P1")] + [Description("Window WindowPosition")] + [Property("SPEC", "Tizen.NUI.Window.WindowPosition A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void WindowWindowPosition() + { + tlog.Debug(tag, $"WindowWindowPosition START"); + + tlog.Debug(tag, "WindowPosition : X , " + win.WindowPosition.X); + tlog.Debug(tag, "WindowPosition : Y , " + win.WindowPosition.Y); + + using ( Position2D pos = new Position2D(100, 200)) + { + win.WindowPosition = pos; + tlog.Debug(tag, "WindowPosition : X , " + pos.X); + tlog.Debug(tag, "WindowPosition : Y , " + pos.Y); + } + + tlog.Debug(tag, $"WindowWindowPosition END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window WindowPosition, with null.")] + [Property("SPEC", "Tizen.NUI.Window.WindowPosition A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void WindowWindowPositionWithNull() + { + tlog.Debug(tag, $"WindowWindowPositionWithNull START"); + + try + { + Position2D pos = null; + win.WindowPosition = pos; + } + catch (ArgumentNullException e) + { + tlog.Debug(tag, e.Message.ToString()); + tlog.Debug(tag, $"WindowWindowPositionWithNull END (OK)"); + Assert.Pass("Caught ArgumentNUllException : Passed!"); + } + } + + [Test] + [Category("P1")] + [Description("Window Title")] + [Property("SPEC", "Tizen.NUI.Window.Title A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void WindowTitle() + { + tlog.Debug(tag, $"WindowTitle START"); + + win.Title = "title"; + tlog.Debug(tag, "Title : " + win.Title); + + tlog.Debug(tag, $"WindowTitle END (OK)"); + } + + [Test] [Category("P1")] [Description("Window GetLayer")] [Property("SPEC", "Tizen.NUI.Window.GetLayer M")] @@ -155,7 +240,7 @@ namespace Tizen.NUI.Devel.Tests try { - win.GetNativeHandle(); + win.GetNativeHandle(); } catch (Exception e) { @@ -165,65 +250,160 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"WindowGetNativeHandle END (OK)"); } + + [Test] + [Category("P1")] + [Description("Window SetAcceptFocus")] + [Property("SPEC", "Tizen.NUI.Window.SetAcceptFocus M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetAcceptFocus() + { + tlog.Debug(tag, $"WindowSetAcceptFocus START"); - [Test] + win.SetAcceptFocus(true); + Assert.IsTrue(win.IsFocusAcceptable()); + + tlog.Debug(tag, $"WindowSetAcceptFocus END (OK)"); + } + + [Test] [Category("P1")] - [Description("Window Add")] - [Property("SPEC", "Tizen.NUI.Window.Add M")] + [Description("Window Show")] + [Property("SPEC", "Tizen.NUI.Window.Show M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowAdd() + public void WindowShow() { - tlog.Debug(tag, $"WindowAdd START"); + tlog.Debug(tag, $"WindowShow START"); try - { - Layer layer = null; - win.Add(layer); + { + win.Show(); + win.Hide(); } - catch (ArgumentNullException e) + catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, $"WindowAdd END (OK)"); - Assert.Pass("Caught ArgumentNullException : Passed!"); + Assert.Fail("Caught Exception : Failed!"); } + + tlog.Debug(tag, $"WindowShow END (OK)"); } + + [Test] + [Category("P1")] + [Description("Window AddAuxiliaryHint")] + [Property("SPEC", "Tizen.NUI.Window.AddAuxiliaryHint M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowAddAuxiliaryHint() + { + tlog.Debug(tag, $"WindowAddAuxiliaryHint START"); - [Test] + try + { + var id1 = win.AddAuxiliaryHint("wm.policy.win.resize_aspect_ratio", "0"); + tlog.Debug(tag, "Auxiliary hint1 : " + id1); + + var id2 = win.AddAuxiliaryHint("wm.policy.win.reset_audio_volume", "1"); + tlog.Debug(tag, "Auxiliary hint2 : " + id2); + + var cnt = win.GetSupportedAuxiliaryHintCount(); + tlog.Debug(tag, "GetSupportedAuxiliaryHintCount : " + cnt); + + win.GetSupportedAuxiliaryHint(1); + win.RemoveAuxiliaryHint(id1); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowAddAuxiliaryHint END (OK)"); + } + + [Test] [Category("P1")] - [Description("Window Remove")] - [Property("SPEC", "Tizen.NUI.Window.Remove M")] + [Description("Window SetAuxiliaryHintValue")] + [Property("SPEC", "Tizen.NUI.Window.SetAuxiliaryHintValue M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowRemove() + public void WindowSetAuxiliaryHintValue() { - tlog.Debug(tag, $"WindowRemove START"); + tlog.Debug(tag, $"WindowSetAuxiliaryHintValue START"); try { - Layer layer = null; - win.Remove(layer); + var id0 = win.AddAuxiliaryHint("wm.policy.win.resize_aspect_ratio", "0"); + tlog.Debug(tag, "Auxiliary hint : " + id0); + + win.SetAuxiliaryHintValue(id0, "1"); + var result = win.GetAuxiliaryHintValue(id0); + Assert.AreEqual("1", result, "Should be equal!"); + + var id1 = win.GetAuxiliaryHintId("wm.policy.win.resize_aspect_ratio"); + Assert.AreEqual(id0, id1, "Should be equal!"); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, $"WindowRemove END (OK)"); + tlog.Debug(tag, $"WindowSetAuxiliaryHintValue END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } } + + [Test] + [Category("P1")] + [Description("Window SetOpaqueState")] + [Property("SPEC", "Tizen.NUI.Window.SetOpaqueState M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetOpaqueState() + { + tlog.Debug(tag, $"WindowSetOpaqueState START"); - [Test] + win.SetOpaqueState(true); + Assert.IsTrue(win.IsOpaqueState()); + + tlog.Debug(tag, $"WindowSetOpaqueState END (OK)"); + } + + [Test] [Category("P1")] - [Description("Window GetRenderTaskList")] - [Property("SPEC", "Tizen.NUI.Window.GetRenderTaskList M")] + [Description("Window SetClass")] + [Property("SPEC", "Tizen.NUI.Window.SetClass M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowGetRenderTaskList() + public void WindowSetClass() { - tlog.Debug(tag, $"WindowGetRenderTaskList START"); + tlog.Debug(tag, $"WindowSetClass START"); + try + { + win.SetClass("windowTitle", ""); + } + catch (Exception e) { - win.GetRenderTaskList(); + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + } + + [Test] + [Category("P1")] + [Description("Window Raise")] + [Property("SPEC", "Tizen.NUI.Window.Raise M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowRaise() + { + tlog.Debug(tag, $"WindowRaise START"); + + try + { + win.Raise(); } catch (Exception e) { @@ -231,91 +411,167 @@ namespace Tizen.NUI.Devel.Tests Assert.Fail("Caught Exception : Failed!"); } - tlog.Debug(tag, $"WindowGetRenderTaskList END (OK)"); + tlog.Debug(tag, $"WindowRaise END (OK)"); } - - [Test] + + [Test] [Category("P1")] - [Description("Window SetWindowSize")] - [Property("SPEC", "Tizen.NUI.Window.SetWindowSize M")] + [Description("Window Lower")] + [Property("SPEC", "Tizen.NUI.Window.Lower M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowSetWindowSize() + public void WindowLower() { - tlog.Debug(tag, $"WindowSetWindowSize START"); + tlog.Debug(tag, $"WindowLower START"); try + { + win.Lower(); + } + catch (Exception e) { - Size2D s1 = null; - win.SetWindowSize(s1); + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); } - catch (ArgumentNullException e) + + tlog.Debug(tag, $"WindowLower END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window Activate")] + [Property("SPEC", "Tizen.NUI.Window.Activate M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowActivate() + { + tlog.Debug(tag, $"WindowActivate START"); + + try + { + win.Activate(); + } + catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, $"WindowSetWindowSize END (OK)"); - Assert.Pass("Caught ArgumentNullException : Passed!"); + Assert.Fail("Caught Exception : Failed!"); } + + tlog.Debug(tag, $"WindowActivate END (OK)"); } + + [Test] + [Category("P1")] + [Description("Window KeepRendering")] + [Property("SPEC", "Tizen.NUI.Window.KeepRendering M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowKeepRendering() + { + tlog.Debug(tag, $"WindowKeepRendering START"); - [Test] + try + { + win.KeepRendering(3000); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowKeepRendering END (OK)"); + } + + [Test] [Category("P1")] - [Description("Window SetPosition")] - [Property("SPEC", "Tizen.NUI.Window.SetPosition M")] + [Description("Window GrabKeyTopmost")] + [Property("SPEC", "Tizen.NUI.Window.GrabKeyTopmost M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowSetPosition() + public void WindowGrabKeyTopmost() { - tlog.Debug(tag, $"WindowSetPosition START"); + tlog.Debug(tag, $"WindowGrabKeyTopmost START"); try { - Position2D position = null; - win.SetPosition(position); + win.GrabKeyTopmost(50); + win.UngrabKeyTopmost(50); } - catch (ArgumentNullException e) + catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, $"WindowSetPosition END (OK)"); - Assert.Pass("Caught ArgumentNullException : Passed!"); + Assert.Fail("Caught Exception : Failed!"); } + + tlog.Debug(tag, $"WindowGrabKeyTopmost END (OK)"); } + + [Test] + [Category("P1")] + [Description("Window GrabKey")] + [Property("SPEC", "Tizen.NUI.Window.GrabKey M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGrabKey() + { + tlog.Debug(tag, $"WindowGrabKey START"); - [Test] + try + { + win.GrabKey(50, KeyGrabMode.Shared); + win.UngrabKey(50); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowUngrabKey END (OK)"); + } + + [Test] [Category("P1")] - [Description("Window SetPositionSize")] - [Property("SPEC", "Tizen.NUI.Window.SetPositionSize M")] + [Description("Window SetKeyboardRepeatInfo")] + [Property("SPEC", "Tizen.NUI.Window.SetKeyboardRepeatInfo M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowSetPositionSize() + public void WindowSetKeyboardRepeatInfo() { - tlog.Debug(tag, $"WindowSetPositionSize START"); + tlog.Debug(tag, $"WindowSetKeyboardRepeatInfo START"); + try { - Rectangle ps = new Rectangle(0, 0, 150, 250); - win.SetPositionSize(ps); + win.SetKeyboardRepeatInfo(50.0f, 0.3f); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } - tlog.Debug(tag, $"WindowSetPositionSize END (OK)"); + + tlog.Debug(tag, $"WindowSetKeyboardRepeatInfo END (OK)"); } [Test] [Category("P1")] - [Description("Window AddFrameUpdateCallback")] - [Property("SPEC", "Tizen.NUI.Window.AddFrameUpdateCallback M")] + [Description("Window AddLayer")] + [Property("SPEC", "Tizen.NUI.Window.AddLayer M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowAddFrameUpdateCallback() + public void WindowAddLayer() { - tlog.Debug(tag, $"WindowAddFrameUpdateCallback START"); + tlog.Debug(tag, $"WindowAddLayer START"); + try { - FrameUpdateCallbackInterface callback = new FrameUpdateCallbackInterface(); - win.AddFrameUpdateCallback(callback); - win.RemoveFrameUpdateCallback(callback); + using (Layer layer = new Layer()) + { + win.AddLayer(layer); + tlog.Debug(tag, "GetLayerCount : " + win.GetLayerCount()); + win.RemoveLayer(layer); + } } catch (Exception e) { @@ -323,107 +579,951 @@ namespace Tizen.NUI.Devel.Tests Assert.Fail("Caught Exception : Failed!"); } - tlog.Debug(tag, $"WindowAddFrameUpdateCallback END (OK)"); + tlog.Debug(tag, $"WindowAddLayer END (OK)"); } [Test] - [Category("P1")] - [Description("Window AddFrameRenderedCallback")] - [Property("SPEC", "Tizen.NUI.Window.AddFrameRenderedCallback M")] + [Category("P2")] + [Description("Window AddLayer, layer is null.")] + [Property("SPEC", "Tizen.NUI.Window.AddLayer M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowAddFrameRenderedCallback() + public void WindowAddLayerWithNull() { - tlog.Debug(tag, $"WindowAddFrameRenderedCallback START"); - + tlog.Debug(tag, $"WindowAddLayerWithNull START"); + try { - FrameCallbackType callback = null; - win.AddFrameRenderedCallback(callback, 1); + Layer layer = null; + win.AddLayer(layer); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, $"WindowAddFrameRenderedCallback END (OK)"); + tlog.Debug(tag, $"WindowAddLayerWithNull END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } } [Test] - [Category("P1")] - [Description("Window AddFramePresentedCallback")] - [Property("SPEC", "Tizen.NUI.Window.AddFramePresentedCallback M")] + [Category("P2")] + [Description("Window RemoveLayer, layer is null.")] + [Property("SPEC", "Tizen.NUI.Window.RemoveLayer M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowAddFramePresentedCallback() + public void WindowRemoveLayerWithNull() { - tlog.Debug(tag, $"WindowAddFramePresentedCallback START"); - + tlog.Debug(tag, $"WindowRemoveLayerWithNull START"); + try { - FrameCallbackType callback = null; - win.AddFramePresentedCallback(callback, 1); + Layer layer = null; + win.RemoveLayer(layer); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); - tlog.Debug(tag, $"WindowAddFramePresentedCallback END (OK)"); + tlog.Debug(tag, $"WindowRemoveLayerWithNull END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } } [Test] [Category("P1")] - [Description("Window Get")] - [Property("SPEC", "Tizen.NUI.Window.Get M")] + [Description("Window FeedKey")] + [Property("SPEC", "Tizen.NUI.Window.FeedKey M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowGet() + public void WindowFeedKey() { - tlog.Debug(tag, $"WindowGet START"); + tlog.Debug(tag, $"WindowFeedKey START"); - using (NUI.BaseComponents.View view = new NUI.BaseComponents.View() { Color = Color.Cyan }) + try { - NUIApplication.GetDefaultWindow().Add(view); - - try + using (Key key = new Key() { }) { - var result = Window.Get(view); - } - catch (Exception e) - { - tlog.Debug(tag, e.Message.ToString()); - Assert.Fail("Caught Exception : Failed!"); + win.FeedKey(key); } - - NUIApplication.GetDefaultWindow().Remove(view); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); } - tlog.Debug(tag, $"WindowGet END (OK)"); + tlog.Debug(tag, $"WindowFeedKey END (OK)"); } + + [Test] + [Category("P1")] + [Description("Window SetTransparency")] + [Property("SPEC", "Tizen.NUI.Window.SetTransparency M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetTransparency() + { + tlog.Debug(tag, $"WindowSetTransparency START"); - [Test] + try + { + win.SetTransparency(true); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowSetTransparency END (OK)"); + } + + [Test] [Category("P1")] - [Description("Window EnableFloatingMode")] - [Property("SPEC", "Tizen.NUI.Window.EnableFloatingMode M")] + [Description("Window ObjectDump")] + [Property("SPEC", "Tizen.NUI.Window.ObjectDump M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] - public void WindowEnableFloatingMode() + public void WindowObjectDump() { - tlog.Debug(tag, $"WindowEnableFloatingMode START"); + tlog.Debug(tag, $"WindowObjectDump START"); try { - Window.Instance.EnableFloatingMode(true); + using (View view = new View()) + { + win.GetRootLayer().Add(view); + win.ObjectDump(); + } } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } - - tlog.Debug(tag, $"WindowEnableFloatingMode END (OK)"); + + tlog.Debug(tag, $"WindowObjectDump END (OK)"); } + + [Test] + [Category("P2")] + [Description("Window SetMimimumSize")] + [Property("SPEC", "Tizen.NUI.Window.SetMimimumSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetMimimumSizeWithNull() + { + tlog.Debug(tag, $"WindowSetMimimumSizeWithNull START"); + + try + { + Size2D size = null; + win.SetMimimumSize(size); + } + catch (ArgumentNullException e) + { + tlog.Debug(tag, e.Message.ToString()); + tlog.Debug(tag, $"WindowSetMimimumSizeWithNull END (OK)"); + Assert.Pass("Caught ArgumentNullException : Passed!"); + } + } + + [Test] + [Category("P1")] + [Description("Window SetMimimumSize")] + [Property("SPEC", "Tizen.NUI.Window.SetMimimumSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetMimimumSize() + { + tlog.Debug(tag, $"WindowSetMimimumSize START"); + + try + { + using (Size2D size = new Size2D(100, 200)) + { + win.SetMimimumSize(size); + } + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowSetMimimumSize START"); + } + + [Test] + [Category("P1")] + [Description("Window IsMinimized")] + [Property("SPEC", "Tizen.NUI.Window.IsMinimized M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowIsMinimized() + { + tlog.Debug(tag, $"WindowIsMinimized START"); + + try + { + var result = win.IsMinimized(); + tlog.Debug(tag, "IsMinimized : " + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowIsMinimized END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window IsWindowRotating")] + [Property("SPEC", "Tizen.NUI.Window.IsWindowRotating M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowIsWindowRotating() + { + tlog.Debug(tag, $"WindowIsWindowRotating START"); + + try + { + var result = win.IsWindowRotating(); + tlog.Debug(tag, "IsWindowRotating : " + result); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowIsWindowRotating END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetLastKeyEvent")] + [Property("SPEC", "Tizen.NUI.Window.GetLastKeyEvent M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetLastKeyEvent() + { + tlog.Debug(tag, $"WindowGetLastKeyEvent START"); + + try + { + var result = win.GetLastKeyEvent(); + Assert.IsInstanceOf(result, "Should be an Instance of Key !"); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowGetLastKeyEvent END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetLastTouchEvent")] + [Property("SPEC", "Tizen.NUI.Window.GetLastTouchEvent M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetLastTouchEvent() + { + tlog.Debug(tag, $"WindowGetLastTouchEvent START"); + + try + { + win.GetLastTouchEvent(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowGetLastTouchEvent END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window FindLayerByID")] + [Property("SPEC", "Tizen.NUI.Window.FindLayerByID M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowFindLayerByID() + { + tlog.Debug(tag, $"WindowFindLayerByID START"); + + try + { + using (Layer layer = new Layer()) + { + win.Add(layer); + win.FindLayerByID(layer.GetId()); + } + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Pass("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowFindLayerByID END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window NativeHandle")] + [Property("SPEC", "Tizen.NUI.Window.NativeHandle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowNativeHandle() + { + tlog.Debug(tag, $"WindowNativeHandle START"); + + var testingTarget = NUIApplication.GetDefaultWindow(); + Assert.IsNotNull(testingTarget, "Can't create success object Window."); + Assert.IsInstanceOf(testingTarget, "Should return Window instance."); + + var handle = testingTarget.NativeHandle; + tlog.Debug(tag, "IsInvalid : " + handle.IsInvalid); + + tlog.Debug(tag, $"WindowFindLayerByID END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window SetMaximumSize, with null.")] + [Property("SPEC", "Tizen.NUI.Window.SetMaximumSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetMaximumSizewithNull() + { + tlog.Debug(tag, $"WindowSetMaximumSizewithNull START"); + + try + { + Size2D size = null; + win.SetMaximumSize(size); + } + catch (ArgumentNullException e) + { + tlog.Debug(tag, e.Message.ToString()); + tlog.Debug(tag, $"WindowSetMaximumSizewithNull END (OK)"); + Assert.Pass("Caught ArgumentNullException : Passed!"); + } + } + + [Test] + [Category("P1")] + [Description("Window SetMaximumSize")] + [Property("SPEC", "Tizen.NUI.Window.SetMaximumSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetMaximumSize() + { + tlog.Debug(tag, $"WindowSetMaximumSize START"); + + try + { + using (Size2D size = new Size2D(50, 50)) + { + win.SetMaximumSize(size); + } + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowSetMaximumSize END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window Maximize")] + [Property("SPEC", "Tizen.NUI.Window.Maximize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowMaximize() + { + tlog.Debug(tag, $"WindowMaximize START"); + + try + { + win.Maximize(true); + Assert.IsTrue(win.IsMaximized()); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowMaximize END (OK)"); + } + + + [Test] + [Category("P1")] + [Description("Window Minimize")] + [Property("SPEC", "Tizen.NUI.Window.Minimize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowMinimize() + { + tlog.Debug(tag, $"WindowMinimize START"); + + try + { + win.Minimize(true); + Assert.IsTrue(win.IsMinimized()); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowMinimize END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetRenderTaskList")] + [Property("SPEC", "Tizen.NUI.Window.GetRenderTaskList M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetRenderTaskList() + { + tlog.Debug(tag, $"WindowGetRenderTaskList START"); + try + { + win.GetRenderTaskList(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowGetRenderTaskList END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window WindowSize")] + [Property("SPEC", "Tizen.NUI.Window.WindowSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowWindowSize() + { + tlog.Debug(tag, $"WindowWindowSize START"); + + try + { + Size2D s1 = new Size2D(100, 200); + win.WindowSize = s1; + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowSetWindowSize END (OK)"); + } + + [Test] + [Category("P2")] + [Description("Window WindowSize, with null.")] + [Property("SPEC", "Tizen.NUI.Window.WindowSize M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowWindowSizeWithNull() + { + tlog.Debug(tag, $"WindowWindowSizeWithNull START"); + + try + { + Size2D size = null; + win.WindowSize = size; + } + catch (ArgumentNullException e) + { + tlog.Debug(tag, e.Message.ToString()); + tlog.Debug(tag, $"WindowWindowSizeWithNull END (OK)"); + Assert.Pass("Caught ArgumentNullException : Passed!"); + } + } + + [Test] + [Category("P1")] + [Description("Window AddFrameUpdateCallback")] + [Property("SPEC", "Tizen.NUI.Window.AddFrameUpdateCallback M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowAddFrameUpdateCallback() + { + tlog.Debug(tag, $"WindowAddFrameUpdateCallback START"); + try + { + FrameUpdateCallbackInterface callback = new FrameUpdateCallbackInterface(); + win.AddFrameUpdateCallback(callback); + win.RemoveFrameUpdateCallback(callback); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowAddFrameUpdateCallback END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window AddFrameRenderedCallback")] + [Property("SPEC", "Tizen.NUI.Window.AddFrameRenderedCallback M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowAddFrameRenderedCallback() + { + tlog.Debug(tag, $"WindowAddFrameRenderedCallback START"); + + try + { + FrameCallbackType callback = null; + win.AddFrameRenderedCallback(callback, 1); + } + catch (ArgumentNullException e) + { + tlog.Debug(tag, e.Message.ToString()); + tlog.Debug(tag, $"WindowAddFrameRenderedCallback END (OK)"); + Assert.Pass("Caught ArgumentNullException : Passed!"); + } + } + + [Test] + [Category("P1")] + [Description("Window AddFramePresentedCallback")] + [Property("SPEC", "Tizen.NUI.Window.AddFramePresentedCallback M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowAddFramePresentedCallback() + { + tlog.Debug(tag, $"WindowAddFramePresentedCallback START"); + + try + { + FrameCallbackType callback = null; + win.AddFramePresentedCallback(callback, 1); + } + catch (ArgumentNullException e) + { + tlog.Debug(tag, e.Message.ToString()); + tlog.Debug(tag, $"WindowAddFramePresentedCallback END (OK)"); + Assert.Pass("Caught ArgumentNullException : Passed!"); + } + } + + [Test] + [Category("P1")] + [Description("Window Get")] + [Property("SPEC", "Tizen.NUI.Window.Get M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGet() + { + tlog.Debug(tag, $"WindowGet START"); + + using (NUI.BaseComponents.View view = new NUI.BaseComponents.View() { Color = Color.Cyan }) + { + NUIApplication.GetDefaultWindow().Add(view); + + try + { + var result = Window.Get(view); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + NUIApplication.GetDefaultWindow().Remove(view); + } + + tlog.Debug(tag, $"WindowGet END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window EnableFloatingMode")] + [Property("SPEC", "Tizen.NUI.Window.EnableFloatingMode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowEnableFloatingMode() + { + tlog.Debug(tag, $"WindowEnableFloatingMode START"); + + try + { + Window.Instance.EnableFloatingMode(true); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowEnableFloatingMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window IsVisible")] + [Property("SPEC", "Tizen.NUI.Window.IsVisible M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowIsVisible() + { + tlog.Debug(tag, $"WindowIsVisible START"); + + try + { + win.IsVisible(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowIsVisible END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetNotificationLevel")] + [Property("SPEC", "Tizen.NUI.Window.GetNotificationLevel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetNotificationLevel() + { + tlog.Debug(tag, $"WindowGetNotificationLevel START"); + + try + { + win.SetNotificationLevel(NotificationLevel.Medium); + var result = win.GetNotificationLevel(); + tlog.Error(tag, "NotificationLevel : " + result); + } + catch (Exception e) + { + tlog.Error(tag, e.Message.ToString()); + Assert.Fail("Caught ArgumentNullException : Failed!"); + } + + tlog.Debug(tag, $"WindowGetNotificationLevel END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window SetInputRegion")] + [Property("SPEC", "Tizen.NUI.Window.SetInputRegion M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetInputRegion() + { + tlog.Debug(tag, $"WindowSetInputRegion START"); + + try + { + Window.Instance.SetInputRegion(rec); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowSetInputRegion END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetScreenOffMode")] + [Property("SPEC", "Tizen.NUI.Window.GetScreenOffMode M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetScreenOffMode() + { + tlog.Debug(tag, $"WindowGetScreenOffMode START"); + + try + { + win.SetScreenOffMode(ScreenOffMode.Timout); + var result = win.GetScreenOffMode(); + Assert.AreEqual(ScreenOffMode.Timout, result, "Should be equal!"); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowGetScreenOffMode END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetKeyboardRepeatInfo")] + [Property("SPEC", "Tizen.NUI.Window.GetKeyboardRepeatInfo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetKeyboardRepeatInfo() + { + tlog.Debug(tag, $"WindowGetKeyboardRepeatInfo START"); + + try + { + win.SetKeyboardRepeatInfo(1.0f, 0.3f); + win.GetKeyboardRepeatInfo(out float rate, out float delay); + Assert.AreEqual(1.0f, rate, "Should be equal!"); + Assert.AreEqual(0.3f, delay, "Should be equal!"); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowGetKeyboardRepeatInfo END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window FeedTouch ")] + [Property("SPEC", "Tizen.NUI.Window.FeedTouch M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowFeedTouch() + { + tlog.Debug(tag, $"WindowFeedTouch START"); + + try + { + TouchPoint touchPoint = new TouchPoint(1, TouchPoint.StateType.Started, 500.0f, 600.0f); + win.FeedTouch (touchPoint, 30); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowFeedTouch END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window FeedWheel ")] + [Property("SPEC", "Tizen.NUI.Window.FeedWheel M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowFeedWheel() + { + tlog.Debug(tag, $"WindowFeedWheel START"); + + try + { + Wheel wheelEvent = new Wheel(); + win.FeedWheel(wheelEvent); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Pass("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowFeedWheel END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window SetParent ")] + [Property("SPEC", "Tizen.NUI.Window.SetParent M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowSetParent() + { + tlog.Debug(tag, $"WindowSetParent START"); + + try + { + win.SetParent(Window.Instance, false); + Assert.AreEqual(Window.Instance, win.GetParent(), "Should be equal!"); + + win.Unparent(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowSetParent END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetLayerCount ")] + [Property("SPEC", "Tizen.NUI.Window.GetLayerCount M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetLayerCount() + { + tlog.Debug(tag, $"WindowGetLayerCount START"); + + try + { + var result = win.GetLayerCount(); + Assert.AreEqual(0, result, "Should be equal!"); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowGetLayerCount END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window BackgroundColor ")] + [Property("SPEC", "Tizen.NUI.Window.BackgroundColor A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void WindowBackgroundColor() + { + tlog.Debug(tag, $"WindowBackgroundColor START"); + + try + { + win.BackgroundColor = new Vector4(1.0f, 0.3f, 0.8f, 0.0f); + Assert.AreEqual(1.0f, win.BackgroundColor.R, "Should be equal!"); + Assert.AreEqual(0.3f, win.BackgroundColor.G, "Should be equal!"); + Assert.AreEqual(0.8f, win.BackgroundColor.B, "Should be equal!"); + Assert.AreEqual(0.0f, win.BackgroundColor.A, "Should be equal!"); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowBackgroundColor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetDpi ")] + [Property("SPEC", "Tizen.NUI.Window.GetDpi M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetDpi() + { + tlog.Debug(tag, $"WindowGetDpi START"); + + try + { + Window.Instance.GetDpi(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowGetDpi END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window GetRenderingBehavior ")] + [Property("SPEC", "Tizen.NUI.Window.GetRenderingBehavior M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowGetRenderingBehavior() + { + tlog.Debug(tag, $"WindowGetRenderingBehavior START"); + + try + { + Window.Instance.GetRenderingBehavior(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowGetRenderingBehavior END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window IncludeInputRegion")] + [Property("SPEC", "Tizen.NUI.Window.IncludeInputRegion M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowIncludeInputRegion() + { + tlog.Debug(tag, $"WindowIncludeInputRegion START"); + + try + { + Window.Instance.IncludeInputRegion(rec); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowIncludeInputRegion END (OK)"); + } + + [Test] + [Category("P1")] + [Description("Window ExcludeInputRegion")] + [Property("SPEC", "Tizen.NUI.Window.ExcludeInputRegion M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowExcludeInputRegion() + { + tlog.Debug(tag, $"WindowExcludeInputRegion START"); + + try + { + Window.Instance.ExcludeInputRegion(rec); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowExcludeInputRegion END (OK)"); + } [Test] [Category("P1")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowAuxiliaryMessag.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowAuxiliaryMessag.cs new file mode 100755 index 0000000..5d27520 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowAuxiliaryMessag.cs @@ -0,0 +1,141 @@ +using NUnit.Framework; +using NUnit.Framework.TUnit; +using System; +using Tizen.NUI; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.Components; +using System.Collections.Generic; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/Window/WindowAuxiliaryMessageEvent")] + internal class PublicWindowAuxiliaryMessageEventTest + { + 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("Create a AuxiliaryMessageEventArgs object.")] + [Property("SPEC", "Tizen.NUI.Window.WindowAuxiliaryMessageEvent.AuxiliaryMessageEventArgs C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void AuxiliaryMessageEventArgsConstructor() + { + tlog.Debug(tag, $"AuxiliaryMessageEventArgsConstructor START"); + + var testingTarget = new AuxiliaryMessageEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object AuxiliaryMessageEventArgs "); + Assert.IsInstanceOf(testingTarget, "Should return AuxiliaryMessageEventArgs instance."); + + tlog.Debug(tag, $"AuxiliaryMessageEventArgsConstructor END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowAuxiliaryMessageEvent Key")] + [Property("SPEC", "Tizen.NUI.Window.WindowAuxiliaryMessageEvent Key M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowAuxiliaryMessageEventKey() + { + tlog.Debug(tag, $"WindowAuxiliaryMessageEventKey START"); + + var testingTarget = new AuxiliaryMessageEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object AuxiliaryMessageEventArgs "); + Assert.IsInstanceOf(testingTarget, "Should return AuxiliaryMessageEventArgs instance."); + + try + { + testingTarget.Key = "str"; + tlog.Debug(tag, "Key : " + testingTarget.Key); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowAuxiliaryMessageEventKey END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowAuxiliaryMessageEvent Value")] + [Property("SPEC", "Tizen.NUI.Window.WindowAuxiliaryMessageEvent Value M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowAuxiliaryMessageEventValue() + { + tlog.Debug(tag, $"WindowAuxiliaryMessageEventValue START"); + + var testingTarget = new AuxiliaryMessageEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object AuxiliaryMessageEventArgs "); + Assert.IsInstanceOf(testingTarget, "Should return AuxiliaryMessageEventArgs instance."); + + try + { + testingTarget.Value = "str" ; + tlog.Debug(tag, "Value : " + testingTarget.Value); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowAuxiliaryMessageEventValue END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowAuxiliaryMessageEvent Options")] + [Property("SPEC", "Tizen.NUI.Window.WindowAuxiliaryMessageEvent Options M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void WindowAuxiliaryMessageEventOptions() + { + tlog.Debug(tag, $"WindowAuxiliaryMessageEventOptions START"); + + var testingTarget = new AuxiliaryMessageEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object AuxiliaryMessageEventArgs "); + Assert.IsInstanceOf(testingTarget, "Should return AuxiliaryMessageEventArgs instance."); + + try + { + List list = new List(); + list.Add("add"); + list.Add("minus"); + list.Add("multiply"); + list.Add("divide"); + + testingTarget.Options = list; + Assert.AreEqual("add", testingTarget.Options[0], "Should be equal!"); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"WindowAuxiliaryMessageEventOptions END (OK)"); + } + } + +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowEvent.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowEvent.cs index 85a1146..2b21636 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowEvent.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowEvent.cs @@ -13,7 +13,19 @@ namespace Tizen.NUI.Devel.Tests public class PublicWindowEventTest { private const string tag = "NUITEST"; + private bool IsFocusChanged = false; + private bool IsResized = false; + private bool OnWindowInterceptTouchEvent(object source, Window.TouchEventArgs e) + { + return true; + } + + private bool OnStageInterceptKeyEvent(object source, Window.KeyEventArgs e) + { + return true; + } + [SetUp] public void Init() { @@ -119,12 +131,203 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "Can't create success object Window"); Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + Assert.IsFalse(IsFocusChanged); + testingTarget.FocusChanged += OnFocusChanged; + + View current = new View() + { + Size = new Size(100, 200), + Position = new Position(0, 0) + }; + testingTarget.GetDefaultLayer().Add(current); + FocusManager.Instance.SetCurrentFocusView(current); + + View next = new View() + { + Size = new Size(100, 200), + Position = new Position(200, 0) + }; + testingTarget.GetDefaultLayer().Add(next); + FocusManager.Instance.MoveFocus(View.FocusDirection.Right); + + tlog.Debug(tag, "FocusChanged : " + IsFocusChanged); testingTarget.FocusChanged -= OnFocusChanged; + testingTarget.Dispose(); tlog.Debug(tag, $"WindowEventFocusChanged END (OK)"); } + // [Test] + // [Category("P1")] + // [Description("WindowEvent InterceptKeyEvent.")] + // [Property("SPEC", "Tizen.NUI.WindowEvent.InterceptKeyEvent A")] + // [Property("SPEC_URL", "-")] + // [Property("CRITERIA", "PRW")] + // [Property("AUTHOR", "guowei.wang@samsung.com")] + // public void WindowEventInterceptKeyEvent() + // { + // tlog.Debug(tag, $"WindowEventInterceptKeyEvent START"); + + // var testingTarget = Window.Instance; + // Assert.IsNotNull(testingTarget, "Can't create success object Window"); + // Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + // testingTarget.InterceptKeyEvent += OnStageInterceptKeyEvent; + // testingTarget.InterceptKeyEvent -= OnStageInterceptKeyEvent; + + // tlog.Debug(tag, $"WindowEventInterceptKeyEvent END (OK)"); + // } + + // [Test] + // [Category("P1")] + // [Description("WindowEvent InterceptKeyEventSignal.")] + // [Property("SPEC", "Tizen.NUI.WindowEvent.InterceptKeyEventSignal A")] + // [Property("SPEC_URL", "-")] + // [Property("CRITERIA", "PRW")] + // [Property("AUTHOR", "guowei.wang@samsung.com")] + // public void WindowEventInterceptKeyEventSignal() + // { + // tlog.Debug(tag, $"WindowEventInterceptKeyEventSignal START"); + + // var testingTarget = Window.Instance; + // Assert.IsNotNull(testingTarget, "Can't create success object Window"); + // Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + //try + //{ + // testingTarget.InterceptKeyEventSignal(); + // } + // catch (Exception e) + // { + // tlog.Debug(tag, e.Message.ToString()); + // Assert.Fail("Caught ArgumentNullException : Failed!"); + // } + + // testingTarget.Dispose(); + // tlog.Debug(tag, $"ViewEventInterceptKeyEventSignal END (OK)"); + // } + + [Test] + [Category("P1")] + [Description("WindowEvent DisconnectNativeSignals.")] + [Property("SPEC", "Tizen.NUI.WindowEvent.DisconnectNativeSignals A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WindowEventDisconnectNativeSignals() + { + tlog.Debug(tag, $"WindowEventDisconnectNativeSignals START"); + + var testingTarget = Window.Instance; + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + try + { + testingTarget.DisconnectNativeSignals(); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught ArgumentNullException : Failed!"); + } + + testingTarget.Dispose(); + tlog.Debug(tag, $"ViewEventDisconnectNativeSignals END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowEvent.FocusChangedEventArgs FocusGained.")] + [Property("SPEC", "Tizen.NUI.WindowEvent.FocusChangedEventArgs .FocusGained A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WindowEventFocusChangedEventArgsFocusGained() + { + tlog.Debug(tag, $"WindowEventFocusChangedEventArgsFocusGained START"); + + var testingTarget = new Window.FocusChangedEventArgs (); + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window.FocusChangedEventArgs type."); + + testingTarget.FocusGained = true; + tlog.Debug(tag, "FocusGained : " + testingTarget.FocusGained); + + tlog.Debug(tag, $"WindowEventFocusChangedEventArgsFocusGained END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowEvent.WindowFocusChangedEventArgs FocusGained.")] + [Property("SPEC", "Tizen.NUI.WindowEvent.WindowFocusChangedEventArgs .FocusGained A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] + public void WindowEventWindowFocusChangedEventArgsFocusGained() + { + tlog.Debug(tag, $"WindowEventWindowFocusChangedEventArgsFocusGained START"); + + var testingTarget = new Window.WindowFocusChangedEventArgs (); + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window.WindowFocusChangedEventArgs type."); + + testingTarget.FocusGained = true; + tlog.Debug(tag, "FocusGained : " + testingTarget.FocusGained); + + tlog.Debug(tag, $"WindowEventWindowFocusChangedEventArgsFocusGained END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowEvent.AccessibilityHighlightEventArgs AccessibilityHighlight.")] + [Property("SPEC", "Tizen.NUI.WindowEvent.AccessibilityHighlightEventArgs .AccessibilityHighlight A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WindowEventAccessibilityHighlightEventArgsAccessibilityHighlight() + { + tlog.Debug(tag, $"WindowEventAccessibilityHighlightEventArgsFocusGained START"); + + var testingTarget = new Window.AccessibilityHighlightEventArgs (); + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window.AccessibilityHighlightEventArgs type."); + + testingTarget.AccessibilityHighlight = true; + tlog.Debug(tag, "AccessibilityHighlight : " + testingTarget.AccessibilityHighlight); + + tlog.Debug(tag, $"WindowEventAccessibilityHighlightEventArgsAccessibilityHighlight END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowEvent.KeyEventArgs Key.")] + [Property("SPEC", "Tizen.NUI.WindowEvent.KeyEventArgs.Key A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WindowEventKeyEventArgsKey() + { + tlog.Debug(tag, $"WindowEventKeyEventArgsKey START"); + + var testingTarget = new Window.KeyEventArgs(); + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window.KeyEventArgs type."); + + using (Key key = new Key()) + { + key.KeyCode = 911; + key.KeyString = "myKey"; + testingTarget.Key = key; + + Assert.AreEqual(911, testingTarget.Key.KeyCode, "Should be equal!"); + } + + tlog.Debug(tag, $"WindowEventKeyEventArgsKey END (OK)"); + } + [Test] [Category("P1")] [Description("WindowEvent TouchEvent.")] @@ -188,13 +391,18 @@ namespace Tizen.NUI.Devel.Tests { tlog.Debug(tag, $"WindowEventResized START"); - using (Rectangle rec = new Rectangle(0, 0, 2, 2)) + using (Rectangle rec = new Rectangle(0, 0, 100, 200)) { + Assert.IsFalse(IsResized) ; + var testingTarget = new Window(rec); Assert.IsNotNull(testingTarget, "Can't create success object Window"); Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); testingTarget.Resized += OnResized; + testingTarget.WindowSize = new Size2D(200, 400); + + tlog.Debug(tag, "Resized : " + IsResized); testingTarget.Resized -= OnResized; testingTarget.Dispose(); @@ -210,6 +418,7 @@ namespace Tizen.NUI.Devel.Tests [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] [Property("AUTHOR", "guowei.wang@samsung.com")] + [Obsolete] public void WindowEventWindowFocusChanged() { tlog.Debug(tag, $"WindowEventWindowFocusChanged START"); @@ -220,8 +429,8 @@ namespace Tizen.NUI.Devel.Tests Assert.IsNotNull(testingTarget, "Can't create success object Window"); Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); - testingTarget.WindowFocusChanged += OnWindowFocusedChanged2; - testingTarget.WindowFocusChanged -= OnWindowFocusedChanged2; + testingTarget.WindowFocusChanged += OnWindowFocusedChanged; + testingTarget.WindowFocusChanged -= OnWindowFocusedChanged; testingTarget.Dispose(); } @@ -390,18 +599,99 @@ namespace Tizen.NUI.Devel.Tests tlog.Debug(tag, $"WindowEventWheelEvent END (OK)"); } + + [Test] + [Category("P1")] + [Description("WindowEvent VisibilityChanged.")] + [Property("SPEC", "Tizen.NUI.WindowEvent.VisibilityChanged A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WindowEventVisibilityChanged() + { + tlog.Debug(tag, $"WindowEventVisibilityChanged START"); + + using (Rectangle rec = new Rectangle(0, 0, 2, 2)) + { + var testingTarget = new Window(rec); + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + testingTarget.VisibilityChanged += OnVisibilityChanged; + testingTarget.VisibilityChanged -= OnVisibilityChanged; + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"WindowEventVisibilityChanged END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowEvent AuxiliaryMessage.")] + [Property("SPEC", "Tizen.NUI.WindowEvent.AuxiliaryMessage A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WindowEventAuxiliaryMessage() + { + tlog.Debug(tag, $"WindowEventAuxiliaryMessage START"); + + using (Rectangle rec = new Rectangle(0, 0, 2, 2)) + { + var testingTarget = new Window(rec); + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + testingTarget.AuxiliaryMessage += OnAuxiliaryMessage; + testingTarget.AuxiliaryMessage -= OnAuxiliaryMessage; + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"WindowEventVisibilityChanged END (OK)"); + } + + [Test] + [Category("P1")] + [Description("WindowEvent AccessibilityHighlight.")] + [Property("SPEC", "Tizen.NUI.WindowEvent.AccessibilityHighlight A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void WindowEventAccessibilityHighlight() + { + tlog.Debug(tag, $"WindowEventAccessibilityHighlight START"); + + using (Rectangle rec = new Rectangle(0, 0, 2, 2)) + { + var testingTarget = new Window(rec); + Assert.IsNotNull(testingTarget, "Can't create success object Window"); + Assert.IsInstanceOf(testingTarget, "Should be an instance of Window type."); + + testingTarget.AccessibilityHighlight += OnAccessibilityHighlight; + testingTarget.AccessibilityHighlight -= OnAccessibilityHighlight; + + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"WindowEventAccessibilityHighlight END (OK)"); + } - private void OnFocusChanged(object sender, Window.FocusChangedEventArgs e) { } + private void OnFocusChanged(object sender, Window.FocusChangedEventArgs e) { IsFocusChanged = true; } private void OnWindowTouch(object sender, Window.TouchEventArgs e) { } private void OnStageWheel(object sender, Window.WheelEventArgs e) { } private void OnStageKey(object sender, Window.KeyEventArgs e) { } - private void OnResized(object sender, Window.ResizedEventArgs e) { } + private void OnResized(object sender, Window.ResizedEventArgs e) { IsResized = true; } private void OnTransitionEffect(object sender, Window.TransitionEffectEventArgs e) { } - private void OnWindowFocusedChanged2(object sender, Window.FocusChangedEventArgs e) { } + private void OnWindowFocusedChanged(object sender, Window.FocusChangedEventArgs e) { } private void OnKeyboardRepeatSettingsChanged(object sender, EventArgs e) { } private void OnEventProcessingFinished(object sender, EventArgs e) { } private void OnContextLost(object sender, EventArgs e) { } private void OnContextRegained(object sender, EventArgs e) { } private void OnSceneCreated(object sender, EventArgs e) { } + private void OnVisibilityChanged(object sender, Window.VisibilityChangedEventArgs e) { } + private void OnAuxiliaryMessage(object sender, EventArgs e) { } + private void OnAccessibilityHighlight(object sender, Window.AccessibilityHighlightEventArgs e) { } } } diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowHandle.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowHandle.cs new file mode 100755 index 0000000..be8638b --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindowHandle.cs @@ -0,0 +1,113 @@ +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/Window/WindowHandle")] + class PublicWindowHandleTest + { + private const string tag = "NUITEST"; + + internal class SafeNativeWindowHandleImpl : SafeNativeWindowHandle + { + public SafeNativeWindowHandleImpl(Window win) : base(win) + { } + + public bool OnReleaseHandle() + { + return base.ReleaseHandle(); + } + } + + [SetUp] + public void Init() + { + tlog.Info(tag, "Init() is called!"); + } + + [TearDown] + public void Destroy() + { + tlog.Info(tag, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("SafeNativeWindowHandle constructor.")] + [Property("SPEC", "Tizen.NUI.SafeNativeWindowHandle.SafeNativeWindowHandle C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SafeNativeWindowHandleConstructor() + { + tlog.Debug(tag, $"PropertyNotifySignalConstructor START"); + + var testingTarget = new SafeNativeWindowHandle(Window.Instance); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of SafeNativeWindowHandle!"); + + testingTarget.Dispose(); + tlog.Debug(tag, $"SafeNativeWindowHandle END (OK)"); + } + + [Test] + [Category("P1")] + [Description("SafeNativeWindowHandle IsInvalid.")] + [Property("SPEC", "Tizen.NUI.SafeNativeWindowHandle.SafeNativeWindowHandle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SafeNativeWindowHandleIsInvalid() + { + tlog.Debug(tag, $"PropertyNotifySignalConstructor START"); + + var testingTarget = new SafeNativeWindowHandle(Window.Instance); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of SafeNativeWindowHandle!"); + + var result = testingTarget.IsInvalid; + tlog.Debug(tag, "IsInvalid : " + result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"SafeNativeWindowHandle END (OK)"); + } + + [Test] + [Category("P1")] + [Description("SafeNativeWindowHandle ReleaseHandle.")] + [Property("SPEC", "Tizen.NUI.SafeNativeWindowHandle.ReleaseHandle M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "guowei.wang@samsung.com")] + public void SafeNativeWindowHandleReleaseHandle() + { + tlog.Debug(tag, $"SafeNativeWindowHandleReleaseHandle START"); + + using (Rectangle rec = new Rectangle(0, 0, Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height)) + { + Window win = new Window(rec); + win.BackgroundColor = Color.Cyan; + win.Raise(); + + var testingTarget = new SafeNativeWindowHandleImpl(win); + Assert.IsNotNull(testingTarget, "Should be not null!"); + Assert.IsInstanceOf(testingTarget, "Should be an Instance of SafeNativeWindowHandleImpl!"); + + var result = testingTarget.OnReleaseHandle(); + tlog.Debug(tag, "ReleaseHandle : " + result); + + win.Dispose(); + testingTarget.Dispose(); + } + + tlog.Debug(tag, $"SafeNativeWindowHandleReleaseHandle END (OK)"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Xaml/TSXamlFilePathAttribute.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Xaml/TSXamlFilePathAttribute.cs index 2d4ef74..3acce29 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Xaml/TSXamlFilePathAttribute.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Xaml/TSXamlFilePathAttribute.cs @@ -40,5 +40,25 @@ namespace Tizen.NUI.Devel.Tests testingTarget = null; tlog.Debug(tag, $"XamlFilePathAttributeConstructor END"); } + + [Test] + [Category("P1")] + [Description("XamlFilePathAttribute FilePath ")] + [Property("SPEC", "Tizen.NUI.XamlFilePathAttribute.FilePath A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + public void XamlFilePathAttributeFilePath() + { + tlog.Debug(tag, $"XamlFilePathAttributeFilePath START"); + + var testingTarget = new XamlFilePathAttribute("myPath"); + Assert.IsNotNull(testingTarget, "null XamlFilePathAttribute"); + Assert.IsInstanceOf(testingTarget, "Should return XamlFilePathAttribute instance."); + + tlog.Debug(tag, "FilePath : " + testingTarget.FilePath); + + testingTarget = null; + tlog.Debug(tag, $"XamlFilePathAttributeFilePath END"); + } } } \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSFloatGraphicsTypeConve.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSFloatGraphicsTypeConve.cs new file mode 100755 index 0000000..d0c29c2 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSFloatGraphicsTypeConve.cs @@ -0,0 +1,69 @@ +using NUnit.Framework; +using System; +using Tizen.NUI.Binding; +using Tizen.NUI.Xaml; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/XamlBinding/FloatGraphicsTypeConverter")] + internal class PublicFloatGraphicsTypeConverterTest + { + 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("FloatGraphicsTypeConverter ConvertFromInvariantString")] + [Property("SPEC", "Tizen.NUI.Binding.FloatGraphicsTypeConverter.ConvertFromInvariantString M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void ConvertFromInvariantStringTest0() + { + tlog.Debug(tag, $"ConvertFromInvariantStringTest0 START"); + + var testingTarget = new FloatGraphicsTypeConverter(); + Assert.IsNotNull(testingTarget, "null FloatGraphicsTypeConverter"); + + var ret = testingTarget.ConvertFromInvariantString("1.0 | #AABBCCFF"); + Assert.IsNotNull(ret, "null ConvertFromInvariantString"); + + tlog.Debug(tag, $"ConvertFromInvariantStringTest0 END"); + } + + [Test] + [Category("P1")] + [Description("FloatGraphicsTypeConverter ConvertToString")] + [Property("SPEC", "Tizen.NUI.Binding.FloatGraphicsTypeConverter.ConvertToString M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void FloatGraphicsTypeConverterConvertToStringTest() + { + tlog.Debug(tag, $"FloatGraphicsTypeConverterConvertToStringTest START"); + + var testingTarget = new FloatGraphicsTypeConverter(); + Assert.IsNotNull(testingTarget, "null FloatGraphicsTypeConverter"); + + var ret1 = testingTarget.ConvertToString(110); + Assert.AreEqual("110", ret1, "Should be equal!"); + + var ret2 = testingTarget.ConvertToString(null); + Assert.AreEqual("", ret2, "Should be equal!"); + + tlog.Debug(tag, $"FloatGraphicsTypeConverterConvertToStringTest END"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSIntGraphicsTypeConvert.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSIntGraphicsTypeConvert.cs new file mode 100755 index 0000000..a0e0977 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSIntGraphicsTypeConvert.cs @@ -0,0 +1,80 @@ +using NUnit.Framework; +using System; +using Tizen.NUI.Binding; +using Tizen.NUI.Xaml; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/XamlBinding/IntGraphicsTypeConverter")] + internal class PublicIntGraphicsTypeConverterTest + { + 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("IntGraphicsTypeConverter ConvertFromInvariantString")] + [Property("SPEC", "Tizen.NUI.Binding.IntGraphicsTypeConverter.ConvertFromInvariantString M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void ConvertFromInvariantStringTest00() + { + tlog.Debug(tag, $"ConvertFromInvariantStringTest0 START"); + + var testingTarget = new IntGraphicsTypeConverter(); + Assert.IsNotNull(testingTarget, "null IntGraphicsTypeConverter"); + + var ret = testingTarget.ConvertFromInvariantString("1.0 | #AABBCCFF"); + Assert.IsNotNull(ret, "null ConvertFromInvariantString"); + + try + { + testingTarget.ConvertFromInvariantString(null); + } + catch (InvalidOperationException e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Pass("Caught InvalidOperationException : Passed!"); + } + + tlog.Debug(tag, $"ConvertFromInvariantStringTest00 END"); + } + + [Test] + [Category("P1")] + [Description("IntGraphicsTypeConverter ConvertToString")] + [Property("SPEC", "Tizen.NUI.Binding.IntGraphicsTypeConverter.ConvertToString M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void IntGraphicsTypeConverterConvertToStringTest() + { + tlog.Debug(tag, $"IntGraphicsTypeConverterConvertToStringTest START"); + + var testingTarget = new IntGraphicsTypeConverter(); + Assert.IsNotNull(testingTarget, "null IntGraphicsTypeConverter"); + + var ret1 = testingTarget.ConvertToString(null); + Assert.AreEqual("", ret1, "Should be equal!"); + + var ret2 = testingTarget.ConvertToString(300); + Assert.AreEqual("300", ret2, "Should be equal!"); + + tlog.Debug(tag, $"IntGraphicsTypeConverterConvertToStringTest END"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSPointSizeTypeConverter.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSPointSizeTypeConverter.cs new file mode 100755 index 0000000..a7eab95 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSPointSizeTypeConverter.cs @@ -0,0 +1,93 @@ +using NUnit.Framework; +using System; +using Tizen.NUI.Binding; +using Tizen.NUI.Xaml; + +namespace Tizen.NUI.Devel.Tests +{ + using tlog = Tizen.Log; + + [TestFixture] + [Description("public/XamlBinding/PointSizeTypeConverter")] + internal class PublicPointSizeTypeConverterTest + { + 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("PointSizeTypeConverter PointSizeTypeConverter")] + [Property("SPEC", "Tizen.NUI.Binding.PointSizeTypeConverter.PointSizeTypeConverter C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + public void PointSizeTypeConverterConstructor() + { + tlog.Debug(tag, $"PointSizeTypeConverterConstructor START"); + + PointSizeTypeConverter testingTarget = new PointSizeTypeConverter(); + Assert.IsNotNull(testingTarget, "null PointSizeTypeConverter"); + Assert.IsInstanceOf(testingTarget, "Should return PointSizeTypeConverter instance."); + + tlog.Debug(tag, $"PointSizeTypeConverterConstructor END"); + } + + [Test] + [Category("P1")] + [Description("PointSizeTypeConverter ConvertFromInvariantString")] + [Property("SPEC", "Tizen.NUI.Binding.PointSizeTypeConverter.ConvertFromInvariantString M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void PointSizeTypeConverterConvertFromInvariantStringTest() + { + tlog.Debug(tag, $"PointSizeTypeConverterConvertFromInvariantStringTest START"); + + var testingTarget = new PointSizeTypeConverter(); + Assert.IsNotNull(testingTarget, "null PointSizeTypeConverter"); + + var ret = testingTarget.ConvertFromInvariantString("2, 2"); + Assert.IsNotNull(ret, "null Binding"); + + try + { + testingTarget.ConvertFromInvariantString(null); + } + catch (InvalidOperationException e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Pass("Caught InvalidOperationException : Passed!"); + } + + tlog.Debug(tag, $"PointSizeTypeConverterConvertFromInvariantStringTest END (OK)"); + } + + [Test] + [Category("P1")] + [Description("PointSizeTypeConverter ConvertToString")] + [Property("SPEC", "Tizen.NUI.Binding.PointSizeTypeConverter.ConvertToString M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void PointSizeTypeConverterConvertToStringTest() + { + tlog.Debug(tag, $"PointSizeTypeConverterConvertToStringTest START"); + + var testingTarget = new PointSizeTypeConverter(); + Assert.IsNotNull(testingTarget, "null PointSizeTypeConverter"); + + var ret = testingTarget.ConvertToString(20); + Assert.AreEqual("20", ret, "Should be equal!"); + + tlog.Debug(tag, $"PointSizeTypeConverterConvertToStringTest END"); + } + } +} \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSSizeTypeConverter.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSSizeTypeConverter.cs index da2e343..994e4fa 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSSizeTypeConverter.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSSizeTypeConverter.cs @@ -105,7 +105,7 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] - [Description("Size2DTypeConverter ConvertFromInvariantString")] + [Description("Size2DTypeConverter ConvertFromInvariantString")] [Property("SPEC", "Tizen.NUI.Binding.Size2DTypeConverter.ConvertFromInvariantString M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSXamlStyle.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSXamlStyle.cs index 9dcc8be..a8f52a6 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSXamlStyle.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/XamlBinding/TSXamlStyle.cs @@ -208,7 +208,7 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] - [Description("XamlStyle TargetType ")] + [Description("XamlStyle TargetType ")] [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.TargetType A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRO")] @@ -231,53 +231,57 @@ namespace Tizen.NUI.Devel.Tests [Test] [Category("P1")] - [Description("XamlStyle Apply")] - [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.Apply A")] + [Description("XamlStyle Apply")] + [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.Apply A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MCST")] - public void ApplyTest1() + public void ApplyTest() { - tlog.Debug(tag, $"ApplyTest1 START"); + tlog.Debug(tag, $"ApplyTest START"); try { - View view = new View(); - Assert.IsNotNull(view, "null View"); - var style = view.MergedStyle; - Assert.IsNotNull(style, "null MergedStyle"); - style.Style = new XamlStyle(typeof(View)); - style.Apply(view); + using (View view = new View()) + { + var testingTarget = view.MergedStyle; + Assert.IsNotNull(testingTarget, "null MergedStyle"); + + testingTarget.Style = new XamlStyle(typeof(View)); + testingTarget.Apply(view); + testingTarget.UnApply(view); + } } catch (Exception e) { - Assert.Fail("Caught Exception" + e.ToString()); + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); } - tlog.Debug(tag, $"ApplyTest1 END"); + + tlog.Debug(tag, $"ApplyTest END"); } [Test] [Category("P1")] - [Description("XamlStyle CanBeAppliedTo")] + [Description("XamlStyle CanBeAppliedTo")] [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.CanBeAppliedTo M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] public void CanBeAppliedTo() { tlog.Debug(tag, $"CanBeAppliedTo START"); + try { - View view = new View(); - Assert.IsNotNull(view, "null View"); var style = new XamlStyle(typeof(View)); style.CanBeAppliedTo(typeof(View)); - style.CanBeAppliedTo(typeof(TextLabel)); } catch (Exception e) { - Assert.Fail("Caught Exception" + e.ToString()); + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); } + tlog.Debug(tag, $"CanBeAppliedTo END"); } - } } \ No newline at end of file -- 2.7.4