created an asynchronous method for adding sqlite store to handle asynchronous migrations. note that this commit breaks previous usage of DataStack.addSQLiteStore(...), which is now renamed to addSQLiteStoreAndWait(...)

This commit is contained in:
John Rommel Estropia
2015-06-10 10:37:16 +09:00
parent c4171de86e
commit f18d29d9bc
22 changed files with 419 additions and 120 deletions

View File

@@ -47,7 +47,7 @@ class CoreStoreTests: XCTestCase {
CoreStore.defaultStack = stack
XCTAssert(CoreStore.defaultStack === stack, "CoreStore.defaultStack === stack")
switch stack.addSQLiteStore("ConfigStore1.sqlite", configuration: "Config1", resetStoreOnMigrationFailure: true){
switch stack.addSQLiteStoreAndWait("ConfigStore1.sqlite", configuration: "Config1", resetStoreOnMigrationFailure: true){
case .Failure(let error):
XCTFail(error.description)
@@ -56,7 +56,7 @@ class CoreStoreTests: XCTestCase {
break
}
switch stack.addSQLiteStore("ConfigStore2.sqlite", configuration: "Config2", resetStoreOnMigrationFailure: true){
switch stack.addSQLiteStoreAndWait("ConfigStore2.sqlite", configuration: "Config2", resetStoreOnMigrationFailure: true){
case .Failure(let error):
XCTFail(error.description)