From 1705318435780b2824cb2faea70a4ac70d32732d Mon Sep 17 00:00:00 2001 From: Dongsug Song Date: Thu, 4 Feb 2021 17:24:31 +0900 Subject: [PATCH] [NUI] Add TC template for coverage --- .../src/internal/Common/FriendAssembly.cs | 1 + test/Tizen.NUI.Tests/Tizen.NUI.TCT.sln | 8 ++ test/Tizen.NUI.Tests/Tizen.NUI.TCT/NuiSample.snk | Bin 0 -> 596 bytes test/Tizen.NUI.Tests/Tizen.NUI.TCT/Program.cs | 6 + .../Tizen.NUI.TCT/Properties/Resources.Designer.cs | 63 --------- .../Tizen.NUI.TCT/Properties/Resources.resx | 124 ----------------- .../Tizen.NUI.TCT/Tizen.NUI.Devel.Tests.csproj | 7 +- .../testcase/{ => etc}/TSButtonExample.cs | 13 +- .../testcase/{ => etc}/TSLottieAnimationView.cs | 32 +++++ .../testcase/{ => etc}/ViewMemoryLeakTest.cs | 2 + .../Accessibility/TSAccessibilityActionSignal.cs | 147 ++++++++++++++++++++ .../TSAccessibilityFocusOvershotSignal.cs | 150 +++++++++++++++++++++ .../Tizen.NUI.TCT/tizen-manifest.xml | 2 +- 13 files changed, 359 insertions(+), 196 deletions(-) create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.TCT/NuiSample.snk delete mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.TCT/Properties/Resources.Designer.cs delete mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.TCT/Properties/Resources.resx rename test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/{ => etc}/TSButtonExample.cs (99%) rename test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/{ => etc}/TSLottieAnimationView.cs (98%) rename test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/{ => etc}/ViewMemoryLeakTest.cs (99%) create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/internal/Accessibility/TSAccessibilityActionSignal.cs create mode 100755 test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/internal/Accessibility/TSAccessibilityFocusOvershotSignal.cs diff --git a/src/Tizen.NUI/src/internal/Common/FriendAssembly.cs b/src/Tizen.NUI/src/internal/Common/FriendAssembly.cs index 6ca5163..7037dbe 100755 --- a/src/Tizen.NUI/src/internal/Common/FriendAssembly.cs +++ b/src/Tizen.NUI/src/internal/Common/FriendAssembly.cs @@ -37,6 +37,7 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Tizen.TV.NUI.Example, " + Tizen.NUI.PublicKey.TizenTV)] [assembly: InternalsVisibleTo("NuiSample, " + Tizen.NUI.PublicKey.Sample)] +[assembly: InternalsVisibleTo("Tizen.NUI.Devel.Tests, " + Tizen.NUI.PublicKey.Sample)] namespace Tizen.NUI { diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT.sln b/test/Tizen.NUI.Tests/Tizen.NUI.TCT.sln index 8bf5b0e..39a4478 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.TCT.sln +++ b/test/Tizen.NUI.Tests/Tizen.NUI.TCT.sln @@ -24,6 +24,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Information", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen", "..\..\src\Tizen\Tizen.csproj", "{2CF2BA0A-198E-4B8F-B5C4-2645AFBA85FA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Feedback", "..\..\src\Tizen.System.Feedback\Tizen.System.Feedback.csproj", "{999E72B5-7822-4187-973A-08800270716A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +99,12 @@ Global {2CF2BA0A-198E-4B8F-B5C4-2645AFBA85FA}.NUI|Any CPU.Build.0 = Debug|Any CPU {2CF2BA0A-198E-4B8F-B5C4-2645AFBA85FA}.Release|Any CPU.ActiveCfg = Release|Any CPU {2CF2BA0A-198E-4B8F-B5C4-2645AFBA85FA}.Release|Any CPU.Build.0 = Release|Any CPU + {999E72B5-7822-4187-973A-08800270716A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {999E72B5-7822-4187-973A-08800270716A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {999E72B5-7822-4187-973A-08800270716A}.NUI|Any CPU.ActiveCfg = Release|Any CPU + {999E72B5-7822-4187-973A-08800270716A}.NUI|Any CPU.Build.0 = Release|Any CPU + {999E72B5-7822-4187-973A-08800270716A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {999E72B5-7822-4187-973A-08800270716A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/NuiSample.snk b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/NuiSample.snk new file mode 100755 index 0000000000000000000000000000000000000000..d21014f1c58ee6ef115f9b939a7d75f2b6447cc3 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097{y!QKGl@uSS6mG{&TMOv0ng&0QA2MJ| z5Z`V|hlm&`K)n^oJE5h(xvuVy;=V%aoC{y$E*))F0QSj4iC4U^><8<3Jz zShTpX1H%oMg9;a|kf|>;_6ia9dU$nyYalh}nZ8=KnnCU1e621kd1w3dn`l&0No(LS z(4I6y$h5*<>}>2zH@CY zyg+(q634ftCqN@CsiI}3{O(4+$U1gP+dc_fy@XG5J? z1j%7Gj`Qz7KG;^uf$b(~?5&u?kfZK_(vS1w`|`#?LxnTLDOA0_7MQ~TlG`O7zCTfD zq%FV8axHq9opXOdyJ=IiQ9)@v?7U6rtu)(d`xo6Cp9qOD$%H(sQCL#jYfbkD1(5gR z?Cfoq;({!gzI{vj>-9{YdmSC53*NV^-)I z^YVoKY$FVTQ?5xDsCA=BU=j0ng$rl8@@{L2qAn+>)Uur(+)gO-(2`txs16AUfY{e9 z^5TrfO~7X^(rWB(vSB8Y`Hus5q3jLOA=&q?ruPmj!TrrU{3mdd5d0qZ=|lz@9h#Y{ i^Ul>vU+6RiTdS^Udax97pMy5uv24tElw*w9g?lBM? -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tizen.NUI.Devel.Tests.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tizen.NUI.Devel.Tests.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/Properties/Resources.resx b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/Properties/Resources.resx deleted file mode 100755 index 16d0353..0000000 --- a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/Properties/Resources.resx +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - test - - \ No newline at end of file diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/Tizen.NUI.Devel.Tests.csproj b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/Tizen.NUI.Devel.Tests.csproj index 5022260..f1c2a5c 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/Tizen.NUI.Devel.Tests.csproj +++ b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/Tizen.NUI.Devel.Tests.csproj @@ -9,10 +9,14 @@ true + Tizen.NUI.Devel.Tests + true + NuiSample.snk portable + TRACE;DEBUG;EXAMPLE_OFF None @@ -35,8 +39,5 @@ - - - diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/TSButtonExample.cs b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/TSButtonExample.cs similarity index 99% rename from test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/TSButtonExample.cs rename to test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/TSButtonExample.cs index 5859695..ced585b 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/TSButtonExample.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/TSButtonExample.cs @@ -1,6 +1,3 @@ -#define EXAMPLE -#undef EXAMPLE - using NUnit.Framework; using NUnit.Framework.TUnit; using System; @@ -29,7 +26,9 @@ namespace Tizen.NUI.Devel.Tests Tizen.Log.Info(TAG, "Destroy() is called!"); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("Test Button empty constructor. Check it has been triggered")] [Property("SPEC", "Tizen.NUI.Components.Button.Button C")] @@ -45,7 +44,9 @@ namespace Tizen.NUI.Devel.Tests Assert.IsInstanceOf(button, "Should be an instance of Button!"); } - //[Test] +#if (EXAMPLE) + [Test] +#endif [Category("P2")] [Description("Check exception when constructing a Button with nonexistent style.")] [Property("SPEC", "Tizen.NUI.Components.Button.Button C")] @@ -67,7 +68,9 @@ namespace Tizen.NUI.Devel.Tests } } - //[Test] +#if (EXAMPLE) + [Test] +#endif [Category("P1")] [Description("Test Button constructor using style. Check it has been triggered")] [Property("SPEC", "Tizen.NUI.Components.Button.Button C")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/TSLottieAnimationView.cs b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/TSLottieAnimationView.cs similarity index 98% rename from test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/TSLottieAnimationView.cs rename to test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/TSLottieAnimationView.cs index 145f585..147c666 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/TSLottieAnimationView.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/TSLottieAnimationView.cs @@ -24,7 +24,9 @@ namespace Tizen.NUI.Devel.Tests { } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("LottieAnimationView constructor test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.LottieAnimationView C")] @@ -52,7 +54,9 @@ namespace Tizen.NUI.Devel.Tests lottie3.Dispose(); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("URL test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.URL A")] @@ -75,7 +79,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("PlayState test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.PlayState A")] @@ -121,7 +127,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("TotalFrame test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.TotalFrame A")] @@ -154,7 +162,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("CurrentFrame test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.CurrentFrame A")] @@ -183,7 +193,9 @@ namespace Tizen.NUI.Devel.Tests } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("LoopingMode test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.LoopingMode A")] @@ -219,7 +231,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("LoopCount test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.LoopCount A")] @@ -253,7 +267,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("StopBehavior test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.StopBehavior A")] @@ -294,7 +310,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("RedrawInScalingDown test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.RedrawInScalingDown A")] @@ -331,7 +349,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("SetMinMaxFrame test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.SetMinMaxFrame M")] @@ -385,7 +405,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("Play test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.Play M")] @@ -418,7 +440,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("Pause test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.Pause M")] @@ -454,7 +478,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("Stop test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.Stop M")] @@ -488,7 +514,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("GetContentInfo test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.GetContentInfo M")] @@ -526,7 +554,9 @@ namespace Tizen.NUI.Devel.Tests await Task.Delay(500); } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("Finished test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.Finished E")] @@ -582,7 +612,9 @@ namespace Tizen.NUI.Devel.Tests finishedCheck = true; } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("RedrawInScalingDown animation test")] [Property("SPEC", "Tizen.NUI.BaseComponents.LottieAnimationView.RedrawInScalingDown A")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/ViewMemoryLeakTest.cs b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/ViewMemoryLeakTest.cs similarity index 99% rename from test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/ViewMemoryLeakTest.cs rename to test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/ViewMemoryLeakTest.cs index c6f0123..22a7043 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/ViewMemoryLeakTest.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/etc/ViewMemoryLeakTest.cs @@ -24,7 +24,9 @@ namespace Tizen.NUI.Devel.Tests { } +#if (EXAMPLE) [Test] +#endif [Category("P1")] [Description("view memory leak test")] [Property("SPEC", "local test")] diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/internal/Accessibility/TSAccessibilityActionSignal.cs b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/internal/Accessibility/TSAccessibilityActionSignal.cs new file mode 100755 index 0000000..53e7845 --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/internal/Accessibility/TSAccessibilityActionSignal.cs @@ -0,0 +1,147 @@ + +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/Accessibility/AccessibilityActionSignal")] + public class InternalAccessibilityActionSignalTest + { + private const string tag = "NUITEST"; + private delegate bool dummyCallback(IntPtr accessibilityManager); + 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] + [Description("AccessibilityActionSignal constructor")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityActionSignalConstructor() + { + tlog.Debug(tag, $"AccessibilityActionSignalConstructor START"); + + var testingTarget = new AccessibilityActionSignal(); + + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.Dispose(); + tlog.Debug(tag, $"AccessibilityActionSignalConstructor END (OK)"); + } + + [Test] + [Description("AccessibilityActionSignal Empty")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityActionSignalEmpty() + { + tlog.Debug(tag, $"AccessibilityActionSignalEmpty START"); + + var testingTarget = new AccessibilityActionSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + var result = testingTarget.Empty(); + Assert.IsTrue(result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"AccessibilityActionSignalEmpty END (OK)"); + } + + [Test] + [Description("AccessibilityActionSignal GetConnectionCount")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityActionSignalGetConnectionCount() + { + tlog.Debug(tag, $"AccessibilityActionSignal_GetConnectionCount START"); + + var testingTarget = new AccessibilityActionSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + var result = testingTarget.GetConnectionCount(); + Assert.IsTrue(result == 0, "result should be 0"); + + testingTarget.Dispose(); + tlog.Debug(tag, $"AccessibilityActionSignalGetConnectionCount END (OK)"); + } + + [Test] + [Description("AccessibilityActionSignal Connection")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityActionSignalConnection() + { + tlog.Debug(tag, $"AccessibilityActionSignalConnection START"); + + var testingTarget = new AccessibilityActionSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + dummyCallback callback = OnDummyCallback; + testingTarget.Connect(callback); + testingTarget.Disconnect(callback); + testingTarget.Dispose(); + + tlog.Debug(tag, $"AccessibilityActionSignalConnection END (OK)"); + } + + [Test] + [Description("AccessibilityActionSignal Disconnection")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityActionSignalDisconnection() + { + tlog.Debug(tag, $"AccessibilityActionSignalDisconnection START"); + + var testingTarget = new AccessibilityActionSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + dummyCallback callback = OnDummyCallback; + testingTarget.Connect(callback); + testingTarget.Disconnect(callback); + testingTarget.Dispose(); + + tlog.Debug(tag, $"AccessibilityActionSignalDisconnection END (OK)"); + } + + [Test] + [Description("AccessibilityActionSignal Emit")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityActionSignalEmit() + { + tlog.Debug(tag, $"AccessibilityActionSignalEmit START"); + var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id; + var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId; + + tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}"); + + var testingTarget = new AccessibilityActionSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.Emit(Tizen.NUI.Accessibility.AccessibilityManager.Instance); + testingTarget.Dispose(); + + tlog.Debug(tag, $"AccessibilityActionSignalEmit END (OK)"); + } + + } +} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/internal/Accessibility/TSAccessibilityFocusOvershotSignal.cs b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/internal/Accessibility/TSAccessibilityFocusOvershotSignal.cs new file mode 100755 index 0000000..98afa2b --- /dev/null +++ b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/testcase/internal/Accessibility/TSAccessibilityFocusOvershotSignal.cs @@ -0,0 +1,150 @@ + +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/Accessibility/AccessibilityFocusOvershotSignal")] + public class InternalAccessibilityFocusOvershotSignalTests + { + private const string tag = "NUITEST"; + private delegate bool dummyCallback(IntPtr accessibilityManager); + 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] + [Description("AccessibilityFocusOvershotSignal constructor")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityFocusOvershotSignalConstructor() + { + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalConstructor START"); + + var testingTarget = new AccessibilityFocusOvershotSignal(); + + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + testingTarget.Dispose(); + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalConstructor END (OK)"); + } + + [Test] + [Description("AccessibilityFocusOvershotSignal Empty")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityFocusOvershotSignalEmpty() + { + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalEmpty START"); + + var testingTarget = new AccessibilityFocusOvershotSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + var result = testingTarget.Empty(); + Assert.IsTrue(result); + + testingTarget.Dispose(); + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalEmpty END (OK)"); + } + + [Test] + [Description("AccessibilityFocusOvershotSignal GetConnectionCount")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityFocusOvershotSignalGetConnectionCount() + { + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalGetConnectionCount START"); + + var testingTarget = new AccessibilityFocusOvershotSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + var result = testingTarget.GetConnectionCount(); + Assert.IsTrue(result == 0, "result should be 0"); + + testingTarget.Dispose(); + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalGetConnectionCount END (OK)"); + } + + [Test] + [Description("AccessibilityFocusOvershotSignal Connection")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityFocusOvershotSignalConnection() + { + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalConnection START"); + + var testingTarget = new AccessibilityFocusOvershotSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + dummyCallback callback = OnDummyCallback; + testingTarget.Connect(callback); + testingTarget.Disconnect(callback); + testingTarget.Dispose(); + + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalConnection END (OK)"); + } + + [Test] + [Description("AccessibilityFocusOvershotSignal Disconnection")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityFocusOvershotSignalDisconnection() + { + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalDisconnection START"); + + var testingTarget = new AccessibilityFocusOvershotSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + dummyCallback callback = OnDummyCallback; + testingTarget.Connect(callback); + testingTarget.Disconnect(callback); + testingTarget.Dispose(); + + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalDisconnection END (OK)"); + } + + [Test] + [Description("AccessibilityFocusOvershotSignal Emit")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public void AccessibilityFocusOvershotSignalEmit() + { + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalEmit START"); + var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id; + var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId; + + tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}"); + + var testingTarget = new AccessibilityFocusOvershotSignal(); + Assert.IsNotNull(testingTarget, "should be not null"); + Assert.IsInstanceOf(testingTarget, "should be an instance of testing target class!"); + + View dummy = new View(); + testingTarget.Emit(dummy, Accessibility.AccessibilityManager.FocusOvershotDirection.Previous); + + testingTarget.Dispose(); + dummy.Dispose(); + + tlog.Debug(tag, $"AccessibilityFocusOvershotSignalEmit END (OK)"); + } + + } +} diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/tizen-manifest.xml b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/tizen-manifest.xml index 086f74e..8d32572 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.TCT/tizen-manifest.xml +++ b/test/Tizen.NUI.Tests/Tizen.NUI.TCT/tizen-manifest.xml @@ -1,5 +1,5 @@ - + nui-csharp.png -- 2.7.4