# Auto-generated from csapi-tizenfx.spec.in by makespec.sh
%define TIZEN_NET_API_VERSION 9
-%define TIZEN_NET_RPM_VERSION 9.0.0.16429+nui22032
-%define TIZEN_NET_NUGET_VERSION 9.0.0.16429
+%define TIZEN_NET_RPM_VERSION 9.0.0.999+nui22033
+%define TIZEN_NET_NUGET_VERSION 9.0.0.99999
%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
NUGET_VERSION=9.0.0.99999
# RPM Version Suffix
-RPM_VERSION_SUFFIX=nui22032
+RPM_VERSION_SUFFIX=nui22033
}
/// <summary>
+ /// Icon image's size in Button.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Size IconSize
+ {
+ get => Icon.Size;
+ set => Icon.Size = value;
+ }
+
+ /// <summary>
/// Text string selector in Button.
/// Getter returns copied selector value if exist, null otherwise.
/// <exception cref="NullReferenceException">Thrown when setting null value.</exception>
namespace Tizen.NUI.Components
{
/// <summary>
- /// Switch is one kind of common component, it can be used as selector.
- /// User can handle Navigation by adding/inserting/deleting NavigationItem.
+ /// Switch is a kind of <see cref="Button"/> component that uses icon part as a toggle shape.
+ /// The icon part consists of track and thumb.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public class Switch : Button
{
- private ImageView track = null;
private ImageView thumb = null;
static Switch() { }
[EditorBrowsable(EditorBrowsableState.Never)]
public override void OnInitialize()
{
- track = new ImageView()
- {
- EnableControlStatePropagation = true
- };
- thumb = new ImageView();
- track.Add(thumb);
-
base.OnInitialize();
SetAccessibilityConstructor(Role.ToggleButton);
{
if (Extension is SwitchExtension extension)
{
- track.Unparent();
+ Icon.Unparent();
thumb.Unparent();
- track = extension.OnCreateTrack(this, track);
+ Icon = extension.OnCreateTrack(this, Icon);
thumb = extension.OnCreateThumb(this, thumb);
- track.Add(thumb);
+ Icon.Add(thumb);
+ LayoutItems();
}
if (switchStyle.Track != null)
/// <since_tizen> 8 </since_tizen>
public ImageView Track
{
- get => track;
+ get => Icon;
internal set
{
- track = value;
+ Icon = value;
}
}
}
/// <summary>
- /// Background image's resource url selector in Switch.
+ /// Switch's track part image url selector.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public StringSelector SwitchBackgroundImageURLSelector
{
- get => new StringSelector(track.ResourceUrlSelector);
+ get => new StringSelector(Icon.ResourceUrlSelector);
set
{
- Debug.Assert(track != null);
- track.ResourceUrlSelector = value;
+ Debug.Assert(Icon != null);
+ Icon.ResourceUrlSelector = value;
}
}
if (type == DisposeTypes.Explicit)
{
- Utility.Dispose(Thumb);
- Utility.Dispose(Track);
+ Utility.Dispose(thumb);
}
base.Dispose(type);
/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
+ protected override ImageView CreateIcon()
+ {
+ var icon = new ImageView()
+ {
+ AccessibilityHighlightable = false,
+ EnableControlStatePropagation = true
+ };
+
+ thumb = new ImageView();
+ icon.Add(thumb);
+
+ return icon;
+ }
+
+ /// <inheritdoc/>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected override void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
{
base.OnControlStateChanged(controlStateChangedInfo);
}
}
- /// <inheritdoc/>
- [EditorBrowsable(EditorBrowsableState.Never)]
- protected override void LayoutItems()
- {
- base.LayoutItems();
- track.Unparent();
- Add(track);
- track.LowerToBottom();
- }
-
private void OnSelect()
{
if (IsHighlighted)
public delegate void resChangeCb(object sender, ResourcesChangedEventArgs e);
- static private Dictionary<object, Dictionary<resChangeCb, int>> resourceChangeCallbackDict = new Dictionary<object, Dictionary<resChangeCb, int>>();
- static public void AddResourceChangedCallback(object handle, resChangeCb cb)
- {
- Dictionary<resChangeCb, int> cbDict;
- resourceChangeCallbackDict.TryGetValue(handle, out cbDict);
-
- if (null == cbDict)
- {
- cbDict = new Dictionary<resChangeCb, int>();
- resourceChangeCallbackDict.Add(handle, cbDict);
- }
-
- if (false == cbDict.ContainsKey(cb))
- {
- cbDict.Add(cb, 0);
- }
- }
+ internal event EventHandler<ResourcesChangedEventArgs> XamlResourceChanged;
internal override void OnResourcesChanged(object sender, ResourcesChangedEventArgs e)
{
base.OnResourcesChanged(sender, e);
-
- foreach (KeyValuePair<object, Dictionary<resChangeCb, int>> resourcePair in resourceChangeCallbackDict)
- {
- foreach (KeyValuePair<resChangeCb, int> cbPair in resourcePair.Value)
- {
- cbPair.Key(sender, e);
- }
- }
+ XamlResourceChanged?.Invoke(sender, e);
}
public ResourceDictionary XamlResources
return instance;
}
+ public static Application NewApplication(string stylesheet, NUIApplication.WindowMode windowMode, Rectangle positionSize, WindowType type)
+ {
+ if (instance)
+ {
+ return instance;
+ }
+ Application ret = New(1, stylesheet, windowMode, positionSize, type);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ instance = ret;
+ return instance;
+ }
+
/// <summary>
/// Ensures that the function passed in is called from the main loop when it is idle.
/// </summary>
return ret;
}
+ public static Application New(int argc, string stylesheet, NUIApplication.WindowMode windowMode, Rectangle positionSize, WindowType type)
+ {
+ Application ret = new Application(Interop.Application.New(argc, stylesheet, (int)windowMode, Rectangle.getCPtr(positionSize), (int)type), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
public Application() : this(Interop.Application.NewApplication(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
*/
using System;
+using System.ComponentModel;
using System.Collections.Generic;
using Tizen.Applications.CoreBackend;
using Tizen.Applications;
private string stylesheet = "";
private NUIApplication.WindowMode windowMode = NUIApplication.WindowMode.Opaque;
private Rectangle windowRectangle = null;
+ private WindowType defaultWindowType = WindowType.Normal;
/// <summary>
/// The Dictionary to contain each type of event callback.
}
/// <summary>
+ /// The constructor with stylesheet, window mode, window size, window position and default window type.
+ /// This will be hidden as inhouse API. Because it is only for internal IME window.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public NUICoreBackend(string stylesheet, NUIApplication.WindowMode windowMode, Size2D windowSize, Position2D windowPosition, WindowType type)
+ {
+ this.stylesheet = stylesheet;
+ this.windowMode = windowMode;
+ if (windowSize != null && windowPosition != null)
+ {
+ this.windowRectangle = new Rectangle(windowPosition.X, windowPosition.Y, windowSize.Width, windowSize.Height);
+ }
+ this.defaultWindowType = type;
+ }
+
+ /// <summary>
/// Adds NUIApplication event to Application.
/// Puts each type of event callback in Dictionary.
/// </summary>
args[0] = this.GetType().Assembly.FullName.Replace(" ", "");
}
- if (windowRectangle != null)
+ if(defaultWindowType != WindowType.Normal)
{
- application = Application.NewApplication(args, stylesheet, windowMode, windowRectangle);
+ application = Application.NewApplication(stylesheet, windowMode, windowRectangle, defaultWindowType);
}
else
{
- application = Application.NewApplication(args, stylesheet, windowMode);
+ if (windowRectangle != null)
+ {
+ application = Application.NewApplication(args, stylesheet, windowMode, windowRectangle);
+ }
+ else
+ {
+ application = Application.NewApplication(args, stylesheet, windowMode);
+ }
}
application.BatteryLow += OnBatteryLow;
public void OnActive()
{
- if (null != childOp && childOp.ValueList.Count > 2 && (childOp.ValueList[0] is Instance instance) && (childOp.ValueList[1] is Instance child))
+ if (null != childOp && childOp.ValueList.Count > 2 && (childOp.ValueList[0] is Instance instance))
{
int parentIndex = instance.Index;
- int childIndex = child.Index;
+ var child = childOp.ValueList[1];
int methodIndex = (int)childOp.ValueList[2];
- globalDataList.Operations.Add(new CallAddMethod(globalDataList, parentIndex, childIndex, methodIndex));
+ globalDataList.Operations.Add(new CallAddMethod(globalDataList, parentIndex, child, methodIndex));
}
}
}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+
+namespace Tizen.NUI.EXaml
+{
+ internal class OtherActions : Action
+ {
+ internal OtherActions(GlobalDataList globalDataList, Action parent)
+ {
+ this.parent = parent;
+ this.globalDataList = globalDataList;
+ }
+
+ private Action parent;
+ private GlobalDataList globalDataList;
+
+ public Action DealChar(char c)
+ {
+ switch (c)
+ {
+ case ' ':
+ case '\n':
+ case '\r':
+ break;
+
+ case 'a':
+ parent?.OnActive();
+ return parent;
+
+ case '(':
+ getValues = new GetValueListAction(')', this);
+ return getValues;
+ }
+
+ return this;
+ }
+
+ public void Init()
+ {
+ }
+
+ public void OnActive()
+ {
+ if (null != getValues)
+ {
+ int index = (int)getValues.ValueList[0];
+
+ switch (index)
+ {
+ case 0:
+ int typeIndex = (int)getValues.ValueList[1];
+ var items = getValues.ValueList[2] as List<object>;
+ var createArrayInstanceOp = new CreateArrayInstance(globalDataList, typeIndex, items);
+ globalDataList.Operations.Add(createArrayInstanceOp);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ getValues = null;
+ }
+
+ private GetValueListAction getValues;
+ }
+}
public void OnActive()
{
var readedAssemblyName = childOp.Value as string;
- globalDataList.Operations.Add(new GatherAssembly(globalDataList, readedAssemblyName));
+ globalDataList.PreLoadOperations.Add(new GatherAssembly(globalDataList, readedAssemblyName));
childOp = null;
}
}
int typeIndex = int.Parse(childOp.ValueList[0] as string);
string propertyName = childOp.ValueList[1] as string;
- globalDataList.Operations.Add(new GatherBindableProperties(globalDataList, typeIndex, propertyName));
+ globalDataList.PreLoadOperations.Add(new GatherBindableProperties(globalDataList, typeIndex, propertyName));
}
}
}
int typeIndex = int.Parse(childOp.ValueList[0] as string);
string eventName = childOp.ValueList[1] as string;
- globalDataList.Operations.Add(new GatherEvent(globalDataList, typeIndex, eventName));
+ globalDataList.PreLoadOperations.Add(new GatherEvent(globalDataList, typeIndex, eventName));
}
}
}
int typeIndex = int.Parse(childOp.ValueList[0] as string);
string name = childOp.ValueList[1] as string;
var paramList = childOp.ValueList[2] as List<object>;
- globalDataList.Operations.Add(new GatherMethod(globalDataList, typeIndex, name, paramList));
+ globalDataList.PreLoadOperations.Add(new GatherMethod(globalDataList, typeIndex, name, paramList));
}
}
}
int typeIndex = int.Parse(childOp.ValueList[0] as string);
string propertyName = childOp.ValueList[1] as string;
- globalDataList.Operations.Add(new GatherProperty(globalDataList, typeIndex, propertyName));
+ globalDataList.PreLoadOperations.Add(new GatherProperty(globalDataList, typeIndex, propertyName));
}
}
}
public void OnActive()
{
- globalDataList.Operations.Add(GatherType(childOp.ValueList));
+ globalDataList.PreLoadOperations.Add(GatherType(childOp.ValueList));
childOp = null;
}
{
internal class GlobalDataList
{
+ internal List<Operation> PreLoadOperations
+ {
+ get;
+ } = new List<Operation>();
+
internal List<Operation> Operations
{
get;
{
internal static class LoadEXaml
{
- internal static void Load(object view, string xaml)
+ internal static GlobalDataList GatherDataList(string xaml)
{
var globalDataList = new GlobalDataList();
- CreateInstanceAction.Root = view;
-
int index = 0;
var createInstance = new CreateInstanceAction(globalDataList, null);
var setDynamicResourceAction = new SetDynamicResourceAction(globalDataList, null);
var addToResourceDictionaryAction = new AddToResourceDictionaryAction(globalDataList, null);
var setBindingAction = new SetBindingAction(globalDataList, null);
+ var otherActions = new OtherActions(globalDataList, null);
foreach (char c in xaml)
{
currentOp = setBindingAction;
currentOp.Init();
break;
+
+ case 'a':
+ currentOp = otherActions;
+ currentOp.Init();
+ break;
}
}
else
}
}
+ foreach (var op in globalDataList.PreLoadOperations)
+ {
+ op.Do();
+ }
+
+ return globalDataList;
+ }
+
+ internal static void Load(object view, string xaml)
+ {
+ var globalDataList = GatherDataList(xaml);
+
+ CreateInstanceAction.Root = view;
+
+ foreach (var op in globalDataList.Operations)
+ {
+ op.Do();
+ }
+ }
+
+ internal static void Load(object view, object preloadData)
+ {
+ var globalDataList = preloadData as GlobalDataList;
+
+ if (null == globalDataList)
+ {
+ return;
+ }
+
+ CreateInstanceAction.Root = view;
+
foreach (var op in globalDataList.Operations)
{
op.Do();
{
internal class CallAddMethod : Operation
{
- public CallAddMethod(GlobalDataList globalDataList, int parentIndex, int childIndex, int methodIndex)
+ public CallAddMethod(GlobalDataList globalDataList, int parentIndex, object child, int methodIndex)
{
this.parentIndex = parentIndex;
- this.childIndex = childIndex;
+ this.child = child;
this.methodIndex = methodIndex;
this.globalDataList = globalDataList;
}
public void Do()
{
object parent = globalDataList.GatheredInstances[parentIndex];
- object child = globalDataList.GatheredInstances[childIndex];
var method = globalDataList.GatheredMethods[methodIndex];
+ if (child is Instance)
+ {
+ child = globalDataList.GatheredInstances[(child as Instance).Index];
+ }
+
method.Invoke(parent, new object[] { child });
}
private int parentIndex;
- private int childIndex;
+ private object child;
private int methodIndex;
}
}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.EXaml
+{
+ internal class CreateArrayInstance : Operation
+ {
+ public CreateArrayInstance(GlobalDataList globalDataList, int typeIndex, List<object> items)
+ {
+ this.typeIndex = typeIndex;
+ this.items = items;
+ this.globalDataList = globalDataList;
+ }
+
+ private GlobalDataList globalDataList;
+
+ public void Do()
+ {
+ var type = globalDataList.GatheredTypes[typeIndex];
+ var array = Array.CreateInstance(type, items.Count);
+
+ for (int i = 0; i < items.Count; i++)
+ {
+ if (items[i] is Instance instance)
+ {
+ ((IList)array)[i] = globalDataList.GatheredInstances[instance.Index];
+ }
+ }
+
+ globalDataList.GatheredInstances.Add(array);
+ }
+
+ private int typeIndex;
+ private List<object> items;
+ }
+}
{
var property = globalDataList.GatheredBindableProperties[bindalbePropertyIndex];
- if (value is Instance)
+ if (value is Instance valueInstance)
{
- int valueIndex = (value as Instance).Index;
- instance.SetValue(property, globalDataList.GatheredInstances[valueIndex]);
- }
- else
- {
- instance.SetValue(property, value);
+ int valueIndex = valueInstance.Index;
+ value = globalDataList.GatheredInstances[valueIndex];
}
+
+ instance.SetValue(property, value);
}
}
if (null == property)
{
- throw new Exception(String.Format("Can't find property in type {0}", instance.GetType().FullName));
+ throw new Exception(String.Format("Can't find property {0} in type {1}", property.Name, instance.GetType().FullName));
}
if (null == property.SetMethod)
throw new Exception(String.Format("Property {0} hasn't set method", property.Name));
}
- if (value is Instance)
+ if (value is Instance valueInstance)
{
- int valueIndex = (value as Instance).Index;
- object realValue = globalDataList.GatheredInstances[valueIndex];
+ int valueIndex = valueInstance.Index;
+ value = globalDataList.GatheredInstances[valueIndex];
- if (null == realValue)
+ if (null == value)
{
throw new Exception(String.Format("Can't get instance of value by index {0}", valueIndex));
}
-
- property.SetMethod.Invoke(instance, new object[] { realValue });
- }
- else
- {
- property.SetMethod.Invoke(instance, new object[] { value });
}
+
+ property.SetMethod.Invoke(instance, new object[] { value });
}
private int instanceIndex;
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New__SWIG_4")]
public static extern global::System.IntPtr New(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New__SWIG_5")]
+ public static extern global::System.IntPtr New(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5, int jarg6);
}
}
}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class RiveAnimationView
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_New__SWIG_0")]
+ public static extern global::System.IntPtr New(string jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_EnableAnimation")]
+ public static extern void EnableAnimation(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, bool jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_SetShapeFillColor")]
+ public static extern void SetShapeFillColor(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_SetShapeStrokeColor")]
+ public static extern void SetShapeStrokeColor(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_SetNodeOpacity")]
+ public static extern void SetNodeOpacity(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, float jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_SetNodeScale")]
+ public static extern void SetNodeScale(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_SetNodeRotation")]
+ public static extern void SetNodeRotation(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_SetNodePosition")]
+ public static extern void SetNodePosition(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_PlayAnimation")]
+ public static extern void PlayAnimation(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_PauseAnimation")]
+ public static extern void PauseAnimation(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RiveAnimationView_StopAnimation")]
+ public static extern void StopAnimation(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+ }
+}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetNativeId")]
public static extern int GetNativeId(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetPositionSizeWithOrientation")]
+ public static extern void SetPositionSizeWithOrientation(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_EnableFloatingMode")]
+ public static extern void EnableFloatingMode(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_RequestMoveToServer")]
+ public static extern void RequestMoveToServer(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_RequestResizeToServer")]
+ public static extern void RequestResizeToServer(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
+
}
}
}
using System.ComponentModel;
using System.Collections.Generic;
using System.Runtime.InteropServices;
-using Tizen.NUI.BaseComponents;
using Tizen.NUI.Binding;
-namespace Tizen.NUI
+namespace Tizen.NUI.BaseComponents
{
/// <summary>
/// WebView
using System;
using System.ComponentModel;
+using Tizen.NUI.BaseComponents;
namespace Tizen.NUI
{
value = Activator.CreateInstance(type, defaultParams.ToArray());
}
- if (value is Element)
+ if (value is Element element)
{
if (null != Application.Current)
{
- Application.AddResourceChangedCallback(value, (value as Element).OnResourcesChanged);
+ Application.Current.XamlResourceChanged += element.OnResourcesChanged;
}
- if (value is BindableObject)
- {
- ((BindableObject)value).IsCreateByXaml = true;
- }
+ element.IsCreateByXaml = true;
}
}
}
{
//non-default ctor
object ret = Activator.CreateInstance(nodeType, BindingFlags.CreateInstance | BindingFlags.Public | BindingFlags.Instance | BindingFlags.OptionalParamBinding, null, arguments, CultureInfo.CurrentCulture);
- if (ret is Element)
+ if (ret is Element element)
{
if (null != Application.Current)
{
- Application.AddResourceChangedCallback(ret, (ret as Element).OnResourcesChanged);
+ Application.Current.XamlResourceChanged += element.OnResourcesChanged;
}
- if (ret is BindableObject)
- {
- ((BindableObject)ret).IsCreateByXaml = true;
- }
+ element.IsCreateByXaml = true;
}
return ret;
}
};
var mi = nodeType.GetRuntimeMethods().FirstOrDefault(isMatch);
if (mi == null)
+ {
+ if (node is ElementNode elementNode)
+ {
+ var nodeTypeExtension = XamlParser.GetElementTypeExtension(node.XmlType, elementNode, Context.RootElement?.GetType().GetTypeInfo().Assembly);
+ mi = nodeTypeExtension?.GetRuntimeMethods().FirstOrDefault(isMatch);
+ }
+ }
+
+ if (mi == null)
+ {
throw new MissingMemberException($"No static method found for {nodeType.FullName}::{factoryMethod} ({string.Join(", ", types.Select(t => t.FullName))})");
+ }
+
return mi.Invoke(null, arguments);
}
else
{
value = Activator.CreateInstance(nodeType);
- if (value is Element)
+ if (value is Element element)
{
if (null != Application.Current)
{
- Application.AddResourceChangedCallback(value, (value as Element).OnResourcesChanged);
+ Application.Current.XamlResourceChanged += element.OnResourcesChanged;
}
- if (value is BindableObject)
- {
- ((BindableObject)value).IsCreateByXaml = true;
- }
+ element.IsCreateByXaml = true;
}
}
return type;
}
+
+ public static Type GetElementTypeExtension(XmlType xmlType, IXmlLineInfo xmlInfo, Assembly currentAssembly)
+ {
+ if (s_xmlnsDefinitions == null)
+ GatherXmlnsDefinitionAttributes(currentAssembly);
+
+ var namespaceURI = xmlType.NamespaceUri;
+ var elementName = xmlType.Name;
+ var typeArguments = xmlType.TypeArguments;
+
+ if (elementName.Contains("-"))
+ {
+ elementName = elementName.Replace('-', '+');
+ }
+
+ var lookupAssemblies = new List<XmlnsDefinitionAttribute>();
+ var lookupNames = new List<string>();
+
+ foreach (var xmlnsDef in s_xmlnsDefinitions)
+ {
+ if (xmlnsDef.XmlNamespace != namespaceURI)
+ continue;
+ lookupAssemblies.Add(xmlnsDef);
+ }
+
+ if (lookupAssemblies.Count == 0)
+ {
+ string ns, asmstring, _;
+ XmlnsHelper.ParseXmlns(namespaceURI, out _, out ns, out asmstring);
+ lookupAssemblies.Add(new XmlnsDefinitionAttribute(namespaceURI, ns)
+ {
+ AssemblyName = asmstring ?? currentAssembly.FullName
+ });
+ }
+
+ lookupNames.Add(elementName + "Extension");
+
+ for (var i = 0; i < lookupNames.Count; i++)
+ {
+ var name = lookupNames[i];
+ if (name.Contains(":"))
+ name = name.Substring(name.LastIndexOf(':') + 1);
+ if (typeArguments != null)
+ name += "`" + typeArguments.Count; //this will return an open generic Type
+ lookupNames[i] = name;
+ }
+
+ Type type = null;
+ foreach (var asm in lookupAssemblies)
+ {
+ foreach (var name in lookupNames)
+ {
+ if ((type = Type.GetType($"{asm.ClrNamespace}.{name}, {asm.AssemblyName}")) != null)
+ break;
+
+ if ((type = currentAssembly.GetType($"{asm.ClrNamespace}.{name}")) != null)
+ {
+ break;
+ }
+
+ if ('?' == name.Last())
+ {
+ string nameOfNotNull = name.Substring(0, name.Length - 1);
+ Type typeofNotNull = Type.GetType($"{asm.ClrNamespace}.{nameOfNotNull}, {asm.AssemblyName}");
+
+ if (null != typeofNotNull)
+ {
+ type = typeof(Nullable<>).MakeGenericType(new Type[] { typeofNotNull });
+ break;
+ }
+ }
+ }
+
+ if (type != null)
+ break;
+ }
+
+ if (type != null && typeArguments != null)
+ {
+ XamlParseException innerexception = null;
+ var args = typeArguments.Select(delegate (XmlType xmltype)
+ {
+ XamlParseException xpe;
+ var t = GetElementType(xmltype, xmlInfo, currentAssembly, out xpe);
+ if (xpe != null)
+ {
+ innerexception = xpe;
+ return null;
+ }
+ return t;
+ }).ToArray();
+ if (innerexception != null)
+ {
+ return null;
+ }
+ type = type.MakeGenericType(args);
+ }
+
+ return type;
+ }
}
}
}
/// <summary>
+ /// The constructor with a stylesheet, window mode, window size, position and default window type.
+ /// </summary>
+ /// <param name="styleSheet">The styleSheet URL.</param>
+ /// <param name="windowMode">The windowMode.</param>
+ /// <param name="windowSize">The window size.</param>
+ /// <param name="windowPosition">The window position.</param>
+ /// <param name="type">The default window type.</param>
+ /// <since_tizen> 9 </since_tizen>
+ /// This should be hidden. Because the major purpose is to support IME window as keyboard application.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public NUIApplication(string styleSheet, WindowMode windowMode, Size2D windowSize, Position2D windowPosition, WindowType type) : base(new NUICoreBackend(styleSheet, windowMode, windowSize, windowPosition, type))
+ {
+ ExternalThemeManager.Initialize();
+ }
+
+ /// <summary>
/// Occurs whenever the application is resumed.
/// </summary>
/// <since_tizen> 4 </since_tizen>
--- /dev/null
+/*
+* Copyright(c) 2021 Samsung Electronics Co., Ltd.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+using System;
+using System.ComponentModel;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+
+namespace Tizen.NUI.BaseComponents
+{
+ /// <summary>
+ /// RiveAnimationView renders an animated vector image (Rive file).
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class RiveAnimationView : View
+ {
+ static RiveAnimationView() { }
+
+ /// <summary>
+ /// RiveAnimationView constructor.
+ /// </summary>
+ /// <param name="url">The rive resource URL</param>
+ ///[EditorBrowsable(EditorBrowsableState.Never)]
+ public RiveAnimationView(string url) : this(Interop.RiveAnimationView.New(url), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal RiveAnimationView(global::System.IntPtr cPtr, bool shown = true) : base(cPtr, shown)
+ {
+ if (!shown)
+ {
+ SetVisible(false);
+ }
+ }
+
+ /// <summary>
+ /// Eanables the given animation.
+ /// </summary>
+ /// <param name="animationName">The animation to enable</param>
+ /// <param name="on">The enable state of given animation</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void EnableAnimation(string animationName, bool on)
+ {
+ Interop.RiveAnimationView.EnableAnimation(SwigCPtr, animationName, on);
+ }
+
+ /// <summary>
+ /// Play animation.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void PlayAnimation()
+ {
+ Interop.RiveAnimationView.PlayAnimation(SwigCPtr);
+ }
+
+ /// <summary>
+ /// Pause animation.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void PauseAnimation()
+ {
+ Interop.RiveAnimationView.PauseAnimation(SwigCPtr);
+ }
+
+ /// <summary>
+ /// Stop animation.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void StopAnimation()
+ {
+ Interop.RiveAnimationView.StopAnimation(SwigCPtr);
+ }
+
+ /// <summary>
+ /// Sets the fill color of given fill.
+ /// </summary>
+ /// <param name="shapeFillName">The shape fill name</param>
+ /// <param name="color">The rgba color</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetShapeFillColor(string shapeFillName, Color color)
+ {
+ if (color == null)
+ throw new ArgumentNullException(nameof(color));
+ Interop.RiveAnimationView.SetShapeFillColor(SwigCPtr, shapeFillName, color.SwigCPtr);
+ }
+
+ /// <summary>
+ /// Sets the shape stroke color of given stroke.
+ /// </summary>
+ /// <param name="shapeStrokeName">The shape stroke name</param>
+ /// <param name="color">The rgba color</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetShapeStrokeColor(string shapeStrokeName, Color color)
+ {
+ if (color == null)
+ throw new ArgumentNullException(nameof(color));
+ Interop.RiveAnimationView.SetShapeStrokeColor(SwigCPtr, shapeStrokeName, color.SwigCPtr);
+ }
+
+ /// <summary>
+ /// Sets the opacity of given node.
+ /// </summary>
+ /// <param name="nodeName">The node name</param>
+ /// <param name="opacity">The opacity of given node</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetNodeOpacity(string nodeName, float opacity)
+ {
+ Interop.RiveAnimationView.SetNodeOpacity(SwigCPtr, nodeName, opacity);
+ }
+
+ /// <summary>
+ /// Sets the scale of given node.
+ /// </summary>
+ /// <param name="nodeName">The node name</param>
+ /// <param name="scale">The scale of given node</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetNodeScale(string nodeName, Vector2 scale)
+ {
+ if (scale == null)
+ throw new ArgumentNullException(nameof(scale));
+ Interop.RiveAnimationView.SetNodeScale(SwigCPtr, nodeName, Vector2.getCPtr(scale));
+ }
+
+ /// <summary>
+ /// Sets the rotation of given node.
+ /// </summary>
+ /// <param name="nodeName">The node name</param>
+ /// <param name="degree">The degree of given node</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetNodeRotation(string nodeName, Degree degree)
+ {
+ if (degree == null)
+ throw new ArgumentNullException(nameof(degree));
+ Interop.RiveAnimationView.SetNodeRotation(SwigCPtr, nodeName, Degree.getCPtr(degree));
+ }
+
+ /// <summary>
+ /// Sets the position of given node.
+ /// </summary>
+ /// <param name="nodeName">The node name</param>
+ /// <param name="position">The position of given node</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetNodePosition(string nodeName, Position position)
+ {
+ if (position == null)
+ throw new ArgumentNullException(nameof(position));
+ Interop.RiveAnimationView.SetNodePosition(SwigCPtr, nodeName, position.SwigCPtr);
+ }
+ }
+}
}
disposed = true;
+
+ if (null != Application.Current)
+ {
+ Application.Current.XamlResourceChanged -= OnResourcesChanged;
+ }
}
/// <summary>
/// <summary>
/// Used for simple dialog windows.
/// </summary>
- Dialog
+ Dialog,
+ /// <summary>
+ /// Used for IME window that is used for keyboard window.
+ /// It should be set in Application's New input param when application is created.
+ /// In addition, it is only for internal keyboard application.
+ /// This should be hidden.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Ime
}
/// <since_tizen> 3 </since_tizen>
return view;
}
+ /// Internal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static T LoadFromEXamlByRelativePath<T>(this T view, string eXamlPath)
+ {
+ if (null == eXamlPath)
+ {
+ return view;
+ }
+
+ MainAssembly = view.GetType().Assembly;
+
+ string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+
+ Tizen.Log.Fatal("NUI", "the resource path: " + resource);
+ int windowWidth = NUIApplication.GetDefaultWindow().Size.Width;
+ int windowHeight = NUIApplication.GetDefaultWindow().Size.Height;
+
+ string likelyResourcePath = resource + eXamlPath;
+
+ //Find the xaml file in the layout folder
+ if (File.Exists(likelyResourcePath))
+ {
+ StreamReader reader = new StreamReader(likelyResourcePath);
+ var xaml = reader.ReadToEnd();
+ reader.Close();
+ reader.Dispose();
+
+ LoadEXaml.Load(view, xaml);
+ }
+ else
+ {
+ throw new Exception($"Can't find examl file {eXamlPath}");
+ }
+
+ return view;
+ }
+
/// Used for TCT and TC coverage, will never be opened.
[EditorBrowsable(EditorBrowsableState.Never)]
public static T LoadFromEXaml<T>(this T view, string eXamlStr)
NotSupported,
}
+ /// <summary>
+ /// Enumeration for window resized mode by display server.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum ResizeDirection
+ {
+ /// <summary>
+ /// Start resizing window to the top-left edge.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ TopLeft = 1,
+ /// <summary>
+ /// Start resizing window to the top side.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Top = 2,
+ /// <summary>
+ /// Start resizing window to the top-right edge.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ TopRight = 3,
+ /// <summary>
+ /// Start resizing window to the left side.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Left = 4,
+ /// <summary>
+ /// Start resizing window to the right side.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Right = 5,
+ /// <summary>
+ /// Start resizing window to the bottom-left edge.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ BottomLeft = 6,
+ /// <summary>
+ /// Start resizing window to the bottom side.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Bottom = 7,
+ /// <summary>
+ /// Start resizing window to the bottom-right edge.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ BottomRight = 8,
+ }
+
/// <summary>
/// The stage instance property (read-only).<br />
}
/// <summary>
+ /// Sets window position and size for specific orientation.
+ /// This api reserves the position and size per orientation to display server.
+ /// When the device is rotated, the window is moved/resized with the reserved position/size by display server.
+ /// Currently, it only works when the window's type is WindowType::Ime.
+ /// It means this function is only for IME window of internal keyboard application.
+ /// It is only for internal keyboard application.
+ /// This should be hidden.
+ /// </summary>
+ /// <param name="positionSize">The reserved position and size for the orientation.</param>
+ /// <param name="orientation">The orientation.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetPositionSizeWithOrientation(Rectangle positionSize, Window.WindowOrientation orientation)
+ {
+ Interop.Window.SetPositionSizeWithOrientation(SwigCPtr, Rectangle.getCPtr(positionSize), (int)orientation);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Get native window ID
/// </summary>
/// <returns>native window ID</returns>
}
/// <summary>
+ /// Enables the floating mode of window.
+ /// The floating mode is to support window is moved or resized by display server.
+ /// For example, if the video-player window sets the floating mode,
+ /// then display server changes its geometry and handles it like a popup.
+ /// The way of handling floating mode window is decided by display server.
+ /// A special display server(as a Tizen display server) supports this mode.
+ /// </summary>
+ /// <param name="enable">Enable floating mode or not.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void EnableFloatingMode(bool enable)
+ {
+ Interop.Window.EnableFloatingMode(SwigCPtr, enable);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Requests to display server for the window is moved by display server.
+ /// It can be work with setting window floating mode.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RequestMoveToServer()
+ {
+ Interop.Window.RequestMoveToServer(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Requests to display server for the window is resized by display server.
+ /// It can be work with setting window floating mode.
+ /// </summary>
+ /// <param name="direction">It is indicated the window's side or edge for starting point.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RequestResizeToServer(ResizeDirection direction)
+ {
+ Interop.Window.RequestResizeToServer(SwigCPtr, (int)direction);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Add FrameUpdateCallback
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
{
bindableObject.bindingContext = newValue;
bindableObject.FlushBinding();
+
+ if (newValue is BindableObject targetBindableObject)
+ {
+ targetBindableObject.IsCreateByXaml = true;
+ }
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
throw new ArgumentNullException(nameof(property));
}
+
+ if (null == property.DefaultValueCreator)
+ {
+ BindablePropertyContext context = GetOrCreateContext(property);
+ if (null != context)
+ {
+ context.Value = value;
+ }
+ }
+
property.PropertyChanged?.Invoke(this, null, value);
OnPropertyChanged(property.PropertyName);
if (this.TryGetResource(key, out value))
OnResourceChanged(property, value);
- Tizen.NUI.Application.AddResourceChangedCallback(this, (this as Element).OnResourcesChanged);
+ if (null != Application.Current)
+ {
+ Application.Current.XamlResourceChanged += OnResourcesChanged;
+ }
}
internal event EventHandler ParentSet;
--- /dev/null
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class RiveAnimationTest : IExample
+ {
+ private Window window;
+ private Layer defaultLayer;
+
+ RiveAnimationView rav;
+ Button playButton, stopButton;
+ Button bounceButton, brokeButton;
+ Button fillButton, strokeButton, opacityButton;
+ Button scaleButton, rotationButton, positionButton;
+ public void Activate()
+ {
+ window = NUIApplication.GetDefaultWindow();
+ defaultLayer = window.GetDefaultLayer();
+
+ rav = new RiveAnimationView(Tizen.Applications.Application.Current.DirectoryInfo.Resource + "buggy.riv")
+ {
+ Size = new Size(500, 500),
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ };
+
+ rav.EnableAnimation("idle", true);
+
+ playButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(0, 0),
+ Text = "Play"
+ };
+ playButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.PlayAnimation();
+ };
+
+ stopButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(200, 0),
+ Text = "Stop"
+ };
+ stopButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.StopAnimation();
+ };
+
+ bounceButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(0, 100),
+ Text = "Bounce"
+ };
+ bounceButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.EnableAnimation("bouncing", true);
+ };
+
+ brokeButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(200, 100),
+ Text = "Broken"
+ };
+ brokeButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.EnableAnimation("broken", true);
+ };
+
+ fillButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(0, 200),
+ Text = "Fill"
+ };
+ fillButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.SetShapeFillColor("grillFillColor", new Color(1.0f, 0.0f, 0.0f, 1.0f));
+ };
+
+ strokeButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(200, 200),
+ Text = "Stroke"
+ };
+ strokeButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.SetShapeStrokeColor("grillStrokeColor", new Color(0.0f, 255.0f, 0.0f, 255.0f));
+ };
+
+ opacityButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(400, 200),
+ Text = "Opacity"
+ };
+ opacityButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.SetNodeOpacity("front_light", 0.3f);
+ };
+
+ scaleButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(0, 300),
+ Text = "Scale"
+ };
+ scaleButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.SetNodeScale("front_light", new Vector2(2.0f, 2.0f));
+ };
+
+ rotationButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(200, 300),
+ Text = "Rotation"
+ };
+ rotationButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.SetNodeRotation("front_light", new Degree(45.0f));
+ };
+
+ positionButton = new Button()
+ {
+ Size = new Size(200, 100),
+ Position = new Position(400, 300),
+ Text = "Position"
+ };
+ positionButton.Clicked += (object source, ClickedEventArgs args) =>
+ {
+ rav.SetNodePosition("front_light", new Position(100.0f, -50.0f));
+ };
+
+ defaultLayer.Add(rav);
+ defaultLayer.Add(playButton);
+ defaultLayer.Add(stopButton);
+ defaultLayer.Add(bounceButton);
+ defaultLayer.Add(brokeButton);
+ defaultLayer.Add(fillButton);
+ defaultLayer.Add(strokeButton);
+ defaultLayer.Add(opacityButton);
+ defaultLayer.Add(scaleButton);
+ defaultLayer.Add(rotationButton);
+ defaultLayer.Add(positionButton);
+ }
+ public void Deactivate()
+ {
+ defaultLayer.Remove(rav);
+ defaultLayer.Remove(playButton);
+ defaultLayer.Remove(stopButton);
+ defaultLayer.Remove(bounceButton);
+ defaultLayer.Remove(brokeButton);
+ defaultLayer.Remove(fillButton);
+ defaultLayer.Remove(strokeButton);
+ defaultLayer.Remove(opacityButton);
+ defaultLayer.Remove(scaleButton);
+ defaultLayer.Remove(rotationButton);
+ defaultLayer.Remove(positionButton);
+ }
+ }
+}
using NUnit.Framework.TUnit;
using Tizen.NUI.Components;
using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
namespace Tizen.NUI.Devel.Tests
{
public class InternalApplicationTest
{
private const string tag = "NUITEST";
+
private delegate bool dummyCallback(IntPtr application);
private bool OnDummyCallback(IntPtr data)
{
return false;
}
+ internal class MyApplication : Application
+ {
+ public MyApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+
+ public void OnDispose(DisposeTypes type)
+ {
+ base.Dispose(type);
+ }
+ }
+
[SetUp]
public void Init()
{
}
[Test]
- [Description("NUIApplicationInitEventArgs Get")]
+ [Category("P1")]
+ [Description("NUIApplicationInitEventArgs Application.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationInitEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationInitEventArgsGet()
{
}
[Test]
- [Description("NUIApplicationInitEventArgs Set")]
+ [Category("P1")]
+ [Description("NUIApplicationInitEventArgs Application.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationInitEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationInitEventArgsSet()
{
}
[Test]
- [Description("NUIApplicationTerminatingEventArgs Get")]
+ [Category("P1")]
+ [Description("NUIApplicationTerminatingEventArgs Application.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationTerminatingEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationTerminatingEventArgsGet()
{
}
[Test]
- [Description("NUIApplicationTerminatingEventArgs Set")]
+ [Category("P1")]
+ [Description("NUIApplicationTerminatingEventArgs Application.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationTerminatingEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationTerminatingEventArgsSet()
{
}
[Test]
- [Description("NUIApplicationPausedEventArgs Get")]
+ [Category("P1")]
+ [Description("NUIApplicationPausedEventArgs Application.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationPausedEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationPausedEventArgsGet()
{
}
[Test]
- [Description("NUIApplicationPausedEventArgs Set")]
+ [Category("P1")]
+ [Description("NUIApplicationPausedEventArgs Application.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationPausedEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationPausedEventArgsSet()
{
}
[Test]
- [Description("NUIApplicationResumedEventArgs Get")]
+ [Category("P1")]
+ [Description("NUIApplicationResumedEventArgs Application.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationResumedEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationResumedEventArgsGet()
{
}
[Test]
- [Description("NUIApplicationResumedEventArgs Set")]
+ [Category("P1")]
+ [Description("NUIApplicationResumedEventArgs Application.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationResumedEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationResumedEventArgsSet()
{
}
[Test]
- [Description("NUIApplicationResetEventArgs Get")]
+ [Category("P1")]
+ [Description("NUIApplicationResetEventArgs Application.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationResetEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationResetEventArgsGet()
{
}
[Test]
- [Description("NUIApplicationResetEventArgs Set")]
+ [Category("P1")]
+ [Description("NUIApplicationResetEventArgs Application.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationResetEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationResetEventArgsSet()
{
}
[Test]
- [Description("NUIApplicationLanguageChangedEventArgs Get")]
+ [Category("P1")]
+ [Description("NUIApplicationLanguageChangedEventArgs Application.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationLanguageChangedEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationLanguageChangedEventArgsGet()
{
}
[Test]
- [Description("NUIApplicationLanguageChangedEventArgs Set")]
+ [Category("P1")]
+ [Description("NUIApplicationLanguageChangedEventArgs Application.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationLanguageChangedEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationLanguageChangedEventArgsSet()
{
}
[Test]
- [Description("NUIApplicationRegionChangedEventArgs Get")]
+ [Category("P1")]
+ [Description("NUIApplicationRegionChangedEventArgs Application.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationRegionChangedEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationRegionChangedEventArgsGet()
{
}
[Test]
- [Description("NUIApplicationRegionChangedEventArgs Set")]
+ [Category("P1")]
+ [Description("NUIApplicationRegionChangedEventArgs Application.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationRegionChangedEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationRegionChangedEventArgsSet()
{
}
[Test]
- [Description("NUIApplicationBatteryLowEventArgs BatteryStatus Get")]
+ [Category("P1")]
+ [Description("NUIApplicationBatteryLowEventArgs BatteryStatus.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationBatteryLowEventArgs.BatteryStatus A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationBatteryLowEventArgsBatteryStatusGet()
{
}
[Test]
- [Description("NUIApplicationBatteryLowEventArgs BatteryStatus Set")]
+ [Category("P1")]
+ [Description("NUIApplicationBatteryLowEventArgs BatteryStatus.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationBatteryLowEventArgs.BatteryStatus A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationBatteryLowEventArgsBatteryStatusSet()
{
}
[Test]
- [Description("NUIApplicationMemoryLowEventArgs MemoryStatus Get")]
+ [Category("P1")]
+ [Description("NUIApplicationMemoryLowEventArgs MemoryStatus.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationMemoryLowEventArgs.MemoryStatus A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationMemoryLowEventArgsMemoryStatusGet()
{
}
[Test]
- [Description("NUIApplicationMemoryLowEventArgs MemoryStatus Set")]
+ [Category("P1")]
+ [Description("NUIApplicationMemoryLowEventArgs MemoryStatus.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationMemoryLowEventArgs.MemoryStatus A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationMemoryLowEventArgsMemoryStatusSet()
{
}
[Test]
- [Description("NUIApplicationAppControlEventArgs Application Get")]
+ [Category("P1")]
+ [Description("NUIApplicationAppControlEventArgs Application.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationAppControlEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationAppControlEventArgsApplicationGet()
{
}
[Test]
- [Description("NUIApplicationAppControlEventArgs Application Set")]
+ [Category("P1")]
+ [Description("NUIApplicationAppControlEventArgs Application.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationAppControlEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationAppControlEventArgsApplicationSet()
{
}
[Test]
- [Description("NUIApplicationAppControlEventArgs VoidP Get")]
+ [Category("P1")]
+ [Description("NUIApplicationAppControlEventArgs VoidP.Get.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationAppControlEventArgs.VoidP A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationAppControlEventArgsVoidPGet()
{
}
[Test]
- [Description("NUIApplicationAppControlEventArgs VoidP Set")]
+ [Category("P1")]
+ [Description("NUIApplicationAppControlEventArgs VoidP.Set.")]
+ [Property("SPEC", "Tizen.NUI.Application.NUIApplicationAppControlEventArgs.VoidP A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIApplicationAppControlEventArgsVoidPSet()
{
tlog.Debug(tag, $"NUIApplicationAppControlEventArgsVoidPSet END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("GetResourcesProvider IResourcesProvider Get")]
+ [Property("SPEC", "Tizen.NUI.GetResourcesProvider.IResourcesProvider.Get A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GetResourcesProviderIResourcesProviderGet()
+ {
+ tlog.Debug(tag, $"GetResourcesProviderIResourcesProviderGet START");
+
+ try
+ {
+ var testingTarget = GetResourcesProvider.Get();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Tizen.NUI.Binding.IResourcesProvider>(testingTarget, "should be an instance of testing target class!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"GetResourcesProviderIResourcesProviderGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application constructor.")]
+ [Property("SPEC", "Tizen.NUI.Application.Application C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationConstructor()
+ {
+ tlog.Debug(tag, $"ApplicationConstructor START");
+
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false);
+
+ try
+ {
+ var testingTarget = new Application(application);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Application>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"ApplicationConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application GetApplicationFromPtr.")]
+ [Property("SPEC", "Tizen.NUI.Application.GetApplicationFromPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationGetApplicationFromPtr()
+ {
+ tlog.Debug(tag, $"ApplicationGetApplicationFromPtr START");
+
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false);
+
+ try
+ {
+ Application.GetApplicationFromPtr(application.SwigCPtr.Handle);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"ApplicationGetApplicationFromPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application SystemResources.")]
+ [Property("SPEC", "Tizen.NUI.Application.SystemResources A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationSystemResources()
+ {
+ tlog.Debug(tag, $"ApplicationSystemResources START");
+
+ try
+ {
+ var result = Application.Instance.SystemResources;
+ tlog.Debug(tag, "SystemResources : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationSystemResources END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application IsResourcesCreated.")]
+ [Property("SPEC", "Tizen.NUI.Application.IsResourcesCreated A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationIsResourcesCreated()
+ {
+ tlog.Debug(tag, $"ApplicationIsResourcesCreated START");
+
+ try
+ {
+ var result = Application.Instance.IsResourcesCreated;
+ tlog.Debug(tag, "IsResourcesCreated : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationIsResourcesCreated END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application AddResourceChangedCallback.")]
+ [Property("SPEC", "Tizen.NUI.Application.AddResourceChangedCallback A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationAddResourceChangedCallback()
+ {
+ tlog.Debug(tag, $"ApplicationAddResourceChangedCallback START");
+
+ try
+ {
+ Application.AddResourceChangedCallback(new ImageView() as object, AddResourceChangedCallback);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationAddResourceChangedCallback END (OK)");
+ }
+
+ private void AddResourceChangedCallback(object sender, ResourcesChangedEventArgs e) { }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application Paused.")]
+ [Property("SPEC", "Tizen.NUI.Application.Paused A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationPaused()
+ {
+ tlog.Debug(tag, $"ApplicationPaused START");
+
+ try
+ {
+ Application.Instance.Paused += MyOnPaused;
+ Application.Instance.Paused -= MyOnPaused;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationPaused END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application Resumed.")]
+ [Property("SPEC", "Tizen.NUI.Application.Paused A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationResumed()
+ {
+ tlog.Debug(tag, $"ApplicationResumed START");
+
+ try
+ {
+ Application.Instance.Resumed += MyOnResumed;
+ Application.Instance.Resumed -= MyOnResumed;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationResumed END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application Reset.")]
+ [Property("SPEC", "Tizen.NUI.Application.Reset A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationReset()
+ {
+ tlog.Debug(tag, $"ApplicationReset START");
+
+ try
+ {
+ Application.Instance.Reset += MyOnReset;
+ Application.Instance.Reset -= MyOnReset;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationReset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application LanguageChanged.")]
+ [Property("SPEC", "Tizen.NUI.Application.LanguageChanged A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationLanguageChanged()
+ {
+ tlog.Debug(tag, $"ApplicationLanguageChanged START");
+
+ try
+ {
+ Application.Instance.LanguageChanged += MyOnLanguageChanged;
+ Application.Instance.LanguageChanged -= MyOnLanguageChanged;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationLanguageChanged END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application AppControl.")]
+ [Property("SPEC", "Tizen.NUI.Application.AppControl A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationAppControl()
+ {
+ tlog.Debug(tag, $"ApplicationAppControl START");
+
+ try
+ {
+ Application.Instance.AppControl += MyOnAppControl;
+ Application.Instance.AppControl -= MyOnAppControl;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationAppControl END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application MemoryLow.")]
+ [Property("SPEC", "Tizen.NUI.Application.MemoryLow A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationMemoryLow()
+ {
+ tlog.Debug(tag, $"ApplicationMemoryLow START");
+
+ try
+ {
+ Application.Instance.MemoryLow += MyOnMemoryLow;
+ Application.Instance.MemoryLow -= MyOnMemoryLow;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationMemoryLow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application BatteryLow.")]
+ [Property("SPEC", "Tizen.NUI.Application.BatteryLow A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationBatteryLow()
+ {
+ tlog.Debug(tag, $"ApplicationBatteryLow START");
+
+ try
+ {
+ Application.Instance.BatteryLow += MyOnBatteryLow;
+ Application.Instance.BatteryLow -= MyOnBatteryLow;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationBatteryLow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application RegionChanged.")]
+ [Property("SPEC", "Tizen.NUI.Application.RegionChanged A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationRegionChanged()
+ {
+ tlog.Debug(tag, $"ApplicationRegionChanged START");
+
+ try
+ {
+ Application.Instance.RegionChanged += MyOnRegionChanged;
+ Application.Instance.RegionChanged -= MyOnRegionChanged;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationRegionChanged END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application Terminating.")]
+ [Property("SPEC", "Tizen.NUI.Application.Terminating A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationTerminating()
+ {
+ tlog.Debug(tag, $"ApplicationTerminating START");
+
+ try
+ {
+ Application.Instance.Terminating += MyOnTerminating;
+ Application.Instance.Terminating -= MyOnTerminating;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationTerminating END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application Initialized.")]
+ [Property("SPEC", "Tizen.NUI.Application.Initialized A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationInitialized()
+ {
+ tlog.Debug(tag, $"ApplicationInitialized START");
+
+ try
+ {
+ Application.Instance.Initialized += MyOnInitialized;
+ Application.Instance.Initialized -= MyOnInitialized;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationInitialized END (OK)");
+ }
+
+ private void MyOnPaused(object sender, NUIApplicationPausedEventArgs e) { }
+ private void MyOnResumed(object sender, NUIApplicationResumedEventArgs e) { }
+ private void MyOnReset(object sender, NUIApplicationResetEventArgs e) { }
+ private void MyOnLanguageChanged(object sender, NUIApplicationLanguageChangedEventArgs e) { }
+ private void MyOnAppControl(object sender, NUIApplicationAppControlEventArgs e) { }
+ private void MyOnMemoryLow(object sender, NUIApplicationMemoryLowEventArgs e) { }
+ private void MyOnBatteryLow(object sender, NUIApplicationBatteryLowEventArgs e) { }
+ private void MyOnRegionChanged(object sender, NUIApplicationRegionChangedEventArgs e) { }
+ private void MyOnTerminating(object sender, NUIApplicationTerminatingEventArgs e) { }
+ private void MyOnInitialized(object sender, NUIApplicationInitEventArgs e) { }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application Dispose.")]
+ [Property("SPEC", "Tizen.NUI.Application.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationDispose()
+ {
+ tlog.Debug(tag, $"ApplicationDispose START");
+
+ try
+ {
+ var testingTarget = new MyApplication(Application.Instance.SwigCPtr.Handle, false);
+
+ tlog.Debug(tag, "testingTarget : " + testingTarget);
+
+ testingTarget.Initialized += MyOnInitialized;
+ testingTarget.Terminating += MyOnTerminating;
+ testingTarget.Paused += MyOnPaused;
+ testingTarget.Resumed += MyOnResumed;
+ testingTarget.Reset += MyOnReset;
+ testingTarget.LanguageChanged += MyOnLanguageChanged;
+ testingTarget.RegionChanged += MyOnRegionChanged;
+ testingTarget.BatteryLow += MyOnBatteryLow;
+ testingTarget.MemoryLow += MyOnMemoryLow;
+ testingTarget.AppControl += MyOnAppControl;
+
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application SetCurrentApplication")]
+ [Property("SPEC", "Tizen.NUI.Application.SetCurrentApplication M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationSetCurrentApplication()
+ {
+ tlog.Debug(tag, $"ApplicationSetCurrentApplication START");
+
+ try
+ {
+ Widget widget = new Widget();
+ WidgetApplication application = new WidgetApplication(widget.GetIntPtr(), false);
+ Application.SetCurrentApplication(application);
+
+ tlog.Debug(tag, "Application.Current : " + Application.Current);
+
+ widget.Dispose();
+ widget = null;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationSetCurrentApplication END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Application Current. With existing application.")]
+ [Property("SPEC", "Tizen.NUI.Application.Current A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationCurrentSetWithExistingApplication()
+ {
+ tlog.Debug(tag, $"ApplicationCurrentSetWithExistingApplication START");
+
+ Widget widget = new Widget();
+ WidgetApplication application = new WidgetApplication(widget.GetIntPtr(), false);
+ Application.SetCurrentApplication(application);
+
+ try
+ {
+ Application.Current = application;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+
+ tlog.Debug(tag, $"ApplicationCurrentSetWithExistingApplication END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application XamlResources.")]
+ [Property("SPEC", "Tizen.NUI.Application.XamlResources A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationXamlResources()
+ {
+ tlog.Debug(tag, $"ApplicationXamlResources START");
+
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
+
+ tlog.Debug(tag, "application.XamlResources : " + application.XamlResources);
+
+ application.XamlResources = new Tizen.NUI.Binding.ResourceDictionary();
+ tlog.Debug(tag, "application.XamlResources : " + application.XamlResources);
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"ApplicationXamlResources END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application IsApplicationOrNull.")]
+ [Property("SPEC", "Tizen.NUI.Application.IsApplicationOrNull M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationIsApplicationOrNull()
+ {
+ tlog.Debug(tag, $"ApplicationIsApplicationOrNull START");
+
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
+
+ try
+ {
+ var result = Application.IsApplicationOrNull(application);
+ Assert.IsTrue(result);
+ tlog.Debug(tag, "result = " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"ApplicationIsApplicationOrNull END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application ResetSignal.")]
+ [Property("SPEC", "Tizen.NUI.Application.ResetSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationResetSignal()
+ {
+ tlog.Debug(tag, $"ApplicationResetSignal START");
+
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
+
+ application.InitSignal();
+
+ try
+ {
+ application.ResetSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"ApplicationResetSignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application GetResourcePath.")]
+ [Property("SPEC", "Tizen.NUI.Application.GetResourcePath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationGetResourcePath()
+ {
+ tlog.Debug(tag, $"ApplicationGetResourcePath START");
+
+ try
+ {
+ Application.GetResourcePath();
+ tlog.Debug(tag, "ResourcePath : " + Application.GetResourcePath());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationGetResourcePath END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application GetLanguage.")]
+ [Property("SPEC", "Tizen.NUI.Application.GetLanguage M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationGetLanguage()
+ {
+ tlog.Debug(tag, $"ApplicationGetLanguage START");
+
+ try
+ {
+ Application.Instance.GetLanguage();
+ tlog.Debug(tag, "Language : " + Application.Instance.GetLanguage());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationGetLanguage END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application GetRegion.")]
+ [Property("SPEC", "Tizen.NUI.Application.GetRegion M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationGetRegion()
+ {
+ tlog.Debug(tag, $"ApplicationGetRegion START");
+
+ try
+ {
+ Application.Instance.GetRegion();
+ tlog.Debug(tag, "Region : " + Application.Instance.GetRegion());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationGetRegion END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application GetWindow.")]
+ [Property("SPEC", "Tizen.NUI.Application.GetWindow M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationGetWindow()
+ {
+ tlog.Debug(tag, $"ApplicationGetWindow START");
+
+ try
+ {
+ Application.Instance.GetWindow();
+ tlog.Debug(tag, "Region : " + Application.Instance.GetWindow());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationGetWindow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application AddIdle.")]
+ [Property("SPEC", "Tizen.NUI.Application.AddIdle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationAddIdle()
+ {
+ tlog.Debug(tag, $"ApplicationAddIdle START");
+
+ try
+ {
+ SWIGTYPE_p_Dali__CallbackBase callback = new SWIGTYPE_p_Dali__CallbackBase(new ImageView().SwigCPtr.Handle);
+ var result = Application.Instance.AddIdle(callback);
+ tlog.Debug(tag, "result : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationAddIdle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application Lower.")]
+ [Property("SPEC", "Tizen.NUI.Application.Lower M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationLower()
+ {
+ tlog.Debug(tag, $"ApplicationLower START");
+
+ try
+ {
+ Application.Instance.Lower();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationLower END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application Assign.")]
+ [Property("SPEC", "Tizen.NUI.Application.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationAssign()
+ {
+ tlog.Debug(tag, $"ApplicationAssign START");
+
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false) as Application;
+
+ try
+ {
+ var testingTarget = Application.Instance.Assign(application);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Application>(testingTarget, "should be an instance of testing target class!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"ApplicationAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Application GetWindowList.")]
+ [Property("SPEC", "Tizen.NUI.Application.GetWindowList M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ApplicationGetWindowList()
+ {
+ tlog.Debug(tag, $"ApplicationGetWindowList START");
+
+ try
+ {
+ Application.GetWindowList();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ApplicationGetWindowList END (OK)");
+ }
}
}
}
[Test]
- [Description("ApplicationControlSignal constructor")]
+ [Category("P1")]
+ [Description("ApplicationControlSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationControlSignal.ApplicationControlSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationControlSignalConstructor()
{
}
[Test]
- [Description("ApplicationControlSignal Empty")]
+ [Category("P1")]
+ [Description("ApplicationControlSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationControlSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationControlSignalEmpty()
{
}
[Test]
- [Description("ApplicationControlSignal GetConnectionCount")]
+ [Category("P1")]
+ [Description("ApplicationControlSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationControlSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationControlSignalGetConnectionCount()
{
}
[Test]
- [Description("ApplicationControlSignal Connection")]
+ [Category("P1")]
+ [Description("ApplicationControlSignal connection.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationControlSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationControlSignalConnection()
{
}
[Test]
- [Description("ApplicationControlSignal Disconnection")]
+ [Category("P1")]
+ [Description("ApplicationControlSignal disconnection.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationControlSignal.Disconnect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationControlSignalDisconnection()
{
}
[Test]
- [Description("ApplicationControlSignal Emit")]
+ [Category("P1")]
+ [Description("ApplicationControlSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationControlSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationControlSignalEmit()
{
}
[Test]
- [Description("ApplicationSignal constructor")]
+ [Category("P1")]
+ [Description("ApplicationSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationSignal.ApplicationSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationSignalConstructor()
{
}
[Test]
- [Description("ApplicationSignal Empty")]
+ [Category("P1")]
+ [Description("ApplicationSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationSignalEmpty()
{
}
[Test]
- [Description("ApplicationSignal GetConnectionCount")]
+ [Category("P1")]
+ [Description("ApplicationSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationSignalGetConnectionCount()
{
}
[Test]
- [Description("ApplicationSignal Connection")]
+ [Category("P1")]
+ [Description("ApplicationSignal connection.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationSignalConnection()
{
}
[Test]
- [Description("ApplicationSignal Disconnection")]
+ [Category("P1")]
+ [Description("ApplicationSignal disconnection.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationSignal.Disconnect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationSignalDisconnection()
{
}
[Test]
- [Description("ApplicationSignal Emit")]
+ [Category("P1")]
+ [Description("ApplicationSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ApplicationSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void ApplicationSignalEmit()
{
return false;
}
+ internal class MyComponentApplication : ComponentApplication
+ {
+ public MyComponentApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+
+ public void OnDispose(DisposeTypes type)
+ {
+ base.Dispose(type);
+ }
+ }
+
[SetUp]
public void Init()
{
{
tlog.Debug(tag, $"ComponentApplicationConstructor START");
- using (Widget widget = new Widget())
- {
- var testingTarget = new ComponentApplication(widget.SwigCPtr.Handle, true);
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
-
- testingTarget.Dispose();
- }
+ ImageView view = new ImageView();
+ var testingTarget = new ComponentApplication(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
+ view.Dispose();
+ testingTarget.Dispose();
tlog.Debug(tag, $"ComponentApplicationConstructor END (OK)");
}
[Test]
[Category("P1")]
+ [Description("ComponentApplication constructor. With ComponentApplication.")]
+ [Property("SPEC", "Tizen.NUI.ComponentApplication.ComponentApplication C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ComponentApplicationConstructorWithComponentApplication()
+ {
+ tlog.Debug(tag, $"ComponentApplicationConstructorWithComponentApplication START");
+
+ ImageView view = new ImageView();
+ ComponentApplication componentApplication = new ComponentApplication(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(componentApplication, "should be not null");
+ Assert.IsInstanceOf<ComponentApplication>(componentApplication, "should be an instance of testing target class!");
+
+ var testingTarget = new ComponentApplication(componentApplication);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
+
+ view.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ComponentApplicationConstructorWithComponentApplication END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("ComponentApplication CreateNativeSignal.")]
[Property("SPEC", "Tizen.NUI.ComponentApplication.CreateNativeSignal M")]
[Property("SPEC_URL", "-")]
{
tlog.Debug(tag, $"ComponentApplicationCreateNativeSignal START");
- using (Widget widget = new Widget())
- {
- var testingTarget = new ComponentApplication(widget.SwigCPtr.Handle, true);
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
+ ImageView view = new ImageView();
+ var testingTarget = new ComponentApplication(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
+ try
+ {
var result = testingTarget.CreateNativeSignal();
Assert.IsNotNull(result, "should be not null");
Assert.IsInstanceOf<ApplicationSignal>(result, "should be an instance of ApplicationSignal class!");
-
- testingTarget.Dispose();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
}
+ view.Dispose();
+ testingTarget.Dispose();
tlog.Debug(tag, $"ComponentApplicationCreateNativeSignal END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("ComponentApplication Dispose.")]
+ [Property("SPEC", "Tizen.NUI.ComponentApplication.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ComponentApplicationDispose()
+ {
+ tlog.Debug(tag, $"ComponentApplicationDispose START");
+
+ ImageView view = new ImageView();
+ var testingTarget = new MyComponentApplication(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
+
+ try
+ {
+ testingTarget.OnDispose(DisposeTypes.Explicit);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ view.Dispose();
+ tlog.Debug(tag, $"ComponentApplicationDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ComponentApplication Assign.")]
+ [Property("SPEC", "Tizen.NUI.ComponentApplication.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ComponentApplicationAssign()
+ {
+ tlog.Debug(tag, $"ComponentApplicationAssign START");
+
+ ImageView view = new ImageView();
+ var testingTarget = new ComponentApplication(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<ComponentApplication>(testingTarget, "should be an instance of testing target class!");
+
+ try
+ {
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ComponentApplicationAssign END (OK)");
+ }
}
}
using NUnit.Framework.TUnit;
using Tizen.NUI.Components;
using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+using Tizen.Applications.CoreBackend;
namespace Tizen.NUI.Devel.Tests
{
}
[Test]
- [Description("NUIComponentCoreBackend constructor")]
+ [Category("P1")]
+ [Description("NUIComponentCoreBackend constructor.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentCoreBackend.NUIComponentCoreBackend C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIComponentCoreBackendConstructor()
{
}
[Test]
- [Description("NUIComponentCoreBackend constructor with stylesheet")]
+ [Category("P1")]
+ [Description("NUIComponentCoreBackend ComponentFactories. Get.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentCoreBackend.ComponentFactories A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void NUIComponentCoreBackendConstructorWithStylesheet()
+ public void NUIComponentCoreBackendComponentFactoriesGet()
{
- tlog.Debug(tag, $"NUIComponentCoreBackendConstructorWithStylesheet START");
+ tlog.Debug(tag, $"NUIComponentCoreBackendComponentFactoriesGet START");
- var dummy = resource + "/style/Test_Style_Manager.json";
- var testingTarget = new NUIComponentCoreBackend(dummy);
+ var testingTarget = new NUIComponentCoreBackend();
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<NUIComponentCoreBackend>(testingTarget, "should be an instance of testing target class!");
+ try
+ {
+ var result = testingTarget.ComponentFactories;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
testingTarget.Dispose();
- tlog.Debug(tag, $"NUIComponentCoreBackendConstructorWithStylesheet END (OK)");
+ tlog.Debug(tag, $"NUIComponentCoreBackendComponentFactoriesGet END (OK)");
}
[Test]
- [Description("NUIComponentCoreBackend dispose")]
+ [Category("P1")]
+ [Description("NUIComponentCoreBackend ComponentFactories. Set.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentCoreBackend.ComponentFactories A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void NUIComponentCoreBackendDispose()
+ public void NUIComponentCoreBackendComponentFactoriesSet()
{
- tlog.Debug(tag, $"NUIComponentCoreBackendDispose START");
+ tlog.Debug(tag, $"NUIComponentCoreBackendComponentFactoriesSet START");
var testingTarget = new NUIComponentCoreBackend();
Assert.IsNotNull(testingTarget, "should be not null");
try
{
- testingTarget.Dispose();
+ testingTarget.ComponentFactories = null;
}
catch (Exception e)
{
- tlog.Error(tag, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
}
-
- tlog.Debug(tag, $"NUIComponentCoreBackendDispose END (OK)");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIComponentCoreBackendComponentFactoriesSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIComponentCoreBackend AddEventHandler.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentCoreBackend.AddEventHandler A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIComponentCoreBackendAddEventHandler()
+ {
+ tlog.Debug(tag, $"NUIComponentCoreBackendAddEventHandler START");
+
+ var testingTarget = new NUIComponentCoreBackend();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<NUIComponentCoreBackend>(testingTarget, "should be an instance of testing target class!");
+
+ try
+ {
+ testingTarget.AddEventHandler(EventType.PreCreated, MyOnPreCreate);
+ testingTarget.AddEventHandler<Tizen.Applications.LowBatteryEventArgs >(EventType.LowBattery, MyOnLowBattery);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIComponentCoreBackendAddEventHandler END (OK)");
+ }
+
+ private void MyOnLowBattery(Tizen.Applications.LowBatteryEventArgs obj) { }
+ private void MyOnPreCreate() { }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIComponentCoreBackend constructor. With stylesheet")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentCoreBackend.NUIComponentCoreBackend C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIComponentCoreBackendConstructorWithStylesheet()
+ {
+ tlog.Debug(tag, $"NUIComponentCoreBackendConstructorWithStylesheet START");
+
+ var dummy = resource + "style/Test_Style_Manager.json";
+ var testingTarget = new NUIComponentCoreBackend(dummy);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<NUIComponentCoreBackend>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIComponentCoreBackendConstructorWithStylesheet END (OK)");
}
[Test]
- [Description("NUIComponentCoreBackend exit")]
+ [Category("P1")]
+ [Description("NUIComponentCoreBackend exit.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentCoreBackend.Exit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIComponentCoreBackendExit()
{
{
private const string tag = "NUITEST";
private event EventHandler Created;
+
+ private delegate bool dummyCallback(IntPtr nuicorebackend);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+
protected virtual void OnCreate()
{
Created?.Invoke(this, EventArgs.Empty);
}
[Test]
- [Description("NUICoreBackend constructor")]
+ [Category("P1")]
+ [Description("NUICoreBackend constructor.")]
+ [Property("SPEC", "Tizen.NUI.NUICoreBackend.NUICoreBackend C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUICoreBackendConstructor()
{
}
[Test]
- [Description("NUICoreBackend constructor with stylesheet")]
+ [Category("P1")]
+ [Description("NUICoreBackend constructor. With stylesheet.")]
+ [Property("SPEC", "Tizen.NUI.NUICoreBackend.NUICoreBackend C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUICoreBackendConstructorWithStylesheet()
{
}
[Test]
- [Description("NUICoreBackend constructor with stylesheet and windowMode")]
+ [Category("P1")]
+ [Description("NUICoreBackend constructor. With stylesheet and windowMode.")]
+ [Property("SPEC", "Tizen.NUI.NUICoreBackend.NUICoreBackend C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUICoreBackendConstructorWithStylesheetAndWindowmode()
{
}
[Test]
- [Description("NUICoreBackend constructor with stylesheet, window mode, window size and window position")]
+ [Category("P1")]
+ [Description("NUICoreBackend constructor. With stylesheet, mode, size, position")]
+ [Property("SPEC", "Tizen.NUI.NUICoreBackend.NUICoreBackend C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void NUICoreBackendConstructorWithMoreArgs()
+ public void NUICoreBackendConstructorWithFourParameters()
{
- tlog.Debug(tag, $"NUICoreBackendConstructorWithMoreArgs START");
+ tlog.Debug(tag, $"NUICoreBackendConstructorWithFourParameters START");
var dummy = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/style/Test_Style_Manager.json";
var testingTarget = new NUICoreBackend(dummy, NUIApplication.WindowMode.Opaque, new Size(400, 400), new Position(200, 300));
Assert.IsInstanceOf<NUICoreBackend>(testingTarget, "should be an instance of testing target class!");
testingTarget.Dispose();
- tlog.Debug(tag, $"NUICoreBackendConstructorWithMoreArgs END (OK)");
+ tlog.Debug(tag, $"NUICoreBackendConstructorWithFourParameters END (OK)");
}
[Test]
+ [Category("P1")]
[Description("NUICoreBackend AddEventHandler")]
+ [Property("SPEC", "Tizen.NUI.NUICoreBackend.AddEventHandler M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUICoreBackendAddEventHandler()
{
}
[Test]
- [Description("NUICoreBackend dispose")]
+ [Category("P1")]
+ [Description("NUICoreBackend Dispose.")]
+ [Property("SPEC", "Tizen.NUI.NUICoreBackend.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUICoreBackendDispose()
{
}
[Test]
- [Description("NUICoreBackend exit")]
+ [Category("P1")]
+ [Description("NUICoreBackend Exit.")]
+ [Property("SPEC", "Tizen.NUI.NUICoreBackend.Exit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUICoreBackendExit()
{
testingTarget.Dispose();
tlog.Debug(tag, $"NUICoreBackendExit END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("NUICoreBackend ApplicationHandle.")]
+ [Property("SPEC", "Tizen.NUI.NUICoreBackend.ApplicationHandle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUICoreBackendApplicationHandle()
+ {
+ tlog.Debug(tag, $"NUICoreBackendApplicationHandle START");
+
+ var testingTarget = new NUICoreBackend();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<NUICoreBackend>(testingTarget, "should be an instance of testing target class!");
+
+ try
+ {
+ var result = testingTarget.ApplicationHandle;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUICoreBackendApplicationHandle END (OK)");
+ }
}
}
using Tizen.NUI.Components;
using Tizen.NUI.BaseComponents;
using System.Collections.Generic;
+using Tizen.Applications.CoreBackend;
namespace Tizen.NUI.Devel.Tests
{
}
[Test]
- [Description("NUIWidgetCoreBackend constructor")]
+ [Category("P1")]
+ [Description("NUIWidgetCoreBackend constructor.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetCoreBackend.NUIWidgetCoreBackend C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIWidgetCoreBackendConstructor()
{
}
[Test]
- [Description("NUIWidgetCoreBackend constructor with stylesheet")]
+ [Category("P1")]
+ [Description("NUIWidgetCoreBackend AddEventHandler.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetCoreBackend.AddEventHandler A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIWidgetCoreBackendAddEventHandler()
+ {
+ tlog.Debug(tag, $"NUIWidgetCoreBackendAddEventHandler START");
+
+ var testingTarget = new NUIWidgetCoreBackend();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
+
+ try
+ {
+ testingTarget.AddEventHandler(EventType.PreCreated, MyOnPreCreate);
+ testingTarget.AddEventHandler<Tizen.Applications.LowBatteryEventArgs>(EventType.LowBattery, MyOnLowBattery);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetCoreBackendAddEventHandler END (OK)");
+ }
+
+ private void MyOnLowBattery(Tizen.Applications.LowBatteryEventArgs obj) { }
+ private void MyOnPreCreate() { }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetCoreBackend constructor. With stylesheet")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetCoreBackend.NUIWidgetCoreBackend C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIWidgetCoreBackendConstructorWithStylesheet()
{
tlog.Debug(tag, $"NUIWidgetCoreBackendConstructorWithStylesheet START");
- var dummy = resource + "/style/Test_Style_Manager.json";
+ var dummy = resource + "style/Test_Style_Manager.json";
var testingTarget = new NUIWidgetCoreBackend(dummy);
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
}
[Test]
- [Description("NUIWidgetCoreBackend dispose")]
+ [Category("P1")]
+ [Description("NUIWidgetCoreBackend dispose.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetCoreBackend.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIWidgetCoreBackendDispose()
{
}
[Test]
- [Description("NUIWidgetCoreBackend exit")]
+ [Category("P1")]
+ [Description("NUIWidgetCoreBackend exit.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetCoreBackend.Exit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIWidgetCoreBackendExit()
{
}
[Test]
- [Description("NUIWidgetCoreBackend register widget info")]
+ [Category("P1")]
+ [Description("NUIWidgetCoreBackend RegisterWidgetInfo.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetCoreBackend.RegisterWidgetInfo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIWidgetCoreBackendRegisterWidgetInfo()
{
}
[Test]
- [Description("NUIWidgetCoreBackend add widget info")]
+ [Category("P1")]
+ [Description("NUIWidgetCoreBackend AddWidgetInfo.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetCoreBackend.AddWidgetInfo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void NUIWidgetCoreBackendAddWidgetInfo()
{
testingTarget.Dispose();
tlog.Debug(tag, $"NUIWidgetCoreBackendAddWidgetInfo END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetCoreBackend WidgetApplicationHandle.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetCoreBackend.WidgetApplicationHandle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIWidgetCoreBackendWidgetApplicationHandle()
+ {
+ tlog.Debug(tag, $"NUIWidgetCoreBackendWidgetApplicationHandle START");
+
+ var testingTarget = new NUIWidgetCoreBackend();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<NUIWidgetCoreBackend>(testingTarget, "should be an instance of testing target class!");
+
+ try
+ {
+ var result = testingTarget.WidgetApplicationHandle;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetCoreBackendWidgetApplicationHandle END (OK)");
+ }
}
}
private const string tag = "NUITEST";
private string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+ internal class MyWatchApplication : WatchApplication
+ {
+ public MyWatchApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+
+ public void OnReleaseSwigCPtr(global::System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ base.ReleaseSwigCPtr(swigCPtr);
+ }
+ }
+
private bool IsWearable()
{
string value;
}
[Test]
- [Description("WatchApplication new")]
+ [Category("P1")]
+ [Description("WatchApplication constructor.")]
+ [Property("SPEC", "Tizen.NUI.WatchApplication.WatchApplication C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationNew()
+ public void WatchApplicationConstructor()
{
- tlog.Debug(tag, $"WatchApplicationNew START");
+ tlog.Debug(tag, $"WatchApplicationConstructor START");
- if (IsWearable())
+ using (ImageView imageView = new ImageView())
{
- var testingTarget = Tizen.NUI.WatchApplication.New();
+ var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
testingTarget.Dispose();
- tlog.Debug(tag, $"WatchApplicationNew END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationNew END (OK)");
- Assert.Pass("Not Supported profile");
}
- }
-
- [Test]
- [Description("WatchApplication new with strings")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationNewWithStrings()
- {
- tlog.Debug(tag, $"WatchApplicationNewWithStrings START");
-
- if (IsWearable())
- {
- var dummy = new string[3];
- var testingTarget = Tizen.NUI.WatchApplication.New(dummy);
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchApplicationNewWithStrings END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationNewWithStrings END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ tlog.Debug(tag, $"WatchApplicationConstructor END (OK)");
}
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication constructor. With WatchApplication.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.WatchApplication C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationConstructorWithApplication()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationConstructorWithApplication START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // WatchApplication watchApplication = new WatchApplication(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(watchApplication, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(watchApplication, "should be an instance of testing target class!");
+
+ // try
+ // {
+ // new WatchApplication(watchApplication);
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_new_WatchApplication__SWIG_1' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // watchApplication.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationConstructorWithApplication END (OK)");
+ //}
+
[Test]
- [Description("WatchApplication new with strings and stylesheet")]
+ [Category("P1")]
+ [Description("WatchApplication getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.WatchApplication.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationNewWithStringsAndStylesheet()
+ public void WatchApplicationgetCPtr()
{
- tlog.Debug(tag, $"WatchApplicationNewWithStringsAndStylesheet START");
+ tlog.Debug(tag, $"WatchApplicationgetCPtr START");
- if (IsWearable())
+ using (ImageView imageView = new ImageView())
{
- var args = new string[] { "Dali-demo" };
- var stylesheet = resource + "/style/Test_Style_Manager.json";
- var testingTarget = Tizen.NUI.WatchApplication.New(args, stylesheet);
+ var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchApplicationNewWithStringsAndStylesheet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationNewWithStringsAndStylesheet END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Description("WatchApplication TimeTickEventArgs:Application get")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationTimeTickEventArgsApplicationGet()
- {
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplicationGet START");
-
- if (IsWearable())
- {
- TimeTickEventArgs dummy = new TimeTickEventArgs();
- var testingTarget = dummy.Application;
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<Application>(testingTarget, "should be an instance of testing target class!");
+ try
+ {
+ WatchApplication.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
testingTarget.Dispose();
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplicationGet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplicationGet END (OK)");
- Assert.Pass("Not Supported profile");
}
- }
-
- [Test]
- [Description("WatchApplication TimeTickEventArgs:Application set")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationTimeTickEventArgsApplicationSet()
- {
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplicationSet START");
-
- if (IsWearable())
- {
- var dummyApplication = new Application();
- Assert.IsNotNull(dummyApplication, "should be not null");
- Assert.IsInstanceOf<Application>(dummyApplication, "should be an instance of testing target class!");
-
- TimeTickEventArgs testingTarget = new TimeTickEventArgs();
- testingTarget.Application = dummyApplication;
- var result = testingTarget.Application;
- Assert.IsNotNull(result, "should be not null.");
- Assert.AreEqual(dummyApplication, result, "Retrieved result should be equal to dummyApplication. ");
-
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplicationSet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplicationSet END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ tlog.Debug(tag, $"WatchApplicationgetCPtr END (OK)");
}
- [Test]
- [Description("WatchApplication TimeTickEventArgs:WatchTime get")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationTimeTickEventArgsWatchTimeGet()
- {
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeGet START");
-
- if (IsWearable())
- {
- TimeTickEventArgs dummy = new TimeTickEventArgs();
- var testingTarget = dummy.WatchTime;
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "should be an instance of testing target class!");
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeGet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeGet END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication ReleaseSwigCPtr.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.ReleaseSwigCPtr M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationReleaseSwigCPtr()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationReleaseSwigCPtr START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new MyWatchApplication(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // try
+ // {
+ // testingTarget.OnReleaseSwigCPtr(imageView.SwigCPtr);
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_delete_WatchApplication' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationReleaseSwigCPtr END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication NewWatchApplication.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.NewWatchApplication M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationNewWatchApplication()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationNewWatchApplication START");
+
+ // try
+ // {
+ // var testingTarget = WatchApplication.NewWatchApplication();
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_New__SWIG_0' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationNewWatchApplication END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication NewWatchApplication. With strings")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.NewWatchApplication M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationNewWatchApplicationWithStrings()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationNewWatchApplicationWithStrings START");
+
+ // try
+ // {
+ // var dummy = new string[3];
+ // var testingTarget = WatchApplication.NewWatchApplication(dummy);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // testingTarget.Dispose();
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_New__SWIG_1' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationNewWatchApplicationWithStrings END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication NewWatchApplication. With strings and style.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.NewWatchApplication M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationNewWithStringsAndStylesheet()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationNewWithStringsAndStylesheet START");
+
+ // try
+ // {
+ // var args = new string[] { "Dali-demo" };
+ // var stylesheet = resource + "style/Test_Style_Manager.json";
+ // var testingTarget = WatchApplication.NewWatchApplication(args, stylesheet);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // testingTarget.Dispose();
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_New__SWIG_2' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationNewWithStringsAndStylesheet END (OK)");
+ //}
[Test]
- [Description("WatchApplication TimeTickEventArgs:WatchTime set")]
+ [Category("P1")]
+ [Description("WatchApplication.TimeTickEventArgs. Application.")]
+ [Property("SPEC", "Tizen.NUI.WatchApplication.TimeTickEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationTimeTickEventArgsWatchTimeSet()
+ public void WatchApplicationTimeTickEventArgsApplication()
{
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeSet START");
+ tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplication START");
- if (IsWearable())
- {
- var dummyWatchTime = new WatchTime();
- Assert.IsNotNull(dummyWatchTime, "should be not null");
- Assert.IsInstanceOf<WatchTime>(dummyWatchTime, "should be an instance of testing target class!");
-
- TimeTickEventArgs testingTarget = new TimeTickEventArgs();
- testingTarget.WatchTime = dummyWatchTime;
+ var testingTarget = new TimeTickEventArgs();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TimeTickEventArgs>(testingTarget, "should be an instance of testing target class!");
- var result = testingTarget.WatchTime;
- Assert.IsNotNull(result, "should be not null.");
- Assert.AreEqual(dummyWatchTime, result, "Retrieved result should be equal to dummyApplication. ");
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false);
+ testingTarget.Application = application;
+ Assert.IsNotNull(testingTarget.Application, "should be not null.");
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeSet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeSet END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplication END (OK)");
}
[Test]
- [Description("WatchApplication AmbientTickEventArgs:Application get")]
+ [Category("P1")]
+ [Description("WatchApplication.TimeTickEventArgs. WatchTime.")]
+ [Property("SPEC", "Tizen.NUI.WatchApplication.TimeTickEventArgs.WatchTime A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationAmbientTickEventArgsApplicationGet()
+ public void WatchApplicationTimeTickEventArgsWatchTime()
{
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsApplicationGet START");
+ tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTime START");
- if (IsWearable())
- {
- AmbientTickEventArgs dummy = new AmbientTickEventArgs();
- var testingTarget = dummy.Application;
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<Application>(testingTarget, "should be an instance of testing target class!");
+ var testingTarget = new TimeTickEventArgs();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TimeTickEventArgs>(testingTarget, "should be an instance of testing target class!");
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsApplicationGet END (OK)");
- }
- else
+ Widget widget = new Widget();
+ using (WatchTime time = new WatchTime(widget.GetIntPtr(), false))
{
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsApplicationGet END (OK)");
- Assert.Pass("Not Supported profile");
+ testingTarget.WatchTime = time;
+ Assert.IsNotNull(testingTarget.WatchTime);
}
- }
-
- [Test]
- [Description("WatchApplication AmbientTickEventArgs:Application set")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationAmbientTickEventArgsApplicationSet()
- {
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsApplicationSet START");
-
- if (IsWearable())
- {
- var application = new Application();
- Assert.IsNotNull(application, "should be not null");
- Assert.IsInstanceOf<Application>(application, "should be an instance of testing target class!");
- AmbientTickEventArgs testingTarget = new AmbientTickEventArgs();
- testingTarget.Application = application;
-
- var result = testingTarget.Application;
- Assert.IsNotNull(result, "should be not null.");
- Assert.AreEqual(application, result, "Retrieved result should be equal to dummyApplication. ");
-
- application.Dispose();
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsApplicationSet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsApplicationSet END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTime END (OK)");
}
- [Test]
- [Description("WatchApplication AmbientTickEventArgs:WatchTime get")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationAmbientTickEventArgsWatchTimeGet()
- {
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsWatchTimeGet START");
-
- if (IsWearable())
- {
- AmbientTickEventArgs dummy = new AmbientTickEventArgs();
- var testingTarget = dummy.WatchTime;
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "should be an instance of testing target class!");
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsWatchTimeGet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsWatchTimeGet END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication.TimeTick.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.TimeTick A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationTimeTick()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationTimeTick START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_TimeTickSignal' in shared library 'libdali2-csharp-binder.so' */
+ // testingTarget.TimeTick += MyOnTimeTick;
+ // testingTarget.TimeTick -= MyOnTimeTick;
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationTimeTick END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication.TimeTickSignal.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.TimeTickSignal A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationTimeTickSignal()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationTimeTickSignal START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // try
+ // {
+ // testingTarget.TimeTickSignal();
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_TimeTickSignal' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationTimeTickSignal END (OK)");
+ //}
+
+ private void MyOnTimeTick(object sender, TimeTickEventArgs e) { }
[Test]
- [Description("WatchApplication AmbientTickEventArgs:WatchTime set")]
+ [Category("P1")]
+ [Description("WatchApplication.AmbientTickEventArgs. Application.")]
+ [Property("SPEC", "Tizen.NUI.WatchApplication.TimeTickEventArgs.Application A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationAmbientTickEventArgsWatchTimeSet()
+ public void WatchApplicationAmbientTickEventArgsApplication()
{
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsWatchTimeSet START");
-
- if (IsWearable())
- {
- var dummyWatchTime = new WatchTime();
- Assert.IsNotNull(dummyWatchTime, "should be not null");
- Assert.IsInstanceOf<WatchTime>(dummyWatchTime, "should be an instance of testing target class!");
+ tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsApplication START");
- AmbientTickEventArgs testingTarget = new AmbientTickEventArgs();
- testingTarget.WatchTime = dummyWatchTime;
+ var testingTarget = new AmbientTickEventArgs();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AmbientTickEventArgs>(testingTarget, "should be an instance of AmbientTickEventArgs class!");
- var result = testingTarget.WatchTime;
- Assert.IsNotNull(result, "should be not null.");
- Assert.AreEqual(dummyWatchTime, result, "Retrieved result should be equal to dummyApplication. ");
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false);
+ testingTarget.Application = application;
+ Assert.IsNotNull(testingTarget.Application, "should be not null.");
- dummyWatchTime.Dispose();
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsWatchTimeSet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsWatchTimeSet END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"WatchApplicationAmbientTickEventArgsApplication END (OK)");
}
[Test]
- [Description("WatchApplication AmbientChangedEventArgs:Application get")]
+ [Category("P1")]
+ [Description("WatchApplication.AmbientTickEventArgs.WatchTime")]
+ [Property("SPEC", "Tizen.NUI.WatchApplication.AmbientTickEventArgs.WatchTime A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationAmbientChangedEventArgsApplicationGet()
+ public void WatchApplicationAmbientTickArgsWatchTime()
{
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsApplicationGet START");
+ tlog.Debug(tag, $"WatchApplicationAmbientTickArgsWatchTime START");
- if (IsWearable())
- {
- AmbientChangedEventArgs dummy = new AmbientChangedEventArgs();
- var testingTarget = dummy.Application;
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<Application>(testingTarget, "should be an instance of testing target class!");
+ var testingTarget = new AmbientTickEventArgs();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AmbientTickEventArgs>(testingTarget, "should be an instance of testing target class!");
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsApplicationGet END (OK)");
- }
- else
+ Widget widget = new Widget();
+ using (WatchTime time = new WatchTime(widget.GetIntPtr(), false))
{
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsApplicationGet END (OK)");
- Assert.Pass("Not Supported profile");
+ testingTarget.WatchTime = time;
+ Assert.IsNotNull(testingTarget.WatchTime);
}
- }
-
- [Test]
- [Description("WatchApplication AmbientChangedEventArgs:Application set")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationAmbientChangedEventArgsApplicationSet()
- {
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsApplicationSet START");
-
- if (IsWearable())
- {
- var dummyApplication = new Application();
- Assert.IsNotNull(dummyApplication, "should be not null");
- Assert.IsInstanceOf<Application>(dummyApplication, "should be an instance of testing target class!");
-
- AmbientChangedEventArgs testingTarget = new AmbientChangedEventArgs();
- testingTarget.Application = dummyApplication;
- var result = testingTarget.Application;
- Assert.IsNotNull(result, "should be not null.");
- Assert.AreEqual(dummyApplication, result, "Retrieved result should be equal to dummyApplication. ");
-
- dummyApplication.Dispose();
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsApplicationSet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsApplicationSet END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"WatchApplicationAmbientTickArgsWatchTime END (OK)");
}
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication.AmbientTick.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.AmbientTick A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationAmbientTick()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationAmbientTick START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_AmbientTickSignal' in shared library 'libdali2-csharp-binder.so' */
+ // testingTarget.AmbientTick += MyOnAmbientTick;
+ // testingTarget.AmbientTick -= MyOnAmbientTick;
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationAmbientTick END (OK)");
+ //}
+
+ //private void MyOnAmbientTick(object sender, AmbientTickEventArgs e) { }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication.AmbientTickSignal.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.AmbientTickSignal A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationAmbientTickSignal()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationAmbientTickSignal START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // try
+ // {
+ // testingTarget.AmbientTickSignal();
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_AmbientTickSignal' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationAmbientTickSignal END (OK)");
+ //}
+
[Test]
- [Description("WatchApplication AmbientChangedEventArgs:Changed get")]
+ [Category("P1")]
+ [Description("WatchApplication.AmbientChangedEventArgs. Application.")]
+ [Property("SPEC", "Tizen.NUI.WatchApplication.TimeTickEventArgs.WatchTime A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchApplicationAmbientChangedEventArgsChangedGet()
+ public void WatchApplicationAmbientChangedEventArgsApplication()
{
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsChangedGet START");
+ tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsApplication START");
- if (IsWearable())
- {
- AmbientChangedEventArgs testingTarget = new AmbientChangedEventArgs();
- var result = testingTarget.Changed;
- Assert.IsNotNull(result, "should be not null");
+ var testingTarget = new AmbientChangedEventArgs();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AmbientChangedEventArgs>(testingTarget, "should be an instance of AmbientChangedEventArgs class!");
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsChangedGet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsChangedGet END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ Widget widget = new Widget();
+ var application = new WidgetApplication(widget.GetIntPtr(), false);
+ testingTarget.Application = application;
+ Assert.IsNotNull(testingTarget.Application, "should be not null.");
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsApplication END (OK)");
}
[Test]
- [Description("WatchApplication AmbientChangedEventArgs:Changed set")]
+ [Category("P1")]
+ [Description("WatchApplication.AmbientChangedEventArgs. Changed.")]
+ [Property("SPEC", "Tizen.NUI.WatchApplication.AmbientChangedEventArgs.Changed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void WatchApplicationAmbientChangedEventArgsChangedSet()
{
tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsChangedSet START");
- if (IsWearable())
- {
- AmbientChangedEventArgs testingTarget = new AmbientChangedEventArgs();
- testingTarget.Changed = true;
+ var testingTarget = new AmbientChangedEventArgs();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AmbientChangedEventArgs>(testingTarget, "should be an instance of AmbientChangedEventArgs class!");
- var result = testingTarget.Changed;
- Assert.IsNotNull(result, "should be not null.");
- Assert.AreEqual(true, result, "Retrieved result should be equal to true. ");
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsChangedSet END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsChangedSet END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ testingTarget.Changed = true;
+ Assert.AreEqual(true, testingTarget.Changed, "Retrieved result should be equal to true. ");
+
+ testingTarget.Changed = false;
+ Assert.AreEqual(false, testingTarget.Changed, "Retrieved result should be equal to true. ");
+
+ tlog.Debug(tag, $"WatchApplicationAmbientChangedEventArgsChangedSet END (OK)");
}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication.AmbientChanged.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.AmbientChanged A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationAmbientChanged()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationAmbientChanged START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_AmbientChangedSignal' in shared library 'libdali2-csharp-binder.so' */
+ // testingTarget.AmbientChanged += MyOnAmbientChanged;
+ // testingTarget.AmbientChanged -= MyOnAmbientChanged;
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationAmbientChanged END (OK)");
+ //}
+
+ //private void MyOnAmbientChanged(object sender, AmbientChangedEventArgs e) { }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication.AmbientChangedSignal.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.AmbientChangedSignal A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationAmbientChangedSignal()
+ //{
+ // tlog.Debug(tag, $"WatchApplicationAmbientChangedSignal START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");
+
+ // try
+ // {
+ // testingTarget.AmbientChangedSignal();
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_AmbientChangedSignal' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+ // }
+
+ // tlog.Debug(tag, $"WatchApplicationAmbientChangedSignal END (OK)");
+ //}
}
}
return false;
}
- private bool IsWearable()
+ internal class MyWatchBoolSignal : WatchBoolSignal
{
- string value;
- var result = Tizen.System.Information.TryGetValue("tizen.org/feature/profile", out value);
- if (result && value.Equals("wearable"))
+ public MyWatchBoolSignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+
+ public void OnReleaseSwigCPtr(global::System.Runtime.InteropServices.HandleRef swigCPtr)
{
- return true;
+ base.ReleaseSwigCPtr(swigCPtr);
}
-
- return false;
}
[SetUp]
}
[Test]
- [Description("WatchBoolSignal constructor")]
+ [Category("P1")]
+ [Description("WatchBoolSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.WatchBoolSignal.WatchBoolSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void WatchBoolSignalConstructor()
{
tlog.Debug(tag, $"WatchBoolSignalConstructor START");
- if (IsWearable())
+ using (ImageView imageView = new ImageView())
{
- var testingTarget = new WatchBoolSignal();
-
+ var testingTarget = new WatchBoolSignal(imageView.SwigCPtr.Handle, false);
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
testingTarget.Dispose();
- tlog.Debug(tag, $"WatchBoolSignalConstructor END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchBoolSignalConstructor END (OK)");
- Assert.Pass("Not Supported profile");
}
+
+ tlog.Debug(tag, $"WatchBoolSignalConstructor END (OK)");
}
- [Test]
- [Description("WatchBoolSignal Empty")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchBoolSignalEmpty()
- {
- tlog.Debug(tag, $"WatchBoolSignalEmpty START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchApplication ReleaseSwigCPtr.")]
+ //[Property("SPEC", "Tizen.NUI.WatchApplication.ReleaseSwigCPtr M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchApplicationReleaseSwigCPtr()
+ //{
+ // tlog.Debug(tag, $"WatchBoolSignalReleaseSwigCPtr START");
- if (IsWearable())
- {
- var testingTarget = new WatchBoolSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new MyWatchBoolSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
- var result = testingTarget.Empty();
- Assert.IsTrue(result);
+ // try
+ // {
+ // testingTarget.OnReleaseSwigCPtr(imageView.SwigCPtr);
+ // }
+ // catch (Exception e)
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_delete_WatchBoolSignal' in shared library 'libdali2-csharp-binder.so' */
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchBoolSignalEmpty END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchBoolSignalEmpty END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ // testingTarget.Dispose();
+ // }
- [Test]
- [Description("WatchBoolSignal GetConnectionCount")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchBoolSignalGetConnectionCount()
- {
- tlog.Debug(tag, $"WatchBoolSignalGetConnectionCount START");
+ // tlog.Debug(tag, $"WatchBoolSignalReleaseSwigCPtr END (OK)");
+ //}
- if (IsWearable())
- {
- var testingTarget = new WatchBoolSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchBoolSignal Empty.")]
+ //[Property("SPEC", "Tizen.NUI.WatchBoolSignal.Empty M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchBoolSignalEmpty()
+ //{
+ // tlog.Debug(tag, $"WatchBoolSignalEmpty START");
- var result = testingTarget.GetConnectionCount();
- Assert.IsTrue(result == 0, "result should be 0");
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchBoolSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchBoolSignalGetConnectionCount END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchBoolSignalGetConnectionCount END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchBoolSignal_Empty' in shared library 'libdali2-csharp-binder.so' */
+ // var result = testingTarget.Empty();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
- [Test]
- [Description("WatchBoolSignal Connection")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchBoolSignalConnection()
- {
- tlog.Debug(tag, $"WatchBoolSignalConnection START");
+ // testingTarget.Dispose();
+ // }
+ // tlog.Debug(tag, $"WatchBoolSignalEmpty END (OK)");
+ //}
- if (IsWearable())
- {
- var testingTarget = new WatchBoolSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchBoolSignal GetConnectionCount.")]
+ //[Property("SPEC", "Tizen.NUI.WatchBoolSignal.GetConnectionCount M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchBoolSignalGetConnectionCount()
+ //{
+ // tlog.Debug(tag, $"WatchBoolSignalGetConnectionCount START");
- dummyCallback callback = OnDummyCallback;
- testingTarget.Connect(callback);
- testingTarget.Disconnect(callback);
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchBoolSignalConnection END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchBoolSignalConnection END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchBoolSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
- [Test]
- [Description("WatchBoolSignal Disconnection")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchBoolSignalDisconnection()
- {
- tlog.Debug(tag, $"WatchBoolSignalDisconnection START");
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchBoolSignal_GetConnectionCount' in shared library 'libdali2-csharp-binder.so' */
+ // var result = testingTarget.GetConnectionCount();
+ // Assert.IsTrue(result == 0, "result should be 0");
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
- if (IsWearable())
- {
- var testingTarget = new WatchBoolSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
+ // testingTarget.Dispose();
+ // }
+ // tlog.Debug(tag, $"WatchBoolSignalGetConnectionCount END (OK)");
+ //}
- dummyCallback callback = OnDummyCallback;
- testingTarget.Connect(callback);
- testingTarget.Disconnect(callback);
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchBoolSignalDisconnection END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchBoolSignalDisconnection END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchBoolSignal connection.")]
+ //[Property("SPEC", "Tizen.NUI.WatchBoolSignal.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchBoolSignalConnection()
+ //{
+ // tlog.Debug(tag, $"WatchBoolSignalConnection START");
- [Test]
- [Description("WatchBoolSignal Emit")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchBoolSignalEmit()
- {
- tlog.Debug(tag, $"WatchBoolSignalEmit START");
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchBoolSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
- if (IsWearable())
- {
- var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
- var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+ // dummyCallback callback = OnDummyCallback;
- tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchBoolSignal_Connect' in shared library 'libdali2-csharp-binder.so' */
+ // testingTarget.Connect(callback);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
- var testingTarget = new WatchBoolSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
+ // testingTarget.Dispose();
+ // }
+ // tlog.Debug(tag, $"WatchBoolSignalConnection END (OK)");
+ //}
- var dummy = new Application();
- testingTarget.Emit(dummy, true);
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchBoolSignal disconnection.")]
+ //[Property("SPEC", "Tizen.NUI.WatchBoolSignal.Disconnect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchBoolSignalDisconnection()
+ //{
+ // tlog.Debug(tag, $"WatchBoolSignalDisconnection START");
- dummy.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchBoolSignalEmit END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchBoolSignalEmit END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchBoolSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
+
+ // dummyCallback callback = OnDummyCallback;
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchBoolSignal_Disconnect' in shared library 'libdali2-csharp-binder.so' */
+ // 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, $"WatchBoolSignalDisconnection END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchBoolSignal Emit.")]
+ //[Property("SPEC", "Tizen.NUI.WatchBoolSignal.Emit M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchBoolSignalEmit()
+ //{
+ // tlog.Debug(tag, $"WatchBoolSignalEmit START");
+
+ // var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ // var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ // tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchBoolSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchBoolSignal>(testingTarget, "should be an instance of testing target class!");
+
+ // Widget widget = new Widget();
+ // var application = new WidgetApplication(widget.GetIntPtr(), false);
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchBoolSignal_Emit' in shared library 'libdali2-csharp-binder.so' */
+ // testingTarget.Emit(application, true);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // widget.Dispose();
+ // widget = null;
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchBoolSignalEmit END (OK)");
+ //}
}
}
return false;
}
- 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()
{
}
[Test]
- [Description("WatchTimeSignal constructor")]
+ [Category("P1")]
+ [Description("WatchTimeSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.WatchTimeSignal.WatchTimeSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
public void WatchTimeSignalConstructor()
{
tlog.Debug(tag, $"WatchTimeSignalConstructor START");
- if (IsWearable())
- {
- var testingTarget = new WatchTimeSignal();
-
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeSignalConstructor END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeSignalConstructor END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Description("WatchTimeSignal Empty")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeSignalEmpty()
- {
- tlog.Debug(tag, $"WatchTimeSignalEmpty START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTimeSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
-
- var result = testingTarget.Empty();
- Assert.IsTrue(result);
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeSignalEmpty END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeSignalEmpty END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Description("WatchTimeSignal GetConnectionCount")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeSignalGetConnectionCount()
- {
- tlog.Debug(tag, $"WatchTimeSignalGetConnectionCount START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTimeSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTimeSignal>(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, $"WatchTimeSignalGetConnectionCount END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeSignalGetConnectionCount END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Description("WatchTimeSignal Connection")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeSignalConnection()
- {
- tlog.Debug(tag, $"WatchTimeSignalConnection START");
-
- if (IsWearable())
+ using (ImageView imageView = new ImageView())
{
- var testingTarget = new WatchTimeSignal();
+ var testingTarget = new WatchTimeSignal(imageView.SwigCPtr.Handle, false);
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
- dummyCallback callback = OnDummyCallback;
- testingTarget.Connect(callback);
- testingTarget.Disconnect(callback);
testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeSignalConnection END (OK)");
}
- else
- {
- tlog.Debug(tag, $"WatchTimeSignalConnection END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Description("WatchTimeSignal Disconnection")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeSignalDisconnection()
- {
- tlog.Debug(tag, $"WatchTimeSignalDisconnection START");
- if (IsWearable())
- {
- var testingTarget = new WatchTimeSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
-
- dummyCallback callback = OnDummyCallback;
- testingTarget.Connect(callback);
- testingTarget.Disconnect(callback);
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeSignalDisconnection END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeSignalDisconnection END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ tlog.Debug(tag, $"WatchTimeSignalConstructor END (OK)");
}
- [Test]
- [Description("WatchTimeSignal Emit")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeSignalEmit()
- {
- tlog.Debug(tag, $"WatchTimeSignalEmit START");
-
- if (IsWearable())
- {
- 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 WatchTimeSignal();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
-
- Application application = new Application();
- WatchTime watchTime = new WatchTime();
- testingTarget.Emit(application, watchTime);
-
- application.Dispose();
- watchTime.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeSignalEmit END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeSignalEmit END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTimeSignal Empty.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTimeSignal.Empty M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeSignalEmpty()
+ //{
+ // tlog.Debug(tag, $"WatchTimeSignalEmpty START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchTimeSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTimeSignal_Empty' in shared library 'libdali2-csharp-binder.so' */
+ // var result = testingTarget.Empty();
+ // Assert.IsTrue(result);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeSignalEmpty END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTimeSignal GetConnectionCount.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTimeSignal.GetConnectionCount M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeSignalGetConnectionCount()
+ //{
+ // tlog.Debug(tag, $"WatchTimeSignalGetConnectionCount START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchTimeSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTimeSignal_GetConnectionCount' in shared library 'libdali2-csharp-binder.so' */
+ // var result = testingTarget.GetConnectionCount();
+ // Assert.IsTrue(result == 0, "result should be 0");
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeSignalGetConnectionCount END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTimeSignal connection.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTimeSignal.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeSignalConnection()
+ //{
+ // tlog.Debug(tag, $"WatchTimeSignalConnection START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchTimeSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
+
+ // dummyCallback callback = OnDummyCallback;
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTimeSignal_Connect' in shared library 'libdali2-csharp-binder.so' */
+ // 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, $"WatchTimeSignalConnection END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTimeSignal disconnection.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTimeSignal.Disconnection M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeSignalDisconnection()
+ //{
+ // tlog.Debug(tag, $"WatchTimeSignalDisconnection START");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchTimeSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
+
+ // dummyCallback callback = OnDummyCallback;
+ // testingTarget.Connect(callback);
+ // testingTarget.Disconnect(callback);
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeSignalDisconnection END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTimeSignal Emit.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTimeSignal.Emit M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeSignalEmit()
+ //{
+ // tlog.Debug(tag, $"WatchTimeSignalEmit START");
+
+ // var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ // var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ // tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ // using (ImageView imageView = new ImageView())
+ // {
+ // var testingTarget = new WatchTimeSignal(imageView.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTimeSignal>(testingTarget, "should be an instance of testing target class!");
+
+ // Widget widget = new Widget();
+ // WidgetApplication application = new WidgetApplication(widget.GetIntPtr(), false);
+ // WatchTime watchTime = new WatchTime(widget.GetIntPtr(), false);
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTimeSignal_Emit' in shared library 'libdali2-csharp-binder.so' */
+ // testingTarget.Emit(application, watchTime);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // application.Dispose();
+ // watchTime.Dispose();
+ // testingTarget.Dispose();
+
+ // widget.Dispose();
+ // widget = null;
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeSignalEmit END (OK)");
+ //}
}
}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/Alignment")]
+ public class InternalAlignmentTest
+ {
+ 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("Alignment constructor.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Alignment C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentConstructor()
+ {
+ tlog.Debug(tag, $"AlignmentConstructor START");
+
+ var testingTarget = new Alignment();
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment constructor. With horizontal type.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Alignment C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentConstructorWithHorizontalType()
+ {
+ tlog.Debug(tag, $"AlignmentConstructorWithHorizontalType START");
+
+ var testingTarget = new Alignment(Alignment.Type.HorizontalCenter);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentConstructorWithHorizontalType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment constructor. With horizontal & vertical type.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Alignment C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentConstructorWithHorizontalAndVerticalType()
+ {
+ tlog.Debug(tag, $"AlignmentConstructorWithHorizontalAndVerticalType START");
+
+ var testingTarget = new Alignment(Alignment.Type.HorizontalCenter, Alignment.Type.VerticalCenter);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentConstructorWithHorizontalAndVerticalType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment constructor. With Alignment.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Alignment C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentConstructorWithAlignment()
+ {
+ tlog.Debug(tag, $"AlignmentConstructorWithAlignment START");
+
+ using (Alignment alignMent = new Alignment(Alignment.Type.HorizontalRight))
+ {
+ var testingTarget = new Alignment(alignMent);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"AlignmentConstructorWithAlignment END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentGetCPtr()
+ {
+ tlog.Debug(tag, $"AlignmentGetCPtr START");
+
+ var testingTarget = new Alignment(new ImageView().SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ try
+ {
+ Alignment.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentGetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment.Padding constructor.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Padding.Padding C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentPadding()
+ {
+ tlog.Debug(tag, $"AlignmentPadding START");
+
+ var testingTarget = new Alignment.Padding();
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment.Padding>(testingTarget, "Should be an instance of Padding type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentPadding END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment.Padding constructor. With floats.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Padding.Padding C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentPaddingConstructorWithFloats()
+ {
+ tlog.Debug(tag, $"AlignmentPaddingConstructorWithFloats START");
+
+ var testingTarget = new Alignment.Padding(1.0f, 2.0f, 3.0f, 4.0f);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment.Padding>(testingTarget, "Should be an instance of Padding type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentPaddingConstructorWithFloats END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment SetAlignmentType.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.SetAlignmentType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentSetAlignmentType()
+ {
+ tlog.Debug(tag, $"AlignmentSetAlignmentType START");
+
+ var testingTarget = new Alignment(Alignment.Type.HorizontalCenter);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ tlog.Debug(tag, "Alignment.Type : " + testingTarget.GetAlignmentType());
+
+ testingTarget.SetAlignmentType(Alignment.Type.VerticalBottom);
+ tlog.Debug(tag, "Alignment.Type : " + testingTarget.GetAlignmentType());
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentSetAlignmentType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment SetScaling.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.SetScaling M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentSetScaling()
+ {
+ tlog.Debug(tag, $"AlignmentSetScaling START");
+
+ var testingTarget = new Alignment(Alignment.Type.HorizontalCenter);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ tlog.Debug(tag, "Alignment.Scaling : " + testingTarget.GetScaling());
+
+ testingTarget.SetScaling(Alignment.Scaling.ScaleToFill);
+ tlog.Debug(tag, "Alignment.Scaling : " + testingTarget.GetScaling());
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentSetScaling END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment SetPadding.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.SetPadding M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentSetPadding()
+ {
+ tlog.Debug(tag, $"AlignmentSetPadding START");
+
+ var testingTarget = new Alignment(Alignment.Type.HorizontalCenter);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ tlog.Debug(tag, "Alignment.Padding : " + testingTarget.GetPadding());
+
+ using (Alignment.Padding padding = new Alignment.Padding(1.0f, 2.0f, 3.0f, 4.0f))
+ {
+ testingTarget.SetPadding(padding);
+ tlog.Debug(tag, "Alignment.Padding : " + testingTarget.GetPadding());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentSetPadding END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment.Padding getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Padding getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentPaddingGetCPtr()
+ {
+ tlog.Debug(tag, $"AlignmentPaddingGetCPtr START");
+
+ var testingTarget = new Alignment.Padding();
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment.Padding>(testingTarget, "Should be an instance of Padding type.");
+
+ try
+ {
+ Alignment.Padding.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentPaddingGetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment Assign.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentAssign()
+ {
+ tlog.Debug(tag, $"AlignmentAssign START");
+
+ var testingTarget = new Alignment();
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ try
+ {
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment DownCast.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentDownCast()
+ {
+ tlog.Debug(tag, $"AlignmentDownCast START");
+
+ var testingTarget = new Alignment();
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment>(testingTarget, "Should be an instance of Alignment type.");
+
+ try
+ {
+ Alignment.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment.Padding left.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Padding left A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentPaddingLeft()
+ {
+ tlog.Debug(tag, $"AlignmentPaddingLeft START");
+
+ var testingTarget = new Alignment.Padding(1.0f, 2.0f, 3.0f, 4.0f);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment.Padding>(testingTarget, "Should be an instance of Padding type.");
+
+ Assert.AreEqual(1.0f, testingTarget.left, "Should be equal!");
+
+ testingTarget.left = 4.0f;
+ Assert.AreEqual(4.0f, testingTarget.left, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentPaddingLeft END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment.Padding right.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Padding right A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentPaddingRight()
+ {
+ tlog.Debug(tag, $"AlignmentPaddingRight START");
+
+ var testingTarget = new Alignment.Padding(1.0f, 2.0f, 3.0f, 4.0f);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment.Padding>(testingTarget, "Should be an instance of Padding type.");
+
+ Assert.AreEqual(2.0f, testingTarget.right, "Should be equal!");
+
+ testingTarget.right = 3.0f;
+ Assert.AreEqual(3.0f, testingTarget.right, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentPaddingRight END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment.Padding top.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Padding top A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentPaddingTop()
+ {
+ tlog.Debug(tag, $"AlignmentPaddingTop START");
+
+ var testingTarget = new Alignment.Padding(1.0f, 2.0f, 3.0f, 4.0f);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment.Padding>(testingTarget, "Should be an instance of Padding type.");
+
+ Assert.AreEqual(3.0f, testingTarget.top, "Should be equal!");
+
+ testingTarget.top = 2.0f;
+ Assert.AreEqual(2.0f, testingTarget.top, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentPaddingTop END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Alignment.Padding bottom.")]
+ [Property("SPEC", "Tizen.NUI.Alignment.Padding bottom A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlignmentPaddingBottom()
+ {
+ tlog.Debug(tag, $"AlignmentPaddingBottom START");
+
+ var testingTarget = new Alignment.Padding(1.0f, 2.0f, 3.0f, 4.0f);
+ Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
+ Assert.IsInstanceOf<Alignment.Padding>(testingTarget, "Should be an instance of Padding type.");
+
+ Assert.AreEqual(4.0f, testingTarget.bottom, "Should be equal!");
+
+ testingTarget.bottom = 1.0f;
+ Assert.AreEqual(1.0f, testingTarget.bottom, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlignmentPaddingBottom END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/AngleAxis")]
+ public class InternalAngleAxisTest
+ {
+ 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("AngleAxis constructor.")]
+ [Property("SPEC", "Tizen.NUI.AngleAxis.AngleAxis C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleAxisConstructor()
+ {
+ tlog.Debug(tag, $"AngleAxisConstructor START");
+
+ var testingTarget = new AngleAxis();
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleAxis");
+ Assert.IsInstanceOf<AngleAxis>(testingTarget, "Should be an instance of AngleAxis type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AngleAxisConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleAxis constructor. With Radian and Vector3.")]
+ [Property("SPEC", "Tizen.NUI.AngleAxis.AngleAxis C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleAxisConstructorWithRadianAndVector3()
+ {
+ tlog.Debug(tag, $"AngleAxisConstructorWithRadianAndVector3 START");
+
+ using (Radian radian = new Radian(0.3f))
+ {
+ using (Vector3 vector = new Vector3(1.0f, 2.0f, 3.0f))
+ {
+ var testingTarget = new AngleAxis(radian, vector);
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleAxis");
+ Assert.IsInstanceOf<AngleAxis>(testingTarget, "Should be an instance of AngleAxis type.");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"AngleAxisConstructorWithRadianAndVector3 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleAxis getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.AngleAxis.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleAxisGetCPtr()
+ {
+ tlog.Debug(tag, $"AngleAxisGetCPtr START");
+
+ var testingTarget = new AngleAxis();
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleAxis");
+ Assert.IsInstanceOf<AngleAxis>(testingTarget, "Should be an instance of AngleAxis type.");
+
+ try
+ {
+ AngleAxis.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AngleAxisGetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleAxis constructor. angle.")]
+ [Property("SPEC", "Tizen.NUI.AngleAxis.angle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleAxisAngle()
+ {
+ tlog.Debug(tag, $"AngleAxisAngle START");
+
+ using (Radian radian = new Radian(0.3f))
+ {
+ using (Vector3 vector = new Vector3(1.0f, 2.0f, 3.0f))
+ {
+ var testingTarget = new AngleAxis(radian, vector);
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleAxis");
+ Assert.IsInstanceOf<AngleAxis>(testingTarget, "Should be an instance of AngleAxis type.");
+
+ Assert.AreEqual(0.3f, testingTarget.angle.ConvertToFloat(), "Should be equal!");
+
+ testingTarget.angle = new Radian(0.8f);
+ Assert.AreEqual(0.8f, testingTarget.angle.ConvertToFloat(), "Should be equal!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"AngleAxisAngle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleAxis constructor. axis.")]
+ [Property("SPEC", "Tizen.NUI.AngleAxis.axis A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleAxisAxis()
+ {
+ tlog.Debug(tag, $"AngleAxisAxis START");
+
+ using (Radian radian = new Radian(0.3f))
+ {
+ using (Vector3 vector = new Vector3(1.0f, 2.0f, 3.0f))
+ {
+ var testingTarget = new AngleAxis(radian, vector);
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleAxis");
+ Assert.IsInstanceOf<AngleAxis>(testingTarget, "Should be an instance of AngleAxis type.");
+
+ Assert.AreEqual(1.0f, testingTarget.axis.X, "Should be equal!");
+ Assert.AreEqual(2.0f, testingTarget.axis.Y, "Should be equal!");
+ Assert.AreEqual(3.0f, testingTarget.axis.Z, "Should be equal!");
+
+ testingTarget.axis = new Vector3(3.0f, 2.0f, 1.0f);
+ Assert.AreEqual(3.0f, testingTarget.axis.X, "Should be equal!");
+ Assert.AreEqual(2.0f, testingTarget.axis.Y, "Should be equal!");
+ Assert.AreEqual(1.0f, testingTarget.axis.Z, "Should be equal!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"AngleAxisAxis END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/AngleThresholdPair")]
+ public class InternalAngleThresholdPairTest
+ {
+ 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("AngleThresholdPair constructor.")]
+ [Property("SPEC", "Tizen.NUI.AngleThresholdPair.AngleThresholdPair C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleThresholdPairConstructor()
+ {
+ tlog.Debug(tag, $"AngleThresholdPairConstructor START");
+
+ var testingTarget = new AngleThresholdPair();
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleThresholdPair");
+ Assert.IsInstanceOf<AngleThresholdPair>(testingTarget, "Should be an instance of AngleThresholdPair type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AngleThresholdPairConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleThresholdPair constructor. With Radians.")]
+ [Property("SPEC", "Tizen.NUI.AngleThresholdPair.AngleThresholdPair C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleThresholdPairConstructorWithRadians()
+ {
+ tlog.Debug(tag, $"AngleThresholdPairConstructorWithRadians START");
+
+ using (Radian t = new Radian(0.3f))
+ {
+ using (Radian u = new Radian(0.8f))
+ {
+ var testingTarget = new AngleThresholdPair(t, u);
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleThresholdPair");
+ Assert.IsInstanceOf<AngleThresholdPair>(testingTarget, "Should be an instance of AngleThresholdPair type.");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"AngleThresholdPairConstructorWithRadians END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleThresholdPair constructor. With AngleThresholdPair.")]
+ [Property("SPEC", "Tizen.NUI.AngleThresholdPair.AngleThresholdPair C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleThresholdPairConstructorWithAngleThresholdPair()
+ {
+ tlog.Debug(tag, $"AngleThresholdPairConstructorWithAngleThresholdPair START");
+
+ using (Radian t = new Radian(0.3f))
+ {
+ using (Radian u = new Radian(0.8f))
+ {
+ using (AngleThresholdPair angleThresholdPair = new AngleThresholdPair(t, u))
+ {
+ var testingTarget = new AngleThresholdPair(angleThresholdPair);
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleThresholdPair");
+ Assert.IsInstanceOf<AngleThresholdPair>(testingTarget, "Should be an instance of AngleThresholdPair type.");
+
+ testingTarget.Dispose();
+ }
+ }
+ }
+
+ tlog.Debug(tag, $"AngleThresholdPairConstructorWithAngleThresholdPair END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleThresholdPair constructor. second.")]
+ [Property("SPEC", "Tizen.NUI.AngleThresholdPair.second A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleThresholdPairSecond()
+ {
+ tlog.Debug(tag, $"AngleThresholdPairSecond START");
+
+ using (Radian t = new Radian(0.3f))
+ {
+ using (Radian u = new Radian(0.8f))
+ {
+ var testingTarget = new AngleThresholdPair(t, u);
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleThresholdPair");
+ Assert.IsInstanceOf<AngleThresholdPair>(testingTarget, "Should be an instance of AngleThresholdPair type.");
+
+ Assert.AreEqual(0.8f, testingTarget.second.ConvertToFloat(), "Should be equal!");
+
+ testingTarget.second = new Radian(0.9f);
+ Assert.AreEqual(0.9f, testingTarget.second.ConvertToFloat(), "Should be equal!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"AngleThresholdPairSecond END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleThresholdPair first.")]
+ [Property("SPEC", "Tizen.NUI.AngleThresholdPair.first A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleThresholdPairFirst()
+ {
+ tlog.Debug(tag, $"AngleThresholdPairFirst START");
+
+ using (Radian t = new Radian(0.3f))
+ {
+ using (Radian u = new Radian(0.8f))
+ {
+ var testingTarget = new AngleThresholdPair(t, u);
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleThresholdPair");
+ Assert.IsInstanceOf<AngleThresholdPair>(testingTarget, "Should be an instance of AngleThresholdPair type.");
+
+ Assert.AreEqual(0.3f, testingTarget.first.ConvertToFloat(), "Should be equal!");
+
+ testingTarget.first = new Radian(0.4f);
+ Assert.AreEqual(0.4f, testingTarget.first.ConvertToFloat(), "Should be equal!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"AngleThresholdPairFirst END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AngleThresholdPair getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.AngleThresholdPair.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AngleThresholdPairGetCPtr()
+ {
+ tlog.Debug(tag, $"AngleThresholdPairGetCPtr START");
+
+ using (Radian t = new Radian(0.3f))
+ {
+ using (Radian u = new Radian(0.8f))
+ {
+ var testingTarget = new AngleThresholdPair(t, u);
+ Assert.IsNotNull(testingTarget, "Can't create success object AngleThresholdPair");
+ Assert.IsInstanceOf<AngleThresholdPair>(testingTarget, "Should be an instance of AngleThresholdPair type.");
+
+ try
+ {
+ AngleThresholdPair.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"AngleThresholdPairGetCPtr END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/Any")]
+ public class InternalAnyTest
+ {
+ 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("Any constructor.")]
+ [Property("SPEC", "Tizen.NUI.Any.Any C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyConstructor()
+ {
+ tlog.Debug(tag, $"AnyConstructor START");
+
+ var testingTarget = new Any();
+ Assert.IsNotNull(testingTarget, "Can't create success object Any");
+ Assert.IsInstanceOf<Any>(testingTarget, "Should be an instance of Any type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnyConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any constructor. With Any.")]
+ [Property("SPEC", "Tizen.NUI.Any.Any C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyConstructorWithAny()
+ {
+ tlog.Debug(tag, $"AnyConstructorWithAny START");
+
+ using (Any any = new Any())
+ {
+ var testingTarget = new Any(any);
+ Assert.IsNotNull(testingTarget, "Can't create success object Any");
+ Assert.IsInstanceOf<Any>(testingTarget, "Should be an instance of Any type.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"AnyConstructorWithAny END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any Assign.")]
+ [Property("SPEC", "Tizen.NUI.Any.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyAssign()
+ {
+ tlog.Debug(tag, $"AnyAssign START");
+
+ using (Any any = new Any())
+ {
+ var testingTarget = new Any(any);
+ Assert.IsNotNull(testingTarget, "Can't create success object Any");
+ Assert.IsInstanceOf<Any>(testingTarget, "Should be an instance of Any type.");
+
+ try
+ {
+ any.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"AnyAssign END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("Any AssertAlways.")]
+ //[Property("SPEC", "Tizen.NUI.Any.AssertAlways M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void AnyAssertAlways()
+ //{
+ // tlog.Debug(tag, $"AnyAssertAlways START");
+
+ // try
+ // {
+ // Any.AssertAlways("This is the test for Any class.");
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // tlog.Debug(tag, $"AnyAssertAlways END (OK)");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("Any GetType.")]
+ [Property("SPEC", "Tizen.NUI.Any.GetType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyGetType()
+ {
+ tlog.Debug(tag, $"AnyGetType START");
+
+ using (Any any = new Any())
+ {
+ var testingTarget = new Any(any);
+ Assert.IsNotNull(testingTarget, "Can't create success object Any");
+ Assert.IsInstanceOf<Any>(testingTarget, "Should be an instance of Any type.");
+
+ try
+ {
+ testingTarget.GetType();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"AnyGetType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any Empty.")]
+ [Property("SPEC", "Tizen.NUI.Any.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyEmpty()
+ {
+ tlog.Debug(tag, $"AnyEmpty START");
+
+ using (Any any = new Any())
+ {
+ var testingTarget = new Any(any);
+ Assert.IsNotNull(testingTarget, "Can't create success object Any");
+ Assert.IsInstanceOf<Any>(testingTarget, "Should be an instance of Any type.");
+
+ try
+ {
+ var result = testingTarget.Empty();
+ tlog.Debug(tag, "result :" + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"AnyEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any.AnyContainerBase constructor.")]
+ [Property("SPEC", "Tizen.NUI.Any.AnyContainerBase.AnyContainerBase C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyContainerBaseConstructor()
+ {
+ tlog.Debug(tag, $"AnyContainerBaseConstructor START");
+
+ SWIGTYPE_p_std__type_info type = new SWIGTYPE_p_std__type_info(new View().SwigCPtr.Handle);
+ SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc = new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(new ImageView().SwigCPtr.Handle);
+ SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc = new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(new TextLabel().SwigCPtr.Handle);
+
+ var testingTarget = new Any.AnyContainerBase(type, cloneFunc, deleteFunc);
+ Assert.IsNotNull(testingTarget, "Can't create success object AnyContainerBase");
+ Assert.IsInstanceOf<Any.AnyContainerBase>(testingTarget, "Should be an instance of AnyContainerBase type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnyContainerBaseConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any.AnyContainerBase GetType.")]
+ [Property("SPEC", "Tizen.NUI.Any.AnyContainerBase.GetType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyContainerBaseGetType()
+ {
+ tlog.Debug(tag, $"AnyContainerBaseGetType START");
+
+ SWIGTYPE_p_std__type_info type = new SWIGTYPE_p_std__type_info(new View().SwigCPtr.Handle);
+ SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc = new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(new ImageView().SwigCPtr.Handle);
+ SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc = new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(new TextLabel().SwigCPtr.Handle);
+
+ var testingTarget = new Any.AnyContainerBase(type, cloneFunc, deleteFunc);
+ Assert.IsNotNull(testingTarget, "Can't create success object AnyContainerBase");
+ Assert.IsInstanceOf<Any.AnyContainerBase>(testingTarget, "Should be an instance of AnyContainerBase type.");
+
+ try
+ {
+ testingTarget.GetType();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnyContainerBaseGetType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any.AnyContainerBase mType.")]
+ [Property("SPEC", "Tizen.NUI.Any.AnyContainerBase.mType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyContainerBasemType()
+ {
+ tlog.Debug(tag, $"AnyContainerBasemType START");
+
+ SWIGTYPE_p_std__type_info type = new SWIGTYPE_p_std__type_info(new View().SwigCPtr.Handle);
+ SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc = new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(new ImageView().SwigCPtr.Handle);
+ SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc = new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(new TextLabel().SwigCPtr.Handle);
+
+ var testingTarget = new Any.AnyContainerBase(type, cloneFunc, deleteFunc);
+ Assert.IsNotNull(testingTarget, "Can't create success object AnyContainerBase");
+ Assert.IsInstanceOf<Any.AnyContainerBase>(testingTarget, "Should be an instance of AnyContainerBase type.");
+
+ tlog.Debug(tag, "mType : " + testingTarget.mType);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnyContainerBasemType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any.AnyContainerBase mCloneFunc.")]
+ [Property("SPEC", "Tizen.NUI.Any.AnyContainerBase.mCloneFunc A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyContainerBasemCloneFunc()
+ {
+ tlog.Debug(tag, $"AnyContainerBasemCloneFunc START");
+
+ SWIGTYPE_p_std__type_info type = new SWIGTYPE_p_std__type_info(new View().SwigCPtr.Handle);
+ SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc = new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(new ImageView().SwigCPtr.Handle);
+ SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc = new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(new TextLabel().SwigCPtr.Handle);
+
+ var testingTarget = new Any.AnyContainerBase(type, cloneFunc, deleteFunc);
+ Assert.IsNotNull(testingTarget, "Can't create success object AnyContainerBase");
+ Assert.IsInstanceOf<Any.AnyContainerBase>(testingTarget, "Should be an instance of AnyContainerBase type.");
+
+ tlog.Debug(tag, "mType : " + testingTarget.mCloneFunc);
+
+ testingTarget.mCloneFunc = new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(new TextLabel().SwigCPtr.Handle);
+ tlog.Debug(tag, "mType : " + testingTarget.mCloneFunc);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnyContainerBasemCloneFunc END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any.AnyContainerBase mDeleteFunc.")]
+ [Property("SPEC", "Tizen.NUI.Any.AnyContainerBase.mDeleteFunc A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyContainerBasemDeleteFunc()
+ {
+ tlog.Debug(tag, $"AnyContainerBasemDeleteFunc START");
+
+ SWIGTYPE_p_std__type_info type = new SWIGTYPE_p_std__type_info(new View().SwigCPtr.Handle);
+ SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc = new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(new ImageView().SwigCPtr.Handle);
+ SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc = new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(new TextLabel().SwigCPtr.Handle);
+
+ var testingTarget = new Any.AnyContainerBase(type, cloneFunc, deleteFunc);
+ Assert.IsNotNull(testingTarget, "Can't create success object AnyContainerBase");
+ Assert.IsInstanceOf<Any.AnyContainerBase>(testingTarget, "Should be an instance of AnyContainerBase type.");
+
+ tlog.Debug(tag, "mType : " + testingTarget.mDeleteFunc);
+
+ testingTarget.mDeleteFunc = new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(new ImageView().SwigCPtr.Handle);
+ tlog.Debug(tag, "mType : " + testingTarget.mDeleteFunc);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnyContainerBasemDeleteFunc END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Any.AnyContainerBase mContainer.")]
+ [Property("SPEC", "Tizen.NUI.Any.AnyContainerBase.mContainer A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnyContainerBasemContainer()
+ {
+ tlog.Debug(tag, $"AnyContainerBasemContainer START");
+
+ using (Any any = new Any())
+ {
+ var testingTarget = new Any(any);
+ Assert.IsNotNull(testingTarget, "Can't create success object Any");
+ Assert.IsInstanceOf<Any>(testingTarget, "Should be an instance of Any type.");
+
+ tlog.Debug(tag, "mContainer : " + testingTarget.mContainer);
+
+ SWIGTYPE_p_std__type_info type = new SWIGTYPE_p_std__type_info(new View().SwigCPtr.Handle);
+ SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase cloneFunc = new SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase(new ImageView().SwigCPtr.Handle);
+ SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void deleteFunc = new SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void(new TextLabel().SwigCPtr.Handle);
+ Any.AnyContainerBase container = new Any.AnyContainerBase(type, cloneFunc, deleteFunc);
+
+ try
+ {
+ testingTarget.mContainer = container;
+ tlog.Debug(tag, "mContainer : " + testingTarget.mContainer);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"AnyContainerBasemContainer END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ArgumentHelper")]
+ public class InternalArgumentHelperTest
+ {
+ 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("ArgumentHelper RequireNotNull.")]
+ [Property("SPEC", "Tizen.NUI.Any.ArgumentHelper.RequireNotNull M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ArgumentHelperRequireNotNull()
+ {
+ tlog.Debug(tag, $"ArgumentHelperRequireNotNull START");
+
+ try
+ {
+ ArgumentHelper.RequireNotNull(null, "type");
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ArgumentHelperRequireNotNull END (OK)");
+ Assert.Pass("Caught ArgumentHelperRequireNotNull: Passed!");
+ }
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/AsyncImageLoader")]
+ public class InternalAsyncImageLoaderTest
+ {
+ private const string tag = "NUITEST";
+ private string url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader constructor.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.AsyncImageLoader C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderConstructor()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderConstructor START");
+
+ var testingTarget = new AsyncImageLoader();
+ Assert.IsNotNull(testingTarget, "Can't create success object AsyncImageLoader");
+ Assert.IsInstanceOf<AsyncImageLoader>(testingTarget, "Should be an instance of AsyncImageLoader type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AsyncImageLoaderConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader constructor. With AsyncImageLoader.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.AsyncImageLoader C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderConstructorWithAsyncImageLoader()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderConstructorWithAsyncImageLoader START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ var testingTarget = new AsyncImageLoader(loader);
+ Assert.IsNotNull(testingTarget, "Can't create success object AsyncImageLoader");
+ Assert.IsInstanceOf<AsyncImageLoader>(testingTarget, "Should be an instance of AsyncImageLoader type.");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderConstructorWithAsyncImageLoader END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader Assign.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderAssign()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderAssign START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ var testingTarget = new AsyncImageLoader(loader);
+ Assert.IsNotNull(testingTarget, "Can't create success object AsyncImageLoader");
+ Assert.IsInstanceOf<AsyncImageLoader>(testingTarget, "Should be an instance of AsyncImageLoader type.");
+
+ try
+ {
+ testingTarget.Assign(loader);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader DownCast.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderDownCast()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderDownCast START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ try
+ {
+ AsyncImageLoader.DownCast(loader);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader Load.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.Load M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderLoad()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderLoad START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ try
+ {
+ loader.Load(url);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderLoad END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader Load. With dimensions.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.Load M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderLoadWithDimensions()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderLoadWithDimensions START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ try
+ {
+ loader.Load(url, new Uint16Pair(100, 80));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderLoadWithDimensions END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader Load. With fittingMode.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.Load M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderLoadWithFittingMode()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderLoadWithFittingMode START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ try
+ {
+ loader.Load(url, new Uint16Pair(100, 80), FittingModeType.Center, SamplingModeType.Linear, false);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderLoadWithFittingMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader Cancel.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.Cancel M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderCancel()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderCancel START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ try
+ {
+ loader.Load(url, new Uint16Pair(100, 80), FittingModeType.Center, SamplingModeType.Linear, false);
+ loader.Cancel(0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderCancel END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader CancelAll.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.CancelAll M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderCancelAll()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderCancelAll START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ try
+ {
+ loader.Load(url, new Uint16Pair(100, 80), FittingModeType.Center, SamplingModeType.Linear, false);
+ loader.CancelAll();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderCancelAll END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AsyncImageLoader ImageLoadedSignal.")]
+ [Property("SPEC", "Tizen.NUI.AsyncImageLoader.ImageLoadedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AsyncImageLoaderImageLoadedSignal()
+ {
+ tlog.Debug(tag, $"AsyncImageLoaderImageLoadedSignal START");
+
+ using (AsyncImageLoader loader = new AsyncImageLoader())
+ {
+ try
+ {
+ loader.ImageLoadedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"AsyncImageLoaderImageLoadedSignal END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/AuthenticationSignalType")]
+ public class InternalAuthenticationSignalTypeTest
+ {
+ 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("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<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"AuthenticationSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AuthenticationSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AuthenticationSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"AuthenticationSignalTypeEmpty START");
+
+ var testingTarget = new AuthenticationSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"AuthenticationSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AuthenticationSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AuthenticationSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"AuthenticationSignalTypeGetConnectionCount START");
+
+ var testingTarget = new AuthenticationSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"AuthenticationSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AuthenticationSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AuthenticationSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"AuthenticationSignalTypeConnect START");
+
+ var testingTarget = new AuthenticationSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
+
+ 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, $"AuthenticationSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AuthenticationSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.AuthenticationSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void AuthenticationSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"AuthenticationSignalTypeEmit 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 AuthenticationSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<AuthenticationSignalType>(testingTarget, "Should be an Instance of AuthenticationSignalType!");
+
+ try
+ {
+ using (AutofillContainer container = new AutofillContainer("container"))
+ {
+ testingTarget.Emit(container);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"AuthenticationSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ContentReceivedSignalType")]
+ public class InternalContentReceivedSignalTypeTest
+ {
+ 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("ContentReceivedSignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.ContentReceivedSignalType.ContentReceivedSignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ContentReceivedSignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"ContentReceivedSignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ContentReceivedSignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ContentReceivedSignalType>(testingTarget, "Should be an Instance of ContentReceivedSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ContentReceivedSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ContentReceivedSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.ContentReceivedSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ContentReceivedSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"ContentReceivedSignalTypeEmpty START");
+
+ var testingTarget = new ContentReceivedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ContentReceivedSignalType>(testingTarget, "Should be an Instance of ContentReceivedSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ContentReceivedSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ContentReceivedSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ContentReceivedSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ContentReceivedSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ContentReceivedSignalTypeGetConnectionCount START");
+
+ var testingTarget = new ContentReceivedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ContentReceivedSignalType>(testingTarget, "Should be an Instance of ContentReceivedSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ContentReceivedSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ContentReceivedSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.ContentReceivedSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ContentReceivedSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"ContentReceivedSignalTypeConnect START");
+
+ var testingTarget = new ContentReceivedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ContentReceivedSignalType>(testingTarget, "Should be an Instance of ContentReceivedSignalType!");
+
+ 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, $"ContentReceivedSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ContentReceivedSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.ContentReceivedSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ContentReceivedSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"ContentReceivedSignalTypeEmit 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 ContentReceivedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ContentReceivedSignalType>(testingTarget, "Should be an Instance of ContentReceivedSignalType!");
+
+ try
+ {
+ testingTarget.Emit("func1", "func2", "func3");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ContentReceivedSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ControlKeySignal")]
+ public class InternalControlKeySignalTest
+ {
+ 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("ControlKeySignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ControlKeySignal.ControlKeySignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlKeySignalConstructor()
+ {
+ tlog.Debug(tag, $"ControlKeySignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ControlKeySignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ControlKeySignal>(testingTarget, "Should be an Instance of ControlKeySignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ControlKeySignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlKeySignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ControlKeySignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlKeySignalEmpty()
+ {
+ tlog.Debug(tag, $"ControlKeySignalEmpty START");
+
+ var testingTarget = new ControlKeySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ControlKeySignal>(testingTarget, "Should be an Instance of ControlKeySignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ControlKeySignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlKeySignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ControlKeySignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlKeySignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ControlKeySignalGetConnectionCount START");
+
+ var testingTarget = new ControlKeySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ControlKeySignal>(testingTarget, "Should be an Instance of ControlKeySignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ControlKeySignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlKeySignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ControlKeySignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ControlKeySignalConnect()
+ {
+ tlog.Debug(tag, $"ControlKeySignalConnect START");
+
+ var testingTarget = new ControlKeySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ControlKeySignal>(testingTarget, "Should be an Instance of ControlKeySignal!");
+
+ 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, $"ControlKeySignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ControlKeySignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ControlKeySignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ControlKeySignalEmit()
+ {
+ tlog.Debug(tag, $"ControlKeySignalEmit 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 ControlKeySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ControlKeySignal>(testingTarget, "Should be an Instance of ControlKeySignal!");
+
+ try
+ {
+ using (View view = new View())
+ {
+ using (Key key = new Key(view.SwigCPtr.Handle, false))
+ {
+ testingTarget.Emit(view, key);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ControlKeySignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/CustomActor")]
+ public class InternalCustomActorTest
+ {
+ 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("CustomActor constructor.")]
+ [Property("SPEC", "Tizen.NUI.CustomActor.CustomActor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomActorConstructor()
+ {
+ tlog.Debug(tag, $"CustomActorConstructor START");
+
+ var testingTarget = new CustomActor();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CustomActor>(testingTarget, "Should be an Instance of CustomActor!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CustomActorConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomActor constructor. With CustomActorImpl.")]
+ [Property("SPEC", "Tizen.NUI.CustomActor.CustomActor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomActorConstructorWithCustomActorImpl()
+ {
+ tlog.Debug(tag, $"CustomActorConstructorWithCustomActorImpl START");
+
+ using (View view = new View())
+ {
+ using (CustomActor actor = new CustomActor(view.SwigCPtr.Handle, false))
+ {
+ var testingTarget = new CustomActor(actor.GetImplementation());
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CustomActor>(testingTarget, "Should be an Instance of CustomActor!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"CustomActorConstructorWithCustomActorImpl END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomActor constructor. With CustomActor.")]
+ [Property("SPEC", "Tizen.NUI.CustomActor.CustomActor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomActorConstructorWithCustomActor()
+ {
+ tlog.Debug(tag, $"CustomActorConstructorWithCustomActor START");
+
+ using (View view = new View())
+ {
+ using (CustomActor actor = new CustomActor(view.SwigCPtr.Handle, false))
+ {
+ var testingTarget = new CustomActor(actor);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CustomActor>(testingTarget, "Should be an Instance of CustomActor!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"CustomActorConstructorWithCustomActor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomActor DownCast.")]
+ [Property("SPEC", "Tizen.NUI.CustomActor.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomActorDownCast()
+ {
+ tlog.Debug(tag, $"CustomActorDownCast START");
+
+ var testingTarget = new CustomActor();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CustomActor>(testingTarget, "Should be an Instance of CustomActor!");
+
+ try
+ {
+ CustomActor.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CustomActorDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomActor GetImplementation.")]
+ [Property("SPEC", "Tizen.NUI.CustomActor.GetImplementation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomActoGetImplementation()
+ {
+ tlog.Debug(tag, $"CustomActoGetImplementation START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new CustomActor(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CustomActor>(testingTarget, "Should be an Instance of CustomActor!");
+
+ try
+ {
+ testingTarget.GetImplementation();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CustomActoGetImplementation END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomActor Assign.")]
+ [Property("SPEC", "Tizen.NUI.CustomActor.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomActoAssign()
+ {
+ tlog.Debug(tag, $"CustomActoAssign START");
+
+ var testingTarget = new CustomActor();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CustomActor>(testingTarget, "Should be an Instance of CustomActor!");
+
+ using (View view = new View())
+ {
+ using (CustomActor actor = new CustomActor(view.SwigCPtr.Handle, false))
+ {
+ try
+ {
+ testingTarget.Assign(actor);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CustomActoAssign END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/CustomAlgorithmInterface")]
+ public class InternalCustomAlgorithmInterfaceTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyCustomAlgorithmInterface : CustomAlgorithmInterface
+ {
+ public MyCustomAlgorithmInterface() : base()
+ { }
+
+ public override View GetNextFocusableView(View current, View proposed, View.FocusDirection direction)
+ {
+ return base.GetNextFocusableView(current, proposed, direction);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomAlgorithmInterface constructor.")]
+ [Property("SPEC", "Tizen.NUI.CustomAlgorithmInterface.CustomAlgorithmInterface C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomAlgorithmInterfaceConstructor()
+ {
+ tlog.Debug(tag, $"CustomAlgorithmInterfaceConstructor START");
+
+ var testingTarget = new CustomAlgorithmInterface();
+ Assert.IsNotNull(testingTarget, "Can't create success object CustomAlgorithmInterface");
+ Assert.IsInstanceOf<CustomAlgorithmInterface>(testingTarget, "Should be an instance of CustomAlgorithmInterface type.");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"CustomAlgorithmInterfaceConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CustomAlgorithmInterface getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.CustomAlgorithmInterface.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CustomAlgorithmInterfaceGetCPtr()
+ {
+ tlog.Debug(tag, $"CustomAlgorithmInterfaceGetCPtr START");
+
+ var testingTarget = new CustomAlgorithmInterface();
+ Assert.IsNotNull(testingTarget, "Can't create success object CustomAlgorithmInterface");
+ Assert.IsInstanceOf<CustomAlgorithmInterface>(testingTarget, "Should be an instance of CustomAlgorithmInterface type.");
+
+ try
+ {
+ CustomAlgorithmInterface.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"CustomAlgorithmInterfaceGetCPtr END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("CustomAlgorithmInterface GetNextFocusableView.")]
+ //[Property("SPEC", "Tizen.NUI.CustomAlgorithmInterface.GetNextFocusableView M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void CustomAlgorithmGetNextFocusableView()
+ //{
+ // tlog.Debug(tag, $"CustomAlgorithmGetNextFocusableView START");
+
+ // var testingTarget = new MyCustomAlgorithmInterface();
+ // Assert.IsNotNull(testingTarget, "Can't create success object CustomAlgorithmInterface");
+ // Assert.IsInstanceOf<CustomAlgorithmInterface>(testingTarget, "Should be an instance of CustomAlgorithmInterface type.");
+
+ // using (View current = new View())
+ // {
+ // current.Size = new Size(2.0f, 4.0f);
+ // current.Position = new Position(0.0f, 0.0f);
+
+ // using (View proposed = new View())
+ // {
+ // proposed.Size = new Size(3.0f, 4.0f);
+ // proposed.Position = new Position(0.0f, 4.0f);
+
+ // try
+ // {
+ // testingTarget.GetNextFocusableView(current, proposed, View.FocusDirection.Down);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+ // }
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"CustomAlgorithmGetNextFocusableView END (OK)");
+ //}
+ }
+}
--- /dev/null
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using Tizen.NUI;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/Disposable")]
+ public class DisposableTests
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ Tizen.Log.Info(tag, " Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Tizen.Log.Info(tag, " Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a Disposable object.Check whether object is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Disposable.Disposable C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Disposable_INIT()
+ {
+ tlog.Debug(tag, $"DisposableConstructor START");
+
+ var disposable = new Disposable();
+ Assert.IsNotNull(disposable, "Can't create success object Disposable");
+ Assert.IsInstanceOf<Disposable>(disposable, "Should be an instance of Disposable type.");
+
+ tlog.Debug(tag, $"DisposableConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Dispose, try to dispose the Disposable.")]
+ [Property("SPEC", "Tizen.NUI.Disposable.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Dispose_TEST()
+ {
+ tlog.Debug(tag, $"DisposableWithDisposable START");
+
+ try
+ {
+ Disposable disposable = new Disposable();
+ disposable.Dispose();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"DisposableWithDisposable END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Dispose, try to dispose the Disposable.")]
+ [Property("SPEC", "Tizen.NUI.Disposable.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ [Property("COVPARAM", "DisposeTypes")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Dispose_Implicit_TEST_WITH_DISPOSETYPE()
+ {
+ tlog.Debug(tag, $"DisposableImplicit START");
+
+ try
+ {
+ MyDisposable myDisposable = new MyDisposable();
+ myDisposable.DisposeImplicit();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"DisposableImplicit END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Dispose, try to dispose the Disposable.")]
+ [Property("SPEC", "Tizen.NUI.Disposable.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ [Property("COVPARAM", "DisposeTypes")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void Dispose_Explicit_TEST_WITH_DISPOSETYPE()
+ {
+ tlog.Debug(tag, $"DisposableExplicit START");
+
+ try
+ {
+ MyDisposable myDisposable = new MyDisposable();
+ myDisposable.DisposeExplicit();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"DisposableExplicit END (OK)");
+ }
+ }
+
+ public class MyDisposable : Disposable
+ {
+ public void DisposeImplicit()
+ {
+ Dispose(DisposeTypes.Implicit);
+ }
+
+ public void DisposeExplicit()
+ {
+ Dispose(DisposeTypes.Explicit);
+ }
+
+ public bool Disposed
+ {
+ get
+ {
+ return disposed;
+ }
+ set
+ {
+ disposed = value;
+ }
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/FloatSignal")]
+ public class InternalFloatSignalTest
+ {
+ 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("FloatSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.FloatSignal.FloatSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FloatSignalConstructor()
+ {
+ tlog.Debug(tag, $"FloatSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new FloatSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FloatSignal>(testingTarget, "Should be an Instance of FloatSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"FloatSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FloatSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.FloatSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FloatSignalEmpty()
+ {
+ tlog.Debug(tag, $"FloatSignalEmpty START");
+
+ var testingTarget = new FloatSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FloatSignal>(testingTarget, "Should be an Instance of FloatSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FloatSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FloatSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.FloatSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FloatSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"FloatSignalGetConnectionCount START");
+
+ var testingTarget = new FloatSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FloatSignal>(testingTarget, "Should be an Instance of FloatSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FloatSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FloatSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.FloatSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FloatSignalConnect()
+ {
+ tlog.Debug(tag, $"FloatSignalConnect START");
+
+ var testingTarget = new FloatSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FloatSignal>(testingTarget, "Should be an Instance of FloatSignal!");
+
+ 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, $"FloatSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FloatSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.FloatSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FloatSignalEmit()
+ {
+ tlog.Debug(tag, $"FloatSignalEmit 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 FloatSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FloatSignal>(testingTarget, "Should be an Instance of FloatSignal!");
+
+ try
+ {
+ testingTarget.Emit(3.0f);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FloatSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/FocusChangedSignal")]
+ public class InternalFocusChangedSignalTest
+ {
+ 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("FocusChangedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.FocusChangedSignal.FocusChangedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FocusChangedSignalConstructor()
+ {
+ tlog.Debug(tag, $"FocusChangedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new FocusChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusChangedSignal>(testingTarget, "Should be an Instance of FocusChangedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"FocusChangedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FocusChangedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.FocusChangedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FocusChangedSignalEmpty()
+ {
+ tlog.Debug(tag, $"FocusChangedSignalEmpty START");
+
+ var testingTarget = new FocusChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusChangedSignal>(testingTarget, "Should be an Instance of FocusChangedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FocusChangedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FocusChangedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.FocusChangedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FocusChangedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"FocusChangedSignalGetConnectionCount START");
+
+ var testingTarget = new FocusChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusChangedSignal>(testingTarget, "Should be an Instance of FocusChangedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FocusChangedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FocusChangedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.FocusChangedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FocusChangedSignalConnect()
+ {
+ tlog.Debug(tag, $"FocusChangedSignalConnect START");
+
+ var testingTarget = new FocusChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusChangedSignal>(testingTarget, "Should be an Instance of FocusChangedSignal!");
+
+ 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, $"FocusChangedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FocusChangedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.FocusChangedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FocusChangedSignalEmit()
+ {
+ tlog.Debug(tag, $"FocusChangedSignalEmit 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 FocusChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusChangedSignal>(testingTarget, "Should be an Instance of FocusChangedSignal!");
+
+ try
+ {
+ using (View current = new View())
+ {
+ using (View goal = new View())
+ {
+ testingTarget.Emit(current, goal);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FocusChangedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/FocusGroupChangedSignal")]
+ public class InternalFocusGroupChangedSignalTest
+ {
+ 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("FocusGroupChangedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.FocusGroupChangedSignal.FocusGroupChangedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FocusGroupChangedSignalConstructor()
+ {
+ tlog.Debug(tag, $"FocusGroupChangedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new FocusGroupChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusGroupChangedSignal>(testingTarget, "Should be an Instance of FocusGroupChangedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"FocusGroupChangedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FocusGroupChangedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.FocusGroupChangedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FocusGroupChangedSignalEmpty()
+ {
+ tlog.Debug(tag, $"FocusGroupChangedSignalEmpty START");
+
+ var testingTarget = new FocusGroupChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusGroupChangedSignal>(testingTarget, "Should be an Instance of FocusGroupChangedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FocusGroupChangedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FocusGroupChangedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.FocusGroupChangedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FocusGroupChangedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"FocusGroupChangedSignalGetConnectionCount START");
+
+ var testingTarget = new FocusGroupChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusGroupChangedSignal>(testingTarget, "Should be an Instance of FocusGroupChangedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FocusGroupChangedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FocusGroupChangedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.FocusGroupChangedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void FocusGroupChangedSignalConnect()
+ {
+ tlog.Debug(tag, $"FocusGroupChangedSignalConnect START");
+
+ var testingTarget = new FocusGroupChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusGroupChangedSignal>(testingTarget, "Should be an Instance of FocusGroupChangedSignal!");
+
+ 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, $"FocusGroupChangedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("FocusGroupChangedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.FocusGroupChangedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void FocusGroupChangedSignalEmit()
+ {
+ tlog.Debug(tag, $"FocusGroupChangedSignalEmit 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 FocusGroupChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<FocusGroupChangedSignal>(testingTarget, "Should be an Instance of FocusGroupChangedSignal!");
+
+ try
+ {
+ using (View current = new View())
+ {
+ testingTarget.Emit(current, false);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"FocusGroupChangedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/GLWindowResizedSignal")]
+ public class InternalGLWindowResizedSignalTest
+ {
+ 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("GLWindowResizedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.GLWindowResizedSignal.GLWindowResizedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GLWindowResizedSignalConstructor()
+ {
+ tlog.Debug(tag, $"GLWindowResizedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new GLWindowResizedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GLWindowResizedSignal>(testingTarget, "Should be an Instance of GLWindowResizedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"GLWindowResizedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindowResizedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.GLWindowResizedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GLWindowResizedSignalEmpty()
+ {
+ tlog.Debug(tag, $"GLWindowResizedSignalEmpty START");
+
+ var testingTarget = new GLWindowResizedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GLWindowResizedSignal>(testingTarget, "Should be an Instance of GLWindowResizedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GLWindowResizedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindowResizedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.GLWindowResizedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GLWindowResizedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"GLWindowResizedSignalGetConnectionCount START");
+
+ var testingTarget = new GLWindowResizedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GLWindowResizedSignal>(testingTarget, "Should be an Instance of GLWindowResizedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GLWindowResizedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindowResizedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.GLWindowResizedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GLWindowResizedSignalConnect()
+ {
+ tlog.Debug(tag, $"GLWindowResizedSignalConnect START");
+
+ var testingTarget = new GLWindowResizedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GLWindowResizedSignal>(testingTarget, "Should be an Instance of GLWindowResizedSignal!");
+
+ 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, $"GLWindowResizedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindowResizedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.GLWindowResizedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void GLWindowResizedSignalEmit()
+ {
+ tlog.Debug(tag, $"GLWindowResizedSignalEmit 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 GLWindowResizedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GLWindowResizedSignal>(testingTarget, "Should be an Instance of GLWindowResizedSignal!");
+
+ try
+ {
+ using (Size2D size = new Size2D(20, 30))
+ {
+ testingTarget.Emit(size);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GLWindowResizedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/HoverSignal")]
+ public class InternalHoverSignalTest
+ {
+ 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("HoverSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.HoverSignal.HoverSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void HoverSignalConstructor()
+ {
+ tlog.Debug(tag, $"HoverSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new HoverSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<HoverSignal>(testingTarget, "Should be an Instance of HoverSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"HoverSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("HoverSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.HoverSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void HoverSignalEmpty()
+ {
+ tlog.Debug(tag, $"HoverSignalEmpty START");
+
+ var testingTarget = new HoverSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<HoverSignal>(testingTarget, "Should be an Instance of HoverSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"HoverSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("HoverSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.HoverSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void HoverSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"HoverSignalGetConnectionCount START");
+
+ var testingTarget = new HoverSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<HoverSignal>(testingTarget, "Should be an Instance of HoverSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"HoverSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("HoverSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.HoverSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void HoverSignalConnect()
+ {
+ tlog.Debug(tag, $"HoverSignalConnect START");
+
+ var testingTarget = new HoverSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<HoverSignal>(testingTarget, "Should be an Instance of HoverSignal!");
+
+ 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, $"HoverSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("HoverSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.HoverSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void HoverSignalEmit()
+ {
+ tlog.Debug(tag, $"HoverSignalEmit 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 HoverSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<HoverSignal>(testingTarget, "Should be an Instance of HoverSignal!");
+
+ try
+ {
+ using (View view = new View())
+ {
+ using (Hover hover = new Hover())
+ {
+ testingTarget.Emit(view, hover);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"HoverSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/InterceptTouchSignal")]
+ public class InternalInterceptTouchSignalTest
+ {
+ 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("InterceptTouchSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.InterceptTouchSignal.InterceptTouchSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void InterceptTouchSignalConstructor()
+ {
+ tlog.Debug(tag, $"InterceptTouchSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new InterceptTouchSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<InterceptTouchSignal>(testingTarget, "Should be an Instance of InterceptTouchSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"InterceptTouchSignalConstructor END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("InterceptTouchSignal Empty.")]
+ //[Property("SPEC", "Tizen.NUI.InterceptTouchSignal.Empty M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void InterceptTouchSignalEmpty()
+ //{
+ // tlog.Debug(tag, $"InterceptTouchSignalEmpty START");
+
+ // var testingTarget = new InterceptTouchSignal();
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<InterceptTouchSignal>(testingTarget, "Should be an Instance of InterceptTouchSignal!");
+
+ // try
+ // {
+ // testingTarget.Empty();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+
+ // tlog.Debug(tag, $"InterceptTouchSignalEmpty END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("InterceptTouchSignal GetConnectionCount.")]
+ //[Property("SPEC", "Tizen.NUI.InterceptTouchSignal.GetConnectionCount M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void InterceptTouchSignalGetConnectionCount()
+ //{
+ // tlog.Debug(tag, $"InterceptTouchSignalGetConnectionCount START");
+
+ // var testingTarget = new InterceptTouchSignal();
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<InterceptTouchSignal>(testingTarget, "Should be an Instance of InterceptTouchSignal!");
+
+ // try
+ // {
+ // testingTarget.GetConnectionCount();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+
+ // tlog.Debug(tag, $"InterceptTouchSignalGetConnectionCount END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("InterceptTouchSignal Connect.")]
+ //[Property("SPEC", "Tizen.NUI.InterceptTouchSignal.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void InterceptTouchSignalConnect()
+ //{
+ // tlog.Debug(tag, $"InterceptTouchSignalConnect START");
+
+ // var testingTarget = new InterceptTouchSignal();
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<InterceptTouchSignal>(testingTarget, "Should be an Instance of InterceptTouchSignal!");
+
+ // 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, $"InterceptTouchSignalConnect END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("InterceptTouchSignal Emit.")]
+ //[Property("SPEC", "Tizen.NUI.InterceptTouchSignal.Emit M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //[Obsolete]
+ //public void InterceptTouchSignalEmit()
+ //{
+ // tlog.Debug(tag, $"InterceptTouchSignalEmit 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 InterceptTouchSignal();
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<InterceptTouchSignal>(testingTarget, "Should be an Instance of InterceptTouchSignal!");
+
+ // try
+ // {
+ // using (Touch touch = new Touch())
+ // {
+ // testingTarget.Emit(touch);
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+
+ // tlog.Debug(tag, $"InterceptTouchSignalEmit END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/KeyEventSignal")]
+ public class InternalKeyEventSignalTest
+ {
+ 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("KeyEventSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.KeyEventSignal.KeyEventSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyEventSignalConstructor()
+ {
+ tlog.Debug(tag, $"KeyEventSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new KeyEventSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyEventSignal>(testingTarget, "Should be an Instance of KeyEventSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"KeyEventSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyEventSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.KeyEventSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyEventSignalEmpty()
+ {
+ tlog.Debug(tag, $"KeyEventSignalEmpty START");
+
+ var testingTarget = new KeyEventSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyEventSignal>(testingTarget, "Should be an Instance of KeyEventSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyEventSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyEventSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.KeyEventSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyEventSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"KeyEventSignalGetConnectionCount START");
+
+ var testingTarget = new KeyEventSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyEventSignal>(testingTarget, "Should be an Instance of KeyEventSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyEventSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyEventSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.KeyEventSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyEventSignalConnect()
+ {
+ tlog.Debug(tag, $"KeyEventSignalConnect START");
+
+ var testingTarget = new KeyEventSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyEventSignal>(testingTarget, "Should be an Instance of KeyEventSignal!");
+
+ 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, $"KeyEventSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyEventSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.KeyEventSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void KeyEventSignalEmit()
+ {
+ tlog.Debug(tag, $"KeyEventSignalEmit 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 KeyEventSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyEventSignal>(testingTarget, "Should be an Instance of KeyEventSignal!");
+
+ try
+ {
+ using (Key key = new Key())
+ {
+ testingTarget.Emit(key);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyEventSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/KeyInputFocusSignal")]
+ public class InternalKeyInputFocusSignalTest
+ {
+ 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("KeyInputFocusSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.KeyInputFocusSignal.KeyInputFocusSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyInputFocusSignalConstructor()
+ {
+ tlog.Debug(tag, $"KeyInputFocusSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new KeyInputFocusSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyInputFocusSignal>(testingTarget, "Should be an Instance of KeyInputFocusSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"KeyInputFocusSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyInputFocusSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.KeyInputFocusSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyInputFocusSignalEmpty()
+ {
+ tlog.Debug(tag, $"KeyInputFocusSignalEmpty START");
+
+ var testingTarget = new KeyInputFocusSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyInputFocusSignal>(testingTarget, "Should be an Instance of KeyInputFocusSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyInputFocusSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyInputFocusSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.KeyInputFocusSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyInputFocusSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"KeyInputFocusSignalGetConnectionCount START");
+
+ var testingTarget = new KeyInputFocusSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyInputFocusSignal>(testingTarget, "Should be an Instance of KeyInputFocusSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyInputFocusSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyInputFocusSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.KeyInputFocusSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyInputFocusSignalConnect()
+ {
+ tlog.Debug(tag, $"KeyInputFocusSignalConnect START");
+
+ var testingTarget = new KeyInputFocusSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyInputFocusSignal>(testingTarget, "Should be an Instance of KeyInputFocusSignal!");
+
+ 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, $"KeyInputFocusSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyInputFocusSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.KeyInputFocusSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void KeyInputFocusSignalEmit()
+ {
+ tlog.Debug(tag, $"KeyInputFocusSignalEmit 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 KeyInputFocusSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyInputFocusSignal>(testingTarget, "Should be an Instance of KeyInputFocusSignal!");
+
+ try
+ {
+ using (View view = new View())
+ {
+ testingTarget.Emit(view);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyInputFocusSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/KeyboardEventSignalType")]
+ public class InternalKeyboardEventSignalTypeTest
+ {
+ 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("KeyboardEventSignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardEventSignalType.KeyboardEventSignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardEventSignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"KeyboardEventSignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new KeyboardEventSignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardEventSignalType>(testingTarget, "Should be an Instance of KeyboardEventSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"KeyboardEventSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardEventSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardEventSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardEventSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"KeyboardEventSignalTypeEmpty START");
+
+ var testingTarget = new KeyboardEventSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardEventSignalType>(testingTarget, "Should be an Instance of KeyboardEventSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardEventSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardEventSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardEventSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardEventSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"KeyboardEventSignalTypeGetConnectionCount START");
+
+ var testingTarget = new KeyboardEventSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardEventSignalType>(testingTarget, "Should be an Instance of KeyboardEventSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardEventSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardEventSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardEventSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardEventSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"KeyboardEventSignalTypeConnect START");
+
+ var testingTarget = new KeyboardEventSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardEventSignalType>(testingTarget, "Should be an Instance of KeyboardEventSignalType!");
+
+ 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, $"KeyboardEventSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardEventSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardEventSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void KeyboardEventSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"KeyboardEventSignalTypeEmit 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 KeyboardEventSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardEventSignalType>(testingTarget, "Should be an Instance of KeyboardEventSignalType!");
+
+ try
+ {
+ using (InputMethodContext context = new InputMethodContext())
+ {
+ using (InputMethodContext.EventData data = new InputMethodContext.EventData())
+ {
+ testingTarget.Emit(context, data);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardEventSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/KeyboardRepeatSettingsChangedSignal")]
+ public class InternalKeyboardRepeatSettingsChangedSignalTest
+ {
+ 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("KeyboardRepeatSettingsChangedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardRepeatSettingsChangedSignal.KeyboardRepeatSettingsChangedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardRepeatSettingsChangedSignalConstructor()
+ {
+ tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new KeyboardRepeatSettingsChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardRepeatSettingsChangedSignal>(testingTarget, "Should be an Instance of KeyboardRepeatSettingsChangedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardRepeatSettingsChangedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardRepeatSettingsChangedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardRepeatSettingsChangedSignalEmpty()
+ {
+ tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalEmpty START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new KeyboardRepeatSettingsChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardRepeatSettingsChangedSignal>(testingTarget, "Should be an Instance of KeyboardRepeatSettingsChangedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardRepeatSettingsChangedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardRepeatSettingsChangedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardRepeatSettingsChangedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalGetConnectionCount START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new KeyboardRepeatSettingsChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardRepeatSettingsChangedSignal>(testingTarget, "Should be an Instance of KeyboardRepeatSettingsChangedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalGetConnectionCount END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("KeyboardRepeatSettingsChangedSignal Connect.")]
+ //[Property("SPEC", "Tizen.NUI.KeyboardRepeatSettingsChangedSignal.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void KeyboardRepeatSettingsChangedSignalConnect()
+ //{
+ // tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalConnect START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new KeyboardRepeatSettingsChangedSignal(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<KeyboardRepeatSettingsChangedSignal>(testingTarget, "Should be an Instance of KeyboardRepeatSettingsChangedSignal!");
+
+ // 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, $"KeyboardRepeatSettingsChangedSignalConnect END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("KeyboardRepeatSettingsChangedSignal Emit.")]
+ //[Property("SPEC", "Tizen.NUI.KeyboardRepeatSettingsChangedSignal.Emit M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //[Obsolete]
+ //public void KeyboardRepeatSettingsChangedSignalEmit()
+ //{
+ // tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalEmit START");
+ // var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ // var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ // tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new KeyboardRepeatSettingsChangedSignal(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<KeyboardRepeatSettingsChangedSignal>(testingTarget, "Should be an Instance of KeyboardRepeatSettingsChangedSignal!");
+
+ // try
+ // {
+ // testingTarget.Emit();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"KeyboardRepeatSettingsChangedSignalEmit END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/KeyboardResizedSignalType")]
+ public class InternalKeyboardResizedSignalTypeTest
+ {
+ 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("KeyboardResizedSignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardResizedSignalType.KeyboardResizedSignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardResizedSignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new KeyboardResizedSignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardResizedSignalType>(testingTarget, "Should be an Instance of KeyboardResizedSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardResizedSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardResizedSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardResizedSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeEmpty START");
+
+ var testingTarget = new KeyboardResizedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardResizedSignalType>(testingTarget, "Should be an Instance of KeyboardResizedSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardResizedSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardResizedSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardResizedSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeGetConnectionCount START");
+
+ var testingTarget = new KeyboardResizedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardResizedSignalType>(testingTarget, "Should be an Instance of KeyboardResizedSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardResizedSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardResizedSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardResizedSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeConnect START");
+
+ var testingTarget = new KeyboardResizedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardResizedSignalType>(testingTarget, "Should be an Instance of KeyboardResizedSignalType!");
+
+ 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, $"KeyboardResizedSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardResizedSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardResizedSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void KeyboardResizedSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeEmit 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 KeyboardResizedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardResizedSignalType>(testingTarget, "Should be an Instance of KeyboardResizedSignalType!");
+
+ try
+ {
+ testingTarget.Emit(1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardResizedSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/KeyboardTypeSignalType")]
+ public class KeyboardTypeSignalTypeTests
+ {
+ 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("KeyboardTypeSignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardTypeSignalType.KeyboardTypeSignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardTypeSignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new KeyboardTypeSignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardTypeSignalType>(testingTarget, "Should be an Instance of KeyboardTypeSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardTypeSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardTypeSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardTypeSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeEmpty START");
+
+ var testingTarget = new KeyboardTypeSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardTypeSignalType>(testingTarget, "Should be an Instance of KeyboardTypeSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardTypeSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardTypeSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardTypeSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeGetConnectionCount START");
+
+ var testingTarget = new KeyboardTypeSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardTypeSignalType>(testingTarget, "Should be an Instance of KeyboardTypeSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardTypeSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardTypeSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyboardTypeSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeConnect START");
+
+ var testingTarget = new KeyboardTypeSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardTypeSignalType>(testingTarget, "Should be an Instance of KeyboardTypeSignalType!");
+
+ 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, $"KeyboardTypeSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyboardTypeSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.KeyboardTypeSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void KeyboardTypeSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeEmit 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 KeyboardTypeSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<KeyboardTypeSignalType>(testingTarget, "Should be an Instance of KeyboardTypeSignalType!");
+
+ try
+ {
+ testingTarget.Emit(new InputMethodContext.KeyboardType());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"KeyboardTypeSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/LanguageChangedSignalType")]
+ public class InternalLanguageChangedSignalTypeTest
+ {
+ 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("LanguageChangedSignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.LanguageChangedSignalType.LanguageChangedSignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LanguageChangedSignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"LanguageChangedSignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new LanguageChangedSignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LanguageChangedSignalType>(testingTarget, "Should be an Instance of LanguageChangedSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"LanguageChangedSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LanguageChangedSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.LanguageChangedSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LanguageChangedSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"LanguageChangedSignalTypeEmpty START");
+
+ var testingTarget = new LanguageChangedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LanguageChangedSignalType>(testingTarget, "Should be an Instance of LanguageChangedSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LanguageChangedSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LanguageChangedSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.LanguageChangedSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LanguageChangedSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"LanguageChangedSignalTypeGetConnectionCount START");
+
+ var testingTarget = new LanguageChangedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LanguageChangedSignalType>(testingTarget, "Should be an Instance of LanguageChangedSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LanguageChangedSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LanguageChangedSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.LanguageChangedSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LanguageChangedSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"LanguageChangedSignalTypeConnect START");
+
+ var testingTarget = new LanguageChangedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LanguageChangedSignalType>(testingTarget, "Should be an Instance of LanguageChangedSignalType!");
+
+ 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, $"LanguageChangedSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LanguageChangedSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.LanguageChangedSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LanguageChangedSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"LanguageChangedSignalTypeEmit 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 LanguageChangedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LanguageChangedSignalType>(testingTarget, "Should be an Instance of LanguageChangedSignalType!");
+
+ try
+ {
+ testingTarget.Emit(1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LanguageChangedSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ListEventSignalType")]
+ public class InternalListEventSignalTypeTest
+ {
+ 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("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<ListEventSignalType>(testingTarget, "Should be an Instance of ListEventSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ListEventSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ListEventSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.ListEventSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ListEventSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"ListEventSignalTypeEmpty START");
+
+ var testingTarget = new ListEventSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ListEventSignalType>(testingTarget, "Should be an Instance of ListEventSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ListEventSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ListEventSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ListEventSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ListEventSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ListEventSignalTypeGetConnectionCount START");
+
+ var testingTarget = new ListEventSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ListEventSignalType>(testingTarget, "Should be an Instance of ListEventSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ListEventSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ListEventSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.ListEventSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ListEventSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"ListEventSignalTypeConnect START");
+
+ var testingTarget = new ListEventSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ListEventSignalType>(testingTarget, "Should be an Instance of ListEventSignalType!");
+
+ 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, $"ListEventSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ListEventSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.ListEventSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ListEventSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"ListEventSignalTypeEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ListEventSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ListEventSignalType>(testingTarget, "Should be an Instance of ListEventSignalType!");
+
+ try
+ {
+ testingTarget.Emit(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ListEventSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/LongPressGestureDetectedSignal")]
+ public class InternalLongPressGestureDetectedSignalTest
+ {
+ 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("LongPressGestureDetectedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.LongPressGestureDetectedSignal.LongPressGestureDetectedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LongPressGestureDetectedSignalConstructor()
+ {
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new LongPressGestureDetectedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LongPressGestureDetectedSignal>(testingTarget, "Should be an Instance of LongPressGestureDetectedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LongPressGestureDetectedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.LongPressGestureDetectedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LongPressGestureDetectedSignalEmpty()
+ {
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalEmpty START");
+
+ var testingTarget = new LongPressGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LongPressGestureDetectedSignal>(testingTarget, "Should be an Instance of LongPressGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LongPressGestureDetectedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.LongPressGestureDetectedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LongPressGestureDetectedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalGetConnectionCount START");
+
+ var testingTarget = new LongPressGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LongPressGestureDetectedSignal>(testingTarget, "Should be an Instance of LongPressGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LongPressGestureDetectedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.LongPressGestureDetectedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LongPressGestureDetectedSignalConnect()
+ {
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalConnect START");
+
+ var testingTarget = new LongPressGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LongPressGestureDetectedSignal>(testingTarget, "Should be an Instance of LongPressGestureDetectedSignal!");
+
+ 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, $"LongPressGestureDetectedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LongPressGestureDetectedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.LongPressGestureDetectedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LongPressGestureDetectedSignalEmit()
+ {
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new LongPressGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LongPressGestureDetectedSignal>(testingTarget, "Should be an Instance of LongPressGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Emit(view, new LongPressGesture(view.SwigCPtr.Handle, false));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"LongPressGestureDetectedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/LowBatterySignalType")]
+ public class InternalLowBatterySignalTypeTest
+ {
+ 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("LowBatterySignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.LowBatterySignalType.LowBatterySignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LowBatterySignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"LowBatterySignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new LowBatterySignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LowBatterySignalType>(testingTarget, "Should be an Instance of LowBatterySignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"LowBatterySignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LowBatterySignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.LowBatterySignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LowBatterySignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"LowBatterySignalTypeEmpty START");
+
+ var testingTarget = new LowBatterySignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LowBatterySignalType>(testingTarget, "Should be an Instance of LowBatterySignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LowBatterySignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LowBatterySignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.LowBatterySignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LowBatterySignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"LowBatterySignalTypeGetConnectionCount START");
+
+ var testingTarget = new LowBatterySignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LowBatterySignalType>(testingTarget, "Should be an Instance of LowBatterySignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LowBatterySignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LowBatterySignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.LowBatterySignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LowBatterySignalTypeConnect()
+ {
+ tlog.Debug(tag, $"LowBatterySignalTypeConnect START");
+
+ var testingTarget = new LowBatterySignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LowBatterySignalType>(testingTarget, "Should be an Instance of LowBatterySignalType!");
+
+ 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, $"LowBatterySignalTypeConnect END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/LowMemorySignalType")]
+ public class InternalLowMemorySignalTypeTest
+ {
+ 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("LowMemorySignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.LowMemorySignalType.LowMemorySignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LowMemorySignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"LowMemorySignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new LowMemorySignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LowMemorySignalType>(testingTarget, "Should be an Instance of LowMemorySignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"LowMemorySignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LowMemorySignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.LowMemorySignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LowMemorySignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"LowMemorySignalTypeEmpty START");
+
+ var testingTarget = new LowMemorySignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LowMemorySignalType>(testingTarget, "Should be an Instance of LowMemorySignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LowMemorySignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LowMemorySignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.LowMemorySignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LowMemorySignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"LowMemorySignalTypeGetConnectionCount START");
+
+ var testingTarget = new LowMemorySignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LowMemorySignalType>(testingTarget, "Should be an Instance of LowMemorySignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"LowMemorySignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("LowMemorySignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.LowMemorySignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LowMemorySignalTypeConnect()
+ {
+ tlog.Debug(tag, $"LowMemorySignalTypeConnect START");
+
+ var testingTarget = new LowMemorySignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<LowMemorySignalType>(testingTarget, "Should be an Instance of LowMemorySignalType!");
+
+ 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, $"LowMemorySignalTypeConnect END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/NUIEventType")]
+ public class NUIEventTypeTests
+ {
+ 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("NUIEventType constructor.")]
+ [Property("SPEC", "Tizen.NUI.NUIEventType.NUIEventType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIEventType_INIT()
+ {
+ tlog.Debug(tag, $"NUIEventTypeConstructor START");
+
+ var nuiEventType = new NUIEventType("TimeTick");
+
+ Assert.IsNotNull(nuiEventType, "Can't create success object NUIEventType");
+ Assert.IsInstanceOf<NUIEventType>(nuiEventType, "Should be an instance of NUIEventType type.");
+
+ tlog.Debug(tag, $"NUIEventTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIEventType TimeTick.")]
+ [Property("SPEC", "Tizen.NUI.NUIEventType.TimeTick A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimeTick_GET_VALUE()
+ {
+ tlog.Debug(tag, $"NUIEventTypeTimeTick START");
+
+ var nuiEventType = NUIEventType.TimeTick;
+ Assert.IsInstanceOf<NUIEventType>(nuiEventType, "Should be an instance of NUIEventType type.");
+ Assert.AreEqual(NUIEventType.TimeTick, nuiEventType, "Should be equal!");
+
+ tlog.Debug(tag, $"NUIEventTypeTimeTick END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIEventType AmbientTick.")]
+ [Property("SPEC", "Tizen.NUI.NUIEventType.AmbientTick A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIEventTypeAmbientTick()
+ {
+ tlog.Debug(tag, $"NUIEventTypeAmbientTick START");
+
+ var nuiEventType = NUIEventType.AmbientTick;
+ Assert.IsInstanceOf<NUIEventType>(nuiEventType, "Should be an instance of NUIEventType type.");
+ Assert.AreEqual(NUIEventType.AmbientTick, nuiEventType, "Should be equal!");
+
+ tlog.Debug(tag, $"NUIEventTypeAmbientTick END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIEventType AmbientChanged.")]
+ [Property("SPEC", "Tizen.NUI.NUIEventType.AmbientChanged A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIEventTypeAmbientChanged()
+ {
+ tlog.Debug(tag, $"NUIEventTypeAmbientChanged START");
+
+ var nuiEventType = NUIEventType.AmbientChanged;
+ Assert.IsInstanceOf<NUIEventType>(nuiEventType, "Should be an instance of NUIEventType type.");
+ Assert.AreEqual(NUIEventType.AmbientChanged, nuiEventType, "Should be equal!");
+
+ tlog.Debug(tag, $"NUIEventTypeAmbientChanged END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIEventType implicit string.")]
+ [Property("SPEC", "Tizen.NUI.NUIEventType.implicit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "string")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIEventTypeImplicit()
+ {
+ tlog.Debug(tag, $"NUIEventTypeImplicit START");
+
+ NUIEventType nuiEventType = "TimeTick";
+ Assert.IsInstanceOf<NUIEventType>(nuiEventType, "Should be an instance of NUIEventType type.");
+
+ tlog.Debug(tag, $"NUIEventTypeImplicit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ObjectCreatedSignal")]
+ public class InternalObjectCreatedSignalTest
+ {
+ 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("ObjectCreatedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ObjectCreatedSignal.ObjectCreatedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectCreatedSignalConstructor()
+ {
+ tlog.Debug(tag, $"ObjectCreatedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ObjectCreatedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectCreatedSignal>(testingTarget, "Should be an Instance of ObjectCreatedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ObjectCreatedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ObjectCreatedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ObjectCreatedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectCreatedSignalEmpty()
+ {
+ tlog.Debug(tag, $"ObjectCreatedSignalEmpty START");
+
+ var testingTarget = new ObjectCreatedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectCreatedSignal>(testingTarget, "Should be an Instance of ObjectCreatedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ObjectCreatedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ObjectCreatedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ObjectCreatedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectCreatedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ObjectCreatedSignalGetConnectionCount START");
+
+ var testingTarget = new ObjectCreatedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectCreatedSignal>(testingTarget, "Should be an Instance of ObjectCreatedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ObjectCreatedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ObjectCreatedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ObjectCreatedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectCreatedSignalConnect()
+ {
+ tlog.Debug(tag, $"ObjectCreatedSignalConnect START");
+
+ var testingTarget = new ObjectCreatedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectCreatedSignal>(testingTarget, "Should be an Instance of ObjectCreatedSignal!");
+
+ 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, $"ObjectCreatedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ObjectCreatedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ObjectCreatedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectCreatedSignalEmit()
+ {
+ tlog.Debug(tag, $"ObjectCreatedSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ObjectCreatedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectCreatedSignal>(testingTarget, "Should be an Instance of ObjectCreatedSignal!");
+
+ try
+ {
+ using (RefObject obj = new RefObject(view.SwigCPtr.Handle, false))
+ {
+ testingTarget.Emit(view);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ObjectCreatedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ObjectDestroyedSignal")]
+ public class InternalObjectDestroyedSignalTest
+ {
+ 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("ObjectDestroyedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ObjectDestroyedSignal.ObjectDestroyedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectDestroyedSignalConstructor()
+ {
+ tlog.Debug(tag, $"ObjectDestroyedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ObjectDestroyedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ObjectDestroyedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ObjectDestroyedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ObjectDestroyedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectDestroyedSignalEmpty()
+ {
+ tlog.Debug(tag, $"ObjectDestroyedSignalEmpty START");
+
+ var testingTarget = new ObjectDestroyedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ObjectDestroyedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ObjectDestroyedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ObjectDestroyedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectDestroyedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ObjectDestroyedSignalGetConnectionCount START");
+
+ var testingTarget = new ObjectDestroyedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ObjectDestroyedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ObjectDestroyedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ObjectDestroyedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectDestroyedSignalConnect()
+ {
+ tlog.Debug(tag, $"ObjectDestroyedSignalConnect START");
+
+ var testingTarget = new ObjectDestroyedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");
+
+ 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, $"ObjectDestroyedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ObjectDestroyedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ObjectDestroyedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ObjectDestroyedSignalEmit()
+ {
+ tlog.Debug(tag, $"ObjectDestroyedSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ObjectDestroyedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ObjectDestroyedSignal>(testingTarget, "Should be an Instance of ObjectDestroyedSignal!");
+
+ try
+ {
+ using (RefObject obj = new RefObject(view.SwigCPtr.Handle, false))
+ {
+ testingTarget.Emit(obj);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ObjectDestroyedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/PanGestureDetectedSignal")]
+ public class InternalPanGestureDetectedSignalTest
+ {
+ 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("PanGestureDetectedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.PanGestureDetectedSignal.PanGestureDetectedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PanGestureDetectedSignalConstructor()
+ {
+ tlog.Debug(tag, $"PanGestureDetectedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PanGestureDetectedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PanGestureDetectedSignal>(testingTarget, "Should be an Instance of PanGestureDetectedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PanGestureDetectedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PanGestureDetectedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.PanGestureDetectedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PanGestureDetectedSignalEmpty()
+ {
+ tlog.Debug(tag, $"PanGestureDetectedSignalEmpty START");
+
+ var testingTarget = new PanGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PanGestureDetectedSignal>(testingTarget, "Should be an Instance of PanGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PanGestureDetectedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PanGestureDetectedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.PanGestureDetectedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PanGestureDetectedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"PanGestureDetectedSignalGetConnectionCount START");
+
+ var testingTarget = new PanGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PanGestureDetectedSignal>(testingTarget, "Should be an Instance of PanGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PanGestureDetectedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PanGestureDetectedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.PanGestureDetectedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PanGestureDetectedSignalConnect()
+ {
+ tlog.Debug(tag, $"PanGestureDetectedSignalConnect START");
+
+ var testingTarget = new PanGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PanGestureDetectedSignal>(testingTarget, "Should be an Instance of PanGestureDetectedSignal!");
+
+ 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, $"PanGestureDetectedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PanGestureDetectedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.PanGestureDetectedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PanGestureDetectedSignalEmit()
+ {
+ tlog.Debug(tag, $"PanGestureDetectedSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PanGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PanGestureDetectedSignal>(testingTarget, "Should be an Instance of PanGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Emit(view, new PanGesture(view.SwigCPtr.Handle, false));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PanGestureDetectedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/PinchGestureDetectedSignal")]
+ public class InternalPinchGestureDetectedSignalTest
+ {
+ 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("PinchGestureDetectedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.PinchGestureDetectedSignal.PinchGestureDetectedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PinchGestureDetectedSignalConstructor()
+ {
+ tlog.Debug(tag, $"PinchGestureDetectedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PinchGestureDetectedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PinchGestureDetectedSignal>(testingTarget, "Should be an Instance of PinchGestureDetectedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PinchGestureDetectedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PinchGestureDetectedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.PinchGestureDetectedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PinchGestureDetectedSignalEmpty()
+ {
+ tlog.Debug(tag, $"PinchGestureDetectedSignalEmpty START");
+
+ var testingTarget = new PinchGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PinchGestureDetectedSignal>(testingTarget, "Should be an Instance of PinchGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PinchGestureDetectedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PinchGestureDetectedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.PinchGestureDetectedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PinchGestureDetectedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"PinchGestureDetectedSignalGetConnectionCount START");
+
+ var testingTarget = new PinchGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PinchGestureDetectedSignal>(testingTarget, "Should be an Instance of PinchGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PinchGestureDetectedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PinchGestureDetectedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.PinchGestureDetectedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PinchGestureDetectedSignalConnect()
+ {
+ tlog.Debug(tag, $"PinchGestureDetectedSignalConnect START");
+
+ var testingTarget = new PinchGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PinchGestureDetectedSignal>(testingTarget, "Should be an Instance of PinchGestureDetectedSignal!");
+
+ 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, $"PinchGestureDetectedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PinchGestureDetectedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.PinchGestureDetectedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PinchGestureDetectedSignalEmit()
+ {
+ tlog.Debug(tag, $"PinchGestureDetectedSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PinchGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PinchGestureDetectedSignal>(testingTarget, "Should be an Instance of PinchGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Emit(view, new PinchGesture(view.SwigCPtr.Handle, false));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PinchGestureDetectedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/PreFocusChangeSignal")]
+ public class InternalPreFocusChangeSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private IntPtr OnDummyCallback(IntPtr current, IntPtr proposed, View.FocusDirection direction)
+ {
+ return proposed;
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PreFocusChangeSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.PreFocusChangeSignal.PreFocusChangeSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PreFocusChangeSignalConstructor()
+ {
+ tlog.Debug(tag, $"PreFocusChangeSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PreFocusChangeSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PreFocusChangeSignal>(testingTarget, "Should be an Instance of PreFocusChangeSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PreFocusChangeSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PreFocusChangeSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.PreFocusChangeSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PreFocusChangeSignalEmpty()
+ {
+ tlog.Debug(tag, $"PreFocusChangeSignalEmpty START");
+
+ var testingTarget = new PreFocusChangeSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PreFocusChangeSignal>(testingTarget, "Should be an Instance of PreFocusChangeSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PreFocusChangeSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PreFocusChangeSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.PreFocusChangeSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PreFocusChangeSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"PreFocusChangeSignalGetConnectionCount START");
+
+ var testingTarget = new PreFocusChangeSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PreFocusChangeSignal>(testingTarget, "Should be an Instance of PreFocusChangeSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PreFocusChangeSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PreFocusChangeSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.PreFocusChangeSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PreFocusChangeSignalConnect()
+ {
+ tlog.Debug(tag, $"PreFocusChangeSignalConnect START");
+
+ var testingTarget = new PreFocusChangeSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PreFocusChangeSignal>(testingTarget, "Should be an Instance of PreFocusChangeSignal!");
+
+ try
+ {
+ Tizen.NUI.FocusManager.PreFocusChangeEventCallback func = OnDummyCallback;
+ testingTarget.Connect(func);
+ testingTarget.Disconnect(func);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PreFocusChangeSignalConnect END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/RenderTaskSignal")]
+ public class InternalRenderTaskSignalTest
+ {
+ 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("RenderTaskSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.RenderTaskSignal.RenderTaskSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RenderTaskSignalConstructor()
+ {
+ tlog.Debug(tag, $"RenderTaskSignalConstructor START");
+
+ var testingTarget = new RenderTaskSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<RenderTaskSignal>(testingTarget, "Should be an Instance of RenderTaskSignal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"RenderTaskSignalConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ResizeSignal")]
+ public class InternalResizeSignalTest
+ {
+ 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("ResizeSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ResizeSignal.ResizeSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ResizeSignalConstructor()
+ {
+ tlog.Debug(tag, $"ResizeSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ResizeSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ResizeSignal>(testingTarget, "Should be an Instance of ResizeSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ResizeSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResizeSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ResizeSignalConstructor.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ResizeSignalEmpty()
+ {
+ tlog.Debug(tag, $"ResizeSignalEmpty START");
+
+ var testingTarget = new ResizeSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ResizeSignal>(testingTarget, "Should be an Instance of ResizeSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ResizeSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResizeSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ResizeSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ResizeSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ResizeSignalGetConnectionCount START");
+
+ var testingTarget = new ResizeSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ResizeSignal>(testingTarget, "Should be an Instance of ResizeSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ResizeSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResizeSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ResizeSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ResizeSignalConnect()
+ {
+ tlog.Debug(tag, $"ResizeSignalConnect START");
+
+ var testingTarget = new ResizeSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ResizeSignal>(testingTarget, "Should be an Instance of ResizeSignal!");
+
+ 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, $"ResizeSignalConnect END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("ResizeSignal Emit.")]
+ //[Property("SPEC", "Tizen.NUI.ResizeSignal.Emit M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void ResizeSignalEmit()
+ //{
+ // tlog.Debug(tag, $"ResizeSignalEmit START");
+ // var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ // var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ // tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ // using (View view = new View())
+ // {
+ // view.Size2D = new Size2D(50, 60);
+ // var testingTarget = new ResizeSignal(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<ResizeSignal>(testingTarget, "Should be an Instance of ResizeSignal!");
+
+ // try
+ // {
+ // using (Size2D size = new Size2D(20, 30))
+ // {
+ // testingTarget.Emit(size);
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"ResizeSignalEmit END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/RotationGestureDetectedSignal")]
+ public class InternalRotationGestureDetectedSignalTest
+ {
+ 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("RotationGestureDetectedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.RotationGestureDetectedSignal.RotationGestureDetectedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RotationGestureDetectedSignalConstructor()
+ {
+ tlog.Debug(tag, $"RotationGestureDetectedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new RotationGestureDetectedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<RotationGestureDetectedSignal>(testingTarget, "Should be an Instance of RotationGestureDetectedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"RotationGestureDetectedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RotationGestureDetectedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.RotationGestureDetectedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RotationGestureDetectedSignalEmpty()
+ {
+ tlog.Debug(tag, $"RotationGestureDetectedSignalEmpty START");
+
+ var testingTarget = new RotationGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<RotationGestureDetectedSignal>(testingTarget, "Should be an Instance of RotationGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"RotationGestureDetectedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RotationGestureDetectedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.RotationGestureDetectedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RotationGestureDetectedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"RotationGestureDetectedSignalGetConnectionCount START");
+
+ var testingTarget = new RotationGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<RotationGestureDetectedSignal>(testingTarget, "Should be an Instance of RotationGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"RotationGestureDetectedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RotationGestureDetectedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.RotationGestureDetectedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RotationGestureDetectedSignalConnect()
+ {
+ tlog.Debug(tag, $"RotationGestureDetectedSignalConnect START");
+
+ var testingTarget = new RotationGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<RotationGestureDetectedSignal>(testingTarget, "Should be an Instance of RotationGestureDetectedSignal!");
+
+ 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, $"RotationGestureDetectedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("RotationGestureDetectedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.RotationGestureDetectedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void RotationGestureDetectedSignalEmit()
+ {
+ tlog.Debug(tag, $"RotationGestureDetectedSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new RotationGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<RotationGestureDetectedSignal>(testingTarget, "Should be an Instance of RotationGestureDetectedSignal!");
+
+ try
+ {
+ using (RotationGesture gesture = new RotationGesture(view.SwigCPtr.Handle, false))
+ {
+ testingTarget.Emit(view, gesture);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"RotationGestureDetectedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ScrollStateChangedSignal")]
+ public class InternalScrollStateChangedSignalTest
+ {
+ 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("ScrollStateChangedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ScrollStateChangedSignal.ScrollStateChangedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollStateChangedSignalConstructor()
+ {
+ tlog.Debug(tag, $"ScrollStateChangedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ScrollStateChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollStateChangedSignal>(testingTarget, "Should be an ScrollStateChangedSignal of WheelSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ScrollStateChangedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollStateChangedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ScrollStateChangedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollStateChangedSignalEmpty()
+ {
+ tlog.Debug(tag, $"ScrollStateChangedSignalEmpty START");
+
+ var testingTarget = new ScrollStateChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollStateChangedSignal>(testingTarget, "Should be an Instance of ScrollStateChangedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ScrollStateChangedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollStateChangedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ScrollStateChangedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollStateChangedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ScrollStateChangedSignalGetConnectionCount START");
+
+ var testingTarget = new ScrollStateChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollStateChangedSignal>(testingTarget, "Should be an Instance of ScrollStateChangedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ScrollStateChangedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollStateChangedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ScrollStateChangedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollStateChangedSignalConnect()
+ {
+ tlog.Debug(tag, $"ScrollStateChangedSignalConnect START");
+
+ var testingTarget = new ScrollStateChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollStateChangedSignal>(testingTarget, "Should be an Instance of ScrollStateChangedSignal!");
+
+ 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, $"ScrollStateChangedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollStateChangedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ScrollStateChangedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollStateChangedSignalEmit()
+ {
+ tlog.Debug(tag, $"ScrollStateChangedSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ScrollStateChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollStateChangedSignal>(testingTarget, "Should be an Instance of ScrollStateChangedSignal!");
+
+ try
+ {
+ testingTarget.Emit(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ScrollStateChangedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ScrollViewSnapStartedSignal")]
+ public class InternalScrollViewSnapStartedSignalTest
+ {
+ 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("ScrollViewSnapStartedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ScrollViewSnapStartedSignal.ScrollViewSnapStartedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollViewSnapStartedSignalConstructor()
+ {
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ScrollViewSnapStartedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollViewSnapStartedSignal>(testingTarget, "Should be an ScrollViewSnapStartedSignal of WheelSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollViewSnapStartedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ScrollViewSnapStartedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollViewSnapStartedSignalEmpty()
+ {
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalEmpty START");
+
+ var testingTarget = new ScrollViewSnapStartedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollViewSnapStartedSignal>(testingTarget, "Should be an Instance of ScrollViewSnapStartedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollViewSnapStartedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ScrollViewSnapStartedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollViewSnapStartedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalGetConnectionCount START");
+
+ var testingTarget = new ScrollViewSnapStartedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollViewSnapStartedSignal>(testingTarget, "Should be an Instance of ScrollViewSnapStartedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollViewSnapStartedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ScrollViewSnapStartedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollViewSnapStartedSignalConnect()
+ {
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalConnect START");
+
+ var testingTarget = new ScrollViewSnapStartedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollViewSnapStartedSignal>(testingTarget, "Should be an Instance of ScrollViewSnapStartedSignal!");
+
+ 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, $"ScrollViewSnapStartedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollViewSnapStartedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ScrollViewSnapStartedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollViewSnapStartedSignalEmit()
+ {
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalEmit 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 ScrollViewSnapStartedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollViewSnapStartedSignal>(testingTarget, "Should be an Instance of ScrollViewSnapStartedSignal!");
+
+ try
+ {
+ testingTarget.Emit(new ScrollView.SnapEvent());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ScrollViewSnapStartedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ScrollableSignal")]
+ public class InternalScrollableSignalTest
+ {
+ 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("ScrollableSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ScrollableSignal.ScrollableSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableSignalConstructor()
+ {
+ tlog.Debug(tag, $"ScrollableSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ScrollableSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollableSignal>(testingTarget, "Should be an Instance of ScrollableSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ScrollableSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ScrollableSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableSignalEmpty()
+ {
+ tlog.Debug(tag, $"ScrollableSignalEmpty START");
+
+ var testingTarget = new ScrollableSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollableSignal>(testingTarget, "Should be an Instance of ScrollableSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ScrollableSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ScrollableSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ScrollableSignalGetConnectionCount START");
+
+ var testingTarget = new ScrollableSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollableSignal>(testingTarget, "Should be an Instance of ScrollableSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ScrollableSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ScrollableSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableSignalConnect()
+ {
+ tlog.Debug(tag, $"ScrollableSignalConnect START");
+
+ var testingTarget = new ScrollableSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollableSignal>(testingTarget, "Should be an Instance of ScrollableSignal!");
+
+ 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, $"ScrollableSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ScrollableSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ScrollableSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ScrollableSignalEmit()
+ {
+ tlog.Debug(tag, $"ScrollableSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (Vector2 vector = new Vector2(0.3f, 0.5f))
+ {
+ var testingTarget = new ScrollableSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ScrollableSignal>(testingTarget, "Should be an Instance of ScrollableSignal!");
+
+ try
+ {
+ testingTarget.Emit(vector);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ScrollableSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/SignalConnectorType")]
+ public class InternalSignalConnectorTypeTest
+ {
+ 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("SignalConnectorType constructor.")]
+ [Property("SPEC", "Tizen.NUI.SignalConnectorType.SignalConnectorType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void SignalConnectorTypeConstructor()
+ {
+ tlog.Debug(tag, $"SignalConnectorTypeConstructor START");
+
+ using (View view = new View())
+ {
+ using (TypeRegistration typeRegistration = new TypeRegistration(view.SwigCPtr.Handle, false))
+ {
+ using (ImageView imageView = new ImageView())
+ {
+ SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool func = new SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool(imageView.SwigCPtr.Handle);
+ var testingTarget = new SignalConnectorType(typeRegistration, "View", func);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<SignalConnectorType>(testingTarget, "Should be an Instance of SignalConnectorType!");
+
+ testingTarget.Dispose();
+ }
+ }
+ }
+
+ tlog.Debug(tag, $"SignalConnectorTypeConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/StageWheelSignal")]
+ public class InternalStageWheelSignalTest
+ {
+ 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("StageWheelSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.StageWheelSignal.StageWheelSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StageWheelSignalConstructor()
+ {
+ tlog.Debug(tag, $"StageWheelSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new StageWheelSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StageWheelSignal>(testingTarget, "Should be an Instance of StageWheelSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"StageWheelSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StageWheelSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.StageWheelSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StageWheelSignalEmpty()
+ {
+ tlog.Debug(tag, $"StageWheelSignalEmpty START");
+
+ var testingTarget = new StageWheelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StageWheelSignal>(testingTarget, "Should be an Instance of StageWheelSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StageWheelSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StageWheelSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.StageWheelSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StageWheelSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"StageWheelSignalGetConnectionCount START");
+
+ var testingTarget = new StageWheelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StageWheelSignal>(testingTarget, "Should be an Instance of StageWheelSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StageWheelSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StageWheelSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.StageWheelSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StageWheelSignalConnect()
+ {
+ tlog.Debug(tag, $"StageWheelSignalConnect START");
+
+ var testingTarget = new StageWheelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StageWheelSignal>(testingTarget, "Should be an Instance of StageWheelSignal!");
+
+ 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, $"StageWheelSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StageWheelSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.StageWheelSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StageWheelSignalEmit()
+ {
+ tlog.Debug(tag, $"StageWheelSignalEmit 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 StageWheelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StageWheelSignal>(testingTarget, "Should be an Instance of StageWheelSignal!");
+
+ try
+ {
+ testingTarget.Emit(new Wheel());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StageWheelSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/StateChangedSignalType")]
+ public class InternalStateChangedSignalTypeTest
+ {
+ 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("StateChangedSignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.StateChangedSignalType.StateChangedSignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StateChangedSignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"StateChangedSignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new StateChangedSignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StateChangedSignalType>(testingTarget, "Should be an Instance of StateChangedSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"StateChangedSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StateChangedSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.StateChangedSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StateChangedSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"StateChangedSignalTypeEmpty START");
+
+ var testingTarget = new StateChangedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StateChangedSignalType>(testingTarget, "Should be an Instance of StateChangedSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StateChangedSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StateChangedSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.StateChangedSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StateChangedSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"StateChangedSignalTypeGetConnectionCount START");
+
+ var testingTarget = new StateChangedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StateChangedSignalType>(testingTarget, "Should be an Instance of StateChangedSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StateChangedSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StateChangedSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.StateChangedSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StateChangedSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"StateChangedSignalTypeConnect START");
+
+ var testingTarget = new StateChangedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StateChangedSignalType>(testingTarget, "Should be an Instance of StateChangedSignalType!");
+
+ 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, $"StateChangedSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StateChangedSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.StateChangedSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StateChangedSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"StatusSignalTypeEmit 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 StateChangedSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StateChangedSignalType>(testingTarget, "Should be an Instance of StateChangedSignalType!");
+
+ try
+ {
+ testingTarget.Emit(TTSPlayer.TTSState.Paused, TTSPlayer.TTSState.Playing);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StateChangedSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/StatusSignalType")]
+ public class InternalStatusSignalTypeTest
+ {
+ 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("StatusSignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.StatusSignalType.StatusSignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StatusSignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"StatusSignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new StatusSignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StatusSignalType>(testingTarget, "Should be an Instance of StatusSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"StatusSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StatusSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.StatusSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StatusSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"StatusSignalTypeEmpty START");
+
+ var testingTarget = new StatusSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StatusSignalType>(testingTarget, "Should be an Instance of StatusSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StatusSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StatusSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.StatusSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StatusSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"StatusSignalTypeGetConnectionCount START");
+
+ var testingTarget = new StatusSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StatusSignalType>(testingTarget, "Should be an Instance of StatusSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StatusSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StatusSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.StatusSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StatusSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"StatusSignalTypeConnect START");
+
+ var testingTarget = new StatusSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StatusSignalType>(testingTarget, "Should be an Instance of StatusSignalType!");
+
+ 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, $"StatusSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StatusSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.StatusSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StatusSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"StatusSignalTypeEmit 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 StatusSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StatusSignalType>(testingTarget, "Should be an Instance of StatusSignalType!");
+
+ try
+ {
+ testingTarget.Emit(true);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StatusSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/StringToVoidSignal")]
+ public class InternalStringToVoidSignalTest
+ {
+ 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("StringToVoidSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.StringToVoidSignal.StringToVoidSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StringToVoidSignalConstructor()
+ {
+ tlog.Debug(tag, $"StringToVoidSignalConstructor START");
+
+ var testingTarget = new StringToVoidSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StringToVoidSignal>(testingTarget, "Should be an Instance of StringToVoidSignal!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StringToVoidSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StringToVoidSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.StringToVoidSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StringToVoidSignalEmpty()
+ {
+ tlog.Debug(tag, $"StringToVoidSignalEmpty START");
+
+ using (TextLabel label = new TextLabel())
+ {
+ label.Text = "TextLabel";
+ var testingTarget = new StringToVoidSignal(label.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StringToVoidSignal>(testingTarget, "Should be an Instance of StringToVoidSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"StringToVoidSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StringToVoidSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.StringToVoidSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StringToVoidSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"StringToVoidSignalGetConnectionCount START");
+
+ using (TextLabel label = new TextLabel())
+ {
+ label.Text = "TextLabel";
+ var testingTarget = new StringToVoidSignal(label.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StringToVoidSignal>(testingTarget, "Should be an Instance of StringToVoidSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"StringToVoidSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StringToVoidSignal GetResult.")]
+ [Property("SPEC", "Tizen.NUI.StringToVoidSignal.GetResult M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StringToVoidSignalGetResult()
+ {
+ tlog.Debug(tag, $"StringToVoidSignalGetResult START");
+
+ using (TextLabel label = new TextLabel())
+ {
+ label.Text = "TextLabel";
+ try
+ {
+ var result = StringToVoidSignal.GetResult(label.SwigCPtr.Handle);
+ tlog.Debug(tag, "GetResult : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Cuaght Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"StringToVoidSignalGetResult END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StringToVoidSignal SetResult.")]
+ [Property("SPEC", "Tizen.NUI.StringToVoidSignal.SetResult M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StringToVoidSignalSetResult()
+ {
+ tlog.Debug(tag, $"StringToVoidSignalSetResult START");
+
+ using (TextLabel label = new TextLabel())
+ {
+ label.Text = "";
+ try
+ {
+ StringToVoidSignal.SetResult(label.SwigCPtr.Handle, "TextLabel");
+ tlog.Debug(tag, "GetResult : " + StringToVoidSignal.GetResult(label.SwigCPtr.Handle));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Cuaght Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"StringToVoidSignalSetResult END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/StyleChangedSignal")]
+ public class InternalStyleChangedSignalTest
+ {
+ 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("StyleChangedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.StyleChangedSignal.StyleChangedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StyleChangedSignalConstructor()
+ {
+ tlog.Debug(tag, $"StyleChangedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new StyleChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StyleChangedSignal>(testingTarget, "Should be an Instance of StyleChangedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"StyleChangedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StyleChangedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.StyleChangedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StyleChangedSignalEmpty()
+ {
+ tlog.Debug(tag, $"StyleChangedSignalEmpty START");
+
+ var testingTarget = new StyleChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StyleChangedSignal>(testingTarget, "Should be an Instance of StyleChangedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StyleChangedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StyleChangedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.StyleChangedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StyleChangedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"StyleChangedSignalGetConnectionCount START");
+
+ var testingTarget = new StyleChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StyleChangedSignal>(testingTarget, "Should be an Instance of StyleChangedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StyleChangedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StyleChangedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.StyleChangedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void StyleChangedSignalConnect()
+ {
+ tlog.Debug(tag, $"StyleChangedSignal START");
+
+ var testingTarget = new StyleChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StyleChangedSignal>(testingTarget, "Should be an Instance of StyleChangedSignal!");
+
+ 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, $"StyleChangedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("StyleChangedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.StyleChangedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void StyleChangedSignalEmit()
+ {
+ tlog.Debug(tag, $"StyleChangedSignalEmit 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 StyleChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<StyleChangedSignal>(testingTarget, "Should be an Instance of StyleChangedSignal!");
+
+ try
+ {
+ testingTarget.Emit(StyleManager.Get(), StyleChangeType.DefaultFontChange);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"StyleChangedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/TapGestureDetectedSignal")]
+ public class InternalTapGestureDetectedSignalTest
+ {
+ 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("TapGestureDetectedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.TapGestureDetectedSignal.TapGestureDetectedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TapGestureDetectedSignalConstructor()
+ {
+ tlog.Debug(tag, $"TapGestureDetectedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new TapGestureDetectedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TapGestureDetectedSignal>(testingTarget, "Should be an Instance of TapGestureDetectedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TapGestureDetectedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TapGestureDetectedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.TapGestureDetectedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TapGestureDetectedSignalEmpty()
+ {
+ tlog.Debug(tag, $"TapGestureDetectedSignalEmpty START");
+
+ var testingTarget = new TapGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TapGestureDetectedSignal>(testingTarget, "Should be an Instance of TapGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TapGestureDetectedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TapGestureDetectedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TapGestureDetectedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TapGestureDetectedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"TapGestureDetectedSignalGetConnectionCount START");
+
+ var testingTarget = new TapGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TapGestureDetectedSignal>(testingTarget, "Should be an Instance of TapGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TapGestureDetectedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TapGestureDetectedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.TapGestureDetectedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TapGestureDetectedSignalConnect()
+ {
+ tlog.Debug(tag, $"TapGestureDetectedSignalConnect START");
+
+ var testingTarget = new TapGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TapGestureDetectedSignal>(testingTarget, "Should be an Instance of TapGestureDetectedSignal!");
+
+ 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, $"TapGestureDetectedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TapGestureDetectedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.TapGestureDetectedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TapGestureDetectedSignalEmit()
+ {
+ tlog.Debug(tag, $"TapGestureDetectedSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (TextLabel label = new TextLabel())
+ {
+ var testingTarget = new TapGestureDetectedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TapGestureDetectedSignal>(testingTarget, "Should be an Instance of TapGestureDetectedSignal!");
+
+ try
+ {
+ testingTarget.Emit(label, new TapGesture());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TapGestureDetectedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/TextEditorSignal")]
+ public class InternalTextEditorSignalTest
+ {
+ 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("TextEditorSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.TextEditorSignal.TextEditorSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextEditorSignalConstructor()
+ {
+ tlog.Debug(tag, $"TextEditorSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new TextEditorSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextEditorSignal>(testingTarget, "Should be an Instance of TextEditorSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TextEditorSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditorSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.TextEditorSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextEditorSignalEmpty()
+ {
+ tlog.Debug(tag, $"TextEditorSignalEmpty START");
+
+ var testingTarget = new TextEditorSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextEditorSignal>(testingTarget, "Should be an Instance of TextEditorSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TextEditorSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditorSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TextEditorSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextEditorSignalConnectionCount()
+ {
+ tlog.Debug(tag, $"TextEditorSignalGetConnectionCount START");
+
+ var testingTarget = new TextEditorSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextEditorSignal>(testingTarget, "Should be an Instance of TextEditorSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TextEditorSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditorSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.TextEditorSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextEditorSignalConnect()
+ {
+ tlog.Debug(tag, $"TextEditorSignalConnect START");
+
+ var testingTarget = new TextEditorSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextEditorSignal>(testingTarget, "Should be an Instance of TextEditorSignal!");
+
+ 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, $"TextEditorSignalConnect END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/TextFieldSignal")]
+ public class InternalTextFieldSignalTest
+ {
+ 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("TextFieldSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.TextFieldSignal.TextFieldSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldSignalConstructor()
+ {
+ tlog.Debug(tag, $"TextFieldSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new TextFieldSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextFieldSignal>(testingTarget, "Should be an Instance of TextFieldSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TextFieldSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextFieldSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.TextFieldSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldSignalEmpty()
+ {
+ tlog.Debug(tag, $"TextFieldSignalEmpty START");
+
+ var testingTarget = new TextFieldSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextFieldSignal>(testingTarget, "Should be an Instance of TextFieldSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TextFieldSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextFieldSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TextFieldSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"TextFieldSignalGetConnectionCount START");
+
+ var testingTarget = new TextFieldSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextFieldSignal>(testingTarget, "Should be an Instance of TextFieldSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TextFieldSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextFieldSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.TextFieldSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldSignalConnect()
+ {
+ tlog.Debug(tag, $"TextFieldSignalConnect START");
+
+ var testingTarget = new TextFieldSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextFieldSignal>(testingTarget, "Should be an Instance of TextFieldSignal!");
+
+ 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, $"TextFieldSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextFieldSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.TextFieldSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextFieldSignalEmit()
+ {
+ tlog.Debug(tag, $"TextFieldSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (TextField field = new TextField())
+ {
+ var testingTarget = new TextFieldSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextFieldSignal>(testingTarget, "Should be an Instance of TextFieldSignal!");
+
+ try
+ {
+ testingTarget.Emit(field);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TouchDataSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/TextLabelSignal")]
+ public class InternalTextLabelSignalTest
+ {
+ 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("TextLabelSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.TextLabelSignal.TextLabelSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextLabelSignalConstructor()
+ {
+ tlog.Debug(tag, $"TextLabelSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new TextLabelSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextLabelSignal>(testingTarget, "Should be an Instance of TextLabelSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TextLabelSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextLabelSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.TextLabelSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextLabelSignalEmpty()
+ {
+ tlog.Debug(tag, $"TextLabelSignalEmpty START");
+
+ var testingTarget = new TextLabelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextLabelSignal>(testingTarget, "Should be an Instance of TextLabelSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TextLabelSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextLabelSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TextLabelSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextLabelSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"TextLabelSignalGetConnectionCount START");
+
+ var testingTarget = new TextLabelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextLabelSignal>(testingTarget, "Should be an Instance of TextLabelSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TextLabelSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextLabelSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.TextLabelSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextLabelSignalConnect()
+ {
+ tlog.Debug(tag, $"TextLabelSignalConnect START");
+
+ var testingTarget = new TextLabelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextLabelSignal>(testingTarget, "Should be an Instance of TextLabelSignal!");
+
+ 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, $"TextLabelSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextLabelSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.TextLabelSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TextLabelSignalEmit()
+ {
+ tlog.Debug(tag, $"TextLabelSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (TextLabel label = new TextLabel())
+ {
+ var testingTarget = new TextLabelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TextLabelSignal>(testingTarget, "Should be an Instance of TextLabelSignal!");
+
+ try
+ {
+ testingTarget.Emit(label);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TextLabelSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/TimerSignalType")]
+ public class InternalTimerSignalTypeTest
+ {
+ 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("TimerSignalType constructor.")]
+ [Property("SPEC", "Tizen.NUI.TimerSignalType.TimerSignalType C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimerSignalTypeConstructor()
+ {
+ tlog.Debug(tag, $"TimerSignalTypeConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new TimerSignalType(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TimerSignalType>(testingTarget, "Should be an Instance of TimerSignalType!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TimerSignalTypeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TimerSignalType Empty.")]
+ [Property("SPEC", "Tizen.NUI.TimerSignalType.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimerSignalTypeEmpty()
+ {
+ tlog.Debug(tag, $"TimerSignalTypeEmpty START");
+
+ var testingTarget = new TimerSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TimerSignalType>(testingTarget, "Should be an Instance of TimerSignalType!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TimerSignalTypeEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TimerSignalType GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TimerSignalType.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimerSignalTypeGetConnectionCount()
+ {
+ tlog.Debug(tag, $"TimerSignalTypeGetConnectionCount START");
+
+ var testingTarget = new TimerSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TimerSignalType>(testingTarget, "Should be an Instance of TimerSignalType!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TimerSignalTypeGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TimerSignalType Connect.")]
+ [Property("SPEC", "Tizen.NUI.TimerSignalType.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TimerSignalTypeConnect()
+ {
+ tlog.Debug(tag, $"TimerSignalTypeConnect START");
+
+ var testingTarget = new TimerSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TimerSignalType>(testingTarget, "Should be an Instance of TimerSignalType!");
+
+ 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, $"TimerSignalTypeConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TimerSignalType Emit.")]
+ [Property("SPEC", "Tizen.NUI.TimerSignalType.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void TimerSignalTypeEmit()
+ {
+ tlog.Debug(tag, $"TimerSignalTypeEmit 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 TimerSignalType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TimerSignalType>(testingTarget, "Should be an Instance of TimerSignalType!");
+
+ try
+ {
+ testingTarget.Emit();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TimerSignalTypeEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/TouchDataSignal")]
+ public class InternalTouchDataSignalTest
+ {
+ 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("TouchDataSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.TouchDataSignal.TouchDataSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchDataSignalConstructor()
+ {
+ tlog.Debug(tag, $"TouchDataSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new TouchDataSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TouchDataSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TouchDataSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.TouchDataSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchDataSignalEmpty()
+ {
+ tlog.Debug(tag, $"TouchDataSignalEmpty START");
+
+ var testingTarget = new TouchDataSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TouchDataSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TouchDataSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TouchDataSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchDataSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"TouchDataSignalGetConnectionCount START");
+
+ var testingTarget = new TouchDataSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TouchDataSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TouchDataSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.TouchDataSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchDataSignalConnect()
+ {
+ tlog.Debug(tag, $"TouchDataSignalConnect START");
+
+ var testingTarget = new TouchDataSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");
+
+ 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, $"TouchDataSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TouchDataSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.TouchDataSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchDataSignalEmit()
+ {
+ tlog.Debug(tag, $"TouchDataSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ using (Touch touch = Touch.GetTouchFromPtr(view.SwigCPtr.Handle))
+ {
+ var testingTarget = new TouchDataSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchDataSignal>(testingTarget, "Should be an Instance of TouchDataSignal!");
+
+ try
+ {
+ testingTarget.Emit(view, touch);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"TouchDataSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/TouchSignal")]
+ public class InternalTouchSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr touchSignal);
+ 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("TouchSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.TouchSignal.TouchSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchSignalConstructor()
+ {
+ tlog.Debug(tag, $"TouchSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new TouchSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchSignal>(testingTarget, "Should be an Instance of TouchSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TouchSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TouchSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.TouchSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchSignalEmpty()
+ {
+ tlog.Debug(tag, $"TouchSignalEmpty START");
+
+ var testingTarget = new TouchSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchSignal>(testingTarget, "Should be an Instance of TouchSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TouchSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TouchSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TouchSignal.TouchSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"TouchSignalGetConnectionCount START");
+
+ var testingTarget = new TouchSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchSignal>(testingTarget, "Should be an Instance of TouchSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"TouchSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TouchSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.TouchSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchSignalConnect()
+ {
+ tlog.Debug(tag, $"TouchSignalConnect START");
+
+ var testingTarget = new TouchSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchSignal>(testingTarget, "Should be an Instance of TouchSignal!");
+
+ 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, $"TouchSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TouchSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.TouchSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TouchSignalEmit()
+ {
+ tlog.Debug(tag, $"TouchSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new TouchSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TouchSignal>(testingTarget, "Should be an Instance of TouchSignal!");
+
+ try
+ {
+ testingTarget.Emit(Touch.GetTouchFromPtr(view.SwigCPtr.Handle));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"TouchSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/VectorBase")]
+ public class InternalVectorBaseTest
+ {
+ 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("VectorBase constructor.")]
+ [Property("SPEC", "Tizen.NUI.VectorBase.VectorBase C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VectorBaseConstructor()
+ {
+ tlog.Debug(tag, $"VectorBaseConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VectorBaseConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VectorBase Capacity.")]
+ [Property("SPEC", "Tizen.NUI.VectorBase.Capacity M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VectorBaseCapacity()
+ {
+ tlog.Debug(tag, $"VectorBaseCapacity START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
+
+ try
+ {
+ var result = testingTarget.Capacity();
+ tlog.Debug(tag, "Capacity : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VectorBaseCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VectorBase Count.")]
+ [Property("SPEC", "Tizen.NUI.VectorBase.Count M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VectorBaseCount()
+ {
+ tlog.Debug(tag, $"VectorBaseCount START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
+
+ try
+ {
+ var result = testingTarget.Count();
+ tlog.Debug(tag, "Count : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VectorBaseCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VectorBase Size.")]
+ [Property("SPEC", "Tizen.NUI.VectorBase.Size M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VectorBaseSize()
+ {
+ tlog.Debug(tag, $"VectorBaseSize START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
+
+ try
+ {
+ var result = testingTarget.Size();
+ tlog.Debug(tag, "Size : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VectorBaseSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VectorBase Empty.")]
+ [Property("SPEC", "Tizen.NUI.VectorBase.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VectorBaseEmpty()
+ {
+ tlog.Debug(tag, $"VectorBaseEmpty START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VectorBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VectorBase>(testingTarget, "Should be an Instance of VectorBase!");
+
+ try
+ {
+ var result = testingTarget.Empty();
+ tlog.Debug(tag, "Empty : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VectorBaseEmpty END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/VideoViewSignal")]
+ public class InternalVideoViewSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr videoViewSignal);
+ 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("VideoViewSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.VideoViewSignal.VideoViewSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VideoViewSignalConstructor()
+ {
+ tlog.Debug(tag, $"VideoViewSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VideoViewSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VideoViewSignal>(testingTarget, "Should be an Instance of VideoViewSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VideoViewSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VideoViewSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.VideoViewSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VideoViewSignalEmpty()
+ {
+ tlog.Debug(tag, $"VideoViewSignalEmpty START");
+
+ var testingTarget = new VideoViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VideoViewSignal>(testingTarget, "Should be an Instance of VideoViewSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"VideoViewSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VideoViewSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.VideoViewSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VideoViewSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"VideoViewSignalGetConnectionCount START");
+
+ var testingTarget = new VideoViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VideoViewSignal>(testingTarget, "Should be an Instance of VideoViewSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"VideoViewSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VideoViewSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.VideoViewSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VideoViewSignalConnect()
+ {
+ tlog.Debug(tag, $"VideoViewSignalConnect START");
+
+ var testingTarget = new VideoViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VideoViewSignal>(testingTarget, "Should be an Instance of VideoViewSignal!");
+
+ 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, $"VideoViewSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VideoViewSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.VideoViewSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VideoViewSignalEmit()
+ {
+ tlog.Debug(tag, $"VideoViewSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (VideoView view = new VideoView())
+ {
+ var testingTarget = new VideoViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VideoViewSignal>(testingTarget, "Should be an Instance of VideoViewSignal!");
+
+ try
+ {
+ testingTarget.Emit(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VideoViewSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ViewLayoutDirectionChangedSignal")]
+ public class InternalViewLayoutDirectionChangedSignalTest
+ {
+ 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("ViewLayoutDirectionChangedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ViewLayoutDirectionChangedSignal.ViewLayoutDirectionChangedSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewLayoutDirectionChangedSignalConstructor()
+ {
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ViewLayoutDirectionChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewLayoutDirectionChangedSignal>(testingTarget, "Should be an Instance of ViewLayoutDirectionChangedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewLayoutDirectionChangedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ViewLayoutDirectionChangedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewLayoutDirectionChangedSignalEmpty()
+ {
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalEmpty START");
+
+ var testingTarget = new ViewLayoutDirectionChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewLayoutDirectionChangedSignal>(testingTarget, "Should be an Instance of ViewLayoutDirectionChangedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewLayoutDirectionChangedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ViewLayoutDirectionChangedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewLayoutDirectionChangedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalGetConnectionCount START");
+
+ var testingTarget = new ViewLayoutDirectionChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewLayoutDirectionChangedSignal>(testingTarget, "Should be an Instance of ViewLayoutDirectionChangedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewLayoutDirectionChangedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ViewLayoutDirectionChangedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewLayoutDirectionChangedSignalConnect()
+ {
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalConnect START");
+
+ var testingTarget = new ViewLayoutDirectionChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewLayoutDirectionChangedSignal>(testingTarget, "Should be an Instance of ViewLayoutDirectionChangedSignal!");
+
+ 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, $"ViewLayoutDirectionChangedSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewLayoutDirectionChangedSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ViewLayoutDirectionChangedSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void ViewLayoutDirectionChangedSignalEmit()
+ {
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalEmit 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 ViewLayoutDirectionChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewLayoutDirectionChangedSignal>(testingTarget, "Should be an Instance of ViewLayoutDirectionChangedSignal!");
+
+ try
+ {
+ using (View view = new View())
+ {
+ testingTarget.Emit(view);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewLayoutDirectionChangedSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ViewResourceReadySignal")]
+ public class InternalViewResourceReadySignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr viewResourceReadySignal);
+ 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("ViewResourceReadySignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ViewResourceReadySignal.ViewResourceReadySignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewResourceReadySignalConstructor()
+ {
+ tlog.Debug(tag, $"ViewResourceReadySignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ViewResourceReadySignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewResourceReadySignal>(testingTarget, "Should be an Instance of ViewResourceReadySignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ViewResourceReadySignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewResourceReadySignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ViewResourceReadySignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewResourceReadySignalEmpty()
+ {
+ tlog.Debug(tag, $"ViewResourceReadySignalEmpty START");
+
+ var testingTarget = new ViewResourceReadySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewResourceReadySignal>(testingTarget, "Should be an Instance of ViewResourceReadySignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewResourceReadySignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewResourceReadySignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ViewResourceReadySignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewResourceReadySignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ViewResourceReadySignalGetConnectionCount START");
+
+ var testingTarget = new ViewResourceReadySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewResourceReadySignal>(testingTarget, "Should be an Instance of ViewResourceReadySignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewResourceReadySignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewResourceReadySignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ViewResourceReadySignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewResourceReadySignalConnect()
+ {
+ tlog.Debug(tag, $"ViewResourceReadySignalConnect START");
+
+ var testingTarget = new ViewResourceReadySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewResourceReadySignal>(testingTarget, "Should be an Instance of ViewResourceReadySignal!");
+
+ 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, $"ViewResourceReadySignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewResourceReadySignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ViewResourceReadySignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewResourceReadySignalEmit()
+ {
+ tlog.Debug(tag, $"ViewResourceReadySignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ViewResourceReadySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewResourceReadySignal>(testingTarget, "Should be an Instance of ViewResourceReadySignal!");
+
+ try
+ {
+ testingTarget.Emit(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ViewResourceReadySignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ViewSignal")]
+ public class InternalViewSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr viewSignal);
+ 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("ViewSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ViewSignal.ViewSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewSignalConstructor()
+ {
+ tlog.Debug(tag, $"ViewSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ViewSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewSignal>(testingTarget, "Should be an Instance of ViewSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ViewSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ViewSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewSignalEmpty()
+ {
+ tlog.Debug(tag, $"ViewSignalEmpty START");
+
+ var testingTarget = new ViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewSignal>(testingTarget, "Should be an Instance of ViewSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ViewSignal.ViewSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ViewSignalGetConnectionCount START");
+
+ var testingTarget = new ViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewSignal>(testingTarget, "Should be an Instance of ViewSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ViewSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewSignalConnect()
+ {
+ tlog.Debug(tag, $"ViewSignalConnect START");
+
+ var testingTarget = new ViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewSignal>(testingTarget, "Should be an Instance of ViewSignal!");
+
+ 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, $"ViewSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.ViewSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewSignalEmit()
+ {
+ tlog.Debug(tag, $"ViewSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewSignal>(testingTarget, "Should be an Instance of ViewSignal!");
+
+ try
+ {
+ testingTarget.Emit(view);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ViewSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/ViewVisibilityChangedSignal")]
+ public class InternalViewVisibilityChangedSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr viewVisibilityChangedSignal);
+ 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("ViewVisibilityChangedSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.ViewVisibilityChangedSignal.ViewSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewVisibilityChangedSignalConstructor()
+ {
+ tlog.Debug(tag, $"ViewVisibilityChangedSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ViewVisibilityChangedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewVisibilityChangedSignal>(testingTarget, "Should be an Instance of ViewVisibilityChangedSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ViewVisibilityChangedSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewVisibilityChangedSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.ViewVisibilityChangedSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewVisibilityChangedSignalEmpty()
+ {
+ tlog.Debug(tag, $"ViewVisibilityChangedSignalEmpty START");
+
+ var testingTarget = new ViewVisibilityChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewVisibilityChangedSignal>(testingTarget, "Should be an Instance of ViewVisibilityChangedSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewVisibilityChangedSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewVisibilityChangedSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ViewVisibilityChangedSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewVisibilityChangedSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ViewVisibilityChangedSignalGetConnectionCount START");
+
+ var testingTarget = new ViewVisibilityChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewVisibilityChangedSignal>(testingTarget, "Should be an Instance of ViewVisibilityChangedSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ViewVisibilityChangedSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ViewVisibilityChangedSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.ViewVisibilityChangedSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ViewVisibilityChangedSignalConnect()
+ {
+ tlog.Debug(tag, $"ViewVisibilityChangedSignalConnect START");
+
+ var testingTarget = new ViewVisibilityChangedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ViewVisibilityChangedSignal>(testingTarget, "Should be an Instance of ViewVisibilityChangedSignal!");
+
+ 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, $"ViewVisibilityChangedSignalConnect END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("ViewVisibilityChangedSignal Emit.")]
+ //[Property("SPEC", "Tizen.NUI.ViewVisibilityChangedSignal.Emit M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void ViewVisibilityChangedSignalEmit()
+ //{
+ // tlog.Debug(tag, $"ViewVisibilityChangedSignalEmit START");
+ // var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ // var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ // tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new ViewVisibilityChangedSignal(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<ViewVisibilityChangedSignal>(testingTarget, "Should be an Instance of ViewVisibilityChangedSignal!");
+
+ // using (View parent = new View())
+ // {
+ // parent.Add(view);
+ // try
+ // {
+ // testingTarget.Emit(view, true, 1);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"ViewVisibilityChangedSignalEmit END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/VisualEventSignal")]
+ public class InternalVisualEventSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr visualEventSignal);
+ 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("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");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VisualEventSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VisualEventSignal>(testingTarget, "Should be an Instance of VisualEventSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VisualEventSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VisualEventSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.VisualEventSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VisualEventSignalEmpty()
+ {
+ tlog.Debug(tag, $"VisualEventSignalEmpty START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VisualEventSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VisualEventSignal>(testingTarget, "Should be an Instance of VisualEventSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VisualEventSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VisualEventSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.VisualEventSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VisualEventSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"VisualEventSignalGetConnectionCount START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VisualEventSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VisualEventSignal>(testingTarget, "Should be an Instance of VisualEventSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VisualEventSignalGetConnectionCount END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/VoidSignal")]
+ public class InternalVoidSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr voidSignal);
+ 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("VoidSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.VoidSignal.VoidSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VoidSignalConstructor()
+ {
+ tlog.Debug(tag, $"VoidSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VoidSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VoidSignal>(testingTarget, "Should be an Instance of VoidSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VoidSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VoidSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.VoidSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VoidSignalEmpty()
+ {
+ tlog.Debug(tag, $"VoidSignalEmpty START");
+
+ var testingTarget = new VoidSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VoidSignal>(testingTarget, "Should be an Instance of VoidSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"VoidSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VoidSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.VoidSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VoidSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"VoidSignalGetConnectionCount START");
+
+ var testingTarget = new VoidSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VoidSignal>(testingTarget, "Should be an Instance of VoidSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"VoidSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VoidSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.VoidSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VoidSignalConnect()
+ {
+ tlog.Debug(tag, $"VoidSignalConnect START");
+
+ var testingTarget = new VoidSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VoidSignal>(testingTarget, "Should be an Instance of VoidSignal!");
+
+ 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, $"VoidSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("VoidSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.VoidSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void VoidSignalEmit()
+ {
+ tlog.Debug(tag, $"VoidSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new VoidSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VoidSignal>(testingTarget, "Should be an Instance of VoidSignal!");
+
+ try
+ {
+ testingTarget.Emit();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"VoidSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Common/WheelSignal")]
+ public class InternalWheelSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr wheelSignal);
+ 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("WheelSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.WheelSignal.WheelSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WheelSignalConstructor()
+ {
+ tlog.Debug(tag, $"WheelSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new WheelSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WheelSignal>(testingTarget, "Should be an Instance of WheelSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"WheelSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WheelSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.WheelSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WheelSignalEmpty()
+ {
+ tlog.Debug(tag, $"WheelSignalEmpty START");
+
+ var testingTarget = new WheelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WheelSignal>(testingTarget, "Should be an Instance of WheelSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"WheelSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WheelSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.WheelSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WheelSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"WheelSignalGetConnectionCount START");
+
+ var testingTarget = new WheelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WheelSignal>(testingTarget, "Should be an Instance of WheelSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"WheelSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WheelSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.WheelSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WheelSignalConnect()
+ {
+ tlog.Debug(tag, $"WheelSignalConnect START");
+
+ var testingTarget = new WheelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WheelSignal>(testingTarget, "Should be an Instance of WheelSignal!");
+
+ 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, $"WheelSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WheelSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.WheelSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WheelSignalEmit()
+ {
+ tlog.Debug(tag, $"WheelSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new WheelSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WheelSignal>(testingTarget, "Should be an Instance of WheelSignal!");
+
+ try
+ {
+ testingTarget.Emit(view, new Wheel());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"WheelSignalEmit END (OK)");
+ }
+ }
+}
{
tlog.Debug(tag, $"TransitionItemConstructor START");
- View currentView = new View()
+ using (View view = new View())
{
- Name = "currentPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- currentView.TransitionOptions.TransitionTag = "Transition";
- currentView.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionItem(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
- View newView = new View()
- {
- Name = "newPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- newView.TransitionOptions.TransitionTag = "Transition";
- newView.TransitionOptions.EnableTransition = true;
-
- AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
- TimePeriod timePeriod = new TimePeriod(500);
-
- var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
-
- newView.Dispose();
- currentView.Dispose();
- timePeriod.Dispose();
- alphaFunction.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemConstructor END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItem ShowSourceAfterFinished.")]
- [Property("SPEC", "Tizen.NUI.TransitionItem.ShowSourceAfterFinished A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PROW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemShowSourceAfterFinished()
- {
- tlog.Debug(tag, $"TransitionItemShowSourceAfterFinished START");
-
- View currentView = new View()
- {
- Name = "currentPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- currentView.TransitionOptions.TransitionTag = "Transition";
- currentView.TransitionOptions.EnableTransition = true;
-
- View newView = new View()
- {
- Name = "newPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- newView.TransitionOptions.TransitionTag = "Transition";
- newView.TransitionOptions.EnableTransition = true;
-
- AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
- TimePeriod timePeriod = new TimePeriod(500);
-
- var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
-
- try
- {
- testingTarget.ShowSourceAfterFinished = true;
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
+ testingTarget.Dispose();
}
-
- newView.Dispose();
- currentView.Dispose();
- timePeriod.Dispose();
- alphaFunction.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemShowSourceAfterFinished END (OK)");
+
+ tlog.Debug(tag, $"TransitionItemConstructor END (OK)");
}
[Test]
{
tlog.Debug(tag, $"TransitionItemAssign START");
- View currentView = new View()
- {
- Name = "currentPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- currentView.TransitionOptions.TransitionTag = "Transition";
- currentView.TransitionOptions.EnableTransition = true;
-
- View newView = new View()
- {
- Name = "newPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- newView.TransitionOptions.TransitionTag = "Transition";
- newView.TransitionOptions.EnableTransition = true;
-
- AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
- TimePeriod timePeriod = new TimePeriod(500);
-
- var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
-
- using (TransitionItem rhs = new TransitionItem(testingTarget))
- {
- var result = testingTarget.Assign(rhs);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(result, "Should be an Instance of TransitionItem!");
- }
-
- currentView?.Dispose();
- newView?.Dispose();
- timePeriod?.Dispose();
- alphaFunction?.Dispose();
- testingTarget?.Dispose();
- tlog.Debug(tag, $"TransitionItemAssign END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItem Dispose.")]
- [Property("SPEC", "Tizen.NUI.TransitionItem.Dispose M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemDispose()
- {
- tlog.Debug(tag, $"TransitionItemDispose START");
-
- View currentView = new View()
- {
- Name = "currentPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- currentView.TransitionOptions.TransitionTag = "Transition";
- currentView.TransitionOptions.EnableTransition = true;
-
- View newView = new View()
+ using (View view = new View())
{
- Name = "newPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- newView.TransitionOptions.TransitionTag = "Transition";
- newView.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionItem(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
+
+ try
+ {
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
- AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
- TimePeriod timePeriod = new TimePeriod(500);
-
- var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
-
- try
- {
testingTarget.Dispose();
}
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
- currentView?.Dispose();
- newView?.Dispose();
- timePeriod?.Dispose();
- alphaFunction?.Dispose();
- tlog.Debug(tag, $"TransitionItemDispose END (OK)");
+ tlog.Debug(tag, $"TransitionItemAssign END (OK)");
}
}
}
{
tlog.Debug(tag, $"TransitionItemBaseConstructor START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
- }
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseConstructor END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItemBase Duration.")]
- [Property("SPEC", "Tizen.NUI.TransitionItemBase.Duration A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemBaseDuration()
- {
- tlog.Debug(tag, $"TransitionItemBaseDuration START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
- }
-
- testingTarget.Duration = 300;
- Assert.IsTrue(300 == testingTarget.Duration);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseDuration END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItemBase Delay.")]
- [Property("SPEC", "Tizen.NUI.TransitionItemBase.Delay A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemBaseDelay()
- {
- tlog.Debug(tag, $"TransitionItemBaseDelay START");
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
+ testingTarget.Dispose();
}
- testingTarget.Delay = 300;
- Assert.IsTrue(300 == testingTarget.Delay);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseDelay END (OK)");
+ tlog.Debug(tag, $"TransitionItemBaseConstructor END (OK)");
}
[Test]
{
tlog.Debug(tag, $"TransitionItemBaseTimePeriod START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
- }
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
- try
- {
- using (TimePeriod setValue = new TimePeriod(300))
- {
- testingTarget.TimePeriod = setValue;
- }
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
+ testingTarget.TimePeriod = new TimePeriod(300);
+ tlog.Debug(tag, "TiemPeriod : " + testingTarget.TimePeriod);
+
+ testingTarget.Dispose();
}
- view.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionItemBaseTimePeriod END (OK)");
}
- [Test]
- [Category("P1")]
- [Description("TransitionItemBase AlphaFunction.")]
- [Property("SPEC", "Tizen.NUI.TransitionItemBase.AlphaFunction A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemBaseAlphaFunction()
- {
- tlog.Debug(tag, $"TransitionItemBaseAlphaFunction START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("TransitionItemBase AlphaFunction.")]
+ //[Property("SPEC", "Tizen.NUI.TransitionItemBase.AlphaFunction A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TransitionItemBaseAlphaFunction()
+ //{
+ // tlog.Debug(tag, $"TransitionItemBaseAlphaFunction START");
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
- }
+ // using (View view = new View())
+ // {
+ // var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
- using (AlphaFunction setValue = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut))
- {
- testingTarget.AlphaFunction = setValue;
- var result = testingTarget.AlphaFunction;
- Assert.IsTrue(result.GetBuiltinFunction() == AlphaFunction.BuiltinFunctions.EaseOut);
- }
+ // testingTarget.AlphaFunction = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut);
+ // tlog.Debug(tag, "AlphaFunction : " + testingTarget.AlphaFunction.ToString());
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseAlphaFunction END (OK)");
- }
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"TransitionItemBaseAlphaFunction END (OK)");
+ //}
[Test]
[Category("P1")]
{
tlog.Debug(tag, $"TransitionItemBaseTransitionWithChild START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
+
+ try
{
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.TransitionWithChild = false;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
- }
- try
- {
- testingTarget.TransitionWithChild = true;
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
+ testingTarget.Dispose();
}
- view.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionItemBaseTransitionWithChild END (OK)");
}
{
tlog.Debug(tag, $"TransitionItemBaseDownCast START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
+
+ try
{
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ TransitionItemBase.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
- }
- var result = TransitionItemBase.DownCast(testingTarget);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionItemBase>(result, "Should be an Instance of TransitionItemBase!");
+ testingTarget.Dispose();
+ }
- view.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionItemBaseDownCast END (OK)");
}
{
tlog.Debug(tag, $"TransitionItemBaseAssign START");
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
+ using (View view = new View())
{
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
+
+ try
{
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.Assign(testingTarget);
}
- }
-
- using (TransitionItemBase rhs = new TransitionItemBase(testingTarget))
- {
- var result = testingTarget.Assign(rhs);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionItemBase>(result, "Should be an Instance of TransitionItemBase!");
- }
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseAssign END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItemBase Dispose.")]
- [Property("SPEC", "Tizen.NUI.TransitionItemBase.Dispose M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemBaseDispose()
- {
- tlog.Debug(tag, $"TransitionItemBaseDispose START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ catch (Exception e)
{
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
- }
- try
- {
testingTarget.Dispose();
}
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
- view?.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseDispose END (OK)");
+ tlog.Debug(tag, $"TransitionItemBaseAssign END (OK)");
}
}
}
tlog.Debug(tag, $"TransitionSetAddTransition END (OK)");
}
+ //[Test]
+ //[Category("P1")]
+ //[Description("TransitionSet Finished.")]
+ //[Property("SPEC", "Tizen.NUI.TransitionSet.Finished A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TransitionSetFinished()
+ //{
+ // tlog.Debug(tag, $"TransitionSetFinished START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
+
+ // testingTarget.Finished += MyOnFinished;
+ // testingTarget.Finished -= MyOnFinished;
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"TransitionSetFinished END (OK)");
+ //}
+
+ //private void MyOnFinished(object sender, EventArgs e) { }
+
[Test]
[Category("P1")]
[Description("TransitionSet GetTransitionAt.")]
{
tlog.Debug(tag, $"TransitionSetGetTransitionAt START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.GetTransitionAt(0);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var result = testingTarget.GetTransitionAt(1);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionItemBase>(result, "Should be an Instance of TransitionItemBase!");
-
- view.Dispose();
- transitionItemBase.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionSetGetTransitionAt END (OK)");
}
{
tlog.Debug(tag, $"TransitionSetGetTransitionCount START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.GetTransitionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var result = testingTarget.GetTransitionCount();
- Assert.IsTrue(1 == result);
-
- view.Dispose();
- transitionItemBase.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionSetGetTransitionCount END (OK)");
}
{
tlog.Debug(tag, $"TransitionSetPlay START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.Play();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- try
- {
- testingTarget.Play();
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
-
- view.Dispose();
- transitionItemBase.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionSetPlay END (OK)");
}
{
tlog.Debug(tag, $"TransitionSetAssign START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var transitionSet = new TransitionSet();
- Assert.IsNotNull(transitionSet, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(transitionSet, "Should be an Instance of TransitionSet!");
-
- transitionSet.AddTransition(transitionItemBase);
-
- var testingTarget = new TransitionSet();
- var result = transitionSet.Assign(testingTarget);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(result, "Should be an Instance of TransitionSet!");
-
- view.Dispose();
- transitionItemBase.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionSetAssign END (OK)");
}
{
tlog.Debug(tag, $"TransitionSetFinishedSignal START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.FinishedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var transitionSet = new TransitionSet();
- Assert.IsNotNull(transitionSet, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(transitionSet, "Should be an Instance of TransitionSet!");
-
- transitionSet.AddTransition(transitionItemBase);
-
- var testingTarget = transitionSet.FinishedSignal();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSet!");
-
- view.Dispose();
- transitionItemBase.Dispose();
tlog.Debug(tag, $"TransitionSetFinishedSignal END (OK)");
}
-
-
- [Test]
- [Category("P1")]
- [Description("TransitionSet Dispose.")]
- [Property("SPEC", "Tizen.NUI.TransitionSet.Dispose M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetDispose()
- {
- tlog.Debug(tag, $"TransitionSetDispose START");
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- try
- {
- testingTarget.Dispose();
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
-
- tlog.Debug(tag, $"TransitionSetDispose END (OK)");
- }
}
}
[Test]
[Category("P1")]
- [Description("TransitionSetSignal Empty.")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Empty M")]
+ [Description("TransitionSetSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.TransitionSetSignal.TransitionSetSignal M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalEmpty()
+ public void TransitionSetSignalConstructor()
{
- tlog.Debug(tag, $"TransitionSetSignalEmpty START");
+ tlog.Debug(tag, $"TransitionSetSignalConstructor START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
+ testingTarget.Dispose();
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- var result = transitionSetSignal.Empty();
- Assert.IsTrue(result);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalEmpty END (OK)");
+ tlog.Debug(tag, $"TransitionSetSignalConstructor END (OK)");
}
[Test]
[Category("P1")]
- [Description("TransitionSetSignal GetConnectionCount.")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.GetConnectionCount M")]
+ [Description("TransitionSetSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Empty M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalGetConnectionCount()
+ public void TransitionSetSignalEmpty()
{
- tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount START");
+ tlog.Debug(tag, $"TransitionSetSignalEmpty START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Debug(tag, "Empty : " + testingTarget.Empty());
}
- }
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- var result = transitionSetSignal.GetConnectionCount();
- Assert.IsTrue(0 == result);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionSetSignal Connect.")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Connect M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalConnect()
- {
- tlog.Debug(tag, $"TransitionSetSignalConnect START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ catch (Exception e)
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
- }
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- dummyCallback callback = OnDummyCallback;
- transitionSetSignal.Connect(callback);
- transitionSetSignal.Disconnect(callback);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalConnect END (OK)");
- }
- [Test]
- [Category("P1")]
- [Description("TransitionSetSignal Connect. With IntPtr")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Connect M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalConnectWithIntPtr()
- {
- tlog.Debug(tag, $"TransitionSetSignalConnectWithIntPtr START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
+ testingTarget.Dispose();
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- transitionSetSignal.Connect(OnIntPtrCallback);
- transitionSetSignal.Disconnect(OnIntPtrCallback);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalConnectWithIntPtr END (OK)");
+ tlog.Debug(tag, $"TransitionSetSignalEmpty END (OK)");
}
[Test]
[Category("P1")]
- [Description("TransitionSetSignal Disconnect.")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Disconnect M")]
+ [Description("TransitionSetSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TransitionSetSignal.GetConnectionCount M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalDisconnect()
+ public void TransitionSetSignalGetConnectionCount()
{
- tlog.Debug(tag, $"TransitionSetSignalDisconnect START");
+ tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Debug(tag, "ConnectionCount : " + testingTarget.GetConnectionCount());
}
- }
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- dummyCallback callback = OnDummyCallback;
- transitionSetSignal.Connect(callback);
- transitionSetSignal.Disconnect(callback);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalDisconnect END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionSetSignal Disconnect. With IntPtr")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Disconnect M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalDisconnectWithIntPtr()
- {
- tlog.Debug(tag, $"TransitionSetSignalDisconnectWithIntPtr START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ catch (Exception e)
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
- }
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- transitionSetSignal.Connect(OnIntPtrCallback);
- transitionSetSignal.Disconnect(OnIntPtrCallback);
+ testingTarget.Dispose();
+ }
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalDisconnectWithIntPtr END (OK)");
+ tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount END (OK)");
}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TransitionSetSignal Connect.")]
+ //[Property("SPEC", "Tizen.NUI.TransitionSetSignal.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TransitionSetSignalConnect()
+ //{
+ // tlog.Debug(tag, $"TransitionSetSignalConnect START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
+
+ // 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, $"TransitionSetSignalConnect END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TransitionSetSignal Connect. With IntPtr")]
+ //[Property("SPEC", "Tizen.NUI.TransitionSetSignal.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TransitionSetSignalConnectWithIntPtr()
+ //{
+ // tlog.Debug(tag, $"TransitionSetSignalConnectWithIntPtr START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
+
+ // try
+ // {
+ // testingTarget.Connect(view.SwigCPtr.Handle);
+ // testingTarget.Disconnect(view.SwigCPtr.Handle);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"TransitionSetSignalConnectWithIntPtr END (OK)");
+ //}
}
}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/Builder")]
+ public class InternalBuilderTest
+ {
+ private const string tag = "NUITEST";
+ private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "lottie.json";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder constructor.")]
+ [Property("SPEC", "Tizen.NUI.Builder.Builder C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderConstructor()
+ {
+ tlog.Debug(tag, $"BuilderConstructor START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder Quit.")]
+ [Property("SPEC", "Tizen.NUI.Builder.Quit A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderQuit()
+ {
+ tlog.Debug(tag, $"BuilderQuit START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ testingTarget.Quit += MyOnQuit;
+ testingTarget.Quit -= MyOnQuit;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderQuit END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder AddConstants.")]
+ [Property("SPEC", "Tizen.NUI.Builder.AddConstants M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderAddConstants()
+ {
+ tlog.Debug(tag, $"BuilderAddConstants START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("Size", new PropertyValue(new Size(20, 30)));
+ map.Add("Posision", new PropertyValue(new Position(100, 200)));
+
+ try
+ {
+ testingTarget.AddConstants(map);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderAddConstants END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder AddConstant.")]
+ [Property("SPEC", "Tizen.NUI.Builder.AddConstant M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderAddConstant()
+ {
+ tlog.Debug(tag, $"BuilderAddConstant START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ try
+ {
+ testingTarget.AddConstant("Size", new PropertyValue(new Size(20, 30)));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderAddConstant END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder GetConstants.")]
+ [Property("SPEC", "Tizen.NUI.Builder.GetConstants M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderGetConstants()
+ {
+ tlog.Debug(tag, $"BuilderGetConstants START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Add("Size", new PropertyValue(new Size(20, 30)));
+ map.Add("Posision", new PropertyValue(new Position(100, 200)));
+
+ testingTarget.AddConstants(map);
+
+ var result = testingTarget.GetConstants();
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an Instance of PropertyMap!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderGetConstants END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder GetConstan.")]
+ [Property("SPEC", "Tizen.NUI.Builder.GetConstan M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderGetConstan()
+ {
+ tlog.Debug(tag, $"BuilderGetConstan START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ testingTarget.AddConstant("Opacity", new PropertyValue(0.5f));
+
+ var result = testingTarget.GetConstant("Opacity");
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(result, "Should be an Instance of PropertyValue!");
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderGetConstan END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder LoadFromFile.")]
+ [Property("SPEC", "Tizen.NUI.Builder.LoadFromFile M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderLoadFromFile()
+ {
+ tlog.Debug(tag, $"BuilderLoadFromFile START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ try
+ {
+ testingTarget.LoadFromFile(path);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderLoadFromFile END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Builder LoadFromFile. Parse failed.")]
+ [Property("SPEC", "Tizen.NUI.Builder.LoadFromFile M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderLoadFromFileParseFailed()
+ {
+ tlog.Debug(tag, $"BuilderLoadFromFileParseFailed START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ try
+ {
+ testingTarget.LoadFromFile(Tizen.Applications.Application.Current.DirectoryInfo.Resource + "index.xml");
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderLoadFromFileParseFailed END (OK)");
+ Assert.Fail("Caught InvalidOperationException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Builder LoadFromString.")]
+ [Property("SPEC", "Tizen.NUI.Builder.LoadFromString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void BuilderLoadFromString()
+ {
+ tlog.Debug(tag, $"BuilderLoadFromString START");
+
+ var testingTarget = new Builder();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ try
+ {
+ testingTarget.LoadFromString("{\"sites\": [{ \"name\":\"caurse\" , \"url\":\"www.runoob.com\" }]}", Builder.UIFormat.JSON);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"BuilderLoadFromString END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("Builder Create.")]
+ //[Property("SPEC", "Tizen.NUI.Builder.Create M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void BuilderCreate()
+ //{
+ // tlog.Debug(tag, $"BuilderCreate START");
+
+ // var testingTarget = new Builder();
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<Builder>(testingTarget, "Should be an Instance of Builder!");
+
+ // try
+ // {
+ // testingTarget.Create("{\"View\" : [\"Size\" : \"\"]}");
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // testingTarget = null;
+ // tlog.Debug(tag, $"BuilderCreate END (OK)");
+ //}
+
+ private void MyOnQuit(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/Camera")]
+ public class InternalCameraTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera constructor.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Camera C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraConstructor()
+ {
+ tlog.Debug(tag, $"CameraConstructor START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera constructor. With Vector2.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Camera C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraConstructorWithVector2()
+ {
+ tlog.Debug(tag, $"CameraConstructorWithVector2 START");
+
+ using (Vector2 size = new Vector2(50, 80))
+ {
+ var testingTarget = new Camera(size);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraConstructorWithVector2 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera constructor. With Camera.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Camera C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraConstructorWithCamera()
+ {
+ tlog.Debug(tag, $"CameraConstructorWithCamera START");
+
+ using (Camera camera = new Camera())
+ {
+ var testingTarget = new Camera(camera);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraConstructorWithCamera END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera DownCast.")]
+ [Property("SPEC", "Tizen.NUI.Camera.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraDownCast()
+ {
+ tlog.Debug(tag, $"CameraDownCast START");
+
+ using (Camera camera = new Camera())
+ {
+ var testingTarget = Camera.DownCast(camera);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Camera DownCast. With null.")]
+ [Property("SPEC", "Tizen.NUI.Camera.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraDownCastWithNull()
+ {
+ tlog.Debug(tag, $"CameraDownCastWithNull START");
+
+ try
+ {
+ var testingTarget = Camera.DownCast(null);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"CameraDownCastWithNull END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera Assign.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraAssign()
+ {
+ tlog.Debug(tag, $"CameraAssign START");
+
+ using (Camera camera = new Camera())
+ {
+ var testingTarget = camera.Assign(camera);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"CameraAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetType.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetType()
+ {
+ tlog.Debug(tag, $"CameraSetType START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetType(Tizen.NUI.CameraType.FreeLook);
+ Assert.AreEqual(Tizen.NUI.CameraType.FreeLook, testingTarget.GetType(), "Should be equal!");
+
+ testingTarget.SetType(Tizen.NUI.CameraType.LookAtTarget);
+ Assert.AreEqual(Tizen.NUI.CameraType.LookAtTarget, testingTarget.GetType(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetProjectionMode.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetProjectionMode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetProjectionMode()
+ {
+ tlog.Debug(tag, $"CameraSetProjectionMode START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetProjectionMode(ProjectionMode.OrthographicProjection);
+ Assert.AreEqual(ProjectionMode.OrthographicProjection, testingTarget.GetProjectionMode(), "Should be equal!");
+
+ testingTarget.SetProjectionMode(ProjectionMode.PerspectiveProjection);
+ Assert.AreEqual(ProjectionMode.PerspectiveProjection, testingTarget.GetProjectionMode(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetProjectionMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetFieldOfView.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetFieldOfView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void CameraSetFieldOfView()
+ {
+ tlog.Debug(tag, $"CameraSetFieldOfView START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetFieldOfView(0.5f);
+ Assert.AreEqual(0.5f, testingTarget.GetFieldOfView(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetFieldOfView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetAspectRatio.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetAspectRatio M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void CameraSetAspectRatio()
+ {
+ tlog.Debug(tag, $"CameraSetAspectRatio START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetAspectRatio(0.5f);
+ Assert.AreEqual(0.5f, testingTarget.GetAspectRatio(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetAspectRatio END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetNearClippingPlane.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetNearClippingPlane M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetNearClippingPlane()
+ {
+ tlog.Debug(tag, $"CameraSetNearClippingPlane START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetNearClippingPlane(0.5f);
+ Assert.AreEqual(0.5f, testingTarget.GetNearClippingPlane(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetNearClippingPlane END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetFarClippingPlane.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetFarClippingPlane M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetFarClippingPlane()
+ {
+ tlog.Debug(tag, $"CameraSetFarClippingPlane START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetFarClippingPlane(0.5f);
+ Assert.AreEqual(0.5f, testingTarget.GetFarClippingPlane(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetFarClippingPlane END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetTargetPosition.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetTargetPosition M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void CameraSetTargetPosition()
+ {
+ tlog.Debug(tag, $"CameraSetTargetPosition START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ using (Vector3 position = new Vector3(0.3f, 0.8f, 0.0f))
+ {
+ testingTarget.SetTargetPosition(position);
+
+ var result = testingTarget.GetTargetPosition();
+ Assert.AreEqual(0.3f, result.X, "Should be equal!");
+ Assert.AreEqual(0.8f, result.Y, "Should be equal!");
+ Assert.AreEqual(0.0f, result.Z, "Should be equal!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetTargetPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera GetInvertYAxis.")]
+ [Property("SPEC", "Tizen.NUI.Camera.GetInvertYAxis M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Obsolete]
+ public void CameraGetInvertYAxis()
+ {
+ tlog.Debug(tag, $"CameraGetInvertYAxis START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.SetInvertYAxis(true);
+ Assert.AreEqual(true, testingTarget.GetInvertYAxis(), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraGetInvertYAxis END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetPerspectiveProjection.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetPerspectiveProjection M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetPerspectiveProjection()
+ {
+ tlog.Debug(tag, $"CameraSetPerspectiveProjection START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ using (Vector2 size = new Vector2(80, 50))
+ {
+ try
+ {
+ testingTarget.SetPerspectiveProjection(size);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetPerspectiveProjection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetOrthographicProjection.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetOrthographicProjection M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetOrthographicProjection()
+ {
+ tlog.Debug(tag, $"CameraSetOrthographicProjection START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ using (Vector2 size = new Vector2(80, 50))
+ {
+ try
+ {
+ testingTarget.SetOrthographicProjection(size);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetOrthographicProjection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera SetOrthographicProjection. With Float.")]
+ [Property("SPEC", "Tizen.NUI.Camera.SetOrthographicProjection M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraSetOrthographicProjectionWithFloat()
+ {
+ tlog.Debug(tag, $"CameraSetOrthographicProjectionWithFloat START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ try
+ {
+ testingTarget.SetOrthographicProjection(0.3f, 0.0f, 0.5f, 0.2f, 0.3f, 1.0f);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraSetOrthographicProjectionWithFloat END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera Type.")]
+ [Property("SPEC", "Tizen.NUI.Camera.Type A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraType()
+ {
+ tlog.Debug(tag, $"CameraType START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.Type = "FreeLook";
+ Assert.AreEqual("FREE_LOOK", testingTarget.Type, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera ProjectionMode.")]
+ [Property("SPEC", "Tizen.NUI.Camera.ProjectionMode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraProjectionMode()
+ {
+ tlog.Debug(tag, $"CameraProjectionMode START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.ProjectionMode = "PerspectiveProjection";
+ Assert.AreEqual("PERSPECTIVE_PROJECTION", testingTarget.ProjectionMode, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraProjectionMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera FieldOfView.")]
+ [Property("SPEC", "Tizen.NUI.Camera.FieldOfView A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraFieldOfView()
+ {
+ tlog.Debug(tag, $"CameraFieldOfView START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.FieldOfView = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.FieldOfView, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraFieldOfView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera AspectRatio.")]
+ [Property("SPEC", "Tizen.NUI.Camera.AspectRatio A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraAspectRatio()
+ {
+ tlog.Debug(tag, $"CameraAspectRatio START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.AspectRatio = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.AspectRatio, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraAspectRatio END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera NearPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.NearPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraNearPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraNearPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.NearPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.NearPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraNearPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera FarPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.FarPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraFarPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraFarPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.FarPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.FarPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraFarPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera LeftPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.LeftPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraLeftPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraLeftPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.LeftPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.LeftPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraLeftPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera RightPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.RightPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraRightPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraRightPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.RightPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.RightPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraRightPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera TopPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.TopPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraTopPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraTopPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.TopPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.TopPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraTopPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera BottomPlaneDistance.")]
+ [Property("SPEC", "Tizen.NUI.Camera.BottomPlaneDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraBottomPlaneDistance()
+ {
+ tlog.Debug(tag, $"CameraBottomPlaneDistance START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.BottomPlaneDistance = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.BottomPlaneDistance, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraBottomPlaneDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera TargetPosition.")]
+ [Property("SPEC", "Tizen.NUI.Camera.TargetPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraTargetPosition()
+ {
+ tlog.Debug(tag, $"CameraTargetPosition START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.TargetPosition = new Vector3(0.3f, 0.5f, 0.0f);
+ Assert.AreEqual(0.3f, testingTarget.TargetPosition.X, "Should be equal!");
+ Assert.AreEqual(0.5f, testingTarget.TargetPosition.Y, "Should be equal!");
+ Assert.AreEqual(0.0f, testingTarget.TargetPosition.Z, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraTargetPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera ProjectionMatrix.")]
+ [Property("SPEC", "Tizen.NUI.Camera.ProjectionMatrix A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraProjectionMatrix()
+ {
+ tlog.Debug(tag, $"CameraProjectionMatrix START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ var result = testingTarget.ProjectionMatrix;
+ Assert.AreEqual(1, result.GetXAxis().X, "Should be equal!");
+ Assert.AreEqual(0, result.GetXAxis().Y, "Should be equal!");
+ Assert.AreEqual(0, result.GetXAxis().Z, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraProjectionMatrix END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera ViewMatrix.")]
+ [Property("SPEC", "Tizen.NUI.Camera.ViewMatrix A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraViewMatrix()
+ {
+ tlog.Debug(tag, $"CameraViewMatrix START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ var result = testingTarget.ViewMatrix;
+ Assert.AreEqual(1, result.GetXAxis().X, "Should be equal!");
+ Assert.AreEqual(0, result.GetXAxis().Y, "Should be equal!");
+ Assert.AreEqual(0, result.GetXAxis().Z, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraViewMatrix END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Camera InvertYAxis.")]
+ [Property("SPEC", "Tizen.NUI.Camera.InvertYAxis A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CameraInvertYAxis()
+ {
+ tlog.Debug(tag, $"CameraInvertYAxis START");
+
+ var testingTarget = new Camera();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Camera>(testingTarget, "Should be an Instance of Camera!");
+
+ testingTarget.InvertYAxis = true;
+ Assert.AreEqual(true, testingTarget.InvertYAxis, "Should be equal!");
+
+ testingTarget.InvertYAxis = false;
+ Assert.AreEqual(false, testingTarget.InvertYAxis, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"CameraInvertYAxis END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ColorCutQuantizer")]
+ public class InternalColorCutQuantizerTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorCutQuantizer FromBitmap .")]
+ [Property("SPEC", "Tizen.NUI.ColorCutQuantizer.FromBitmap M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorCutQuantizerFromBitmap()
+ {
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmap START");
+
+ using (PixelBuffer pixelBuffer = new PixelBuffer(100, 200, PixelFormat.RGBA8888))
+ {
+ using (Rectangle region = new Rectangle())
+ {
+ var testingTarget = ColorCutQuantizer.FromBitmap(pixelBuffer, region, 255);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorCutQuantizer>(testingTarget, "Should be an Instance of ColorCutQuantizer!");
+ }
+ }
+
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmap END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorCutQuantizer FromBitmap. MaxColor < 1.")]
+ [Property("SPEC", "Tizen.NUI.ColorCutQuantizer.FromBitmap M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorCutQuantizerFromBitmapWithMaxColorLessThan1()
+ {
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmapWithMaxColorLessThan1 START");
+
+ using (PixelBuffer pixelBuffer = new PixelBuffer(100, 200, PixelFormat.RGBA8888))
+ {
+ using (Rectangle region = new Rectangle())
+ {
+ try
+ {
+ ColorCutQuantizer.FromBitmap(pixelBuffer, region, 0);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmapWithMaxColorLessThan1 END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorCutQuantizer FromBitmap. Region is null.")]
+ [Property("SPEC", "Tizen.NUI.ColorCutQuantizer.FromBitmap M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorCutQuantizerFromBitmapWithNullRegion()
+ {
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmapWithNullRegion START");
+
+ using (PixelBuffer pixelBuffer = new PixelBuffer(1, 2, PixelFormat.A8))
+ {
+ using (Rectangle region = null)
+ {
+ var testingTarget = ColorCutQuantizer.FromBitmap(pixelBuffer, region, 255);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorCutQuantizer>(testingTarget, "Should be an Instance of ColorCutQuantizer!");
+ }
+ }
+
+ tlog.Debug(tag, $"ColorCutQuantizerFromBitmapWithNullRegion END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorCutQuantizer GetQuantizedColors .")]
+ [Property("SPEC", "Tizen.NUI.ColorCutQuantizer.GetQuantizedColors M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorCutQuantizerGetQuantizedColors()
+ {
+ tlog.Debug(tag, $"ColorCutQuantizerGetQuantizedColors START");
+
+ using (PixelBuffer pixelBuffer = new PixelBuffer(100, 200, PixelFormat.A8))
+ {
+ using (Rectangle region = new Rectangle())
+ {
+ var testingTarget = ColorCutQuantizer.FromBitmap(pixelBuffer, region, 255);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorCutQuantizer>(testingTarget, "Should be an Instance of ColorCutQuantizer!");
+
+ try
+ {
+ testingTarget.GetQuantizedColors();
+ tlog.Debug(tag, "quantizedColors : " + testingTarget.GetQuantizedColors());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+ }
+
+ tlog.Debug(tag, $"ColorCutQuantizerGetQuantizedColors END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ColorHistogram")]
+ public class InternalColorHistogramTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorHistogram constructor.")]
+ [Property("SPEC", "Tizen.NUI.ColorHistogram.ColorHistogram C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorHistogramConstructor()
+ {
+ tlog.Debug(tag, $"ColorHistogramConstructor START");
+
+ int[] pixels = new int[3] { 16, 4, 20 };
+ var testingTarget = new ColorHistogram(pixels);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorHistogram>(testingTarget, "Should be an Instance of ColorHistogram!");
+
+ tlog.Debug(tag, $"ColorHistogramConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorHistogram GetNumberOfColors.")]
+ [Property("SPEC", "Tizen.NUI.ColorHistogram.GetNumberOfColors M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorHistogramGetNumberOfColors()
+ {
+ tlog.Debug(tag, $"ColorHistogramGetNumberOfColors START");
+
+ int[] pixels = new int[3] { 16, 4, 20 };
+ var testingTarget = new ColorHistogram(pixels);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorHistogram>(testingTarget, "Should be an Instance of ColorHistogram!");
+
+ try
+ {
+ testingTarget.GetNumberOfColors();
+ tlog.Debug(tag, "numberColors :" + testingTarget.GetNumberOfColors());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ColorHistogramGetNumberOfColors END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorHistogram GetColors.")]
+ [Property("SPEC", "Tizen.NUI.ColorHistogram.GetColors M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorHistogramGetColors()
+ {
+ tlog.Debug(tag, $"ColorHistogramGetColors START");
+
+ int[] pixels = new int[3] { 16, 4, 20 };
+ var testingTarget = new ColorHistogram(pixels);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorHistogram>(testingTarget, "Should be an Instance of ColorHistogram!");
+
+ try
+ {
+ testingTarget.GetColors();
+ tlog.Debug(tag, "colors :" + testingTarget.GetColors());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ColorHistogramGetColors END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorHistogram GetColorCounts.")]
+ [Property("SPEC", "Tizen.NUI.ColorHistogram.GetColorCounts M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorHistogramGetColorCounts()
+ {
+ tlog.Debug(tag, $"ColorHistogramGetColorCounts START");
+
+ int[] pixels = new int[3] { 16, 4, 20 };
+ var testingTarget = new ColorHistogram(pixels);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ColorHistogram>(testingTarget, "Should be an Instance of ColorHistogram!");
+
+ try
+ {
+ testingTarget.GetColorCounts();
+ tlog.Debug(tag, "colorCounts :" + testingTarget.GetColorCounts());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ColorHistogramGetColorCounts END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ColorUtils")]
+ public class InternalColorUtilsTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils RgbToXyz.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.RgbToXyz M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsRgbToXyz()
+ {
+ tlog.Debug(tag, $"ColorUtilsRgbToXyz START");
+
+ try
+ {
+ double[] outXyz = new double[3];
+ ColorUtils.RgbToXyz(10, 8, 133, outXyz);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught Exception: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsRgbToXyz END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorUtils RgbToXyz.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.RgbToXyz M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsRgbToXyzWithArgumentException()
+ {
+ tlog.Debug(tag, $"ColorUtilsRgbToXyzWithArgumentException START");
+
+ try
+ {
+ double[] outXyz = new double[2];
+ ColorUtils.RgbToXyz(10, 8, 133, outXyz);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorUtilsRgbToXyzWithArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils CalculateLuminance.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateLuminance M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateLuminance()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateLuminance START");
+
+ try
+ {
+ ColorUtils.CalculateLuminance(115);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught Exception: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsCalculateLuminance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils CalculateContrast.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateContrast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateContrast()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateContrast START");
+
+ try
+ {
+ ColorUtils.CalculateContrast(30, -2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsCalculateContrast END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorUtils CalculateContrast. ArgumentException.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateContrast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateContrastArgumentException()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateContrastArgumentException START");
+
+ try
+ {
+ ColorUtils.CalculateContrast(25, 0);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorUtilsCalculateContrastArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils SetAlphaComponent.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.SetAlphaComponent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsSetAlphaComponent()
+ {
+ tlog.Debug(tag, $"ColorUtilsSetAlphaComponent START");
+
+ try
+ {
+ ColorUtils.SetAlphaComponent(25, 111);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught Exception: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsSetAlphaComponent END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorUtils SetAlphaComponent. ArgumentException")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.SetAlphaComponent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsSetAlphaComponentArgumentException()
+ {
+ tlog.Debug(tag, $"ColorUtilsSetAlphaComponentArgumentException START");
+
+ try
+ {
+ ColorUtils.SetAlphaComponent(25, -1);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorUtilsSetAlphaComponentArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils CalculateMinimumAlpha.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateMinimumAlpha M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateMinimumAlpha()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateMinimumAlpha START");
+
+ try
+ {
+ ColorUtils.CalculateMinimumAlpha(25, -2, 0.3f);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Pass("Caught Exception: Passed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsCalculateMinimumAlpha END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorUtils CalculateMinimumAlpha. ArgumentException")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.CalculateMinimumAlpha M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsCalculateMinimumAlphaArgumentException()
+ {
+ tlog.Debug(tag, $"ColorUtilsCalculateMinimumAlphaArgumentException START");
+
+ try
+ {
+ ColorUtils.CalculateMinimumAlpha(25, 0, 0.3f);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ColorUtilsCalculateMinimumAlphaArgumentException END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils HslToRgb.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.HslToRgb M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsHslToRgb()
+ {
+ tlog.Debug(tag, $"ColorUtilsHslToRgb START");
+
+ try
+ {
+ float[] hsl0 = { 10.0f, 200.0f, 500.0f };
+ ColorUtils.HslToRgb(hsl0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl1 = { 60.0f, 210.0f, 510.0f };
+ ColorUtils.HslToRgb(hsl1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl2 = { 120.0f, 220.0f, 520.0f };
+ ColorUtils.HslToRgb(hsl2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl3 = { 180.0f, 230.0f, 530.0f };
+ ColorUtils.HslToRgb(hsl3);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl4 = { 240.0f, 240.0f, 540.0f };
+ ColorUtils.HslToRgb(hsl4);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl5 = { 300.0f, 250.0f, 550.0f };
+ ColorUtils.HslToRgb(hsl5);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ try
+ {
+ float[] hsl6 = { 360.0f, 260.0f, 560.0f };
+ ColorUtils.HslToRgb(hsl6);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caugth Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ColorUtilsHslToRgb END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorUtils GetBytesPerPixel.")]
+ [Property("SPEC", "Tizen.NUI.ColorUtils.GetBytesPerPixel M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ColorUtilsGetBytesPerPixel()
+ {
+ tlog.Debug(tag, $"ColorUtilsGetBytesPerPixel START");
+
+ var result = ColorUtils.GetBytesPerPixel(PixelFormat.RGBA4444);
+ Assert.AreEqual(2, result, "Should be equal!");
+
+ result = ColorUtils.GetBytesPerPixel(PixelFormat.RGB888);
+ Assert.AreEqual(3, result, "Should be equal!");
+
+ result = ColorUtils.GetBytesPerPixel(PixelFormat.BGR8888);
+ Assert.AreEqual(4, result, "Should be equal!");
+
+ result = ColorUtils.GetBytesPerPixel(0);
+ Assert.AreEqual(0, result, "Should be equal!");
+
+ tlog.Debug(tag, $"ColorUtilsGetBytesPerPixel END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ConnectionTracker")]
+ public class InternalConnectionTrackerTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ConnectionTracker constructor.")]
+ [Property("SPEC", "Tizen.NUI.ConnectionTracker.ConnectionTracker C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ConnectionTrackerConstructor()
+ {
+ tlog.Debug(tag, $"ConnectionTrackerConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ConnectionTracker(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ConnectionTracker>(testingTarget, "Should be an Instance of ConnectionTracker!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ConnectionTrackerConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ConnectionTracker GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.ConnectionTracker.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ConnectionTrackerGetConnectionCount()
+ {
+ tlog.Debug(tag, $"ConnectionTrackerGetConnectionCount START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ConnectionTracker(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ConnectionTracker>(testingTarget, "Should be an Instance of ConnectionTracker!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ConnectionTrackerGetConnectionCount END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ConnectionTrackerInterface")]
+ public class InternalConnectionTrackerInterfaceTest
+ {
+ private const string tag = "NUITEST";
+ private delegate bool dummyCallback(IntPtr pageTurnSignal);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+
+ internal class MyConnectionTrackerInterface : ConnectionTrackerInterface
+ {
+ public MyConnectionTrackerInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ConnectionTrackerInterface constructor.")]
+ [Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.ConnectionTrackerInterface C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ConnectionTrackerInterfaceConstructor()
+ {
+ tlog.Debug(tag, $"ConnectionTrackerInterfaceConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ConnectionTrackerInterface(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ConnectionTrackerInterfaceConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ConnectionTrackerInterface getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ConnectionTrackerInterfacegetCPtr()
+ {
+ tlog.Debug(tag, $"ConnectionTrackerInterfacegetCPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new MyConnectionTrackerInterface(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
+
+ try
+ {
+ ConnectionTrackerInterface.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ConnectionTrackerInterfacegetCPtr END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("ConnectionTrackerInterface SignalConnected.")]
+ //[Property("SPEC", "Tizen.NUI.ConnectionTrackerInterface.SignalConnected M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void ConnectionTrackerInterfaceSignalConnected()
+ //{
+ // tlog.Debug(tag, $"ConnectionTrackerInterfaceSignalConnected START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new ConnectionTrackerInterface(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<ConnectionTrackerInterface>(testingTarget, "Should be an Instance of ConnectionTrackerInterface!");
+
+ // try
+ // {
+ // var slotObserver = new SlotObserver(testingTarget.SwigCPtr.Handle, false);
+ // var callback = new SWIGTYPE_p_CallbackBase(testingTarget.SwigCPtr.Handle);
+ // testingTarget.SignalConnected(slotObserver, callback);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"ConnectionTrackerInterfaceSignalConnected END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/CreateWidgetFunction")]
+ public class InternalCreateWidgetFunctionTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyCreateWidgetFunction : CreateWidgetFunction
+ {
+ public MyCreateWidgetFunction() : base()
+ { }
+
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CreateWidgetFunction constructor.")]
+ [Property("SPEC", "Tizen.NUI.CreateWidgetFunction.CreateWidgetFunction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CreateWidgetFunctionConstructor()
+ {
+ tlog.Debug(tag, $"CreateWidgetFunctionConstructor START");
+
+ var testingTarget = new MyCreateWidgetFunction();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CreateWidgetFunction>(testingTarget, "Should be an Instance of CreateWidgetFunction!");
+
+ tlog.Debug(tag, $"CreateWidgetFunctionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("CreateWidgetFunction constructor. With IntPtr.")]
+ [Property("SPEC", "Tizen.NUI.CreateWidgetFunction.CreateWidgetFunction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void CreateWidgetFunctionConstructorWithIntPtr()
+ {
+ tlog.Debug(tag, $"CreateWidgetFunctionConstructorWithIntPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new CreateWidgetFunction(view.SwigCPtr.Handle);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<CreateWidgetFunction>(testingTarget, "Should be an Instance of CreateWidgetFunction!");
+ }
+
+ tlog.Debug(tag, $"CreateWidgetFunctionConstructorWithIntPtr END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/EnvironmentVariable")]
+ public class InternalEnvironmentVariableTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EnvironmentVariable GetEnvironmentVariable .")]
+ [Property("SPEC", "Tizen.NUI.EnvironmentVariable.GetEnvironmentVariable M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void EnvironmentVariableGetEnvironmentVariable()
+ {
+ tlog.Debug(tag, $"EnvironmentVariableGetEnvironmentVariable START");
+
+ var testingTarget = EnvironmentVariable.GetEnvironmentVariable("path");
+ tlog.Debug(tag, "path : " + testingTarget);
+
+ tlog.Debug(tag, $"EnvironmentVariableGetEnvironmentVariable END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EnvironmentVariable SetEnvironmentVariable .")]
+ [Property("SPEC", "Tizen.NUI.EnvironmentVariable.SetEnvironmentVariable M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void EnvironmentVariableSetEnvironmentVariable()
+ {
+ tlog.Debug(tag, $"EnvironmentVariableSetEnvironmentVariable START");
+
+ EnvironmentVariable.SetEnvironmentVariable("path", Tizen.Applications.Application.Current.DirectoryInfo.Resource);
+ tlog.Debug(tag, "path : " + EnvironmentVariable.GetEnvironmentVariable("path"));
+
+ tlog.Debug(tag, $"EnvironmentVariableSetEnvironmentVariable END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/GaussianBlurViewSignal")]
+ public class InternalGaussianBlurViewSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr gaussianBlurViewSignal);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.GaussianBlurViewSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalConstructor()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new GaussianBlurViewSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalEmpty()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalEmpty START");
+
+ var testingTarget = new GaussianBlurViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalGetConnectionCount START");
+
+ var testingTarget = new GaussianBlurViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalConnect()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalConnect START");
+
+ var testingTarget = new GaussianBlurViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ try
+ {
+ dummyCallback callback = OnDummyCallback;
+ testingTarget.Connect(callback);
+ testingTarget.Disconnect(callback);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GaussianBlurViewSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.GaussianBlurViewSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void GaussianBlurViewSignalEmit()
+ {
+ tlog.Debug(tag, $"GaussianBlurViewSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new GaussianBlurViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<GaussianBlurViewSignal>(testingTarget, "Should be an Instance of GaussianBlurViewSignal!");
+
+ try
+ {
+ testingTarget.Emit(new GaussianBlurView(view.SwigCPtr.Handle, false));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"GaussianBlurViewSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/Item")]
+ public class InternalItemTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item constructor.")]
+ [Property("SPEC", "Tizen.NUI.Item.Item C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructor()
+ {
+ tlog.Debug(tag, $"ItemConstructor START");
+
+ var testingTarget = new Item();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item constructor. With View.")]
+ [Property("SPEC", "Tizen.NUI.Item.Item C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructorWithView()
+ {
+ tlog.Debug(tag, $"ItemConstructorWithView START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new Item(2, view);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemConstructorWithView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item constructor. With Item.")]
+ [Property("SPEC", "Tizen.NUI.Item.Item C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructorWithItem()
+ {
+ tlog.Debug(tag, $"ItemConstructorWithItem START");
+
+ using (View view = new View())
+ {
+ using (Item item = new Item(2, view))
+ {
+ var testingTarget = new Item(item);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemConstructorWithItem END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item first.")]
+ [Property("SPEC", "Tizen.NUI.Item.first A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructorFirst()
+ {
+ tlog.Debug(tag, $"ItemConstructorFirst START");
+
+ using (View view = new View())
+ {
+ using (Item item = new Item(2, view))
+ {
+ var testingTarget = new Item(item);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ Assert.AreEqual(2, testingTarget.first, "should be equal!");
+
+ testingTarget.first = 1;
+ Assert.AreEqual(1, testingTarget.first, "should be equal!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemConstructorFirst END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Item second.")]
+ [Property("SPEC", "Tizen.NUI.Item.second A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemConstructorSecond()
+ {
+ tlog.Debug(tag, $"ItemConstructorSecond START");
+
+ using (View view = new View())
+ {
+ using (Item item = new Item(2, view))
+ {
+ var testingTarget = new Item(item);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Item>(testingTarget, "Should be an Instance of Item!");
+
+ var result = testingTarget.second;
+ Assert.IsInstanceOf<View>(testingTarget.second, "Should be an Instance of View!");
+
+ using (View view2 = new View())
+ {
+ testingTarget.second = view2;
+ Assert.IsNotNull(testingTarget.second, "Should be not null!");
+ Assert.IsInstanceOf<View>(testingTarget.second, "Should be an Instance of View!");
+ }
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemConstructorSecond END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemCollection")]
+ public class InternalItemCollectionTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructor()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructor START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.IsFalse(testingTarget.IsFixedSize);
+ Assert.IsFalse(testingTarget.IsReadOnly);
+ Assert.IsFalse(testingTarget.IsSynchronized);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection constructor. With ItemCollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructorWithItemCollection()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructorWithItemCollection START");
+
+ using (ItemCollection itemCollection = new ItemCollection())
+ {
+ var testingTarget = new ItemCollection(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionConstructorWithItemCollection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection constructor. With capacity.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructorWithCapacity()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructorWithCapacity START");
+
+ var testingTarget = new ItemCollection(5);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionConstructorWithCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection constructor. With ICollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructorWithICollection()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructorWithICollection START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.AreEqual(4, testingTarget.Count, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionConstructorWithICollection END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection constructor. With null ICollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionConstructorWithNullICollection()
+ {
+ tlog.Debug(tag, $"ItemCollectionConstructorWithNullICollection START");
+
+ global::System.Collections.ICollection c = null;
+
+ try
+ {
+ new ItemCollection(c);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ItemCollectionConstructorWithNullICollection END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Clear.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionClear()
+ {
+ tlog.Debug(tag, $"ItemCollectionClear START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+ tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
+
+
+ try
+ {
+ testingTarget.Clear();
+ tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionClear END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection this.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.this A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionGetVauleByIndex()
+ {
+ tlog.Debug(tag, $"ItemCollectionGetVauleByIndex START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget[2].first = 3;
+ Assert.AreEqual(3, testingTarget[2].first, "Should be equal!");
+
+ try
+ {
+ testingTarget[1] = new Item(testingTarget[2]);
+ Assert.AreEqual(3, testingTarget[1].first, "Should be equal!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionGetVauleByIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Capacity.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Capacity A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCapacity()
+ {
+ tlog.Debug(tag, $"ItemCollectionCapacity START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.AreEqual(4, testingTarget.Capacity, "Should be equal!");
+
+ testingTarget.Capacity = 8;
+ Assert.AreEqual(8, testingTarget.Capacity, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection Capacity. Set exception.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Capacity A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCapacitySetException()
+ {
+ tlog.Debug(tag, $"ItemCollectionCapacitySetException START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.AreEqual(4, testingTarget.Capacity, "Should be equal!");
+
+ try
+ {
+ testingTarget.Capacity = 2;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCapacitySetException END (OK)");
+ Assert.Pass("Caught ArgumentOutOfRangeException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection CopyTo.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyTo()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyTo START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Item[] array = new Item[4];
+
+ try
+ {
+ testingTarget.CopyTo(array);
+ Assert.IsNotNull(array[1], "Should be not null!");
+ Assert.IsInstanceOf<Item>(array[1], "Should be an Instance of Item!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection CopyTo. With arrayIndex.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithArrayIndex()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithArrayIndex START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(new Item[2], 0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithArrayIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection CopyTo. With null array.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithNullArray()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithNullArray START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(null, 0);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithNullArray END (OK)");
+ Assert.Fail("Caught ArgumentNullException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection CopyTo. ArrayIndex < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithArrayIndexLessThan0()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithArrayIndexLessThan0 START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(new Item[2], -1);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithArrayIndexLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection CopyTo. Elements too large.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithLargerElements()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithLargerElements START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Item[] array = new Item[4];
+
+ try
+ {
+ testingTarget.CopyTo(array, 2);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithLargerElements END (OK)");
+ Assert.Fail("Caught ArgumentException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection CopyTo. Index < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithIndexLessThan0()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithIndexLessThan0 START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(-1, new Item[2], 0, 1);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithIndexLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection CopyTo. Count < zero.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionCopyToWithCountLessThan0()
+ {
+ tlog.Debug(tag, $"ItemCollectionCopyToWithCountLessThan0 START");
+
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.Add(new Item());
+ Assert.AreEqual(1, testingTarget.Count, "Should be equal!");
+
+ try
+ {
+ testingTarget.CopyTo(0, new Item[2], 0, -1);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionCopyToWithCountLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException: Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection GetEnumerator.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.GetEnumerator M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionGetEnumerator()
+ {
+ tlog.Debug(tag, $"ItemCollectionGetEnumerator START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ var result = testingTarget.GetEnumerator();
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(result, "Should be an Instance of ItemCollectionEnumerator!");
+
+ tlog.Debug(tag, $"ItemCollectionGetEnumerator END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection.ItemCollectionEnumerator constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.ItemCollectionEnumerator C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONTSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorConstructor()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorConstructor START");
+
+ using (ItemCollection itemCollection = new ItemCollection())
+ {
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection.ItemCollectionEnumerator Current. currentIndex == -1.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.Current A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorCurrent()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorCurrent START");
+
+ using (ItemCollection itemCollection = new ItemCollection())
+ {
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ try
+ {
+ tlog.Debug(tag, "Current : " + testingTarget.Current);
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorCurrent END (OK)");
+ Assert.Pass("Caught InvalidOperationException : passed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorCurrent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection.ItemCollectionEnumerator MoveNext.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.MoveNext M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorMoveNext()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorMoveNext START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var itemCollection = new ItemCollection(c);
+ Assert.IsNotNull(itemCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(itemCollection, "Should be an Instance of ItemCollection!");
+
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ try
+ {
+ testingTarget.MoveNext();
+ var result = testingTarget.Current;
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<Item>(result, "Should be an Instance of Item!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorMoveNext END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemCollection.ItemCollectionEnumerator MoveNext. Object is null.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.MoveNext M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorMoveNextNullObject()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorMoveNextNullObject START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var itemCollection = new ItemCollection(c);
+ Assert.IsNotNull(itemCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(itemCollection, "Should be an Instance of ItemCollection!");
+
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ try
+ {
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ var result = testingTarget.Current;
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorMoveNextNullObject END (OK)");
+ Assert.Pass("Caught InvalidOperationException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection.ItemCollectionEnumerator Reset.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.ItemCollectionEnumerator.Reset M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionItemCollectionEnumeratorReset()
+ {
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorReset START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var itemCollection = new ItemCollection(c);
+ Assert.IsNotNull(itemCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(itemCollection, "Should be an Instance of ItemCollection!");
+
+ var testingTarget = new ItemCollection.ItemCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection.ItemCollectionEnumerator>(testingTarget, "Should be an Instance of ItemCollectionEnumerator!");
+
+ testingTarget.MoveNext();
+
+ try
+ {
+ testingTarget.Reset();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemCollectionItemCollectionEnumeratorReset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection AddRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.AddRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionAddRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionAddRange START");
+
+ using (ItemCollection itemCollection = new ItemCollection(5))
+ {
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ try
+ {
+ testingTarget.AddRange(itemCollection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionAddRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection GetRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.GetRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionGetRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionGetRange START");
+
+ using (ItemCollection itemCollection = new ItemCollection(5))
+ {
+ var testingTarget = new ItemCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ testingTarget.AddRange(itemCollection);
+
+ try
+ {
+ var result = testingTarget.GetRange(0, 0);
+ Assert.IsInstanceOf<ItemCollection>(result, "Should be an Instance of ItemCollection!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionGetRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Insert.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Insert M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionInsert()
+ {
+ tlog.Debug(tag, $"ItemCollectionInsert START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Insert(4, new Item());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemCollectionInsert END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection InsertRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.InsertRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionInsertRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionInsertRange START");
+
+ using (ItemCollection value = new ItemCollection(3))
+ {
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 10;
+
+ try
+ {
+ testingTarget.InsertRange(4, value);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionInsertRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection RemoveAt.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.RemoveAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionRemoveAt()
+ {
+ tlog.Debug(tag, $"ItemCollectionRemoveAt START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.RemoveAt(3);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionRemoveAt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection RemoveRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.RemoveRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionRemoveRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionRemoveRange START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.RemoveRange(1, 2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionRemoveRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Repeat.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Repeat M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionRepeat()
+ {
+ tlog.Debug(tag, $"ItemCollectionRepeat START");
+
+ var testingTarget = ItemCollection.Repeat(new Item(), 6);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemCollection>(testingTarget, "Should be an Instance of ItemCollection!");
+
+ Assert.AreEqual(6, testingTarget.Capacity, "Should be equal!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionRepeat END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection SetRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.SetRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionSetRange()
+ {
+ tlog.Debug(tag, $"ItemCollectionSetRange START");
+
+ using (ItemCollection itemCollection = new ItemCollection(5))
+ {
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ try
+ {
+ testingTarget.SetRange(1, itemCollection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemCollectionSetRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Reverse.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Reverse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionReverse()
+ {
+ tlog.Debug(tag, $"ItemCollectionReverse START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Reverse();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionReverse END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemCollection Reverse. With parameters.")]
+ [Property("SPEC", "Tizen.NUI.ItemCollection.Reverse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemCollectionReverseWithParameters()
+ {
+ tlog.Debug(tag, $"ItemCollectionReverseWithParameters START");
+
+ Item[] b = new Item[] { new Item(), new Item(), new Item(), new Item() };
+ global::System.Collections.ICollection c = b;
+ var testingTarget = new ItemCollection(c);
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Reverse(1, 2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemCollectionReverseWithParameters END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemFactory")]
+ public class InternalItemFactoryTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyItemFactory : ItemFactory
+ {
+ public MyItemFactory() : base()
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemFactory constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemFactory.ItemFactory C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemFactoryConstructor()
+ {
+ tlog.Debug(tag, $"ItemFactoryConstructor START");
+
+ var testingTarget = new ItemFactory();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemFactory>(testingTarget, "Should be an Instance of ItemFactory!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemFactoryConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemFactory getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.ItemFactory.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemFactorygetCPtr()
+ {
+ tlog.Debug(tag, $"ItemFactorygetCPtr START");
+
+ var testingTarget = new ItemFactory();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemFactory>(testingTarget, "Should be an Instance of ItemFactory!");
+
+ try
+ {
+ ItemFactory.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemFactorygetCPtr END (OK)");
+ }
+
+
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemIdCollection")]
+ public class InternalItemIdCollectionTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyItemIdCollection : ItemIdCollection
+ {
+ public MyItemIdCollection() : base()
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionConstructor()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionConstructor START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ Assert.IsFalse(testingTarget.IsFixedSize);
+ Assert.IsFalse(testingTarget.IsReadOnly);
+ Assert.IsFalse(testingTarget.IsSynchronized);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection constructor. With ItemIdCollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionConstructorWithItemIdCollection()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithItemIdCollection START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var itemIdCollection = new ItemIdCollection(c);
+ Assert.IsNotNull(itemIdCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
+
+ var testingTarget = new ItemIdCollection(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ itemIdCollection.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithItemIdCollection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection constructor. With capacity.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionConstructorWithCapacity()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithCapacity START");
+
+ var testingTarget = new ItemIdCollection(5);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemIdCollection constructor. Null ICollection.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionConstructorWithNullICollection()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithNullICollection START");
+
+ global::System.Collections.ICollection c = null;
+
+ try
+ {
+ new ItemIdCollection(c);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ItemIdCollectionConstructorWithNullICollection END (OK)");
+ Assert.Pass("Caught ArgumentNullException : passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectiongetCPtr()
+ {
+ tlog.Debug(tag, $"ItemIdCollectiongetCPtr START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ ItemIdCollection.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectiongetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection this.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.this A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionThis()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionThis START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ tlog.Debug(tag, testingTarget[1].ToString());
+
+ testingTarget[2] = 5;
+ tlog.Debug(tag, testingTarget[2].ToString());
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionThis END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Capacity.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Capacity A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCapacity()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCapacity START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
+
+ testingTarget.Capacity = 5;
+ tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemIdCollection Capacity. Set value < size.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Capacity A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCapacitySetValueLessThanSize()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCapacitySetValueLessThanSize START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ tlog.Debug(tag, "Count : " + testingTarget.Count);
+ tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
+
+ try
+ {
+ testingTarget.Capacity = 3;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCapacitySetValueLessThanSize END (OK)");
+ Assert.Pass("Caught ArgumentOutOfRangeException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyTo()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyTo START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ uint[] array = new uint[4];
+
+ try
+ {
+ testingTarget.CopyTo(array);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionCopyTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. With arrayIndex.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithArrayIndex()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndex START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ uint[] array = new uint[4];
+
+ try
+ {
+ testingTarget.CopyTo(array, 0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. With null array.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithNullArray()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithNullArray START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ testingTarget.CopyTo(null);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithNullArray END (OK)");
+ Assert.Fail("Caught ArgumentNullException : Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. index < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithIndexLessThan0()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithIndexLessThan0 START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ uint[] array = new uint[4];
+ testingTarget.CopyTo(-1, array, 0, testingTarget.Count);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithIndexLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. arrayIndex < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithArrayIndexLessThan0()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndexLessThan0 START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ uint[] array = new uint[4];
+ testingTarget.CopyTo(0, array, -1, testingTarget.Count);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndexLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection CopyTo. count < 0.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionCopyToWithCountLessThan0()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithCountLessThan0 START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ uint[] array = new uint[4];
+ testingTarget.CopyTo(0, array, 0, -1);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionCopyToWithCountLessThan0 END (OK)");
+ Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection GetEnumerator.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.GetEnumerator M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionGetEnumerator()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionGetEnumerator START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ var result = testingTarget.GetEnumerator();
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(result, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ tlog.Debug(tag, $"ItemIdCollectionGetEnumerator END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.ItemIdCollectionEnumerator C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONTSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorConstructor()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorConstructor START");
+
+ using (ItemIdCollection itemIdCollection = new ItemIdCollection())
+ {
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator Current. currentIndex == -1.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.Current A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorCurrent()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorCurrent START");
+
+ using (ItemIdCollection itemCollection = new ItemIdCollection())
+ {
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ try
+ {
+ tlog.Debug(tag, "Current : " + testingTarget.Current);
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorCurrent END (OK)");
+ Assert.Pass("Caught InvalidOperationException : passed!");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator MoveNext.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.MoveNext M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorMoveNext()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNext START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var itemIdCollection = new ItemIdCollection(c);
+ Assert.IsNotNull(itemIdCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
+
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ try
+ {
+ testingTarget.MoveNext();
+ var result = testingTarget.Current;
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<uint>(result, "Should be an Instance of uint!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNext END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator MoveNext. Object is null.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.MoveNext M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorMoveNextNullObject()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNextNullObject START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var itemIdCollection = new ItemIdCollection(c);
+ Assert.IsNotNull(itemIdCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
+
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ try
+ {
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ testingTarget.MoveNext();
+ var result = testingTarget.Current;
+ }
+ catch (InvalidOperationException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNextNullObject END (OK)");
+ Assert.Pass("Caught InvalidOperationException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection.ItemIdCollectionEnumerator Reset.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.Reset M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionEnumeratorReset()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorReset START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var itemIdCollection = new ItemIdCollection(c);
+ Assert.IsNotNull(itemIdCollection, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
+
+ var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
+
+ testingTarget.MoveNext();
+
+ try
+ {
+ testingTarget.Reset();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionEnumeratorReset END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Clear.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionClear()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionClear START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+ tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
+
+ try
+ {
+ testingTarget.Clear();
+ tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionClear END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection AddRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.AddRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionAddRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionAddRange START");
+
+ using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
+ {
+ var testingTarget = new ItemIdCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ testingTarget.AddRange(itemIdCollection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionAddRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection GetRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.GetRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionGetRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionGetRange START");
+
+ using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
+ {
+ var testingTarget = new ItemIdCollection();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.AddRange(itemIdCollection);
+
+ try
+ {
+ var result = testingTarget.GetRange(0, 0);
+ Assert.IsInstanceOf<ItemIdCollection>(result, "Should be an Instance of ItemIdCollection!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionGetRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Insert.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Insert M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionInsert()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionInsert START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Insert(4, 5);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionInsert END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection InsertRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.InsertRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionInsertRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionInsertRange START");
+
+ using (ItemIdCollection value = new ItemIdCollection(3))
+ {
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 10;
+
+ try
+ {
+ testingTarget.InsertRange(3, value);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionInsertRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection RemoveAt.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.RemoveAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionRemoveAt()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionRemoveAt START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.RemoveAt(3);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionRemoveAt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection RemoveRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.RemoveRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionRemoveRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionRemoveRange START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.RemoveRange(1, 2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionRemoveRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Repeat.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Repeat M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionRepeat()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionRepeat START");
+
+ var testingTarget = ItemIdCollection.Repeat(6, 4);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ Assert.AreEqual(4, testingTarget.Capacity, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionRepeat END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection SetRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.SetRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionSetRange()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionSetRange START");
+
+ using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
+ {
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ try
+ {
+ testingTarget.SetRange(1, itemIdCollection);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemIdCollectionSetRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Reverse.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Reverse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionReverse()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionReverse START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Reverse();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionReverse END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Reverse. With parameters.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Reverse M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionReverseWithParameters()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionReverseWithParameters START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ try
+ {
+ testingTarget.Reverse(1, 2);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemIdCollectionReverseWithParameters END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Contains.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Contains M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionContains()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionContains START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ Assert.IsTrue(testingTarget.Contains(2));
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionContains END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection IndexOf.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.IndexOf M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionIndexOf()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionIndexOf START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ Assert.AreEqual(2, testingTarget.IndexOf(3), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionIndexOf END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection LastIndexOf.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.LastIndexOf M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionLastIndexOf()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionLastIndexOf START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4, 3 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ Assert.AreEqual(4, testingTarget.LastIndexOf(3), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionLastIndexOf END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemIdCollection Remove.")]
+ [Property("SPEC", "Tizen.NUI.ItemIdCollection.Remove M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemIdCollectionRemove()
+ {
+ tlog.Debug(tag, $"ItemIdCollectionRemove START");
+
+ uint[] itemId = new uint[] { 1, 2, 3, 4, 3 };
+ global::System.Collections.ICollection c = itemId;
+
+ var testingTarget = new ItemIdCollection(c);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
+
+ testingTarget.Capacity = 5;
+
+ Assert.AreEqual(true, testingTarget.Remove(3), "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemIdCollectionRemove END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemLayout")]
+ public class PublicItemLayoutTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyItemLayout : ItemLayout
+ {
+ public MyItemLayout(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemLayout constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemLayout.ItemLayout C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemLayoutConstructor()
+ {
+ tlog.Debug(tag, $"ItemLayoutConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ItemLayout(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemLayout>(testingTarget, "Should be an Instance of ItemLayout!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemLayoutConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemLayout getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.ItemLayout.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemLayoutgetCPtr()
+ {
+ tlog.Debug(tag, $"ItemLayoutgetCPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new MyItemLayout(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemLayout>(testingTarget, "Should be an Instance of ItemLayout!");
+
+ try
+ {
+ ItemLayout.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemLayoutgetCPtr END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemRange")]
+ public class InternalItemRangeTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.ItemRange C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeConstructor()
+ {
+ tlog.Debug(tag, $"ItemRangeConstructor START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemRangeConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange constructor. With ItemRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.ItemRange C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeConstructorWithItemRange()
+ {
+ tlog.Debug(tag, $"ItemRangeConstructorWithItemRange START");
+
+ using (ItemRange copy = new ItemRange(0, 300))
+ {
+ var testingTarget = new ItemRange(copy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemRangeConstructorWithItemRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange Assign.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeAssign()
+ {
+ tlog.Debug(tag, $"ItemRangeAssign START");
+
+ using (ItemRange range = new ItemRange(0, 300))
+ {
+ using (ItemRange copy = new ItemRange(range))
+ {
+ var testingTarget = range.Assign(copy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemRangeAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange Within.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.Within M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeWithin()
+ {
+ tlog.Debug(tag, $"ItemRangeWithin START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ var result = testingTarget.Within(50);
+ Assert.IsTrue(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemRangeWithin END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange Intersection.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.Intersection M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeIntersection()
+ {
+ tlog.Debug(tag, $"ItemRangeIntersection START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ using (ItemRange second = new ItemRange(300, 500))
+ {
+ var result = testingTarget.Intersection(second);
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(result, "Should be an Instance of ItemRange!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ItemRangeIntersection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange begin.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.begin A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeBegin()
+ {
+ tlog.Debug(tag, $"ItemRangeBegin START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ Assert.AreEqual(0, testingTarget.begin, "Should be equal!");
+ testingTarget.begin = 100;
+ Assert.AreEqual(100, testingTarget.begin, "Should be equal!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemRangeBegin END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemRange end.")]
+ [Property("SPEC", "Tizen.NUI.ItemRange.end C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemRangeEnd()
+ {
+ tlog.Debug(tag, $"ItemRangeEnd START");
+
+ var testingTarget = new ItemRange(0, 300);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemRange>(testingTarget, "Should be an Instance of ItemRange!");
+
+ Assert.AreEqual(300, testingTarget.end, "Should be equal!");
+ testingTarget.end = 500;
+ Assert.AreEqual(500, testingTarget.end, "Should be equal!");
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"ItemRangeEnd END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/ItemView")]
+ public class InternalItemViewTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView constructor.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.ItemView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewConstructor()
+ {
+ tlog.Debug(tag, $"ItemViewConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new ItemView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView constructor. With ItemFactory.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Layout C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewConstructorWithItemFactory()
+ {
+ tlog.Debug(tag, $"ItemViewConstructorWithItemFactory START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewConstructorWithItemFactory END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView Layout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Layout A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewLayout()
+ {
+ tlog.Debug(tag, $"ItemViewLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ using (PropertyArray propertyArray = new PropertyArray())
+ {
+ propertyArray.Add(new PropertyValue(new Size2D(100, 80)));
+ testingTarget.Layout = propertyArray;
+
+ try
+ {
+ testingTarget.Layout = propertyArray;
+ tlog.Debug(tag, "Layout : " + testingTarget.Layout);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView AddLayout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.AddLayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewAddLayout()
+ {
+ tlog.Debug(tag, $"ItemViewAddLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewAddLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView RemoveLayout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.RemoveLayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewRemoveLayout()
+ {
+ tlog.Debug(tag, $"ItemViewRemoveLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
+ tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
+
+ try
+ {
+ testingTarget.RemoveLayout((uint)testingTarget.LayoutPosition);
+ tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewRemoveLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView DownCast.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Layout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewDownCast()
+ {
+ tlog.Debug(tag, $"ItemViewDownCast START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView view = new ItemView(factory))
+ {
+ var testingTarget = ItemView.DownCast(view);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView GetLayout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.GetLayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewGetLayout()
+ {
+ tlog.Debug(tag, $"ItemViewGetLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
+
+ try
+ {
+ testingTarget.GetLayout((uint)testingTarget.LayoutPosition);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewGetLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView GetActiveLayout.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.GetActiveLayout M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewGetActiveLayout()
+ {
+ tlog.Debug(tag, $"ItemViewGetActiveLayout START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
+
+ try
+ {
+ testingTarget.GetActiveLayout();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewGetActiveLayout END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView InsertItem.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.InsertItem M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewInsertItem()
+ {
+ tlog.Debug(tag, $"ItemViewInsertItem START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ try
+ {
+ using (Item item = new Item())
+ {
+ testingTarget.InsertItem(new Item(), 30.0f);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewInsertItem END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView RemoveItem.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.RemoveItem M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewRemoveItem()
+ {
+ tlog.Debug(tag, $"ItemViewRemoveItem START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ using (Item item = new Item())
+ {
+ testingTarget.InsertItem(item, 30.0f);
+
+ var id = testingTarget.GetLayoutCount() - 1;
+ testingTarget.RemoveItem(id, 0.5f);
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewRemoveItem END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SetItemsAnchorPoint.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SetItemsAnchorPoint M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSetItemsAnchorPoint()
+ {
+ tlog.Debug(tag, $"ItemViewSetItemsAnchorPoint START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ using (Vector3 vector = new Vector3(100.0f, 30.0f, 200.0f))
+ {
+ testingTarget.SetItemsAnchorPoint(vector);
+ Assert.AreEqual(100.0f, testingTarget.GetItemsAnchorPoint().X, "Should be equal!");
+ Assert.AreEqual(30.0f, testingTarget.GetItemsAnchorPoint().Y, "Should be equal!");
+ Assert.AreEqual(200.0f, testingTarget.GetItemsAnchorPoint().Z, "Should be equal!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewSetItemsAnchorPoint END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView GetItemsRange.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.GetItemsRange M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewGetItemsRange()
+ {
+ tlog.Debug(tag, $"ItemViewGetItemsRange START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ try
+ {
+ using (ItemRange range = new ItemRange(0, 300))
+ {
+ testingTarget.GetItemsRange(range);
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewGetItemsRange END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SetAnchoring.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SetAnchoring M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSetAnchoring()
+ {
+ tlog.Debug(tag, $"ItemViewSetAnchoring START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView itemView = new ItemView(factory))
+ {
+ itemView.SetAnchoring(true);
+ Assert.AreEqual(true, itemView.GetAnchoring(), "Should be equal!");
+
+ itemView.SetAnchoring(false);
+ Assert.AreEqual(false, itemView.GetAnchoring(), "Should be equal!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewSetAnchoring END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SetAnchoringDuration.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SetAnchoringDuration M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSetAnchoringDuration()
+ {
+ tlog.Debug(tag, $"ItemViewSetAnchoringDuration START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView itemView = new ItemView(factory))
+ {
+ itemView.SetAnchoringDuration(30.0f);
+ Assert.AreEqual(30.0f, itemView.GetAnchoringDuration(), "Should be equal!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewSetAnchoringDuration END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView Refresh.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Refresh M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewRefresh()
+ {
+ tlog.Debug(tag, $"ItemViewRefresh START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.AddLayout(new ItemLayout(factory.SwigCPtr.Handle, true));
+
+ try
+ {
+ testingTarget.Refresh();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewRefresh END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView GetItemId.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.GetItemId M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewGetItemId()
+ {
+ tlog.Debug(tag, $"ItemViewGetItemId START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ View view = new View()
+ {
+ Size = new Size(100, 80)
+ };
+
+ testingTarget.AddLayout(new ItemLayout(view.SwigCPtr.Handle, true));
+
+ try
+ {
+ var result = testingTarget.GetItemId(view);
+ tlog.Debug(tag, "ItemId : " + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewGetItemId END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SetItemsParentOrigin.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SetItemsParentOrigin M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSetItemsParentOrigin()
+ {
+ tlog.Debug(tag, $"ItemViewSetItemsParentOrigin START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView itemView = new ItemView(factory))
+ {
+ using (Vector3 vector = new Vector3(0.0f, 1.0f, 3.0f))
+ {
+ itemView.SetItemsParentOrigin(vector);
+ Assert.AreEqual(0.0f, itemView.GetItemsParentOrigin().X, "Should be equal!");
+ Assert.AreEqual(1.0f, itemView.GetItemsParentOrigin().Y, "Should be equal!");
+ Assert.AreEqual(3.0f, itemView.GetItemsParentOrigin().Z, "Should be equal!");
+ }
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewSetItemsParentOrigin END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView LayoutActivatedSignal.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.LayoutActivatedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewLayoutActivatedSignal()
+ {
+ tlog.Debug(tag, $"ItemViewLayoutActivatedSignal START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ using (ItemView itemView = new ItemView(factory))
+ {
+ var testingTarget = itemView.LayoutActivatedSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<VoidSignal>(testingTarget, "Should be an Instance of VoidSignal!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"ItemViewLayoutActivatedSignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView MinimumSwipeDistance.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.MinimumSwipeDistance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewMinimumSwipeDistance()
+ {
+ tlog.Debug(tag, $"ItemViewMinimumSwipeDistance START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.MinimumSwipeDistance = 10.0f;
+ Assert.AreEqual(10.0f, testingTarget.MinimumSwipeDistance, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewMinimumSwipeDistance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView MinimumSwipeSpeed.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.MinimumSwipeSpeed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewMinimumSwipeSpeed()
+ {
+ tlog.Debug(tag, $"ItemViewMinimumSwipeSpeed START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.MinimumSwipeSpeed = 1.0f;
+ Assert.AreEqual(1.0f, testingTarget.MinimumSwipeSpeed, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewMinimumSwipeSpeed END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView WheelScrollDistanceStep.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.WheelScrollDistanceStep A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewWheelScrollDistanceStep()
+ {
+ tlog.Debug(tag, $"ItemViewWheelScrollDistanceStep START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.WheelScrollDistanceStep = 1.0f;
+ Assert.AreEqual(1.0f, testingTarget.WheelScrollDistanceStep, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewWheelScrollDistanceStep END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView SnapToItemEnabled.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.SnapToItemEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewSnapToItemEnabled()
+ {
+ tlog.Debug(tag, $"ItemViewSnapToItemEnabled START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.SnapToItemEnabled = true;
+ Assert.AreEqual(true, testingTarget.SnapToItemEnabled, "Should be equal");
+
+ testingTarget.SnapToItemEnabled = false;
+ Assert.AreEqual(false, testingTarget.SnapToItemEnabled, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewSnapToItemEnabled END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView RefreshInterval.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.RefreshInterval A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewRefreshInterval()
+ {
+ tlog.Debug(tag, $"ItemViewRefreshInterval START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.RefreshInterval = 0.3f;
+ Assert.AreEqual(0.3f, testingTarget.RefreshInterval, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewRefreshInterval END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView LayoutPosition.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.LayoutPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewLayoutPosition()
+ {
+ tlog.Debug(tag, $"ItemViewLayoutPosition START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.LayoutPosition = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.LayoutPosition, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewLayoutPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView ScrollSpeed.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.ScrollSpeed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewScrollSpeed()
+ {
+ tlog.Debug(tag, $"ItemViewScrollSpeed START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.ScrollSpeed = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.ScrollSpeed, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewScrollSpeed END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView Overshoot.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.Overshoot A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewOvershoot()
+ {
+ tlog.Debug(tag, $"ItemViewOvershoot START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.Overshoot = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.Overshoot, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewOvershoot END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView ScrollDirection.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.ScrollDirection A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewScrollDirection()
+ {
+ tlog.Debug(tag, $"ItemViewScrollDirection START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.ScrollDirection = new Vector2(0.0f, 90.0f);
+ Assert.AreEqual(0.0f, testingTarget.ScrollDirection.X, "Should be equal");
+ Assert.AreEqual(90.0f, testingTarget.ScrollDirection.Y, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewScrollDirection END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView LayoutOrientation.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.LayoutOrientation A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewLayoutOrientation()
+ {
+ tlog.Debug(tag, $"ItemViewLayoutOrientation START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.LayoutOrientation = 1;
+ Assert.AreEqual(1, testingTarget.LayoutOrientation, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewLayoutOrientation END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ItemView ScrollContentSize.")]
+ [Property("SPEC", "Tizen.NUI.ItemView.ScrollContentSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ItemViewScrollContentSize()
+ {
+ tlog.Debug(tag, $"ItemViewScrollContentSize START");
+
+ using (ItemFactory factory = new ItemFactory())
+ {
+ var testingTarget = new ItemView(factory);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
+
+ testingTarget.ScrollContentSize = 15.0f;
+ Assert.AreEqual(15.0f, testingTarget.ScrollContentSize, "Should be equal");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"ItemViewScrollContentSize END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageFactory")]
+ public class InternalPageFactoryTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyPageFactory : PageFactory
+ {
+ public MyPageFactory(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageFactory constructor.")]
+ [Property("SPEC", "Tizen.NUI.PageFactory.PageFactory C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageFactoryConstructor()
+ {
+ tlog.Debug(tag, $"PageFactoryConstructor START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new PageFactory(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageFactory>(testingTarget, "Should be an Instance of PageFactory!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageFactoryConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageFactory getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.PageFactory.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageFactorygetCPtr()
+ {
+ tlog.Debug(tag, $"PageFactorygetCPtr START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new MyPageFactory(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageFactory>(testingTarget, "Should be an Instance of PageFactory!");
+
+ try
+ {
+ MyPageFactory.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageFactorygetCPtr END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PagePanSignal")]
+ public class InternalPagePanSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr pagePanSignal);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.PagePanSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignalConstructor()
+ {
+ tlog.Debug(tag, $"PagePanSignalConstructor START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new PagePanSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PagePanSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignaEmpty()
+ {
+ tlog.Debug(tag, $"PagePanSignaEmpty START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new PagePanSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PagePanSignaEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignaGetConnectionCount()
+ {
+ tlog.Debug(tag, $"PagePanSignaGetConnectionCount START");
+
+ using (View view = new View())
+ {
+ view.Size = new Size(20, 40);
+ view.BackgroundColor = Color.Cyan;
+
+ var testingTarget = new PagePanSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PagePanSignaGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignaConnect()
+ {
+ tlog.Debug(tag, $"PagePanSignaConnect START");
+
+ var testingTarget = new PagePanSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ try
+ {
+ dummyCallback callback = OnDummyCallback;
+ testingTarget.Connect(callback);
+ testingTarget.Disconnect(callback);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PagePanSignaConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PagePanSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.PagePanSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PagePanSignalEmit()
+ {
+ tlog.Debug(tag, $"PagePanSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PagePanSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PagePanSignal>(testingTarget, "Should be an Instance of PagePanSignal!");
+
+ try
+ {
+ testingTarget.Emit(new PageTurnView(view.SwigCPtr.Handle, false));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PagePanSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageTurnLandscapeView")]
+ public class InternalPageTurnLandscapeViewTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView constructor.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewConstructor()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView constructor. With PageTurnLandscapeView.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewConstructorWithPageTurnLandscapeView()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewConstructorWithPageTurnLandscapeView START");
+
+ using (View view = new View())
+ {
+ using (PageTurnLandscapeView landscapeView = new PageTurnLandscapeView(view.SwigCPtr.Handle, false))
+ {
+ var testingTarget = new PageTurnLandscapeView(landscapeView);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewConstructorWithPageTurnLandscapeView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewGetCPtr()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewGetCPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ try
+ {
+ PageTurnLandscapeView.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewGetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView DownCast.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewDownCast()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewDownCast START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ try
+ {
+ PageTurnLandscapeView.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnLandscapeView Assign.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnLandscapeViewAssign()
+ {
+ tlog.Debug(tag, $"PageTurnLandscapeViewAssign START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ try
+ {
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnLandscapeViewAssign END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("PageTurnLandscapeView constructor.")]
+ //[Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void PageTurnLandscapeViewConstructor()
+ //{
+ // tlog.Debug(tag, $"PageTurnLandscapeViewConstructor START");
+
+ // using (View view = new View())
+ // {
+ // using (PageFactory pageFactory = new PageFactory(view.SwigCPtr.Handle, true))
+ // {
+ // using (Vector2 pageSize = new Vector2(100, 50))
+ // {
+ // var testingTarget = new PageTurnLandscapeView(pageFactory, pageSize);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
+
+ // testingTarget.Dispose();
+ // }
+ // }
+ // }
+
+ // tlog.Debug(tag, $"PageTurnLandscapeViewConstructor END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageTurnPortraitView")]
+ public class InternalPageTurnPortraitViewTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView constructor.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.PageTurnPortraitView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewConstructor()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnPortraitView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView constructor. With PageTurnPortraitView.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.PageTurnPortraitView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewConstructorWithPageTurnPortraitView()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewConstructorWithPageTurnPortraitView START");
+
+ using (View view = new View())
+ {
+ using (PageTurnPortraitView portraitView = new PageTurnPortraitView(view.SwigCPtr.Handle, false))
+ {
+ var testingTarget = new PageTurnPortraitView(portraitView);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ testingTarget.Dispose();
+ }
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewConstructorWithPageTurnPortraitView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewGetCPtr()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewGetCPtr START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnPortraitView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ try
+ {
+ PageTurnPortraitView.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewGetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView DownCast.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewDownCast()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewDownCast START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnPortraitView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ try
+ {
+ PageTurnPortraitView.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnPortraitView Assign.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnPortraitView.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnPortraitViewAssign()
+ {
+ tlog.Debug(tag, $"PageTurnPortraitViewAssign START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnPortraitView(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ try
+ {
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnPortraitViewAssign END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("PageTurnPortraitView constructor.")]
+ //[Property("SPEC", "Tizen.NUI.PageTurnPortraitView.PageTurnPortraitView C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void PageTurnPortraitViewConstructor()
+ //{
+ // tlog.Debug(tag, $"PageTurnPortraitViewConstructor START");
+
+ // using (View view = new View())
+ // {
+ // using (PageFactory pageFactory = new PageFactory(view.SwigCPtr.Handle, false))
+ // {
+ // using (Vector2 pageSize = new Vector2(100, 50))
+ // {
+ // var testingTarget = new PageTurnPortraitView(pageFactory, pageSize);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<PageTurnPortraitView>(testingTarget, "Should be an Instance of PageTurnPortraitView!");
+
+ // testingTarget.Dispose();
+ // }
+ // }
+ // }
+
+ // tlog.Debug(tag, $"PageTurnPortraitViewConstructor END (OK)");
+ //}
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageTurnSignal")]
+ public class InternalPageTurnSignalTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr pageTurnSignal);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.PageTurnSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalConstructor()
+ {
+ tlog.Debug(tag, $"PageTurnSignalConstructor START");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalEmpty()
+ {
+ tlog.Debug(tag, $"PageTurnSignalEmpty START");
+
+ var testingTarget = new PageTurnSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ try
+ {
+ testingTarget.Empty();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PageTurnSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"PageTurnSignalGetConnectionCount START");
+
+ var testingTarget = new PageTurnSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ try
+ {
+ testingTarget.GetConnectionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PageTurnSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalConnect()
+ {
+ tlog.Debug(tag, $"PageTurnSignalConnect START");
+
+ var testingTarget = new PageTurnSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ try
+ {
+ dummyCallback callback = OnDummyCallback;
+ testingTarget.Connect(callback);
+ testingTarget.Disconnect(callback);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PageTurnSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PageTurnSignal Emit.")]
+ [Property("SPEC", "Tizen.NUI.PageTurnSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PageTurnSignalEmit()
+ {
+ tlog.Debug(tag, $"PageTurnSignalEmit START");
+ var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
+
+ tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");
+
+ using (View view = new View())
+ {
+ var testingTarget = new PageTurnSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PageTurnSignal>(testingTarget, "Should be an Instance of PageTurnSignal!");
+
+ try
+ {
+ testingTarget.Emit(new PageTurnView(view.SwigCPtr.Handle, false), 1, false);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ }
+
+ tlog.Debug(tag, $"PageTurnSignalEmit END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Utility/PageTurnView")]
+ public class InternalPageTurnViewTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Widget/WidgetApplication")]
+ public class InternalWidgetApplicationTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyWidgetApplication : WidgetApplication
+ {
+ public MyWidgetApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ { }
+
+ public void OnReleaseSwigCPtr(global::System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ base.ReleaseSwigCPtr(swigCPtr);
+ }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication Constructor.")]
+ [Property("SPEC", "Tizen.NUI.WidgetApplication.WidgetApplication C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationConstructor()
+ {
+ 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<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ widget.Dispose();
+ widget = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication Constructor. With WidgetApplication.")]
+ [Property("SPEC", "Tizen.NUI.WidgetApplication.WidgetApplication C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationConstructorWithWidgetApplication()
+ {
+ 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>(widgetApplication, "Should be an instance of WidgetApplication type.");
+
+ var testingTarget = new WidgetApplication(widgetApplication);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication");
+ Assert.IsInstanceOf<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ widget.Dispose();
+ widget = null;
+
+ widgetApplication.Dispose();
+ widgetApplication = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationConstructorWithWidgetApplication END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication Assign.")]
+ [Property("SPEC", "Tizen.NUI.WidgetApplication.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationAssign()
+ {
+ 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>(widgetApplication, "Should be an instance of WidgetApplication type.");
+
+ var testingTarget = widgetApplication.Assign(widgetApplication);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication");
+ Assert.IsInstanceOf<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ widget.Dispose();
+ widget = null;
+
+ widgetApplication.Dispose();
+ widgetApplication = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.WidgetApplication.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationgetCPtr()
+ {
+ tlog.Debug(tag, $"WidgetApplicationgetCPtr START");
+
+ Widget widget = new Widget();
+
+ var testingTarget = new WidgetApplication(widget.GetIntPtr(), false);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication");
+ Assert.IsInstanceOf<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ try
+ {
+ WidgetApplication.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationgetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication ReleaseSwigCPtr.")]
+ [Property("SPEC", "Tizen.NUI.WidgetApplication.ReleaseSwigCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationReleaseSwigCPtr()
+ {
+ 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<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ try
+ {
+ testingTarget.OnReleaseSwigCPtr(widget.SwigCPtr);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationReleaseSwigCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication RegisterWidgetCreatingFunction.")]
+ [Property("SPEC", "Tizen.NUI.WidgetApplication.RegisterWidgetCreatingFunction M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationRegisterWidgetCreatingFunction()
+ {
+ tlog.Debug(tag, $"WidgetApplicationRegisterWidgetCreatingFunction START");
+
+ Widget widget = new Widget();
+
+ var testingTarget = new MyWidgetApplication(widget.GetIntPtr(), false);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication");
+ Assert.IsInstanceOf<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ global::System.Collections.Generic.Dictionary<Type, string> widgetInfo = new global::System.Collections.Generic.Dictionary<Type, string>(){
+ { typeof(Widget), "w1@org.tizen.WidgetApp"} };
+
+ testingTarget.RegisterWidgetInfo(widgetInfo);
+
+ try
+ {
+ testingTarget.RegisterWidgetCreatingFunction();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationRegisterWidgetCreatingFunction END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication AddWidgetInstance.")]
+ [Property("SPEC", "Tizen.NUI.WidgetApplication.AddWidgetInstance M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationAddWidgetInstance()
+ {
+ tlog.Debug(tag, $"WidgetApplicationAddWidgetInstance START");
+
+ Widget widget = new Widget();
+
+ var testingTarget = new WidgetApplication(widget.GetIntPtr(), false);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication");
+ Assert.IsInstanceOf<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ try
+ {
+ testingTarget.AddWidgetInstance(widget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationAddWidgetInstance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication RegisterWidgetInfo.")]
+ [Property("SPEC", "Tizen.Applications.WidgetApplication.RegisterWidgetInfo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationRegisterWidgetInfo()
+ {
+ 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<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ global::System.Collections.Generic.Dictionary<Type, string> widgetInfo = new global::System.Collections.Generic.Dictionary<Type, string>(){
+ { typeof(Widget), "w1@org.tizen.WidgetApp"} };
+
+ try
+ {
+ testingTarget.RegisterWidgetInfo(widgetInfo);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationRegisterWidgetInfo 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");
+
+ Widget widget = new Widget();
+
+ var testingTarget = new WidgetApplication(widget.GetIntPtr(), false);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetApplication");
+ Assert.IsInstanceOf<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ global::System.Collections.Generic.Dictionary<Type, string> widgetInfo = new global::System.Collections.Generic.Dictionary<Type, string>(){
+ { typeof(Widget), "w1@org.tizen.WidgetApp"} };
+ testingTarget.RegisterWidgetInfo(widgetInfo);
+
+ try
+ {
+ testingTarget.AddWidgetInfo(new global::System.Collections.Generic.Dictionary<Type, string>(){
+ { typeof(WidgetApplication), "w2@org.tizen.WidgetApp"} });
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetApplicationAddWidgetInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication WidgetCreateFunction.")]
+ [Property("SPEC", "Tizen.Applications.WidgetApplication.WidgetCreateFunction M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationWidgetCreateFunction()
+ {
+ tlog.Debug(tag, $"WidgetApplicationWidgetCreateFunction START");
+
+ tlog.Debug(tag, "WidgetApplication.Instance : " + WidgetApplication.Instance);
+
+ try
+ {
+ string widgetName = null;
+ WidgetApplication.WidgetCreateFunction(ref widgetName);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetApplicationWidgetCreateFunction END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetApplication WidgetInfo.")]
+ [Property("SPEC", "Tizen.Applications.WidgetApplication.WidgetInfo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetApplicationWidgetInfo()
+ {
+ 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<WidgetApplication>(testingTarget, "Should be an instance of WidgetApplication type.");
+
+ global::System.Collections.Generic.Dictionary<Type, string> widgetInfo = new global::System.Collections.Generic.Dictionary<Type, string>(){
+ { typeof(Widget), "w1@org.tizen.WidgetApp"} };
+ testingTarget.RegisterWidgetInfo(widgetInfo);
+
+ tlog.Debug(tag, "testingTarget.WidgetInfo : " + testingTarget.WidgetInfo);
+
+ widget.Dispose();
+ widget = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+
+ tlog.Debug(tag, $"WidgetApplicationWidgetInfo END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Widget/WidgetImpl")]
+ public class PublicWidgetImplTest
+ {
+ 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("WidgetImpl.WIdgetInstanceOnCreateArgs.ContentInfo.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.WIdgetInstanceOnCreateArgs.ContentInfo A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplWIdgetInstanceOnCreateArgsContentInfo()
+ {
+ tlog.Debug(tag, $"WidgetImplWIdgetInstanceOnCreateArgsContentInfo START");
+
+ var testingTarget = new WidgetImpl.WIdgetInstanceOnCreateArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object WIdgetInstanceOnCreateArgs");
+ Assert.IsInstanceOf<WidgetImpl.WIdgetInstanceOnCreateArgs>(testingTarget, "Should be an instance of WIdgetInstanceOnCreateArgs type.");
+
+ tlog.Debug(tag, "Default testingTarget.ContentInfo is : " + testingTarget.ContentInfo);
+
+ testingTarget.ContentInfo = "WidgetImpl";
+ tlog.Debug(tag, "testingTarget.ContentInfo : " + testingTarget.ContentInfo);
+
+ tlog.Debug(tag, $"WidgetImplWIdgetInstanceOnCreateArgsContentInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.WIdgetInstanceOnCreateArgs.Window.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.WIdgetInstanceOnCreateArgs.Window A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplWIdgetInstanceOnCreateArgsWindow()
+ {
+ tlog.Debug(tag, $"WidgetImplWIdgetInstanceOnCreateArgsWindow START");
+
+ var testingTarget = new WidgetImpl.WIdgetInstanceOnCreateArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object WIdgetInstanceOnCreateArgs");
+ Assert.IsInstanceOf<WidgetImpl.WIdgetInstanceOnCreateArgs>(testingTarget, "Should be an instance of WIdgetInstanceOnCreateArgs type.");
+
+ tlog.Debug(tag, "Default testingTarget.Window is : " + testingTarget.Window);
+
+ testingTarget.Window = Window.Instance;
+ tlog.Debug(tag, "testingTarget.Window : " + testingTarget.Window);
+
+ tlog.Debug(tag, $"WidgetImplWIdgetInstanceOnCreateArgsWindow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.WIdgetInstanceOnDestroyArgs.ContentInfo.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.WIdgetInstanceOnDestroyArgs.ContentInfo A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplWIdgetInstanceOnDestroyArgsContentInfo()
+ {
+ tlog.Debug(tag, $"WidgetImplWIdgetInstanceOnDestroyArgsContentInfo START");
+
+ var testingTarget = new WidgetImpl.WIdgetInstanceOnDestroyArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object WIdgetInstanceOnDestroyArgs");
+ Assert.IsInstanceOf<WidgetImpl.WIdgetInstanceOnDestroyArgs>(testingTarget, "Should be an instance of WIdgetInstanceOnDestroyArgs type.");
+
+ tlog.Debug(tag, "Default testingTarget.ContentInfo is : " + testingTarget.ContentInfo);
+
+ testingTarget.ContentInfo = "WIdgetInstanceOnDestroyArgs";
+ tlog.Debug(tag, "testingTarget.ContentInfo : " + testingTarget.ContentInfo);
+
+ tlog.Debug(tag, $"WidgetImplWIdgetInstanceOnDestroyArgsContentInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.WIdgetInstanceOnDestroyArgs.TerminateType.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.WIdgetInstanceOnDestroyArgs.TerminateType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplWIdgetInstanceOnDestroyArgsTerminateType()
+ {
+ tlog.Debug(tag, $"WidgetImplWIdgetInstanceOnDestroyArgsTerminateType START");
+
+ var testingTarget = new WidgetImpl.WIdgetInstanceOnDestroyArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object WIdgetInstanceOnDestroyArgs");
+ Assert.IsInstanceOf<WidgetImpl.WIdgetInstanceOnDestroyArgs>(testingTarget, "Should be an instance of WIdgetInstanceOnDestroyArgs type.");
+
+ tlog.Debug(tag, "Default testingTarget.TerminateType is : " + testingTarget.TerminateType);
+
+ testingTarget.TerminateType = Widget.TerminationType.Permanent;
+ tlog.Debug(tag, "testingTarget.TerminateType : " + testingTarget.TerminateType);
+
+ testingTarget.TerminateType = Widget.TerminationType.Temporary;
+ tlog.Debug(tag, "testingTarget.TerminateType : " + testingTarget.TerminateType);
+
+ tlog.Debug(tag, $"WidgetImplWIdgetInstanceOnDestroyArgsTerminateType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.WidgetInstanceOnResizeArgs.Window.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.WidgetInstanceOnResizeArgs.Window A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplWidgetInstanceOnResizeArgsWindow()
+ {
+ tlog.Debug(tag, $"WidgetImplWidgetInstanceOnResizeArgsWindow START");
+
+ var testingTarget = new WidgetImpl.WidgetInstanceOnResizeArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetInstanceOnResizeArgs");
+ Assert.IsInstanceOf<WidgetImpl.WidgetInstanceOnResizeArgs>(testingTarget, "Should be an instance of WidgetInstanceOnResizeArgs type.");
+
+ tlog.Debug(tag, "Default testingTarget.Window is : " + testingTarget.Window);
+
+ testingTarget.Window = Window.Instance;
+ tlog.Debug(tag, "testingTarget.Window : " + testingTarget.Window);
+
+ tlog.Debug(tag, $"WidgetImplWidgetInstanceOnResizeArgsWindow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.WidgetInstanceOnUpdateArgs.ContentInfo.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.WidgetInstanceOnUpdateArgs.ContentInfo A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplWidgetInstanceOnUpdateArgsContentInfo()
+ {
+ tlog.Debug(tag, $"WidgetImplWidgetInstanceOnUpdateArgsContentInfo START");
+
+ var testingTarget = new WidgetImpl.WidgetInstanceOnUpdateArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetInstanceOnUpdateArgs");
+ Assert.IsInstanceOf<WidgetImpl.WidgetInstanceOnUpdateArgs>(testingTarget, "Should be an instance of WidgetInstanceOnUpdateArgs type.");
+
+ tlog.Debug(tag, "Default testingTarget.ContentInfo is : " + testingTarget.ContentInfo);
+
+ testingTarget.ContentInfo = "WidgetInstanceOnUpdateArgs";
+ tlog.Debug(tag, "testingTarget.ContentInfo : " + testingTarget.ContentInfo);
+
+ tlog.Debug(tag, $"WidgetImplWidgetInstanceOnUpdateArgsContentInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.WidgetInstanceOnUpdateArgs.Force.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.WidgetInstanceOnUpdateArgs.Force A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplWidgetInstanceOnUpdateArgsForce()
+ {
+ tlog.Debug(tag, $"WidgetImplWidgetInstanceOnUpdateArgsForce START");
+
+ var testingTarget = new WidgetImpl.WidgetInstanceOnUpdateArgs();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetInstanceOnUpdateArgs");
+ Assert.IsInstanceOf<WidgetImpl.WidgetInstanceOnUpdateArgs>(testingTarget, "Should be an instance of WidgetInstanceOnUpdateArgs type.");
+
+ tlog.Debug(tag, "Default testingTarget.Force is : " + testingTarget.Force);
+
+ testingTarget.Force = 0;
+ tlog.Debug(tag, "testingTarget.Force : " + testingTarget.Force);
+
+ tlog.Debug(tag, $"WidgetImplWidgetInstanceOnUpdateArgsForce END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.SetImpl.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.SetImpl M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplSetImpl()
+ {
+ tlog.Debug(tag, $"WidgetImplSetImpl START");
+
+ var testingTarget = new WidgetImpl();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImpl");
+ Assert.IsInstanceOf<WidgetImpl>(testingTarget, "Should be an instance of WidgetImpl type.");
+
+ Widget widget = new Widget();
+
+ try
+ {
+ testingTarget.SetImpl(new SWIGTYPE_p_Dali__Widget__Impl(widget.GetIntPtr()));
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ widget.Dispose();
+ widget = null;
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetImplSetImpl END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.OnCreate.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.OnCreate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplOnCreate()
+ {
+ tlog.Debug(tag, $"WidgetImplOnCreate START");
+
+ var testingTarget = new WidgetImpl();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImpl");
+ Assert.IsInstanceOf<WidgetImpl>(testingTarget, "Should be an instance of WidgetImpl type.");
+
+ try
+ {
+ testingTarget.OnCreate("WidgetImplOnCreate", Window.Instance);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetImplOnCreate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.OnTerminate. Type is Permanent.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.OnTerminate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplOnTerminatePermanent()
+ {
+ tlog.Debug(tag, $"WidgetImplOnTerminatePermanent START");
+
+ var testingTarget = new WidgetImpl();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImpl");
+ Assert.IsInstanceOf<WidgetImpl>(testingTarget, "Should be an instance of WidgetImpl type.");
+
+ try
+ {
+ testingTarget.OnTerminate("WidgetImplOnTerminate", Widget.TerminationType.Permanent);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetImplOnTerminatePermanent END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.OnTerminate. Type is Temporary.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.OnTerminate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplOnTerminateTemporary()
+ {
+ tlog.Debug(tag, $"WidgetImplOnTerminateTemporary START");
+
+ var testingTarget = new WidgetImpl();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImpl");
+ Assert.IsInstanceOf<WidgetImpl>(testingTarget, "Should be an instance of WidgetImpl type.");
+
+ try
+ {
+ testingTarget.OnTerminate("WidgetImplOnTerminate", Widget.TerminationType.Temporary);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetImplOnTerminateTemporary END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.OnPause.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.OnPause M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplOnPause()
+ {
+ tlog.Debug(tag, $"WidgetImplOnPause START");
+
+ var testingTarget = new WidgetImpl();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImpl");
+ Assert.IsInstanceOf<WidgetImpl>(testingTarget, "Should be an instance of WidgetImpl type.");
+
+ try
+ {
+ testingTarget.OnPause();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetImplOnPause END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.OnResume.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.OnResume M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplOnResume()
+ {
+ tlog.Debug(tag, $"WidgetImplOnResume START");
+
+ var testingTarget = new WidgetImpl();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImpl");
+ Assert.IsInstanceOf<WidgetImpl>(testingTarget, "Should be an instance of WidgetImpl type.");
+
+ try
+ {
+ testingTarget.OnResume();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetImplOnResume END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.OnResize.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.OnResize M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplOnResize()
+ {
+ tlog.Debug(tag, $"WidgetImplOnResize START");
+
+ var testingTarget = new WidgetImpl();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImpl");
+ Assert.IsInstanceOf<WidgetImpl>(testingTarget, "Should be an instance of WidgetImpl type.");
+
+ try
+ {
+ testingTarget.OnResize(Window.Instance);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetImplOnResize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImpl.OnUpdate.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImpl.OnUpdate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplOnUpdate()
+ {
+ tlog.Debug(tag, $"WidgetImplOnUpdate START");
+
+ var testingTarget = new WidgetImpl();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImpl");
+ Assert.IsInstanceOf<WidgetImpl>(testingTarget, "Should be an instance of WidgetImpl type.");
+
+ try
+ {
+ testingTarget.OnUpdate("WidgetImplOnUpdate", 0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ testingTarget = null;
+ tlog.Debug(tag, $"WidgetImplOnUpdate END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("Internal/Widget/WidgetImplPtr")]
+ public class InternalWidgetImplPtrTest
+ {
+ private const string tag = "NUITEST";
+
+ internal class MyWidgetImplPtr : WidgetImplPtr
+ {
+ public MyWidgetImplPtr() : base()
+ { }
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImplPtr Constructor.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImplPtr.WidgetImplPtr C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplPtrConstructorWithIntPtr()
+ {
+ tlog.Debug(tag, $"WidgetImplPtrConstructorWithIntPtr START");
+
+ Widget widget = new Widget();
+
+ var testingTarget = new WidgetImplPtr(widget.GetIntPtr());
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImplPtr");
+ Assert.IsInstanceOf<WidgetImplPtr>(testingTarget, "Should be an instance of WidgetImplPtr type.");
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"WidgetImplPtrConstructorWithIntPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetImplPtr Constructor.")]
+ [Property("SPEC", "Tizen.NUI.WidgetImplPtr.WidgetImplPtr C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetImplPtrConstructor()
+ {
+ tlog.Debug(tag, $"WidgetImplPtrConstructor START");
+
+ Widget widget = new Widget();
+
+ var testingTarget = new MyWidgetImplPtr();
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetImplPtr");
+ Assert.IsInstanceOf<WidgetImplPtr>(testingTarget, "Should be an instance of WidgetImplPtr type.");
+
+ widget.Dispose();
+ widget = null;
+ tlog.Debug(tag, $"WidgetImplPtrConstructor END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("internal/Widget/WidgetViewSignal")]
+ public class WidgetViewSignalTests
+ {
+ private const string tag = "NUITEST";
+ private delegate void SignalCallback();
+
+ private static void MyDelegate()
+ {
+ Log.Fatal("TCT", "[TestCase][AddIdle][NUIApplication] Pass");
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ Tizen.Log.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Tizen.Log.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.WidgetViewSignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalConstructor()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalConstructor START");
+
+ var testingTarget = new WidgetViewSignal() ;
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewSignal Dispose.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalDispose()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalDispose START");
+
+ var testingTarget = new WidgetViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ try
+ {
+ testingTarget.Dispose();
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalEmpty()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalEmpty START");
+
+ var testingTarget = new WidgetViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ Assert.IsTrue(testingTarget.Empty(), "Should be true here!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalGetConnectionCount START");
+
+ var testingTarget = new WidgetViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ Assert.AreEqual(0, testingTarget.GetConnectionCount(), "Should be zero here!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewSignal Connect.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalConnect()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalConnect START");
+
+ var testingTarget = new WidgetViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ try
+ {
+ SignalCallback signalCallback = new SignalCallback(MyDelegate);
+ testingTarget.Connect(signalCallback);
+ Assert.AreEqual(1, testingTarget.GetConnectionCount(), "Should be one here!");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("WidgetViewSignal Connect. With null.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalConnectWithNull()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalConnectWithNull START");
+
+ var testingTarget = new WidgetViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ try
+ {
+ testingTarget.Connect(null);
+ Assert.Fail("Should throw the ArgumentNullException!");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.True(true);
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalConnectWithNull END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewSignal Disconnect")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.Disconnect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalDisconnect()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalDisconnect START");
+
+ var testingTarget = new WidgetViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ SignalCallback signalCallback = new SignalCallback(MyDelegate);
+
+ try
+ {
+ testingTarget.Connect(signalCallback);
+ Assert.AreEqual(1, testingTarget.GetConnectionCount(), "Should be one here!");
+
+ testingTarget.Disconnect(signalCallback);
+ Assert.AreEqual(0, testingTarget.GetConnectionCount(), "Should be zero here!");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalDisconnect END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("WidgetViewSignal Disconnect. With null.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.Disconnect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalDisconnectWithNull()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalDisconnect START");
+
+ var testingTarget = new WidgetViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ try
+ {
+ testingTarget.Disconnect(null);
+ Assert.Fail("Should throw the ArgumentNullException!");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.True(true);
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalDisconnect END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("WidgetViewSignal Emit. With null.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewSignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewSignalEmitWithNull()
+ {
+ tlog.Debug(tag, $"WidgetViewSignalEmitWithNull START");
+
+ var testingTarget = new WidgetViewSignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<WidgetViewSignal>(testingTarget, "Should be an Instance of WidgetViewSignal!");
+
+ try
+ {
+ testingTarget.Emit(null);
+ Assert.Fail("Should throw the ArgumentNullException!");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.True(true);
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewSignalEmitWithNull END (OK)");
+ }
+ }
+
+}
[Test]
[Category("P1")]
- [Description("NUIApplication SendLaunchRequest")]
- [Property("SPEC", "Tizen.NUI.NUIApplication.SendLaunchRequest M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void NUIApplicationSendLaunchRequest()
- {
- tlog.Debug(tag, $"NUIApplicationSendLaunchRequest START");
-
- var testingTarget = new NUIApplication();
- Assert.IsNotNull(testingTarget, "Should be not null.");
- Assert.IsInstanceOf<NUIApplication>(testingTarget, "Should be an instance of Window type.");
-
- TransitionOptions transitionOption = new TransitionOptions(Window.Instance);
- testingTarget.TransitionOptions = transitionOption;
- transitionOption.EnableTransition = true;
-
- var appControl = new Applications.AppControl(true);
- try
- {
- testingTarget.SendLaunchRequest(appControl);
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
-
- transitionOption.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"NUIApplicationSendLaunchRequest END (OK)");
- }
-
- [Test]
- [Category("P1")]
[Description("NUIApplication TransitionOptions")]
[Property("SPEC", "Tizen.NUI.NUIApplication.TransitionOptions A")]
[Property("SPEC_URL", "-")]
using NUnit.Framework.TUnit;
using Tizen.NUI.Components;
using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
namespace Tizen.NUI.Devel.Tests
{
{
private const string tag = "NUITEST";
+ internal class MyNUIComponentApplication : NUIComponentApplication
+ {
+ public MyNUIComponentApplication(IDictionary<Type, string> typeInfo) : base(typeInfo)
+ { }
+
+ public void MyOnCreate() { base.OnCreate(); }
+
+ public void MyOnTerminate() { base.OnTerminate(); }
+
+ public void MyExit() { base.Exit(); }
+ }
+
[SetUp]
public void Init()
{
{
tlog.Info(tag, "Destroy() is called!");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIComponentApplication constructor.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentApplication.NUIComponentApplication M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIComponentApplicationConstructor()
+ {
+ tlog.Debug(tag, $"NUIComponentApplicationConstructor START");
+
+ IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();
+ typeInfo.Add(typeof(Applications.ComponentBased.Common.FrameComponent), "FrameComponent");
+ typeInfo.Add(typeof(Applications.ComponentBased.Common.ServiceComponent), "ServiceComponent");
+ var testingTarget = new NUIComponentApplication(typeInfo);
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIComponentApplication>(testingTarget, "Should be an instance of NUIComponentApplication type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIComponentApplicationConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("NUIComponentApplication constructor. With illegal type.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentApplication.NUIComponentApplication M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIComponentApplicationConstructorWithIllegalType()
+ {
+ tlog.Debug(tag, $"NUIComponentApplicationConstructorWithIllegalType START");
+
+ IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();
+ typeInfo.Add(typeof(Widget), "Widget");
+
+ try
+ {
+ new NUIComponentApplication(typeInfo);
+ }
+ catch (ArgumentException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"NUIComponentApplicationConstructorWithIllegalType END (OK)");
+ Assert.Pass("Caught ArgumentException: Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("NUIComponentApplication constructor. With null parameter.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentApplication.NUIComponentApplication M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIComponentApplicationConstructorWithNull()
+ {
+ tlog.Debug(tag, $"NUIComponentApplicationConstructorWithNull START");
+
+ var testingTarget = new NUIComponentApplication(null);
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIComponentApplication>(testingTarget, "Should be an instance of NUIComponentApplication type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIComponentApplicationConstructorWithNull END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIComponentApplication OnCreate.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentApplication.OnCreate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIComponentApplicationOnCreate()
+ {
+ tlog.Debug(tag, $"NUIComponentApplicationOnCreate START");
+
+ IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();
+ typeInfo.Add(typeof(Applications.ComponentBased.Common.FrameComponent), "FrameComponent");
+ var testingTarget = new MyNUIComponentApplication(typeInfo);
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIComponentApplication>(testingTarget, "Should be an instance of NUIComponentApplication type.");
+
+ try
+ {
+ testingTarget.MyOnCreate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIComponentApplicationOnCreate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIComponentApplication OnTerminate.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentApplication.OnTerminate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIComponentApplicationOnTerminate()
+ {
+ tlog.Debug(tag, $"NUIComponentApplicationOnCreate START");
+
+ IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();
+ typeInfo.Add(typeof(Applications.ComponentBased.Common.FrameComponent), "FrameComponent");
+ var testingTarget = new MyNUIComponentApplication(typeInfo);
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIComponentApplication>(testingTarget, "Should be an instance of NUIComponentApplication type.");
+
+ try
+ {
+ testingTarget.MyOnTerminate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIComponentApplicationOnCreate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIComponentApplication Exit.")]
+ [Property("SPEC", "Tizen.NUI.NUIComponentApplication.Exit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIComponentApplicationExit()
+ {
+ tlog.Debug(tag, $"NUIComponentApplicationExit START");
+
+ IDictionary<Type, string> typeInfo = new Dictionary<Type, string>();
+ typeInfo.Add(typeof(Applications.ComponentBased.Common.FrameComponent), "FrameComponent");
+ var testingTarget = new MyNUIComponentApplication(typeInfo);
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIComponentApplication>(testingTarget, "Should be an instance of NUIComponentApplication type.");
+
+ try
+ {
+ testingTarget.MyExit();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIComponentApplicationExit END (OK)");
+ }
+
}
}
{
private const string tag = "NUITEST";
+ internal class MyNUIFrameComponent : NUIFrameComponent
+ {
+ public MyNUIFrameComponent() : base()
+ { }
+
+ public void MyOnCreate()
+ {
+ base.OnCreate();
+ }
+
+ public void MyOnStart(Tizen.Applications.AppControl appControl, bool restarted)
+ {
+ base.OnStart(appControl, restarted);
+ }
+
+ public void MyOnResume()
+ {
+ base.OnResume();
+ }
+
+ public void MyOnPause()
+ {
+ base.OnPause();
+ }
+
+ public void MyOnStop()
+ {
+ base.OnStop();
+ }
+
+ public void MyOnDestroy()
+ {
+ base.OnDestroy();
+ }
+ }
+
[SetUp]
public void Init()
{
{
tlog.Info(tag, "Destroy() is called!");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIFrameComponent NUIWindowInfo")]
+ [Property("SPEC", "Tizen.NUI.NUIFrameComponent.NUIWindowInfo A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIFrameComponentNUIWindowInfo()
+ {
+ tlog.Debug(tag, $"NUIFrameComponentNUIWindowInfo START");
+
+ var testingTarget = new NUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ testingTarget.NUIWindowInfo = new NUIWindowInfo(Window.Instance);
+ tlog.Debug(tag, "testingTarget.NUIWindowInfo : " + testingTarget.NUIWindowInfo);
+ Assert.IsNotNull(testingTarget.NUIWindowInfo);
+
+ tlog.Debug(tag, $"NUIFrameComponentNUIWindowInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIFrameComponent Window")]
+ [Property("SPEC", "Tizen.NUI.NUIFrameComponent.Window A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIFrameComponentWindow()
+ {
+ tlog.Debug(tag, $"NUIFrameComponentWindow START");
+
+ var testingTarget = new NUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ testingTarget.Window = new Window(new Rectangle(0, 0, 1920, 1080), false);
+ tlog.Debug(tag, "testingTarget.Window : " + testingTarget.Window);
+ Assert.IsNotNull(testingTarget.Window);
+
+ tlog.Debug(tag, $"NUIFrameComponentWindow END (OK)");
+ }
+
+ [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 NUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ try
+ {
+ testingTarget.NUIWindowInfo = new NUIWindowInfo(Window.Instance);
+ testingTarget.Window = new Window(new Rectangle(0, 0, 1920, 1080), false);
+
+ testingTarget.CreateWindowInfo();
+ }
+ 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 OnCreate.")]
+ [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnCreate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIFrameComponentOnCreate()
+ {
+ tlog.Debug(tag, $"NUIFrameComponentOnCreate START");
+
+ var testingTarget = new MyNUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ try
+ {
+ testingTarget.MyOnCreate();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"NUIFrameComponentOnCreate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIFrameComponent OnStart.")]
+ [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnStart M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIFrameComponentOnStart()
+ {
+ tlog.Debug(tag, $"NUIFrameComponentOnStart START");
+
+ var testingTarget = new MyNUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ try
+ {
+ Tizen.Applications.AppControl appControl = new Tizen.Applications.AppControl(true);
+ testingTarget.MyOnStart(appControl, false);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"NUIFrameComponentOnStart END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIFrameComponent OnResume.")]
+ [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnResume M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIFrameComponentOnResume()
+ {
+ tlog.Debug(tag, $"NUIFrameComponentOnResume START");
+
+ var testingTarget = new MyNUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ try
+ {
+ testingTarget.MyOnResume();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"NUIFrameComponentOnResume END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIFrameComponent OnPause.")]
+ [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnPause M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIFrameComponentOnPause()
+ {
+ tlog.Debug(tag, $"NUIFrameComponentOnPause START");
+
+ var testingTarget = new MyNUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ try
+ {
+ testingTarget.MyOnPause();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"NUIFrameComponentOnPause END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIFrameComponent OnStop.")]
+ [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnStop M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIFrameComponentOnStop()
+ {
+ tlog.Debug(tag, $"NUIFrameComponentOnStop START");
+
+ var testingTarget = new MyNUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ try
+ {
+ testingTarget.MyOnStop();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"NUIFrameComponentOnStop END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIFrameComponent OnDestroy.")]
+ [Property("SPEC", "Tizen.NUI.NUIFrameComponent.OnDestroy M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void NUIFrameComponentOnDestroy()
+ {
+ tlog.Debug(tag, $"NUIFrameComponentOnDestroy START");
+
+ var testingTarget = new MyNUIFrameComponent();
+ Assert.IsNotNull(testingTarget, "Should be not null.");
+ Assert.IsInstanceOf<NUIFrameComponent>(testingTarget, "Should be an instance of NUIFrameComponent type.");
+
+ try
+ {
+ testingTarget.MyOnDestroy();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"NUIFrameComponentOnDestroy END (OK)");
+ }
}
}
}
}
+ internal class MyNUIWidgetApplication : NUIWidgetApplication
+ {
+ public MyNUIWidgetApplication(global::System.Type widgetType) : base(widgetType)
+ { }
+
+ public void MyOnCreate()
+ {
+ base.OnCreate();
+ }
+
+ public void MyOnTerminate()
+ {
+ base.OnTerminate();
+ }
+
+ public void MyOnLocaleChanged(Applications.LocaleChangedEventArgs e)
+ {
+ base.OnLocaleChanged(e);
+ }
+
+ public void MyOnLowBattery(Applications.LowBatteryEventArgs e)
+ {
+ base.OnLowBattery(e);
+ }
+
+ public void MyOnLowMemory(Applications.LowMemoryEventArgs e)
+ {
+ base.OnLowMemory(e);
+ }
+
+ public void MyOnRegionFormatChanged(Applications.RegionFormatChangedEventArgs e)
+ {
+ base.OnRegionFormatChanged(e);
+ }
+ }
+
public class PublicNUIWidgetApplicationTest
{
private const string tag = "NUITEST";
tlog.Debug(tag, $"NUIWidgetApplicationDispose END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication AddWidgetType.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.AddWidgetType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationAddWidgetType()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationAddWidgetType START");
+
+ var testingTarget = new NUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ testingTarget.AddWidgetType(typeof(MyWidget));
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationAddWidgetType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication AddWidgetType. With Dictionary.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.AddWidgetType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationAddWidgetTypeWithDictionary()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationAddWidgetTypeWithDictionary START");
+
+ var testingTarget = new NUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ Dictionary<global::System.Type, string> widgetTypes = new Dictionary<Type, string>();
+ widgetTypes.Add(typeof(MyWidget), "MyWidget");
+ testingTarget.AddWidgetType(widgetTypes);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationAddWidgetTypeWithDictionary END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication ApplicationHandle.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.ApplicationHandle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationApplicationHandle()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationApplicationHandle START");
+
+ var testingTarget = new NUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ var result = testingTarget.ApplicationHandle;
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationApplicationHandle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication OnCreate.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.OnCreate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationOnCreate()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationOnCreate START");
+
+ var testingTarget = new MyNUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ testingTarget.MyOnCreate();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationOnCreate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication OnLocaleChanged.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.OnLocaleChanged M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationOnLocaleChanged()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationOnLocaleChanged START");
+
+ var testingTarget = new MyNUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ testingTarget.MyOnLocaleChanged(new Applications.LocaleChangedEventArgs("BeiJing"));
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationOnLocaleChanged END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication OnLowBattery.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.OnLowBattery M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationOnLowBattery()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationOnLowBattery START");
+
+ var testingTarget = new MyNUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ testingTarget.MyOnLowBattery(new Applications.LowBatteryEventArgs(Applications.LowBatteryStatus.PowerOff));
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationOnLowBattery END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication OnLowMemory.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.OnLowMemory M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationOnLowMemory()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationOnLowMemory START");
+
+ var testingTarget = new MyNUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ testingTarget.MyOnLowMemory(new Applications.LowMemoryEventArgs(Applications.LowMemoryStatus.Normal));
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationOnLowMemory END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication OnTerminate.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.OnTerminate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationOnTerminate()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationOnTerminate START");
+
+ var testingTarget = new MyNUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ testingTarget.MyOnTerminate();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationOnTerminate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NUIWidgetApplication OnRegionFormatChanged.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.OnRegionFormatChanged M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@partner.samsung.com")]
+ public void NUIWidgetApplicationOnRegionFormatChanged()
+ {
+ tlog.Debug(tag, $"NUIWidgetApplicationOnRegionFormatChanged START");
+
+ var testingTarget = new MyNUIWidgetApplication(typeof(MyWidget));
+ Assert.IsNotNull(testingTarget, "should be not null.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type.");
+
+ try
+ {
+ testingTarget.MyOnRegionFormatChanged(new Applications.RegionFormatChangedEventArgs("China"));
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"NUIWidgetApplicationOnRegionFormatChanged END (OK)");
+ }
}
}
{
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()
{
{
tlog.Debug(tag, $"WatchTimeConstructor START");
- if (IsWearable())
- {
- var testingTarget = new WatchTime();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeConstructor END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeConstructor END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Category("P1")]
- [Description("WatchTime Day.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.Day A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeDay()
- {
- tlog.Debug(tag, $"WatchTimeDay START");
-
- if (IsWearable())
+ using (ImageView view = new ImageView())
{
- var testingTarget = new WatchTime();
+ var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- int time = testingTarget.Day;
- Assert.IsTrue(time > 0.0f);
testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeDay END (OK)");
}
- else
- {
- tlog.Debug(tag, $"WatchTimeDay END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Category("P1")]
- [Description("WatchTime DaylightSavingTimeStatus.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.DaylightSavingTimeStatus A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [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<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- bool status = testingTarget.DaylightSavingTimeStatus;
- Assert.AreEqual(false, status, "Should be the default value");
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ tlog.Debug(tag, $"WatchTimeConstructor END (OK)");
}
[Test]
[Category("P1")]
- [Description("WatchTime DayOfWeek.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.DayOfWeek A")]
+ [Description("WatchTime getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.WatchTime.getCPtr M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeDayOfWeek()
+ public void WatchTimegetCPtr()
{
- tlog.Debug(tag, $"WatchTimeDayOfWeek START");
+ tlog.Debug(tag, $"WatchTimegetCPtr START");
- if (IsWearable())
+ using (ImageView view = new ImageView())
{
- var testingTarget = new WatchTime();
+ var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
- int day = testingTarget.DayOfWeek;
- Assert.IsTrue(day > 0.0f);
+ try
+ {
+ WatchTime.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeDayOfWeek END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeDayOfWeek END (OK)");
- Assert.Pass("Not Supported profile");
}
- }
-
- [Test]
- [Category("P1")]
- [Description("WatchTime Hour.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.Hour A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeHour()
- {
- tlog.Debug(tag, $"WatchTimeHour START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTime();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- int hour = testingTarget.Hour;
- Assert.IsTrue(hour > 0.0f);
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeHour END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeHour END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ tlog.Debug(tag, $"WatchTimegetCPtr END (OK)");
}
[Test]
[Category("P1")]
- [Description("WatchTime Hour24.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.Hour24 A")]
+ [Description("WatchTime GetWatchTimeFromPtr.")]
+ [Property("SPEC", "Tizen.NUI.WatchTime.GetWatchTimeFromPtr M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
+ [Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeHour24()
+ public void WatchTimeGetWatchTimeFromPtr()
{
- tlog.Debug(tag, $"WatchTimeHour24 START");
+ tlog.Debug(tag, $"WatchTimeGetWatchTimeFromPtr START");
- if (IsWearable())
+ using (ImageView view = new ImageView())
{
- var testingTarget = new WatchTime();
+ var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
Assert.IsNotNull(testingTarget, "should be not null");
Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
- int hour24 = testingTarget.Hour24;
- Assert.IsTrue(hour24 >= 0.0f);
+ try
+ {
+ WatchTime.GetWatchTimeFromPtr(testingTarget.SwigCPtr.Handle);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeHour24 END (OK)");
}
- else
- {
- tlog.Debug(tag, $"WatchTimeHour24 END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
- [Test]
- [Category("P1")]
- [Description("WatchTime Millisecond.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.Millisecond A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeMillisecond()
- {
- tlog.Debug(tag, $"WatchTimeMillisecond START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTime();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- int millisecond = testingTarget.Millisecond;
- Assert.IsTrue(millisecond >= 0.0f);
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeMillisecond END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeMillisecond END (OK)");
- Assert.Pass("Not Supported profile");
- }
+ tlog.Debug(tag, $"WatchTimeGetWatchTimeFromPtr END (OK)");
}
- [Test]
- [Category("P1")]
- [Description("WatchTime Minute.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.Minute A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeMinute()
- {
- tlog.Debug(tag, $"WatchTimeMinute START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTime();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- int minute = testingTarget.Minute;
- Assert.IsTrue(minute >= 0.0f);
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeMinute END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeMinute END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Category("P1")]
- [Description("WatchTime Month.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.Month A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeMonth()
- {
- tlog.Debug(tag, $"WatchTimeMonth START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTime();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- int month = testingTarget.Month;
- Assert.IsTrue(month > 0.0f);
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeMonth END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeMonth END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Category("P1")]
- [Description("WatchTime Second.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.Second A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeSecond()
- {
- tlog.Debug(tag, $"WatchTimeSecond START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTime();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- int second = testingTarget.Second;
- Assert.IsTrue(second >= 0.0f);
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeSecond END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeSecond END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Category("P1")]
- [Description("WatchTime TimeZone.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.TimeZone A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeTimeZone()
- {
- tlog.Debug(tag, $"WatchTimeTimeZone START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTime();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- string zone = testingTarget.TimeZone;
- Assert.IsNotEmpty(zone, "TimeZone is empty");
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeTimeZone END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeTimeZone END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
-
- [Test]
- [Category("P1")]
- [Description("WatchTime Year.")]
- [Property("SPEC", "Tizen.NUI.WatchTime.Year A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void WatchTimeYear()
- {
- tlog.Debug(tag, $"WatchTimeYear START");
-
- if (IsWearable())
- {
- var testingTarget = new WatchTime();
- Assert.IsNotNull(testingTarget, "should be not null");
- Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
-
- int year = testingTarget.Year;
- Assert.IsTrue(year > 0.0f);
-
- testingTarget.Dispose();
- tlog.Debug(tag, $"WatchTimeYear END (OK)");
- }
- else
- {
- tlog.Debug(tag, $"WatchTimeYear END (OK)");
- Assert.Pass("Not Supported profile");
- }
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime GetUtcTime.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.GetUtcTime M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeGetUtcTime()
+ //{
+ // tlog.Debug(tag, $"WatchTimeGetUtcTime START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetUtcTime' in shared library 'libdali2-csharp-binder.so' */
+ // testingTarget.GetUtcTime();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeGetUtcTime END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime Day.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.Day A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeDay()
+ //{
+ // tlog.Debug(tag, $"WatchTimeDay START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetDay' in shared library 'libdali2-csharp-binder.so' */
+ // int time = testingTarget.Day;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeDay END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime DaylightSavingTimeStatus.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.DaylightSavingTimeStatus A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeDaylightSavingTimeStatus()
+ //{
+ // tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetDaylightSavingTimeStatus' in shared library 'libdali2-csharp-binder.so' */
+ // bool status = testingTarget.DaylightSavingTimeStatus;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeDaylightSavingTimeStatus END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime DayOfWeek.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.DayOfWeek A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeDayOfWeek()
+ //{
+ // tlog.Debug(tag, $"WatchTimeDayOfWeek START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetDayOfWeek' in shared library 'libdali2-csharp-binder.so' */
+ // int day = testingTarget.DayOfWeek;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeDayOfWeek END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime Hour.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.Hour A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeHour()
+ //{
+ // tlog.Debug(tag, $"WatchTimeHour START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetHour' in shared library 'libdali2-csharp-binder.so' */
+ // int hour = testingTarget.Hour;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeHour END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime Hour24.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.Hour24 A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeHour24()
+ //{
+ // tlog.Debug(tag, $"WatchTimeHour24 START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetHour24' in shared library 'libdali2-csharp-binder.so' */
+ // int hour24 = testingTarget.Hour24;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeHour24 END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime Millisecond.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.Millisecond A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeMillisecond()
+ //{
+ // tlog.Debug(tag, $"WatchTimeMillisecond START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetMillisecond' in shared library 'libdali2-csharp-binder.so' */
+ // int millisecond = testingTarget.Millisecond;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeMillisecond END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime Minute.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.Minute A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeMinute()
+ //{
+ // tlog.Debug(tag, $"WatchTimeMinute START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetMinute' in shared library 'libdali2-csharp-binder.so' */
+ // int minute = testingTarget.Minute;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeMinute END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime Month.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.Month A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeMonth()
+ //{
+ // tlog.Debug(tag, $"WatchTimeMonth START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetMonth' in shared library 'libdali2-csharp-binder.so' */
+ // int month = testingTarget.Month;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeMonth END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime Second.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.Second A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeSecond()
+ //{
+ // tlog.Debug(tag, $"WatchTimeSecond START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetSecond' in shared library 'libdali2-csharp-binder.so' */
+ // int second = testingTarget.Second;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeSecond END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime TimeZone.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.TimeZone A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeTimeZone()
+ //{
+ // tlog.Debug(tag, $"WatchTimeTimeZone START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetTimeZone' in shared library 'libdali2-csharp-binder.so' */
+ // string zone = testingTarget.TimeZone;
+ // Assert.IsNotEmpty(zone, "TimeZone is empty");
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeTimeZone END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WatchTime Year.")]
+ //[Property("SPEC", "Tizen.NUI.WatchTime.Year A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRO")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WatchTimeYear()
+ //{
+ // tlog.Debug(tag, $"WatchTimeYear START");
+
+ // using (ImageView view = new ImageView())
+ // {
+ // var testingTarget = new WatchTime(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "should be not null");
+ // Assert.IsInstanceOf<WatchTime>(testingTarget, "Should be an instance of WatchTime type.");
+
+ // try
+ // {
+ // /** Unable to find an entry point named 'CSharp_Dali_WatchTime_GetYear' in shared library 'libdali2-csharp-binder.so' */
+ // int year = testingTarget.Year;
+ // Assert.IsTrue(year > 0);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"WatchTimeYear END (OK)");
+ //}
}
}
+++ /dev/null
-using NUnit.Framework;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Theme/DefaultTheme")]
- internal class PublicDefaultThemeTest
- {
- 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("DefaultThemeCreator GetExternalThemeKeyListSet")]
- [Property("SPEC", "Tizen.NUI.DefaultThemeCreator.GetExternalThemeKeyListSet M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void DefaultThemeCreatorGetExternalThemeKeyListSet()
- {
- tlog.Debug(tag, $"DefaultThemeCreatorGetExternalThemeKeyListSet START");
-
- DefaultThemeCreator.Instance.GetExternalThemeKeyListSet();
-
- tlog.Debug(tag, $"DefaultThemeCreatorGetExternalThemeKeyListSet END (OK)");
- Assert.Pass("DefaultThemeCreatorGetExternalThemeKeyListSet");
- }
- }
-
-}
-
+++ /dev/null
-using NUnit.Framework;
-using System.Collections.Generic;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Theme/DictionaryExternalTheme")]
- internal class PublicDictionaryExternalThemeTest
- {
- 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 DictionaryExternalTheme object.")]
- [Property("SPEC", "Tizen.NUI.DictionaryExternalTheme.DictionaryExternalTheme C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("COVPARAM", "")]
- public void DictionaryExternalThemeConstructor()
- {
- tlog.Debug(tag, $"DictionaryExternalThemeConstructor START");
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
-
- tlog.Debug(tag, $"DictionaryExternalThemeConstructor END (OK)");
- Assert.Pass("DictionaryExternalThemeConstructor");
- }
-
- [Test]
- [Category("P1")]
- [Description("test DictionaryExternalTheme Id.")]
- [Property("SPEC", "Tizen.NUI.DictionaryExternalTheme.Id A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("COVPARAM", "")]
- public void DictionaryExternalThemeId()
- {
- tlog.Debug(tag, $"DictionaryExternalThemeId START");
-
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
- string b1 = a1.Id;
-
- tlog.Debug(tag, $"DictionaryExternalThemeId END (OK)");
- Assert.Pass("DictionaryExternalThemeId");
- }
-
- [Test]
- [Category("P1")]
- [Description("test DictionaryExternalTheme Version.")]
- [Property("SPEC", "Tizen.NUI.DictionaryExternalTheme.Version A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("COVPARAM", "")]
- public void DictionaryExternalThemeVersion()
- {
- tlog.Debug(tag, $"DictionaryExternalThemeVersion START");
-
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
- string b1 = a1.Version;
-
- tlog.Debug(tag, $"DictionaryExternalThemeVersion END (OK)");
- Assert.Pass("DictionaryExternalThemeVersion");
- }
-
- [Test]
- [Category("P1")]
- [Description("test DictionaryExternalTheme GetValue.")]
- [Property("SPEC", "Tizen.NUI.DictionaryExternalTheme.GetValue M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void DictionaryExternalThemeGetValue()
- {
- tlog.Debug(tag, $"DictionaryExternalThemeGetValue START");
-
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
- string b1 = a1.GetValue("aaa");
-
- tlog.Debug(tag, $"DictionaryExternalThemeGetValue END (OK)");
- Assert.Pass("DictionaryExternalThemeGetValue");
- }
- }
-}
+++ /dev/null
-using NUnit.Framework;
-using System;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Theme/ExternalThemeKeyList")]
- internal class PublicExternalThemeKeyListTest
- {
- private const string tag = "NUITEST";
- private readonly object viewStyle;
-
- [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 ExternalThemeKeyList object.")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.ExternalThemeKeyList C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("COVPARAM", "")]
- public void ExternalThemeKeyListConstructor()
- {
- tlog.Debug(tag, $"ExternalThemeKeyListConstructor START");
-
- Type componentType = typeof(string);
- Type styleType = typeof(string);
- ExternalThemeKeyList a1 = new ExternalThemeKeyList(componentType, styleType);
-
- tlog.Debug(tag, $"ExternalThemeKeyListConstructor END (OK)");
- Assert.Pass("ExternalThemeKeyListConstructor");
- }
-
- [Test]
- [Category("P1")]
- [Description("ExternalThemeKeyList add")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.add M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void ExternalThemeKeyListadd()
- {
- tlog.Debug(tag, $"ExternalThemeKeyListadd START");
-
- ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
-
- keyList.Add<Size>("/Size", (ViewStyle style, Size value) => style.Size = value);
- tlog.Debug(tag, $"ExternalThemeKeyListadd END (OK)");
- Assert.Pass("ExternalThemeKeyListadd");
- }
-
- [Test]
- [Category("P1")]
- [Description("ExternalThemeKeyList AddSelector")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.AddSelector M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void ExternalThemeKeyListAddSelector()
- {
- tlog.Debug(tag, $"ExternalThemeKeyListAddSelector START");
-
- ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
-
- keyList.AddSelector<Color>("/Pickers/ItemTextLabel/TextColor", (ViewStyle style, Selector<Color> value) => ((TimePickerStyle)style).Pickers.ItemTextLabel.TextColor = value, ControlState.Selected);
-
- tlog.Debug(tag, $"ExternalThemeKeyListAddSelector END (OK)");
- Assert.Pass("ExternalThemeKeyListAddSelector");
- }
-
- [Test]
- [Category("P1")]
- [Description("ExternalThemeKeyList AddBackgroundSelector")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.AddBackgroundSelector M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void ExternalThemeKeyListAddBackgroundSelector()
- {
- tlog.Debug(tag, $"ExternalThemeKeyListAddBackgroundSelector START");
-
- ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
-
- keyList.AddBackgroundSelector("/Background", mySetBackgroundColor, mySetBackgroundImage);
-
- tlog.Debug(tag, $"ExternalThemeKeyListAddBackgroundSelector END (OK)");
- Assert.Pass("ExternalThemeKeyListAddBackgroundSelector");
- }
-
- private static void mySetBackgroundColor(ViewStyle style, Selector<Color> value)
- {
- style.BackgroundColor = value;
- }
-
- private static void mySetBackgroundImage(ViewStyle style, Selector<string> value)
- {
- style.BackgroundImage = value;
- }
-
- //[Test]
- //[Category("P1")]
- //[Description("ExternalThemeKeyList ApplyKeyActions")]
- //[Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.ApplyKeyActions M")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "MR")]
- //public void ExternalThemeKeyListApplyKeyActions()
- //{
- // tlog.Debug(tag, $"ExternalThemeKeyListApplyKeyActions START");
-
- // ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
-
- // Tizen.Applications.ThemeManager.Theme theme();
- // TizenExternalTheme externalTheme = new TizenExternalTheme();
- // Theme theme = new Theme();
- // keyList.ApplyKeyActions(externalTheme, theme);
-
- // tlog.Debug(tag, $"ExternalThemeKeyListApplyKeyActions END (OK)");
- // Assert.Pass("ExternalThemeKeyListApplyKeyActions");
- //}
- }
-}
-
-using NUnit.Framework;
+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
internal class PublicExternalThemeManagerTest
{
private const string tag = "NUITEST";
+ private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
[SetUp]
public void Init()
{
tlog.Debug(tag, $"ExternalThemeManagerSharedResourcePath START");
- string b1 = ExternalThemeManager.SharedResourcePath;
-
- ExternalThemeManager.Initialize();
- b1 = ExternalThemeManager.SharedResourcePath;
+ ExternalThemeManager.SharedResourcePath = path;
+ Assert.AreEqual(path, ExternalThemeManager.SharedResourcePath, "Should be equal!");
tlog.Debug(tag, $"ExternalThemeManagerSharedResourcePath END (OK)");
- Assert.Pass("ExternalThemeManagerSharedResourcePath");
}
[Test]
tlog.Debug(tag, $"ExternalThemeManagerInitialize END (OK)");
Assert.Pass("ExternalThemeManagerInitialize");
}
-
- [Test]
- [Category("P1")]
- [Description("test ExternalThemeManager GetCurrentTheme")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeManager.GetCurrentTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ExternalThemeManagerGetCurrentTheme()
- {
- tlog.Debug(tag, $"ExternalThemeManagerGetCurrentTheme START");
-
- ExternalThemeManager.GetCurrentTheme();
-
- tlog.Debug(tag, $"ExternalThemeManagerGetCurrentTheme END (OK)");
- Assert.Pass("ExternalThemeManagerGetCurrentTheme");
- }
-
- [Test]
- [Category("P1")]
- [Description("test ExternalThemeManager GetTheme")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeManager.GetTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ExternalThemeManagerGetTheme()
- {
- tlog.Debug(tag, $"ExternalThemeManagerGetTheme START");
-
- ExternalThemeManager.GetTheme("aaa");
-
- tlog.Debug(tag, $"ExternalThemeManagerGetTheme END (OK)");
- Assert.Pass("ExternalThemeManagerGetTheme");
- }
-
- [Test]
- [Category("P1")]
- [Description("test ExternalThemeManager SetTestTheme")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeManager.SetTestTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ExternalThemeManagerSetTestTheme()
- {
- tlog.Debug(tag, $"ExternalThemeManagerSetTestTheme START");
-
- ExternalThemeManager.SetTestTheme(null);
-
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
-
- ExternalThemeManager.SetTestTheme(a1);
- ExternalThemeManager.SetTestTheme(id, version, theme);
-
- tlog.Debug(tag, $"ExternalThemeManagerSetTestTheme END (OK)");
- Assert.Pass("ExternalThemeManagerSetTestTheme");
- }
}
}
\ No newline at end of file
}
[Test]
- [Category("P1")]
- [Description("Create a Theme object.")]
+ [Category("P2")]
+ [Description("Theme construcotr. xaml file path is null.")]
[Property("SPEC", "Tizen.NUI.Theme.Theme C")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "")]
- public void ThemeConstructor()
+ public void ThemeConstructorWithUnavailablePath()
{
- tlog.Debug(tag, $"ThemeConstructor START");
-
- Theme a1 = new Theme("");
- Theme b1 = new Theme("/root/noexist.xml");
- Theme C1 = new Theme("/etc/info.ini");
+ tlog.Debug(tag, $"ThemeConstructorWithUnavailablePath START");
- tlog.Debug(tag, $"ThemeConstructor END (OK)");
- Assert.Pass("ThemeConstructor");
+ try
+ {
+ Theme a1 = new Theme("");
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ThemeConstructorWithUnavailablePath END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
}
[Test]
Assert.Pass("ThemeResources");
}
- //[Test]
- //[Category("P1")]
- //[Description("test Theme this .")]
- //[Property("SPEC", "Tizen.NUI.Theme.this A")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "PRW")]
- //[Property("COVPARAM", "")]
- //public void Themethis()
- //{
- // tlog.Debug(tag, $"Themethis START");
- // Theme a1 = new Theme();
-
- // ViewStyle b1 = a1.styleName;
-
- // tlog.Debug(tag, $"Themethis END (OK)");
- // Assert.Pass("Themethis");
- //}
-
[Test]
[Category("P1")]
[Description("test Theme Clear .")]
[Test]
[Category("P1")]
- [Description("test Theme AddStyle .")]
- [Property("SPEC", "Tizen.NUI.Theme.AddStyle M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ThemeAddStyle()
- {
- tlog.Debug(tag, $"ThemeAddStyle START");
- Theme a1 = new Theme();
-
- ViewStyle v1 = new ViewStyle();
- a1.AddStyle("red", v1);
-
- a1.AddStyle(null, v1);
-
- tlog.Debug(tag, $"ThemeAddStyle END (OK)");
- Assert.Pass("ThemeAddStyle");
- }
-
- [Test]
- [Category("P1")]
[Description("test Theme Clone .")]
[Property("SPEC", "Tizen.NUI.Theme.Clone M")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
- [Description("test Theme Merge .")]
+ [Description("Theme Merge .")]
[Property("SPEC", "Tizen.NUI.Theme.Merge M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
public void ThemeMerge()
{
tlog.Debug(tag, $"ThemeMerge START");
+
+ ViewStyle style = new ViewStyle()
+ {
+ Size = new Size2D(100, 30),
+ Focusable = true
+ };
Theme a1 = new Theme();
+ a1.Version = "0.1";
+ a1.AddStyle("myStyle", style);
- a1.Merge("./opt/etc/skel/apps_rw/mobilebff/tizen-manifest.xml");
+ ViewStyle style1 = new ViewStyle()
+ {
+ Margin = new Extents(4, 2, 3, 7)
+ };
Theme t1 = new Theme();
- a1.Merge(t1);
+ t1.Id = "t1";
+ t1.Version = "1.0";
+ t1.AddStyle("myStyle", style1);
- Theme t2 = null;
- a1.Merge(t2);
+ try
+ {
+ a1.Merge(t1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
tlog.Debug(tag, $"ThemeMerge END (OK)");
- Assert.Pass("ThemeMerge");
}
[Test]
- [Category("P1")]
- [Description("test Theme MergeWithoutClone .")]
- [Property("SPEC", "Tizen.NUI.Theme.MergeWithoutClone M")]
+ [Category("P2")]
+ [Description("Theme Merge. Parameter is null.")]
+ [Property("SPEC", "Tizen.NUI.Theme.Merge M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "")]
- public void ThemeMergeWithoutClone()
+ public void ThemeMergeWithNullParameter()
{
- tlog.Debug(tag, $"ThemeMergeWithoutClone START");
+ tlog.Debug(tag, $"ThemeMergeWithNullParameter START");
Theme a1 = new Theme();
Theme b1 = new Theme();
Theme t2 = null;
- a1.Merge(t2);
+ try
+ {
+ a1.Merge(t2);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ThemeMergeWithNullParameter END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+
string tmp = a1.Id;
a1.Id = null;
tmp = a1.Version;
a1.Version = null;
a1.Merge(b1);
-
- tlog.Debug(tag, $"ThemeMergeWithoutClone END (OK)");
- Assert.Pass("ThemeMergeWithoutClone");
}
[Test]
- [Category("P1")]
- [Description("test Theme ApplyExternalTheme .")]
- [Property("SPEC", "Tizen.NUI.Theme.ApplyExternalTheme M")]
+ [Category("P2")]
+ [Description("Theme Merge. Id is null.")]
+ [Property("SPEC", "Tizen.NUI.Theme.Merge M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "")]
- public void ThemeApplyExternalTheme()
+ public void ThemeMergeWithNullId()
{
- tlog.Debug(tag, $"ThemeApplyExternalTheme START");
+ tlog.Debug(tag, $"ThemeMergeWithNullId START");
Theme a1 = new Theme();
Theme b1 = new Theme();
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme c1 = new DictionaryExternalTheme("myid", "myversion", theme);
+ a1.Id = null;
+ a1.Merge(b1);
+ Assert.AreEqual(a1.Id, b1.Id, "Should be equal!");
- Type componentType = typeof(string);
- Type styleType = typeof(string);
- ExternalThemeKeyList e1 = new ExternalThemeKeyList(componentType, styleType);
+ tlog.Debug(tag, $"ThemeMergeWithNullId END (OK)");
+ }
- HashSet<ExternalThemeKeyList> keyListSet = new HashSet<ExternalThemeKeyList>
- {
- e1
- };
+ [Test]
+ [Category("P2")]
+ [Description("Theme Merge. Version is null.")]
+ [Property("SPEC", "Tizen.NUI.Theme.Merge M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ public void ThemeMergeWithNullVersion()
+ {
+ tlog.Debug(tag, $"ThemeMergeWithNullVersion START");
+ Theme a1 = new Theme();
+ Theme b1 = new Theme();
- a1.ApplyExternalTheme(c1, keyListSet);
- a1.ApplyExternalTheme(c1, null);
+ a1.Version = null;
+ a1.Merge(b1);
+ Assert.AreEqual(a1.Version, b1.Version, "Should be equal!");
- tlog.Debug(tag, $"ThemeApplyExternalTheme END (OK)");
- Assert.Pass("ThemeApplyExternalTheme");
+ tlog.Debug(tag, $"ThemeMergeWithNullVersion END (OK)");
}
[Test]
{
tlog.Debug(tag, $"ThemeHasSameIdAndVersion START");
Theme a1 = new Theme();
- a1.HasSameIdAndVersion(null);
+ a1.HasSameIdAndVersion("themeid", "1.0");
tlog.Debug(tag, $"ThemeHasSameIdAndVersion END (OK)");
Assert.Pass("ThemeHasSameIdAndVersion");
-using NUnit.Framework;
+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
{
{
tlog.Debug(tag, $"ThemeChangedEventArgsConstructor START");
- ThemeChangedEventArgs a1 = new ThemeChangedEventArgs("themeid");
+ Theme theme = new Theme()
+ {
+ Id = "1"
+ };
+
+ try
+ {
+ var testingTarget = new ThemeChangedEventArgs(theme.Id, ThemeManager.PlatformThemeId, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object ThemeChangedEventArgs.");
+ Assert.IsInstanceOf<ThemeChangedEventArgs>(testingTarget, "Should return ThemeChangedEventArgs instance.");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
tlog.Debug(tag, $"ThemeChangedEventArgsConstructor END (OK)");
- Assert.Pass("ThemeChangedEventArgsConstructor");
}
[Test]
{
tlog.Debug(tag, $"ThemeChangedEventArgsThemeId START");
- ThemeChangedEventArgs a1 = new ThemeChangedEventArgs("themeid");
- string b1 = a1.ThemeId;
+ Theme theme = new Theme()
+ {
+ Id = "1"
+ };
+ var testingTarget = new ThemeChangedEventArgs(theme.Id, ThemeManager.PlatformThemeId, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object ThemeChangedEventArgs.");
+ Assert.IsInstanceOf<ThemeChangedEventArgs>(testingTarget, "Should return ThemeChangedEventArgs instance.");
+
+ try
+ {
+ var result = testingTarget.ThemeId;
+ tlog.Debug(tag, "themeId :" + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
tlog.Debug(tag, $"ThemeChangedEventArgsThemeId END (OK)");
- Assert.Pass("ThemeChangedEventArgsThemeId");
}
}
}
-using NUnit.Framework;
-using System;
+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
[Test]
[Category("P1")]
- [Description("Test ThemeManager DefaultTheme.")]
- [Property("SPEC", "Tizen.NUI.ThemeManager.DefaultTheme A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("COVPARAM", "")]
- public void ThemeManagerDefaultTheme()
- {
- tlog.Debug(tag, $"ThemeManagerDefaultTheme START");
-
- Theme a1 = ThemeManager.DefaultTheme;
- ThemeManager.DefaultTheme = a1;
-
- tlog.Debug(tag, $"ThemeManagerDefaultTheme END (OK)");
- Assert.Pass("ThemeManagerDefaultTheme");
- }
-
- [Test]
- [Category("P1")]
[Description("Test ThemeManager CurrentTheme.")]
[Property("SPEC", "Tizen.NUI.ThemeManager.CurrentTheme A")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
- [Description("Test ThemeManager ApplyBaseTheme.")]
- [Property("SPEC", "Tizen.NUI.ThemeManager.ApplyBaseTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ThemeManagerApplyBaseTheme()
- {
- tlog.Debug(tag, $"ThemeManagerApplyBaseTheme START");
-
-
- ThemeManager.ApplyBaseTheme("mythemeid");
-
- tlog.Debug(tag, $"ThemeManagerApplyBaseTheme END (OK)");
- Assert.Pass("ThemeManagerApplyBaseTheme");
- }
-
- [Test]
- [Category("P1")]
[Description("Test ThemeManager GetStyle.")]
[Property("SPEC", "Tizen.NUI.ThemeManager.GetStyle M")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
- [Description("Test ThemeManager GetBuiltinTheme.")]
- [Property("SPEC", "Tizen.NUI.ThemeManager.GetBuiltinTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ThemeManagerGetBuiltinTheme()
- {
- tlog.Debug(tag, $"ThemeManagerGetBuiltinTheme START");
-
-
- ThemeManager.GetBuiltinTheme("myThemeID");
-
- tlog.Debug(tag, $"ThemeManagerGetBuiltinTheme END (OK)");
- Assert.Pass("ThemeManagerGetBuiltinTheme");
- }
-
- [Test]
- [Category("P1")]
[Description("Test ThemeManager ApplyFallbackTheme.")]
[Property("SPEC", "Tizen.NUI.ThemeManager.ApplyFallbackTheme M")]
[Property("SPEC_URL", "-")]
tlog.Debug(tag, $"ThemeManagerApplyFallbackTheme END (OK)");
Assert.Pass("ThemeManagerApplyFallbackTheme");
}
-
- [Test]
- [Category("P1")]
- [Description("Test ThemeManager ApplyExternalTheme.")]
- [Property("SPEC", "Tizen.NUI.ThemeManager.ApplyExternalTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ThemeManagerApplyExternalTheme()
- {
- tlog.Debug(tag, $"ThemeManagerApplyExternalTheme START");
-
- Dictionary<string, string> b1 = new Dictionary<string, string>
- {
- { "test1", "test2" }
- };
-
-
- DictionaryExternalTheme c1 = new DictionaryExternalTheme("myid", "myVersion", b1);
-
- ThemeManager.ApplyExternalTheme(c1);
-
- tlog.Debug(tag, $"ThemeManagerApplyExternalTheme END (OK)");
- Assert.Pass("ThemeManagerApplyExternalTheme");
- }
-
}
}
+++ /dev/null
-using NUnit.Framework;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Theme/TizenExternalTheme")]
- internal class PublicTizenExternalThemeTest
- {
- private const string tag = "NUITEST";
- private readonly object themeLoader;
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test TizenExternalTheme GetValue.")]
- [Property("SPEC", "Tizen.NUI.TizenExternalTheme.GetValue M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void TizenExternalThemeGetValue()
- {
- tlog.Debug(tag, $"TizenExternalThemeGetValue START");
-
- Tizen.Applications.ThemeManager.ThemeLoader themeLoader = new Tizen.Applications.ThemeManager.ThemeLoader();
-
- Tizen.Applications.ThemeManager.Theme a1 = null;
- string id = "myId";
-
- a1 = themeLoader.LoadTheme(id);
-
- TizenExternalTheme b1 = new TizenExternalTheme(a1);
-
-
-
- tlog.Debug(tag, $"TizenExternalThemeGetValue END (OK)");
- Assert.Pass("TizenExternalThemeGetValue");
- }
- }
-}
-
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Widget/Widget")]
+ public class PublicWidgetTest
+ {
+ private const string tag = "NUITEST";
+ private Widget widget = null;
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+
+ widget = new Widget();
+ tlog.Debug(tag, "widget.Id : " + widget.Id);
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ widget.Dispose();
+ widget = null;
+
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ internal class MyWidget : Widget
+ {
+ public MyWidget() : base()
+ { }
+
+ public void MyOnCreate(string contentInfo, Window window)
+ {
+ window.BackgroundColor = Color.White;
+ TextLabel textLabel = new TextLabel("Widget Works");
+
+ window.GetDefaultLayer().Add(textLabel);
+ base.OnCreate(contentInfo, window);
+ }
+
+ public void MyOnTerminate(string contentInfo, Widget.TerminationType type)
+ {
+ base.OnTerminate(contentInfo, type);
+ }
+
+ public void MyOnPause()
+ {
+ base.OnPause();
+ }
+
+ public void MyOnResume()
+ {
+ base.OnResume();
+ }
+
+ public void MyOnResize(Window window)
+ {
+ base.OnResize(window);
+ }
+
+ public void MyOnUpdate(string contentInfo, int force)
+ {
+ base.OnUpdate(contentInfo, force);
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Widget Constructor. With IntPtr.")]
+ [Property("SPEC", "Tizen.NUI.Widget.Widget C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetConstructorWithIntPtr()
+ {
+ tlog.Debug(tag, $"WidgetConstructorWithIntPtr START");
+
+ var testingTarget = new Widget(widget.GetIntPtr(), true);
+ Assert.IsNotNull(testingTarget, "Can't create success object Widget");
+ Assert.IsInstanceOf<Widget>(testingTarget, "Should be an instance of Widget type.");
+
+ tlog.Debug(tag, $"WidgetConstructorWithIntPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Widget SetContentInfo.")]
+ [Property("SPEC", "Tizen.NUI.Widget.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetSetContentInfo()
+ {
+ tlog.Debug(tag, $"WidgetSetContentInfo START");
+
+ try
+ {
+ widget.SetContentInfo("PublicWidgetTest");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetSetContentInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Widget getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.Widget.getCPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetGetCPtr()
+ {
+ tlog.Debug(tag, $"WidgetGetCPtr START");
+
+ var testingTarget = new Widget(widget.GetIntPtr(), true);
+ Assert.IsNotNull(testingTarget, "Can't create success object Widget");
+ Assert.IsInstanceOf<Widget>(testingTarget, "Should be an instance of Widget type.");
+
+ var result = Widget.getCPtr(testingTarget);
+ Assert.IsNotNull(result);
+
+ tlog.Debug(tag, $"WidgetGetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Widget Assign.")]
+ [Property("SPEC", "Tizen.NUI.Widget.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetAssign()
+ {
+ tlog.Debug(tag, $"WidgetAssign START");
+
+ var result = widget.Assign(Activator.CreateInstance(typeof(Widget)) as Widget);
+ Assert.IsNotNull(result, "Can't create success object Widget");
+ Assert.IsInstanceOf<Widget>(result, "Should be an instance of Widget type.");
+
+ tlog.Debug(tag, $"WidgetAssign END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Widget/WidgetView")]
+ public class PublicWidgetViewTest
+ {
+ private const string tag = "NUITEST";
+ private ImageView imageView = null;
+ private WidgetView widgetView = null;
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+
+ imageView = new ImageView();
+ widgetView = new WidgetView(imageView.SwigCPtr.Handle, false);
+ tlog.Debug(tag, " widgetView.Id : " + widgetView.Id.ToString());
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ imageView?.Dispose();
+ imageView = null;
+
+ widgetView?.Dispose();
+ widgetView = null;
+
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView Constructor.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.WidgetView C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewConstructor()
+ //{
+ // tlog.Debug(tag, $"WidgetViewConstructor START");
+
+ // try
+ // {
+ // var testingTarget = new WidgetView(widget.Id.ToString(), "WidgetView", 100, 200, 50.0f);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // testingTarget.Dispose();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // tlog.Debug(tag, $"WidgetViewConstructor END (OK)");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView Constructor. With WidgetView")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetView C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewConstructorWithWidgetView()
+ {
+ tlog.Debug(tag, $"WidgetViewConstructorWithWidgetView START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewConstructorWithWidgetView END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView WidgetAddedSignal.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetAddedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetAddedSignal()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetAddedSignal START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.WidgetAddedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewWidgetAddedSignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView WidgetDeletedSignal.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetDeletedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetDeletedSignal()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetDeletedSignal START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.WidgetDeletedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewWidgetDeletedSignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView WidgetCreationAbortedSignal.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetCreationAbortedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetCreationAbortedSignal()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetCreationAbortedSignal START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.WidgetCreationAbortedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewWidgetCreationAbortedSignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView WidgetContentUpdatedSignal.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetContentUpdatedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetContentUpdatedSignal()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetContentUpdatedSignal START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.WidgetContentUpdatedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewWidgetContentUpdatedSignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView WidgetUpdatePeriodChangedSignal.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetUpdatePeriodChangedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetUpdatePeriodChangedSignal()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetUpdatePeriodChangedSignal START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.WidgetUpdatePeriodChangedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewWidgetUpdatePeriodChangedSignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView WidgetFaultedSignal.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetFaultedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetFaultedSignal()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetFaultedSignal START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.WidgetFaultedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewWidgetFaultedSignal END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView WidgetAdded.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.WidgetAdded A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewWidgetAdded()
+ //{
+ // tlog.Debug(tag, $"WidgetViewWidgetAdded START");
+
+ // var testingTarget = new WidgetView(widgetView);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // try
+ // {
+ // testingTarget.WidgetAdded += MyOnWidgetAdded;
+ // testingTarget.WidgetAdded -= MyOnWidgetAdded;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"WidgetViewWidgetAdded END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView WidgetContentUpdated.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.WidgetContentUpdated A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewWidgetContentUpdated()
+ //{
+ // tlog.Debug(tag, $"WidgetViewWidgetContentUpdated START");
+
+ // var testingTarget = new WidgetView(widgetView);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // try
+ // {
+ // testingTarget.WidgetContentUpdated += MyOnWidgetContentUpdated;
+ // testingTarget.WidgetContentUpdated -= MyOnWidgetContentUpdated;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"WidgetViewWidgetContentUpdated END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView WidgetDeleted.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.WidgetDeleted A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewWidgetDeleted()
+ //{
+ // tlog.Debug(tag, $"WidgetViewWidgetDeleted START");
+
+ // var testingTarget = new WidgetView(widgetView);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // try
+ // {
+ // testingTarget.WidgetDeleted += MyOnWidgetDeleted;
+ // testingTarget.WidgetDeleted -= MyOnWidgetDeleted;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"WidgetViewWidgetDeleted END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView WidgetCreationAborted.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.WidgetCreationAborted A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewWidgetCreationAborted()
+ //{
+ // tlog.Debug(tag, $"WidgetViewWidgetCreationAborted START");
+
+ // var testingTarget = new WidgetView(widgetView);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // try
+ // {
+ // testingTarget.WidgetCreationAborted += MyOnWidgetCreationAborted;
+ // testingTarget.WidgetCreationAborted -= MyOnWidgetCreationAborted;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"WidgetViewWidgetCreationAborted END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView WidgetUpdatePeriodChanged.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.WidgetUpdatePeriodChanged A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewWidgetUpdatePeriodChanged()
+ //{
+ // tlog.Debug(tag, $"WidgetViewWidgetUpdatePeriodChanged START");
+
+ // var testingTarget = new WidgetView(widgetView);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // try
+ // {
+ // testingTarget.WidgetUpdatePeriodChanged += MyOnWidgetUpdatePeriodChanged;
+ // testingTarget.WidgetUpdatePeriodChanged -= MyOnWidgetUpdatePeriodChanged;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"WidgetViewWidgetUpdatePeriodChanged END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView WidgetFaulted.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.WidgetFaulted A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewWidgetFaulted()
+ //{
+ // tlog.Debug(tag, $"WidgetViewWidgetFaulted START");
+
+ // var testingTarget = new WidgetView(widgetView);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // try
+ // {
+ // testingTarget.WidgetFaulted += MyOnWidgetFaulted;
+ // testingTarget.WidgetFaulted -= MyOnWidgetFaulted;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"WidgetViewWidgetFaulted END (OK)");
+ //}
+
+ private void MyOnWidgetAdded(object sender, EventArgs e) { }
+ //private void MyOnWidgetContentUpdated(object sender, EventArgs e) { }
+ //private void MyOnWidgetDeleted(object sender, EventArgs e) { }
+ //private void MyOnWidgetCreationAborted(object sender, EventArgs e) { }
+ //private void MyOnWidgetUpdatePeriodChanged(object sender, EventArgs e) { }
+ //private void MyOnWidgetFaulted(object sender, EventArgs e) { }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView WidgetID.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetID A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetID()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetID START");
+
+ try
+ {
+ tlog.Debug(tag, "widgetView.WidgetID : " + widgetView.WidgetID);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewWidgetID END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView InstanceID.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.InstanceID A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewInstanceID()
+ {
+ tlog.Debug(tag, $"WidgetViewInstanceID START");
+
+ try
+ {
+ tlog.Debug(tag, "widgetView.InstanceID : " + widgetView.InstanceID);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewInstanceID END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView ContentInfo.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.ContentInfo A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewContentInfo()
+ {
+ tlog.Debug(tag, $"WidgetViewContentInfo START");
+
+ try
+ {
+ tlog.Debug(tag, "widgetView.ContentInfo : " + widgetView.ContentInfo);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewContentInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView Title.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.Title A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewTitle()
+ {
+ tlog.Debug(tag, $"WidgetViewTitle START");
+
+ try
+ {
+ tlog.Debug(tag, "widgetView.Title : " + widgetView.Title);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewTitle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView UpdatePeriod.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.Title A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewUpdatePeriod()
+ {
+ tlog.Debug(tag, $"WidgetViewUpdatePeriod START");
+
+ try
+ {
+ tlog.Debug(tag, "widgetView.UpdatePeriod : " + widgetView.UpdatePeriod);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewUpdatePeriod END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView Preview.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.Preview A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewPreview()
+ {
+ tlog.Debug(tag, $"WidgetViewPreview START");
+
+ try
+ {
+ tlog.Debug(tag, "Default widgetView.Preview is : " + widgetView.Preview);
+
+ widgetView.Preview = true;
+ tlog.Debug(tag, "widgetView.Preview : " + widgetView.Preview);
+
+ widgetView.Preview = false;
+ tlog.Debug(tag, "widgetView.Preview : " + widgetView.Preview);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewPreview END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView LoadingText.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.LoadingText A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewLoadingText()
+ {
+ tlog.Debug(tag, $"WidgetViewLoadingText START");
+
+ try
+ {
+ tlog.Debug(tag, "Default widgetView.Preview is : " + widgetView.LoadingText);
+
+ widgetView.LoadingText = true;
+ tlog.Debug(tag, "widgetView.LoadingText : " + widgetView.LoadingText);
+
+ widgetView.LoadingText = false;
+ tlog.Debug(tag, "widgetView.LoadingText : " + widgetView.LoadingText);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewLoadingText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView WidgetStateFaulted.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetStateFaulted A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetStateFaulted()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetStateFaulted START");
+
+ try
+ {
+ tlog.Debug(tag, "Default widgetView.Preview is : " + widgetView.WidgetStateFaulted);
+
+ widgetView.WidgetStateFaulted = true;
+ tlog.Debug(tag, "widgetView.WidgetStateFaulted : " + widgetView.WidgetStateFaulted);
+
+ widgetView.WidgetStateFaulted = false;
+ tlog.Debug(tag, "widgetView.WidgetStateFaulted : " + widgetView.WidgetStateFaulted);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewWidgetStateFaulted END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView PermanentDelete.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.PermanentDelete A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetPermanentDelete()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetPermanentDelete START");
+
+ try
+ {
+ tlog.Debug(tag, "Default widgetView.Preview is : " + widgetView.PermanentDelete);
+
+ widgetView.PermanentDelete = true;
+ tlog.Debug(tag, "widgetView.PermanentDelete : " + widgetView.PermanentDelete);
+
+ widgetView.PermanentDelete = false;
+ tlog.Debug(tag, "widgetView.PermanentDelete : " + widgetView.PermanentDelete);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewWidgetPermanentDelete END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView RetryText.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.RetryText A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewRetryText()
+ {
+ tlog.Debug(tag, $"WidgetViewRetryText START");
+
+ try
+ {
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Insert(WidgetView.Property.RetryText, new PropertyValue(1));
+
+ widgetView.RetryText = map;
+
+ var result = widgetView.RetryText;
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewRetryText END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView Effect.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.Effect A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewEffect()
+ {
+ tlog.Debug(tag, $"WidgetViewEffect START");
+
+ try
+ {
+ using (PropertyMap map = new PropertyMap())
+ {
+ map.Insert(WidgetView.Property.EFFECT, new PropertyValue(1));
+
+ widgetView.Effect = map;
+
+ var result = widgetView.Effect;
+ Assert.IsInstanceOf<PropertyMap>(result, "Should be an instance of PropertyMap type.");
+ }
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewEffect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView PauseWidget.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.PauseWidget M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetPauseWidget()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetPauseWidget START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.PauseWidget();
+ testingTarget.ResumeWidget();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewWidgetPauseWidget END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView CancelTouchEvent.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.CancelTouchEvent M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewCancelTouchEvent()
+ //{
+ // tlog.Debug(tag, $"WidgetViewCancelTouchEvent START");
+
+ // var testingTarget = new WidgetView(widgetView);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // try
+ // {
+ // tlog.Debug(tag, "testingTarget.CancelTouchEvent() : " + testingTarget.CancelTouchEvent());
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"WidgetViewCancelTouchEvent END (OK)");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView ActivateFaultedWidget.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.ActivateFaultedWidget M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewActivateFaultedWidget()
+ {
+ tlog.Debug(tag, $"WidgetViewActivateFaultedWidget START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.ActivateFaultedWidget();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewActivateFaultedWidget END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView TerminateWidget.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.TerminateWidget M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewTerminateWidget()
+ {
+ tlog.Debug(tag, $"WidgetViewTerminateWidget START");
+
+ var testingTarget = new WidgetView(widgetView);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ try
+ {
+ testingTarget.TerminateWidget();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewTerminateWidget END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetView DownCast.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetView.DownCast M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewDownCast()
+ //{
+ // tlog.Debug(tag, $"WidgetViewDownCast START");
+
+ // var testingTarget = new WidgetView(widgetView);
+ // Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(testingTarget, "Should be an instance of WidgetView type.");
+
+ // try
+ // {
+ // WidgetView.DownCast(testingTarget);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // tlog.Debug(tag, $"WidgetViewDownCast END (OK)");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView GetWidgetViewFromPtr.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.GetWidgetViewFromPtr M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewGetWidgetViewFromPtr()
+ {
+ tlog.Debug(tag, $"WidgetViewGetWidgetViewFromPtr START");
+
+ try
+ {
+ WidgetView.GetWidgetViewFromPtr(widgetView.SwigCPtr.Handle);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewGetWidgetViewFromPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView Assign.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewAssign()
+ {
+ tlog.Debug(tag, $"WidgetViewAssign START");
+
+ try
+ {
+ widgetView.Assign(widgetView);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetView.WidgetViewEventArgs.WidgetView.")]
+ [Property("SPEC", "Tizen.NUI.WidgetView.WidgetViewEventArgs.WidgetView M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewWidgetViewEventArgsWidgetView()
+ {
+ tlog.Debug(tag, $"WidgetViewWidgetViewEventArgsWidgetView START");
+
+ var testingTarget = new WidgetView.WidgetViewEventArgs();
+ tlog.Debug(tag, "Default testingTarget.WidgetView is : " + testingTarget.WidgetView);
+
+ testingTarget.WidgetView = widgetView;
+ tlog.Debug(tag, "testingTarget.WidgetView is : " + testingTarget.WidgetView);
+
+ tlog.Debug(tag, $"WidgetViewWidgetViewEventArgsWidgetView END (OK)");
+ }
+
+
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Widget/WidgetViewManager")]
+ public class PublicWidgetViewManagerTest
+ {
+ private const string tag = "NUITEST";
+ private Widget widget = null;
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+
+ widget = new Widget();
+ tlog.Debug(tag, "widget.Id : " + widget.Id);
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ widget.Dispose();
+ widget = null;
+
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewManager constructor.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewManager.WidgetViewManager C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewManagerConstructor()
+ {
+ tlog.Debug(tag, $"WidgetViewManagerConstructor START");
+
+ var testingTarget = new WidgetViewManager(widget.GetIntPtr(), false);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetViewManager");
+ Assert.IsInstanceOf<WidgetViewManager>(testingTarget, "Should be an instance of WidgetViewManager type.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewManagerConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewManager constructor. With WidgetViewManager.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewManager.WidgetViewManager C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewManagerConstructorWithWidgetViewManager()
+ {
+ tlog.Debug(tag, $"WidgetViewManagerConstructorWithWidgetViewManager START");
+
+ WidgetViewManager manager = new WidgetViewManager(widget.GetIntPtr(), false);
+ Assert.IsNotNull(manager, "Can't create success object WidgetViewManager");
+ Assert.IsInstanceOf<WidgetViewManager>(manager, "Should be an instance of WidgetViewManager type.");
+
+ var testingTarget = new WidgetViewManager(manager);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetViewManager");
+ Assert.IsInstanceOf<WidgetViewManager>(testingTarget, "Should be an instance of WidgetViewManager type.");
+
+ manager.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"WidgetViewManagerConstructorWithWidgetViewManager END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewManager Instance.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewManager.Instance A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewManagerInstance()
+ {
+ tlog.Debug(tag, $"WidgetViewManagerInstance START");
+
+ try
+ {
+ tlog.Debug(tag, "WidgetViewManager.Instance : " + WidgetViewManager.Instance);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewManagerInstance END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("WidgetViewManager AddWidget.")]
+ //[Property("SPEC", "Tizen.NUI.WidgetViewManager.AddWidget M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void WidgetViewManagerAddWidget()
+ //{
+ // tlog.Debug(tag, $"WidgetViewManagerAddWidget START");
+
+ // var testingTarget = new WidgetViewManager(widget.GetIntPtr(), false);
+
+ // var result = testingTarget.AddWidget(widget.Id.ToString(), "WidgetView", 100, 200, 50.0f);
+ // Assert.IsNotNull(result, "Can't create success object WidgetView");
+ // Assert.IsInstanceOf<WidgetView>(result, "Should be an instance of WidgetView type.");
+
+ // testingTarget.Dispose();
+
+ // tlog.Debug(tag, $"WidgetViewManagerAddWidget END (OK)");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewManager getCPtr.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewManager.getCPtr A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewManagergetCPtr()
+ {
+ tlog.Debug(tag, $"WidgetViewManagergetCPtr START");
+
+ var testingTarget = new WidgetViewManager(widget.GetIntPtr(), false);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetViewManager");
+ Assert.IsInstanceOf<WidgetViewManager>(testingTarget, "Should be an instance of WidgetViewManager type.");
+
+ try
+ {
+
+ WidgetViewManager.getCPtr(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewManagergetCPtr END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewManager DownCast.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewManager.DownCast A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewManagerDownCast()
+ {
+ tlog.Debug(tag, $"WidgetViewManagerDownCast START");
+
+ var testingTarget = new WidgetViewManager(widget.GetIntPtr(), false);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetViewManager");
+ Assert.IsInstanceOf<WidgetViewManager>(testingTarget, "Should be an instance of WidgetViewManager type.");
+
+ try
+ {
+
+ WidgetViewManager.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewManagerDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("WidgetViewManager Assign.")]
+ [Property("SPEC", "Tizen.NUI.WidgetViewManager.Assign A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void WidgetViewManagerAssign()
+ {
+ tlog.Debug(tag, $"WidgetViewManagerAssign START");
+
+ var testingTarget = new WidgetViewManager(widget.GetIntPtr(), false);
+ Assert.IsNotNull(testingTarget, "Can't create success object WidgetViewManager");
+ Assert.IsInstanceOf<WidgetViewManager>(testingTarget, "Should be an instance of WidgetViewManager type.");
+
+ try
+ {
+ WidgetViewManager.Instance.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"WidgetViewManagerAssign END (OK)");
+ }
+ }
+}
--- /dev/null
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Window/GLWindow.cs")]
+ internal class PublicGLWindowTest
+ {
+ 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("GLWindow constructor.")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GLWindow C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ public void GLWindowConstructor()
+ {
+ tlog.Debug(tag, $"GLWindowConstructor START");
+
+ var testingTarget = new GLWindow();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Destroy();
+ tlog.Debug(tag, $"GLWindowConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow constructor. With name.")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GLWindow C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ public void GLWindowConstructorWithName()
+ {
+ tlog.Debug(tag, $"GLWindowConstructorWithName START");
+
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowConstructorWithName END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow constructor. With GLWindow.")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GLWindow C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ public void GLWindowConstructorWithGLWindow()
+ {
+ tlog.Debug(tag, $"GLWindowConstructorWithGLWindow START");
+
+ using (GLWindow glwindow = new GLWindow())
+ {
+ var testingTarget = new GLWindow(glwindow.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Destroy();
+ }
+
+ tlog.Debug(tag, $"GLWindowConstructorWithGLWindow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow WindowSize")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.WindowSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowWindowSize()
+ {
+ tlog.Debug(tag, $"GLWindowWindowSize START");
+
+ var testingTarget = new GLWindow();
+ Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "Should be an instance of GLWindow type.");
+
+ testingTarget.WindowSize = new Size2D(50, 30);
+ Assert.AreEqual(50, testingTarget.WindowSize.Width, "Should be equal!");
+ Assert.AreEqual(30, testingTarget.WindowSize.Height, "Should be equal!");
+
+ testingTarget.Destroy();
+ tlog.Debug(tag, $"GLWindowWindowSize END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("GLWindow SetEglConfig")]
+ //[Property("SPEC", "Tizen.NUI.GLWindow.SetEglConfig M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void GLWindowSetEglConfig()
+ //{
+ // tlog.Debug(tag, $"GLWindowSetEglConfig START");
+
+ // var testingTarget = new GLWindow();
+ // Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
+ // Assert.IsInstanceOf<GLWindow>(testingTarget, "Should be an instance of GLWindow type.");
+
+ // try
+ // {
+ // testingTarget.SetEglConfig(true, true, 10, GLESVersion.Version20);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Destroy();
+ // tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow Show")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.Show M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowShow()
+ {
+ tlog.Debug(tag, $"GLWindowShow START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.Show();
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowShow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow Hide")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.Hide M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowHide()
+ {
+ tlog.Debug(tag, $"GLWindowHide START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.Hide();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowHide END (OK)");
+ }
+
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow Raise")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.Raise M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowRaise()
+ {
+ tlog.Debug(tag, $"GLWindowRaise START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.Raise();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowRaise END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow Lower")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.Lower M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowLower()
+ {
+ tlog.Debug(tag, $"GLWindowLower START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.Lower();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowLower END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow Activate")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.Activate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowActivate()
+ {
+ tlog.Debug(tag, $"GLWindowActivate START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.Activate();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowActivate END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow WindowPositionSize")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.WindowPositionSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowWindowPositionSize()
+ {
+ tlog.Debug(tag, $"GLWindowWindowPositionSize START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.WindowPositionSize = new Rectangle(30, 40, 50, 60);
+ Assert.AreEqual(30, a1.WindowPositionSize.X, "Should be equal!");
+ Assert.AreEqual(40, a1.WindowPositionSize.Y, "Should be equal!");
+ Assert.AreEqual(50, a1.WindowPositionSize.Width, "Should be equal!");
+ Assert.AreEqual(60, a1.WindowPositionSize.Height, "Should be equal!");
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowWindowPositionSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow GetSupportedAuxiliaryHintCount")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GetSupportedAuxiliaryHintCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowGetSupportedAuxiliaryHintCount()
+ {
+ tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHintCount START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ var result = a1.GetSupportedAuxiliaryHintCount();
+ tlog.Debug(tag, "SupportedAuxiliaryHintCount : " + result);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHintCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow GetSupportedAuxiliaryHint")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GetSupportedAuxiliaryHint M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowGetSupportedAuxiliaryHint()
+ {
+ tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHint START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ var result = a1.GetSupportedAuxiliaryHint(1);
+ tlog.Debug(tag, "GetSupportedAuxiliaryHint : " + result);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHint END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow AddAuxiliaryHint")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.AddAuxiliaryHint M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowAddAuxiliaryHint()
+ {
+ tlog.Debug(tag, $"GLWindowAddAuxiliaryHint START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.AddAuxiliaryHint("myHint", "myValue");
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowAddAuxiliaryHint END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow RemoveAuxiliaryHint")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.RemoveAuxiliaryHint M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowRemoveAuxiliaryHint()
+ {
+ tlog.Debug(tag, $"GLWindowRemoveAuxiliaryHint START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
+ a1.RemoveAuxiliaryHint(pos);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowRemoveAuxiliaryHint END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow SetAuxiliaryHintValue")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.SetAuxiliaryHintValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowSetAuxiliaryHintValue()
+ {
+ tlog.Debug(tag, $"GLWindowSetAuxiliaryHintValue START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
+ a1.SetAuxiliaryHintValue(pos, "myValue");
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowSetAuxiliaryHintValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow GetAuxiliaryHintValue")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GetAuxiliaryHintValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowGetAuxiliaryHintValue()
+ {
+ tlog.Debug(tag, $"GLWindowGetAuxiliaryHintValue START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
+ a1.GetAuxiliaryHintValue(pos);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowGetAuxiliaryHintValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow GetAuxiliaryHintId")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GetAuxiliaryHintId M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowGetAuxiliaryHintId()
+ {
+ tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
+ a1.GetAuxiliaryHintId("myHint");
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow SetInputRegion")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.SetInputRegion M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowSetInputRegion()
+ {
+ tlog.Debug(tag, $"GLWindowSetInputRegion START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.SetInputRegion(rectangle);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow SetOpaqueState")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.SetOpaqueState M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowSetOpaqueState()
+ {
+ tlog.Debug(tag, $"GLWindowSetOpaqueState START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.SetOpaqueState(true);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowSetOpaqueState END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow IsOpaqueState")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.IsOpaqueState M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowIsOpaqueState()
+ {
+ tlog.Debug(tag, $"GLWindowIsOpaqueState START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ var result = a1.IsOpaqueState();
+ tlog.Debug(tag, "IsOpaqueState : " + result);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowIsOpaqueState END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow SetPreferredOrientation")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.SetPreferredOrientation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowSetPreferredOrientation()
+ {
+ tlog.Debug(tag, $"GLWindowSetPreferredOrientation START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ GLWindow.GLWindowOrientation o1 = new GLWindow.GLWindowOrientation();
+ a1.SetPreferredOrientation(o1);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowSetPreferredOrientation END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow GetCurrentOrientation")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GetCurrentOrientation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowGetCurrentOrientation()
+ {
+ tlog.Debug(tag, $"GLWindowGetCurrentOrientation START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ var result = a1.GetCurrentOrientation();
+ tlog.Debug(tag, "CurrentOrientation : " + result);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowGetCurrentOrientation END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow SetAvailableOrientations")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.SetAvailableOrientations M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowSetAvailableOrientations()
+ {
+ tlog.Debug(tag, $"GLWindowSetAvailableOrientations START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ GLWindow.GLWindowOrientation o1 = new GLWindow.GLWindowOrientation();
+ List<GLWindow.GLWindowOrientation> l1 = new List<GLWindow.GLWindowOrientation>
+ {
+ o1
+ };
+
+ a1.SetAvailableOrientations(l1);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowSetAvailableOrientations END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow RenderOnce")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.RenderOnce M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowRenderOnce()
+ {
+ tlog.Debug(tag, $"GLWindowRenderOnce START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.RenderOnce();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowRenderOnce END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow RegisterGlCallback")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.RegisterGlCallback M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowRegisterGlCallback()
+ {
+ tlog.Debug(tag, $"GLWindowRegisterGlCallback START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.RegisterGlCallback(GLInit, GLRenderFrame, GLTerminate);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowRegisterGlCallback END (OK)");
+ }
+
+ public void GLInit() { }
+ public int GLRenderFrame() { return 0; }
+ public void GLTerminate() { }
+ }
+}
+
--- /dev/null
+using NUnit.Framework;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Window/GLWindowEvent")]
+ internal class PublicGLWindowEventTest
+ {
+ 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("GLWindow FocusChanged")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.FocusChanged A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowFocusChanged()
+ {
+ tlog.Debug(tag, $"GLWindowFocusChanged START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.FocusChanged += A1_FocusChanged;
+ a1.FocusChanged -= A1_FocusChanged;
+
+ GLWindow.FocusChangedEventArgs e1 = new GLWindow.FocusChangedEventArgs();
+ A1_FocusChanged(null, e1);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowFocusChanged END (OK)");
+ Assert.Pass("GLWindowFocusChanged");
+ }
+
+ private void A1_FocusChanged(object sender, GLWindow.FocusChangedEventArgs e)
+ {
+ bool c1 = e.FocusGained;
+ e.FocusGained = c1;
+
+ return;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow TouchEvent")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.TouchEvent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowTouchEvent()
+ {
+ tlog.Debug(tag, $"GLWindowTouchEvent START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.TouchEvent += A1_TouchEvent;
+ a1.TouchEvent -= A1_TouchEvent;
+
+ GLWindow.TouchEventArgs e1 = new GLWindow.TouchEventArgs();
+ A1_TouchEvent(null, e1);
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowTouchEvent END (OK)");
+ Assert.Pass("GLWindowTouchEvent");
+ }
+
+ private void A1_TouchEvent(object sender, GLWindow.TouchEventArgs e)
+ {
+ Touch t1 = e.Touch;
+ e.Touch = t1;
+
+ return;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow KeyEvent")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.KeyEvent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowKeyEvent()
+ {
+ tlog.Debug(tag, $"GLWindowKeyEvent START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.KeyEvent += A1_KeyEvent;
+ a1.KeyEvent -= A1_KeyEvent;
+
+ GLWindow.KeyEventArgs e1 = new GLWindow.KeyEventArgs();
+ A1_KeyEvent(null, e1);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowKeyEvent END (OK)");
+ Assert.Pass("GLWindowKeyEvent");
+ }
+
+ private void A1_KeyEvent(object sender, GLWindow.KeyEventArgs e)
+ {
+ Key k1 = e.Key;
+ e.Key = k1;
+ return;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow Resized")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.Resized A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowResized()
+ {
+ tlog.Debug(tag, $"GLWindowResized START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.Resized += A1_Resized;
+ a1.Resized -= A1_Resized;
+
+ GLWindow.ResizedEventArgs e1 = new GLWindow.ResizedEventArgs();
+ A1_Resized(null, e1);
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowResized END (OK)");
+ Assert.Pass("GLWindowResized");
+ }
+
+ private void A1_Resized(object sender, GLWindow.ResizedEventArgs e)
+ {
+ Size2D s1 = e.WindowSize;
+ e.WindowSize = s1;
+ return;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow FocusChangedSignal")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.FocusChangedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowFocusChangedSignal()
+ {
+ tlog.Debug(tag, $"GLWindowFocusChangedSignal START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.FocusChangedSignal();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowFocusChangedSignal END (OK)");
+ Assert.Pass("GLWindowFocusChangedSignal");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow KeyEventSignal")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.KeyEventSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowKeyEventSignal()
+ {
+ tlog.Debug(tag, $"GLWindowKeyEventSignal START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.KeyEventSignal();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowKeyEventSignal END (OK)");
+ Assert.Pass("GLWindowKeyEventSignal");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow TouchSignal")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.TouchSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowTouchSignal()
+ {
+ tlog.Debug(tag, $"GLWindowTouchSignal START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.TouchSignal();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowTouchSignal END (OK)");
+ Assert.Pass("GLWindowTouchSignal");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow GLWindowResizedSignal")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GLWindowResizedSignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowGLWindowResizedSignal()
+ {
+ tlog.Debug(tag, $"GLWindowGLWindowResizedSignal START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.GLWindowResizedSignal();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowGLWindowResizedSignal END (OK)");
+ Assert.Pass("GLWindowGLWindowResizedSignal");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow GLWindowDisconnectNativeSignals")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.DisconnectNativeSignals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowDisconnectNativeSignals()
+ {
+ tlog.Debug(tag, $"GLWindowDisconnectNativeSignals START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.DisconnectNativeSignals();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowDisconnectNativeSignals END (OK)");
+ Assert.Pass("GLWindowDisconnectNativeSignals");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("GLWindow GLWindowVisibilityChanged")]
+ //[Property("SPEC", "Tizen.NUI.GLWindow.VisibilityChanged A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void GLWindowVisibilityChanged()
+ //{
+ // tlog.Debug(tag, $"GLWindowVisibilityChanged START");
+ // string name = "myGLWindow";
+ // Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ // GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ // a1.VisibilityChanged += A1_VisibilityChanged;
+ // a1.VisibilityChanged -= A1_VisibilityChanged;
+
+ // a1.Destroy();
+ // tlog.Debug(tag, $"GLWindowVisibilityChanged END (OK)");
+ //}
+
+ private void A1_VisibilityChanged(object sender, GLWindow.VisibilityChangedEventArgs e) { }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow GLWindowVisibiltyChangedSignalEmit")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.VisibiltyChangedSignalEmit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowVisibiltyChangedSignalEmit()
+ {
+ tlog.Debug(tag, $"GLWindowVisibiltyChangedSignalEmit START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ a1.VisibiltyChangedSignalEmit(true);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowVisibiltyChangedSignalEmit END (OK)");
+ Assert.Pass("GLWindowVisibiltyChangedSignalEmit");
+ }
+ }
+}
+
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Window/GLWindowVisibilityChangedEvent")]
+ internal class PublicGLWindowVisibilityChangedEventTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate bool dummyCallback(IntPtr glWindow);
+ 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("Create a GLWindowVisibilityChangedEvent object.")]
+ [Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.GLWindowVisibilityChangedEvent C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ public void GLWindowVisibilityChangedEventConstructor()
+ {
+ tlog.Debug(tag, $"GLWindowVisibilityChangedEventConstructor START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
+
+ b1.Dispose();
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowVisibilityChangedEventConstructor END (OK)");
+ Assert.Pass("GLWindowVisibilityChangedEventConstructor");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("GLWindowVisibilityChangedEvent Empty")]
+ //[Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.Empty M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void GLWindowVisibilityChangedEventEmpty()
+ //{
+ // tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty START");
+
+ // using (GLWindow glWindow = new GLWindow())
+ // {
+ // var testingTarget = new GLWindowVisibilityChangedEvent(glWindow.SwigCPtr.Handle, false);
+
+ // try
+ // {
+ // var result = testingTarget.Empty();
+ // tlog.Debug(tag, "result : " + result);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty END (OK)");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindowVisibilityChangedEvent GetConnectionCount")]
+ [Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowVisibilityChangedEventGetConnectionCount()
+ {
+ tlog.Debug(tag, $"GLWindowVisibilityChangedEventGetConnectionCount START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
+ b1.GetConnectionCount();
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowVisibilityChangedEventGetConnectionCount END (OK)");
+ Assert.Pass("GLWindowVisibilityChangedEventGetConnectionCount");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("GLWindowVisibilityChangedEvent Connect")]
+ //[Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void GLWindowVisibilityChangedEventConnect()
+ //{
+ // tlog.Debug(tag, $"GLWindowVisibilityChangedEventConnect START");
+
+ // using (GLWindow glWindow = new GLWindow())
+ // {
+ // var testingTarget = new GLWindowVisibilityChangedEvent(glWindow.SwigCPtr.Handle, false);
+
+ // 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, $"GLWindowVisibilityChangedEventConnect END (OK)");
+ // Assert.Pass("GLWindowVisibilityChangedEventConnect");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindowVisibilityChangedEvent Emit")]
+ [Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GLWindowVisibilityChangedEventEmit()
+ {
+ tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmit START");
+ string name = "myGLWindow";
+ Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
+ b1.Emit(a1, true);
+
+ a1.Destroy();
+ tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmit END (OK)");
+ Assert.Pass("GLWindowVisibilityChangedEventEmit");
+ }
+ }
+}
+
--- /dev/null
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using static Tizen.NUI.Window;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Window/Window")]
+ internal class PublicWindowTest
+ {
+ private const string tag = "NUITEST";
+ private static Window myWin;
+ [SetUp]
+ public void Init()
+ {
+ Rectangle r1 = new Rectangle(0, 0, 20, 20);
+ myWin = new Window(r1);
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ if (myWin != null)
+ {
+ myWin.Destroy();
+ myWin = null;
+ }
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Window WindowPositionSize")]
+ [Property("SPEC", "Tizen.NUI.Window.WindowPositionSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void WindowWindowPositionSize()
+ {
+ tlog.Debug(tag, $"WindowWindowPositionSize START");
+
+ try
+ {
+ myWin.WindowPositionSize = new Rectangle(1, 2, 3, 4);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"WindowWindowPositionSize END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("Window DEFAULT_BACKGROUND_COLOR")]
+ //[Property("SPEC", "Tizen.NUI.Window.DEFAULT_BACKGROUND_COLOR A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void WindowDEFAULT_BACKGROUND_COLOR()
+ //{
+ // tlog.Debug(tag, $"WindowDEFAULT_BACKGROUND_COLOR START");
+ // try
+ // {
+ // Vector4 v1 = Window.DEFAULT_BACKGROUND_COLOR;
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"WindowDEFAULT_BACKGROUND_COLOR END (OK)");
+ // Assert.Pass("WindowDEFAULT_BACKGROUND_COLOR");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("Window DEBUG_BACKGROUND_COLOR")]
+ //[Property("SPEC", "Tizen.NUI.Window.DEBUG_BACKGROUND_COLOR A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void WindowDEBUG_BACKGROUND_COLOR()
+ //{
+ // tlog.Debug(tag, $"WindowDEBUG_BACKGROUND_COLOR START");
+ // try
+ // {
+ // Vector4 v1 = Window.DEBUG_BACKGROUND_COLOR;
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"WindowDEBUG_BACKGROUND_COLOR END (OK)");
+ // Assert.Pass("WindowDEBUG_BACKGROUND_COLOR");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("Window GetLayer")]
+ [Property("SPEC", "Tizen.NUI.Window.GetLayer M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowGetLayer()
+ {
+ tlog.Debug(tag, $"WindowGetLayer START");
+
+ try
+ {
+ myWin.GetLayer(0);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ tlog.Debug(tag, $"WindowGetLayer END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Window GetCurrentOrientation")]
+ [Property("SPEC", "Tizen.NUI.Window.GetCurrentOrientation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowGetCurrentOrientation()
+ {
+ tlog.Debug(tag, $"WindowGetCurrentOrientation START");
+
+ try
+ {
+ myWin.GetCurrentOrientation();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"WindowGetCurrentOrientation END (OK)");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("Window SetAvailableOrientations")]
+ //[Property("SPEC", "Tizen.NUI.Window.SetAvailableOrientations M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void WindowSetAvailableOrientations()
+ //{
+ // tlog.Debug(tag, $"WindowSetAvailableOrientations START");
+ // try
+ // {
+ // List<Window.WindowOrientation> l1 = new List<Window.WindowOrientation>();
+
+ // l1.Add(Window.WindowOrientation.Landscape);
+ // l1.Add(Window.WindowOrientation.LandscapeInverse);
+ // l1.Add(Window.WindowOrientation.NoOrientationPreference);
+ // l1.Add(Window.WindowOrientation.Portrait);
+ // l1.Add(Window.WindowOrientation.PortraitInverse);
+
+ // myWin.SetAvailableOrientations(l1);
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+
+ // tlog.Debug(tag, $"WindowSetAvailableOrientations END (OK)");
+ // Assert.Pass("WindowSetAvailableOrientations");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("Window GetNativeId")]
+ [Property("SPEC", "Tizen.NUI.Window.GetNativeId M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowGetNativeId()
+ {
+ tlog.Debug(tag, $"WindowGetNativeId START");
+
+ try
+ {
+ myWin.GetNativeId();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"WindowGetNativeId END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Window GetNativeHandle")]
+ [Property("SPEC", "Tizen.NUI.Window.GetNativeHandle M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowGetNativeHandle()
+ {
+ tlog.Debug(tag, $"WindowGetNativeHandle START");
+
+ try
+ {
+ myWin.GetNativeHandle();
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"WindowGetNativeHandle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Window Add")]
+ [Property("SPEC", "Tizen.NUI.Window.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowAdd()
+ {
+ tlog.Debug(tag, $"WindowAdd START");
+
+ try
+ {
+ Layer layer = null;
+ myWin.Add(layer);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowAdd END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Window Remove")]
+ [Property("SPEC", "Tizen.NUI.Window.Remove M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowRemove()
+ {
+ tlog.Debug(tag, $"WindowRemove START");
+
+ try
+ {
+ Layer layer = null;
+ myWin.Remove(layer);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowRemove END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [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
+ {
+ myWin.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 GetObjectRegistry")]
+ //[Property("SPEC", "Tizen.NUI.Window.GetObjectRegistry M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void WindowGetObjectRegistry()
+ //{
+ // tlog.Debug(tag, $"WindowGetObjectRegistry START");
+ // try
+ // {
+ // myWin.GetObjectRegistry();
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"WindowGetObjectRegistry END (OK)");
+ // Assert.Pass("WindowGetObjectRegistry");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("Window SetWindowSize")]
+ [Property("SPEC", "Tizen.NUI.Window.SetWindowSize M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowSetWindowSize()
+ {
+ tlog.Debug(tag, $"WindowSetWindowSize START");
+
+ try
+ {
+ Size2D s1 = null;
+ myWin.SetWindowSize(s1);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowSetWindowSize END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Window SetPosition")]
+ [Property("SPEC", "Tizen.NUI.Window.SetPosition M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowSetPosition()
+ {
+ tlog.Debug(tag, $"WindowSetPosition START");
+
+ try
+ {
+ Position2D p1 = null;
+ myWin.SetPosition(p1);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowSetPosition END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Window SetPositionSize")]
+ [Property("SPEC", "Tizen.NUI.Window.SetPositionSize M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowSetPositionSize()
+ {
+ tlog.Debug(tag, $"WindowSetPositionSize START");
+ try
+ {
+ Rectangle r1 = new Rectangle(0, 0, 20, 20);
+ myWin.SetPositionSize(r1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+ tlog.Debug(tag, $"WindowSetPositionSize END (OK)");
+ }
+
+ [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 f1 = new FrameUpdateCallbackInterface();
+ myWin.AddFrameUpdateCallback(f1);
+ }
+ 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 RemoveFrameUpdateCallback")]
+ [Property("SPEC", "Tizen.NUI.Window.RemoveFrameUpdateCallback M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void WindowRemoveFrameUpdateCallback()
+ {
+ tlog.Debug(tag, $"WindowRemoveFrameUpdateCallback START");
+ try
+ {
+ FrameUpdateCallbackInterface f1 = new FrameUpdateCallbackInterface();
+ myWin.RemoveFrameUpdateCallback(f1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
+ }
+
+ tlog.Debug(tag, $"WindowRemoveFrameUpdateCallback 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 f1 = null;
+ myWin.AddFrameRenderedCallback(f1, 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 f1 = null;
+ myWin.AddFramePresentedCallback(f1, 1);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowAddFramePresentedCallback END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
+ }
+ }
+}
\ No newline at end of file