Esempio n. 1
0
        public void CreateTableDefinition()
        {
            var schemaChecker   = new SqliteSchemaChecker(DataStore);
            var tableDefinition = schemaChecker.GetTableFormat("EntityDefinition");

            Assert.AreEqual(EntityDefinition.TableDefinition, tableDefinition);
        }
Esempio n. 2
0
        public void CreateOrUpdateStore_LateAddEntity_ShouldUpdateDb()
        {
            DataStore.AddType<LateAddItem>();

            DataStore.CreateOrUpdateStore();

            var expected = new TableDefinition("LateAddItem");
            expected.AddColumn("Id", 0, false, "INTEGER");
            expected.AddColumn("Name", 1, true, "TEXT");

            var schemaChecker = new SqliteSchemaChecker(DataStore);
            var current = schemaChecker.GetTableFormat("LateAddItem");

            Assert.AreEqual(expected, current);
        }