|
|
|
|
@ -79,9 +79,14 @@ struct SyncDataAccessTests { |
|
|
|
|
let tournamentColA: SyncedCollection<Tournament> = await StoreCenter.main.mainStore.asyncLoadingSynchronizedCollection() |
|
|
|
|
let eventColB: SyncedCollection<Event> = await self.secondStoreCenter.mainStore.asyncLoadingSynchronizedCollection() |
|
|
|
|
let tournamentColB: SyncedCollection<Tournament> = await self.secondStoreCenter.mainStore.asyncLoadingSynchronizedCollection() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if let dataAccessCollection = StoreCenter.main.dataAccessCollection { |
|
|
|
|
await dataAccessCollection.deleteAsync(contentOfs: Array(dataAccessCollection)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
await eventColA.deleteAsync(contentOfs: Array(eventColA)) |
|
|
|
|
await tournamentColA.deleteAsync(contentOfs: Array(tournamentColA)) |
|
|
|
|
|
|
|
|
|
let _ = try await self.secondStoreCenter.testSynchronizeOnceAsync() |
|
|
|
|
|
|
|
|
|
#expect(eventColB.count == 0) |
|
|
|
|
@ -114,6 +119,12 @@ struct SyncDataAccessTests { |
|
|
|
|
#expect(eventColB.count == 0) |
|
|
|
|
#expect(tournamentColB.count == 0) |
|
|
|
|
|
|
|
|
|
let dataAccesses: [DataAccess] = try await StoreCenter.main.service().get() |
|
|
|
|
#expect(dataAccesses.count == 0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// tester les shared data, les relationship add/remove shared/ou non |
|
|
|
|
|
|
|
|
|
// trouver le moyen de tester les sous-Store et voir si on peut essayer de rendre ça propre sans passer par DataStore ou autre |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|