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

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

            DataStore.CreateOrUpdateStore();

            var expected = new TableDefinition("LateAddItem");

            expected.AddColumn("Id", 1, false, "int");
            expected.AddColumn("Name", 2, true, "nvarchar");

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

            Assert.AreEqual(expected, current);
        }