public void DropStructureSet_WhenCalledTwice_DropperIsCalledTwice() { var upserterFake = new Mock <IDbSchemaUpserter>(); var dbClientFake = CreateDbClientFake(); var manager = new DbSchemas(Mock.Of <ISisoDatabase>(), upserterFake.Object); manager.Drop(_structureSchema, dbClientFake.Object); manager.Drop(_structureSchema, dbClientFake.Object); dbClientFake.Verify(f => f.Drop(_structureSchema), Times.Exactly(2)); }
protected virtual void OnDropStructureSets(Type[] types) { using (var dbClient = ProviderFactory.GetTransactionalDbClient(_connectionInfo)) { foreach (var type in types) { CacheProvider.ClearByType(type); var structureSchema = StructureSchemas.GetSchema(type); DbSchemas.Drop(structureSchema, dbClient); StructureSchemas.RemoveSchema(type); } } }