Exemple #1
0
        public void Setup()
        {
            var dbContainer = MultiContainerMemoryDB.Create();

            using (var db = dbContainer.NewDB(ConfigureIndexes))
            {
                db.Store(new ClassWithoutFields());
                db.Store(new ClassWithFields());
                db.Store(new RecursiveClass());
                db.Store(new WithBuiltInGeneric());
                db.Store(new Generic <string>());
                db.Store(new Generic <string, List <string> >());
                db.Store(new Base());
                db.Store(new SubClass());
                db.Store(new ClassWithArrays());
                db.Store(new SystemTypeArrays());
                db.Store(new ClassWithAutoProperty());
                db.Store(new ClassWithSelfUsingArray());
                db.Store(new WithMixedGeneric());
                db.Store(new ClassWithIndexedFields());
                db.Store(new ClassWithHalfKnownGeneric());
                db.Store(new NestedGenerics <string>());
                db.Store(new NestedGenerics <string> .InnerGeneric <string, int>());
            }
            database = dbContainer.NewDB();

            this.generatedClassses = MetaDataReader.Read(database, TestUtils.TestTypeResolver());
        }
Exemple #2
0
        public void CanHandleSameTypeTwiceScenario()
        {
            var contex = MultiContainerMemoryDB.Create();

            StoreAPerson(contex);
            StoreAPerson(contex);
            using (var db = contex.NewDB())
            {
                this.generatedClassses = MetaDataReader.Read(db);
                Assert.IsTrue(generatedClassses.Any());
            }
        }