Esempio n. 1
0
        public void RootClass()
        {
            var db4oReflector        = new NetReflector();
            var baseClass            = db4oReflector.ForClass(typeof(ClassWithoutFields)).GetSuperclass();
            var baseClassOfBaseClass = baseClass.GetSuperclass();

            Assert.NotNull(baseClass);
            Assert.IsNull(baseClassOfBaseClass);
        }
Esempio n. 2
0
        public void DBWithoutAllTypesInList()
        {
            var reflector       = new NetReflector();
            var colorHolderType = reflector.ForClass(typeof(ColorHolder));

            var dbMock = new Mock <IObjectContainer>();

            dbMock.Setup(c => c.Ext().KnownClasses()).Returns(new[] { colorHolderType });
            var classInfos = MetaDataReader.Read(dbMock.Object, TestUtils.TestTypeResolver());

            Assert.IsTrue(1 < classInfos.Count());
        }