示例#1
0
        public void Not_supported_features()
        {
            IType testing = BuildRoutine.VirtualType().FromBasic();

            Assert.IsNull(testing.ParentType);
            Assert.AreEqual(0, testing.GetCustomAttributes().Length);
            Assert.IsFalse(testing.IsAbstract);
            Assert.IsFalse(testing.IsEnum);
            Assert.IsFalse(testing.IsGenericType);
            Assert.IsFalse(testing.IsPrimitive);
            Assert.IsFalse(testing.IsValueType);
            Assert.AreEqual(type.of <object>(), testing.BaseType);
            Assert.AreEqual(0, testing.GetGenericArguments().Count);
            Assert.IsNull(testing.GetElementType());
            Assert.IsNull(testing.GetParseMethod());
            Assert.AreEqual(0, testing.GetEnumNames().Count);
            Assert.AreEqual(0, testing.GetEnumValues().Count);
            Assert.IsNull(testing.GetEnumUnderlyingType());
            Assert.Throws <NotSupportedException>(() => testing.CreateListInstance(10));
            Assert.AreEqual(0, testing.Constructors.Count);
            Assert.AreEqual(0, testing.Properties.Count);
        }