public void CreateMixedGenericInstance() { var metaInfo = TestMetaData.CreateClassListGenericOf(TestMetaData.CreateEmptyClassMetaInfo().First()); var types = NewTestInstance(metaInfo); var genericTypes = types.Types[metaInfo.First()]; var fields = genericTypes.GetFields(); Assert.AreEqual(typeof(List <>), fields.Single().FieldType.GetGenericTypeDefinition()); }
public void DoesAddPartialGenerics() { var meta = TestMetaData.CreateClassListGenericOf(TestMetaData.CreateEmptyClassMetaInfo().Single()); var db = Configure(DatabaseMetaInfo.Create(meta, TestUtils.NewName())); var typeWithGenericField = meta.First(); var fieldType = typeWithGenericField.Fields.Single(); var typeInfo = db.Ext().Reflector().ForName(fieldType.Type.TypeName.FullName); Assert.NotNull(typeInfo); Assert.IsTrue(typeInfo.GetName().StartsWith("System.Collections.Generic.List`1[[ANamespace")); }