public async Task TrackingTable_Drop_All() { var dbName = HelperDatabase.GetRandomName("tcp_lo_"); await HelperDatabase.CreateDatabaseAsync(ProviderType.Sql, dbName, true); var cs = HelperDatabase.GetConnectionString(ProviderType.Sql, dbName); var sqlProvider = new SqlSyncProvider(cs); var ctx = new AdventureWorksContext((dbName, ProviderType.Sql, sqlProvider), true, false); await ctx.Database.EnsureCreatedAsync(); var options = new SyncOptions(); var setup = new SyncSetup(new string[] { "SalesLT.ProductCategory", "SalesLT.ProductModel", "SalesLT.Product", "Posts" }); setup.TrackingTablesPrefix = "t_"; setup.TrackingTablesSuffix = "_t"; var remoteOrchestrator = new RemoteOrchestrator(sqlProvider, options); var scopeInfo = await remoteOrchestrator.GetServerScopeInfoAsync(setup); var onDropping = 0; var onDropped = 0; remoteOrchestrator.OnTrackingTableDropping(ttca => onDropping++); remoteOrchestrator.OnTrackingTableDropped(ttca => onDropped++); await remoteOrchestrator.CreateTrackingTablesAsync(scopeInfo); await remoteOrchestrator.DropTrackingTablesAsync(scopeInfo); Assert.Equal(4, onDropping); Assert.Equal(4, onDropped); HelperDatabase.DropDatabase(ProviderType.Sql, dbName); }