mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-23 18:01:10 +01:00
WIP: the great renaming
This commit is contained in:
@@ -30,7 +30,7 @@ class BaseTestDataTestCase: BaseTestCase {
|
||||
@nonobjc
|
||||
func prepareTestDataForStack(_ stack: DataStack, configurations: [String?] = [nil]) {
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
for (configurationIndex, configuration) in configurations.enumerated() {
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
let fetchExpectation = self.expectation(withDescription: "fetch")
|
||||
|
||||
var existing1: TestEntity1?
|
||||
_ = _ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
existing1 = transaction.fetchExisting(object)
|
||||
XCTAssertNotNil(existing1)
|
||||
@@ -166,7 +166,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
let fetchExpectation = self.expectation(withDescription: "fetch")
|
||||
|
||||
var existing1 = [TestEntity1]()
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
existing1 = transaction.fetchExisting(objects)
|
||||
XCTAssertEqual(
|
||||
@@ -1724,7 +1724,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>()
|
||||
do {
|
||||
@@ -1768,7 +1768,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertNil(objectID)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil)
|
||||
do {
|
||||
@@ -1812,7 +1812,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertNil(objectID)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1")
|
||||
do {
|
||||
@@ -1863,7 +1863,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>()
|
||||
do {
|
||||
@@ -1907,7 +1907,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertNil(objectID)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil)
|
||||
do {
|
||||
@@ -1951,7 +1951,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertNil(objectID)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1")
|
||||
do {
|
||||
@@ -1995,7 +1995,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertNil(objectID)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config2")
|
||||
do {
|
||||
@@ -2046,7 +2046,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil, "Config1")
|
||||
do {
|
||||
@@ -2090,7 +2090,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertNil(objectID)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil, "Config2")
|
||||
do {
|
||||
@@ -2134,7 +2134,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertNil(objectID)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1", "Config2")
|
||||
do {
|
||||
@@ -2189,7 +2189,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>()
|
||||
do {
|
||||
@@ -2259,7 +2259,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(objectIDs?.count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil)
|
||||
do {
|
||||
@@ -2329,7 +2329,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(objectIDs?.count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1")
|
||||
do {
|
||||
@@ -2380,7 +2380,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>()
|
||||
do {
|
||||
@@ -2444,7 +2444,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(objectIDs?.count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil)
|
||||
do {
|
||||
@@ -2512,7 +2512,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(objectIDs?.count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1")
|
||||
do {
|
||||
@@ -2580,7 +2580,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(objectIDs?.count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config2")
|
||||
do {
|
||||
@@ -2629,7 +2629,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil, "Config1")
|
||||
do {
|
||||
@@ -2693,7 +2693,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(objectIDs?.count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil, "Config2")
|
||||
do {
|
||||
@@ -2761,7 +2761,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(objectIDs?.count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1", "Config2")
|
||||
do {
|
||||
@@ -2840,7 +2840,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>()
|
||||
do {
|
||||
@@ -2876,7 +2876,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil)
|
||||
do {
|
||||
@@ -2912,7 +2912,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1")
|
||||
do {
|
||||
@@ -2951,7 +2951,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>()
|
||||
do {
|
||||
@@ -2987,7 +2987,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil)
|
||||
do {
|
||||
@@ -3023,7 +3023,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1")
|
||||
do {
|
||||
@@ -3059,7 +3059,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config2")
|
||||
do {
|
||||
@@ -3098,7 +3098,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack, configurations: configurations)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil, "Config1")
|
||||
do {
|
||||
@@ -3134,7 +3134,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>(nil, "Config2")
|
||||
do {
|
||||
@@ -3170,7 +3170,7 @@ final class FetchTests: BaseTestDataTestCase {
|
||||
XCTAssertEqual(count, 0)
|
||||
}
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let from = From<TestEntity1>("Config1", "Config2")
|
||||
do {
|
||||
|
||||
@@ -38,7 +38,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareStack { (stack) in
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
@@ -70,7 +70,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareStack { (stack) in
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let errorExpectation = self.expectation(withDescription: "error")
|
||||
do {
|
||||
@@ -119,7 +119,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareStack { (stack) in
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
@@ -178,7 +178,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareStack { (stack) in
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
@@ -232,7 +232,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareStack { (stack) in
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let errorExpectation = self.expectation(withDescription: "error")
|
||||
do {
|
||||
@@ -292,7 +292,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareStack { (stack) in
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
@@ -351,7 +351,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
@@ -421,7 +421,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
@@ -521,7 +521,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
@@ -600,7 +600,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
@@ -658,7 +658,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let errorExpectation = self.expectation(withDescription: "error")
|
||||
do {
|
||||
@@ -705,7 +705,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
self.checkExpectationsImmediately()
|
||||
transaction.context.reset()
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let errorExpectation = self.expectation(withDescription: "error")
|
||||
do {
|
||||
@@ -758,7 +758,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
self.checkExpectationsImmediately()
|
||||
transaction.context.reset()
|
||||
}
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let errorExpectation = self.expectation(withDescription: "error")
|
||||
do {
|
||||
@@ -820,7 +820,7 @@ class ImportTests: BaseTestDataTestCase {
|
||||
|
||||
self.prepareTestDataForStack(stack)
|
||||
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
do {
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ final class TransactionTests: BaseTestCase {
|
||||
do {
|
||||
|
||||
let createExpectation = self.expectation(withDescription: "create")
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let object = transaction.create(Into<TestEntity1>())
|
||||
object.testEntityID = NSNumber(value: 1)
|
||||
@@ -75,7 +75,7 @@ final class TransactionTests: BaseTestCase {
|
||||
do {
|
||||
|
||||
let updateExpectation = self.expectation(withDescription: "update")
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
guard let object = transaction.fetchOne(From<TestEntity1>()) else {
|
||||
|
||||
@@ -110,7 +110,7 @@ final class TransactionTests: BaseTestCase {
|
||||
do {
|
||||
|
||||
let deleteExpectation = self.expectation(withDescription: "delete")
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let object = transaction.fetchOne(From<TestEntity1>())
|
||||
transaction.delete(object)
|
||||
@@ -144,7 +144,7 @@ final class TransactionTests: BaseTestCase {
|
||||
do {
|
||||
|
||||
let createExpectation = self.expectation(withDescription: "create")
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let object = transaction.create(Into<TestEntity1>("Config1"))
|
||||
object.testEntityID = NSNumber(value: 1)
|
||||
@@ -177,7 +177,7 @@ final class TransactionTests: BaseTestCase {
|
||||
do {
|
||||
|
||||
let updateExpectation = self.expectation(withDescription: "update")
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
guard let object = transaction.fetchOne(From<TestEntity1>("Config1")) else {
|
||||
|
||||
@@ -213,7 +213,7 @@ final class TransactionTests: BaseTestCase {
|
||||
do {
|
||||
|
||||
let deleteExpectation = self.expectation(withDescription: "delete")
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let object = transaction.fetchOne(From<TestEntity1>("Config1"))
|
||||
transaction.delete(object)
|
||||
@@ -245,7 +245,7 @@ final class TransactionTests: BaseTestCase {
|
||||
|
||||
let createDiscardExpectation = self.expectation(withDescription: "create-discard")
|
||||
let loggerExpectations = self.prepareLoggerExpectations([.logWarning])
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let object = transaction.create(Into<TestEntity1>())
|
||||
object.testEntityID = NSNumber(value: 1)
|
||||
@@ -267,7 +267,7 @@ final class TransactionTests: BaseTestCase {
|
||||
do {
|
||||
|
||||
let createExpectation = self.expectation(withDescription: "create")
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
let object = transaction.create(Into<TestEntity1>())
|
||||
object.testEntityID = NSNumber(value: 1)
|
||||
@@ -290,7 +290,7 @@ final class TransactionTests: BaseTestCase {
|
||||
|
||||
let updateDiscardExpectation = self.expectation(withDescription: "update-discard")
|
||||
let loggerExpectations = self.prepareLoggerExpectations([.logWarning])
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
guard let object = transaction.fetchOne(From<TestEntity1>()) else {
|
||||
|
||||
@@ -319,7 +319,7 @@ final class TransactionTests: BaseTestCase {
|
||||
|
||||
let deleteDiscardExpectation = self.expectation(withDescription: "delete-discard")
|
||||
let loggerExpectations = self.prepareLoggerExpectations([.logWarning])
|
||||
_ = stack.beginSynchronous { (transaction) in
|
||||
stack.beginSynchronous { (transaction) in
|
||||
|
||||
guard let object = transaction.fetchOne(From<TestEntity1>()) else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user