1 using NUnit.Framework;
3 using Tizen.NUI.Binding.Internals;
5 namespace Tizen.NUI.Devel.Tests
7 using tlog = Tizen.Log;
10 [Description("internal/Xaml/ReflectionExtensions")]
11 public class InternalReflectionExtensionsTest
13 private const string tag = "NUITEST";
18 tlog.Info(tag, "Init() is called!");
24 tlog.Info(tag, "Destroy() is called!");
27 internal class TypeImpl : Type
29 public override global::System.Reflection.Assembly Assembly => global::System.Reflection.Assembly.LoadFile(AppDomain.CurrentDomain.BaseDirectory + "WeGanttGmTask.dll");
30 public override string AssemblyQualifiedName => null;
31 public override Type BaseType => null;
32 public override string FullName => null;
33 public override Guid GUID => new Guid("ebc600a9-4fa4-4bc4-88a9-0dd8d57f0076");
34 public override global::System.Reflection.Module Module => this.GetType().Module;
35 public override string Namespace => "http://www.w3school.com.cn/children/";
36 public override Type UnderlyingSystemType => null;
37 public override string Name => null;
38 public override global::System.Reflection.ConstructorInfo[] GetConstructors(global::System.Reflection.BindingFlags bindingAttr) { return null; }
39 public override object[] GetCustomAttributes(bool inherit) { return null; }
40 public override object[] GetCustomAttributes(Type attributeType, bool inherit) { return null; }
41 public override Type GetElementType() { return null; }
42 public override global::System.Reflection.EventInfo GetEvent(string name, global::System.Reflection.BindingFlags bindingAttr) { return null; }
43 public override global::System.Reflection.EventInfo[] GetEvents(global::System.Reflection.BindingFlags bindingAttr) { return null; }
44 public override global::System.Reflection.FieldInfo GetField(string name, global::System.Reflection.BindingFlags bindingAttr) { return null; }
45 public override global::System.Reflection.FieldInfo[] GetFields(global::System.Reflection.BindingFlags bindingAttr) { return null; }
46 public override Type GetInterface(string name, bool ignoreCase) { return null; }
47 public override Type[] GetInterfaces() { return null; }
48 public override global::System.Reflection.MemberInfo[] GetMembers(global::System.Reflection.BindingFlags bindingAttr) { return null; }
49 public override global::System.Reflection.MethodInfo[] GetMethods(global::System.Reflection.BindingFlags bindingAttr) { return null; }
50 public override Type GetNestedType(string name, global::System.Reflection.BindingFlags bindingAttr) { return null; }
51 public override Type[] GetNestedTypes(global::System.Reflection.BindingFlags bindingAttr) { return null; }
52 public override global::System.Reflection.PropertyInfo[] GetProperties(global::System.Reflection.BindingFlags bindingAttr) { return null; }
53 public override object InvokeMember(string name, global::System.Reflection.BindingFlags invokeAttr, global::System.Reflection.Binder binder, object target, object[] args, global::System.Reflection.ParameterModifier[] modifiers, global::System.Globalization.CultureInfo culture, string[] namedParameters) { return null; }
54 public override bool IsDefined(Type attributeType, bool inherit) { return true; }
55 protected override global::System.Reflection.TypeAttributes GetAttributeFlagsImpl() { return global::System.Reflection.TypeAttributes.Public; }
56 protected override global::System.Reflection.ConstructorInfo GetConstructorImpl(global::System.Reflection.BindingFlags bindingAttr, global::System.Reflection.Binder binder, global::System.Reflection.CallingConventions callConvention, Type[] types, global::System.Reflection.ParameterModifier[] modifiers) { return null; }
57 protected override global::System.Reflection.MethodInfo GetMethodImpl(string name, global::System.Reflection.BindingFlags bindingAttr, global::System.Reflection.Binder binder, global::System.Reflection.CallingConventions callConvention, Type[] types, global::System.Reflection.ParameterModifier[] modifiers) { return null; }
58 protected override global::System.Reflection.PropertyInfo GetPropertyImpl(string name, global::System.Reflection.BindingFlags bindingAttr, global::System.Reflection.Binder binder, Type returnType, Type[] types, global::System.Reflection.ParameterModifier[] modifiers) { return null; }
59 protected override bool HasElementTypeImpl() { return true; }
60 protected override bool IsArrayImpl() { return true; }
61 protected override bool IsByRefImpl() { return true; }
62 protected override bool IsCOMObjectImpl() { return true; }
63 protected override bool IsPointerImpl() { return true; }
64 protected override bool IsPrimitiveImpl() { return true; }
69 [Description("ReflectionExtensions GetFields")]
70 [Property("SPEC", "Tizen.NUI.ReflectionExtensions.GetFields M")]
71 [Property("SPEC_URL", "-")]
72 [Property("CRITERIA", "MR")]
73 public void ReflectionExtensionsGetFields()
75 tlog.Debug(tag, $"ReflectionExtensionsGetFields START");
79 ReflectionExtensions.GetFields(new TypeImpl());
83 tlog.Debug(tag, e.Message.ToString());
84 Assert.Fail("Caught Exception : Failed!");
87 tlog.Debug(tag, $"ReflectionExtensionsGetFields END");
92 [Description("ReflectionExtensions GetProperties")]
93 [Property("SPEC", "Tizen.NUI.ReflectionExtensions.GetProperties M")]
94 [Property("SPEC_URL", "-")]
95 [Property("CRITERIA", "MR")]
96 public void ReflectionExtensionsGetProperties()
98 tlog.Debug(tag, $"ReflectionExtensionsGetProperties START");
102 ReflectionExtensions.GetProperties(new TypeImpl());
106 tlog.Debug(tag, e.Message.ToString());
107 Assert.Fail("Caught Exception : Failed!");
110 tlog.Debug(tag, $"ReflectionExtensionsGetProperties END");