From a993e61db87ce078daf5d497c44735c31fce762e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Nu=C3=B1ez?= <elvisnunez@me.com> Date: Thu, 16 Mar 2017 17:07:44 +0100 Subject: [PATCH 1/8] Huge renaming --- Demo.xcodeproj/project.pbxproj | 492 +++++++++--------- README.md | 28 +- .../{DATAFilter.swift => DataFilter.swift} | 20 +- .../{DATAStack.swift => DataStack.swift} | 56 +- ...tyMapper.h => NSDate+SyncPropertyMapper.h} | 2 +- ...tyMapper.m => NSDate+SyncPropertyMapper.m} | 4 +- ...h => NSEntityDescription+SyncPrimaryKey.h} | 16 +- ...m => NSEntityDescription+SyncPrimaryKey.m} | 18 +- ...ManagedObject+SyncPropertyMapperHelpers.h} | 26 +- ...ManagedObject+SyncPropertyMapperHelpers.m} | 76 +-- ...CPropertyMapper.h => SyncPropertyMapper.h} | 56 +- ...CPropertyMapper.m => SyncPropertyMapper.m} | 94 ++-- ...flections.h => NSString+SyncInflections.h} | 2 +- ...flections.m => NSString+SyncInflections.m} | 20 +- Source/Sync.h | 6 +- Source/Sync/NSArray+Sync.swift | 4 +- Source/Sync/NSManagedObject+Sync.swift | 16 +- Source/Sync/NSManagedObjectContext+Sync.swift | 2 +- ...c+DATAStack.swift => Sync+DataStack.swift} | 28 +- Source/Sync/Sync+NSPersistentContainer.swift | 4 +- Source/Sync/Sync.swift | 22 +- Sync.podspec | 4 +- ...ilterTests.swift => DataFilterTests.swift} | 88 ++-- Tests/DATAStack/Tests.swift | 12 +- .../PrimaryKeyTests.m | 6 +- .../.xccurrentversion | 2 +- ...ests.m => NSString_SyncInflectionsTests.m} | 6 +- .../SYNCPropertyMapper/DictionaryTests.swift | 2 +- Tests/SYNCPropertyMapper/HelperTests.m | 8 +- .../Model.xcdatamodel/contents | 2 +- ...ictionaryTests.m => SyncDictionaryTests.m} | 42 +- ...yTests.m => SyncFillWithDictionaryTests.m} | 60 +-- .../Transformers/HYPTestValueTransformer.h | 5 - .../Transformers/SyncTestValueTransformer.h | 5 + ...ansformer.m => SyncTestValueTransformer.m} | 4 +- Tests/Sync/Helpers/Helper.swift | 10 +- .../NSManagedObjectContext+SyncTests.swift | 2 +- iOSDemo/AppDelegate.swift | 2 +- iOSDemo/ViewController.swift | 4 +- 39 files changed, 632 insertions(+), 624 deletions(-) rename Source/DATAFilter/{DATAFilter.swift => DataFilter.swift} (87%) rename Source/DATAStack/{DATAStack.swift => DataStack.swift} (91%) rename Source/DateParser/{NSDate+SYNCPropertyMapper.h => NSDate+SyncPropertyMapper.h} (98%) rename Source/DateParser/{NSDate+SYNCPropertyMapper.m => NSDate+SyncPropertyMapper.m} (99%) rename Source/NSEntityDescription-SYNCPrimaryKey/{NSEntityDescription+SYNCPrimaryKey.h => NSEntityDescription+SyncPrimaryKey.h} (62%) rename Source/NSEntityDescription-SYNCPrimaryKey/{NSEntityDescription+SYNCPrimaryKey.m => NSEntityDescription+SyncPrimaryKey.m} (68%) rename Source/NSManagedObject-SYNCPropertyMapper/{NSManagedObject+SYNCPropertyMapperHelpers.h => NSManagedObject+SyncPropertyMapperHelpers.h} (61%) rename Source/NSManagedObject-SYNCPropertyMapper/{NSManagedObject+SYNCPropertyMapperHelpers.m => NSManagedObject+SyncPropertyMapperHelpers.m} (81%) rename Source/NSManagedObject-SYNCPropertyMapper/{SYNCPropertyMapper.h => SyncPropertyMapper.h} (82%) rename Source/NSManagedObject-SYNCPropertyMapper/{SYNCPropertyMapper.m => SyncPropertyMapper.m} (83%) rename Source/NSString-SYNCInflections/{NSString+SYNCInflections.h => NSString+SyncInflections.h} (73%) rename Source/NSString-SYNCInflections/{NSString+SYNCInflections.m => NSString+SyncInflections.m} (91%) rename Source/Sync/{Sync+DATAStack.swift => Sync+DataStack.swift} (91%) rename Tests/DATAFilter/{DATAFilterTests.swift => DataFilterTests.swift} (78%) rename Tests/NSString-SYNCInflections/{NSString_SYNCInflectionsTests.m => NSString_SyncInflectionsTests.m} (96%) rename Tests/SYNCPropertyMapper/{HYPDictionaryTests.m => SyncDictionaryTests.m} (94%) rename Tests/SYNCPropertyMapper/{HYPFillWithDictionaryTests.m => SyncFillWithDictionaryTests.m} (92%) delete mode 100755 Tests/SYNCPropertyMapper/Transformers/HYPTestValueTransformer.h create mode 100755 Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.h rename Tests/SYNCPropertyMapper/Transformers/{HYPTestValueTransformer.m => SyncTestValueTransformer.m} (93%) diff --git a/Demo.xcodeproj/project.pbxproj b/Demo.xcodeproj/project.pbxproj index dc16d37b..16dd9f14 100644 --- a/Demo.xcodeproj/project.pbxproj +++ b/Demo.xcodeproj/project.pbxproj @@ -18,41 +18,41 @@ 14241EA21DBC3A6F0042ED81 /* NSManagedObject+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; }; 14241EA31DBC3A6F0042ED81 /* NSManagedObjectContext+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF81DA0021300E71A53 /* NSManagedObjectContext+Sync.swift */; }; 14241EA41DBC3A6F0042ED81 /* Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; }; - 14241EA51DBC3A6F0042ED81 /* DATAFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BB81D9F932C007F9E26 /* DATAFilter.swift */; }; + 14241EA51DBC3A6F0042ED81 /* DataFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BB81D9F932C007F9E26 /* DataFilter.swift */; }; 14241EA71DBC3A6F0042ED81 /* TestCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449828031D9F8F2D00E2BCA3 /* TestCheck.swift */; }; 14241EA81DBC3A770042ED81 /* NSArray+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */; }; 14241EA91DBC3A770042ED81 /* NSEntityDescription+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */; }; 14241EAA1DBC3A770042ED81 /* NSManagedObject+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; }; 14241EAB1DBC3A770042ED81 /* NSManagedObjectContext+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF81DA0021300E71A53 /* NSManagedObjectContext+Sync.swift */; }; 14241EAC1DBC3A770042ED81 /* Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; }; - 14241EAD1DBC3A770042ED81 /* DATAFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BB81D9F932C007F9E26 /* DATAFilter.swift */; }; + 14241EAD1DBC3A770042ED81 /* DataFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BB81D9F932C007F9E26 /* DataFilter.swift */; }; 14241EAF1DBC3A770042ED81 /* TestCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449828031D9F8F2D00E2BCA3 /* TestCheck.swift */; }; 14241EB01DBC3A7F0042ED81 /* NSArray+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */; }; 14241EB11DBC3A7F0042ED81 /* NSEntityDescription+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */; }; 14241EB21DBC3A7F0042ED81 /* NSManagedObject+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; }; 14241EB31DBC3A7F0042ED81 /* NSManagedObjectContext+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF81DA0021300E71A53 /* NSManagedObjectContext+Sync.swift */; }; 14241EB41DBC3A7F0042ED81 /* Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; }; - 14241EB51DBC3A7F0042ED81 /* DATAFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BB81D9F932C007F9E26 /* DATAFilter.swift */; }; + 14241EB51DBC3A7F0042ED81 /* DataFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BB81D9F932C007F9E26 /* DataFilter.swift */; }; 14241EB71DBC3A7F0042ED81 /* TestCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449828031D9F8F2D00E2BCA3 /* TestCheck.swift */; }; 14241EB81DBC3A880042ED81 /* NSArray+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */; }; 14241EB91DBC3A880042ED81 /* NSEntityDescription+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */; }; 14241EBA1DBC3A880042ED81 /* NSManagedObject+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; }; 14241EBB1DBC3A880042ED81 /* NSManagedObjectContext+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF81DA0021300E71A53 /* NSManagedObjectContext+Sync.swift */; }; 14241EBC1DBC3A880042ED81 /* Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; }; - 14241EBD1DBC3A880042ED81 /* DATAFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BB81D9F932C007F9E26 /* DATAFilter.swift */; }; + 14241EBD1DBC3A880042ED81 /* DataFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BB81D9F932C007F9E26 /* DataFilter.swift */; }; 14241EBF1DBC3A880042ED81 /* TestCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449828031D9F8F2D00E2BCA3 /* TestCheck.swift */; }; - 142CD2A81DEF39AE002FDABE /* Sync+DATAStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */; }; - 142CD2A91DEF39AE002FDABE /* Sync+DATAStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */; }; - 142CD2AA1DEF39AE002FDABE /* Sync+DATAStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */; }; - 142CD2AB1DEF39AE002FDABE /* Sync+DATAStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */; }; + 142CD2A81DEF39AE002FDABE /* Sync+DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; }; + 142CD2A91DEF39AE002FDABE /* Sync+DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; }; + 142CD2AA1DEF39AE002FDABE /* Sync+DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; }; + 142CD2AB1DEF39AE002FDABE /* Sync+DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; }; 142CD2B11DEF3A01002FDABE /* Sync+NSPersistentContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; }; 142CD2B21DEF3A01002FDABE /* Sync+NSPersistentContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; }; 142CD2B31DEF3A01002FDABE /* Sync+NSPersistentContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; }; 142CD2B41DEF3A01002FDABE /* Sync+NSPersistentContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; }; - 1467388C1E7ADBA700913C8E /* DATAStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DATAStack.swift */; }; - 1467388D1E7ADBA700913C8E /* DATAStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DATAStack.swift */; }; - 1467388E1E7ADBA700913C8E /* DATAStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DATAStack.swift */; }; - 1467388F1E7ADBA700913C8E /* DATAStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DATAStack.swift */; }; + 1467388C1E7ADBA700913C8E /* DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; }; + 1467388D1E7ADBA700913C8E /* DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; }; + 1467388E1E7ADBA700913C8E /* DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; }; + 1467388F1E7ADBA700913C8E /* DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; }; 146738961E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */; }; 146738971E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */; }; 146738991E7ADC1900913C8E /* ModelGroup.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 146738921E7ADC1900913C8E /* ModelGroup.xcdatamodeld */; }; @@ -198,9 +198,9 @@ 14A84E681E4E6B2800701B8A /* UpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 444546D51DF06E2600CC7928 /* UpdateTests.swift */; }; 14A84E691E4E6B2800701B8A /* DeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146EB24C1DEF75D70068EDC3 /* DeleteTests.swift */; }; 14A84E6A1E4E6B2800701B8A /* FetchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44584FDB1DF2EE550082D7A0 /* FetchTests.swift */; }; - 14A84E6B1E4E6B2F00701B8A /* DATAFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DATAFilterTests.swift */; }; + 14A84E6B1E4E6B2F00701B8A /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */; }; 14A84E6C1E4E6B2F00701B8A /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CC760F1D9F9076003545A4 /* TestCheckTests.swift */; }; - 14A84E6D1E4E6B3400701B8A /* DATAFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DATAFilter.xcdatamodeld */; }; + 14A84E6D1E4E6B3400701B8A /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */; }; 14A84E6E1E4E6B4100701B8A /* 3ca82a0.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4E28B59E1DEE43F8007FED27 /* 3ca82a0.xcdatamodeld */; }; 14A84E6F1E4E6B4100701B8A /* 84.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC351D9F90B5001C8DA6 /* 84.xcdatamodeld */; }; 14A84E701E4E6B4100701B8A /* 113.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC251D9F90B5001C8DA6 /* 113.xcdatamodeld */; }; @@ -238,9 +238,9 @@ 14A84E901E4E6B4100701B8A /* Tests.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 1421405B1DBCDD52000FF107 /* Tests.xcdatamodeld */; }; 14A84E911E4E6B4100701B8A /* ToOne.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC511D9F90B5001C8DA6 /* ToOne.xcdatamodeld */; }; 14A84E921E4E6B4100701B8A /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC531D9F90B5001C8DA6 /* Unique.xcdatamodeld */; }; - 14A84E931E4E6B4A00701B8A /* DATAFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DATAFilter.xcdatamodeld */; }; + 14A84E931E4E6B4A00701B8A /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */; }; 14A84E951E4E70B900701B8A /* Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14A84E961E4E70B900701B8A /* Sync+DATAStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; + 14A84E961E4E70B900701B8A /* Sync+DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14A84E971E4E70B900701B8A /* Sync+NSPersistentContainer.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14A84E981E4E70B900701B8A /* NSArray+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14A84E991E4E70B900701B8A /* NSEntityDescription+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -251,18 +251,18 @@ 14A84EC71E4E748000701B8A /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84E9F1E4E748000701B8A /* DateTests.swift */; }; 14A84ECC1E4E748000701B8A /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */; }; 14A84ECD1E4E748000701B8A /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */; }; - 14A84ECF1E4E748000701B8A /* NSString_SYNCInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SYNCInflectionsTests.m */; }; - 14A84ED01E4E748000701B8A /* NSString_SYNCInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SYNCInflectionsTests.m */; }; + 14A84ECF1E4E748000701B8A /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */; }; + 14A84ED01E4E748000701B8A /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */; }; 14A84ED21E4E748000701B8A /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA71E4E748000701B8A /* DictionaryTests.swift */; }; 14A84ED31E4E748000701B8A /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA71E4E748000701B8A /* DictionaryTests.swift */; }; 14A84ED51E4E748000701B8A /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */; }; 14A84ED61E4E748000701B8A /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */; }; 14A84EDB1E4E748000701B8A /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAA1E4E748000701B8A /* HelperTests.m */; }; 14A84EDC1E4E748000701B8A /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAA1E4E748000701B8A /* HelperTests.m */; }; - 14A84EDE1E4E748000701B8A /* HYPDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* HYPDictionaryTests.m */; }; - 14A84EDF1E4E748000701B8A /* HYPDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* HYPDictionaryTests.m */; }; - 14A84EE11E4E748000701B8A /* HYPFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* HYPFillWithDictionaryTests.m */; }; - 14A84EE21E4E748000701B8A /* HYPFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* HYPFillWithDictionaryTests.m */; }; + 14A84EDE1E4E748000701B8A /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */; }; + 14A84EDF1E4E748000701B8A /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */; }; + 14A84EE11E4E748000701B8A /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */; }; + 14A84EE21E4E748000701B8A /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */; }; 14A84EE41E4E748000701B8A /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAE1E4E748000701B8A /* 112.xcdatamodeld */; }; 14A84EE51E4E748000701B8A /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAE1E4E748000701B8A /* 112.xcdatamodeld */; }; 14A84EE71E4E748000701B8A /* 121.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB01E4E748000701B8A /* 121.xcdatamodeld */; }; @@ -285,45 +285,45 @@ 14A84F001E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */; }; 14A84F021E4E748000701B8A /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC31E4E748000701B8A /* DateStringTransformer.m */; }; 14A84F031E4E748000701B8A /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC31E4E748000701B8A /* DateStringTransformer.m */; }; - 14A84F051E4E748000701B8A /* HYPTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* HYPTestValueTransformer.m */; }; - 14A84F061E4E748000701B8A /* HYPTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* HYPTestValueTransformer.m */; }; + 14A84F051E4E748000701B8A /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */; }; + 14A84F061E4E748000701B8A /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */; }; 14AF6AFE1DFC3D88009E5BC4 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; }; 14AF6AFF1DFC3D88009E5BC4 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; }; 14AF6B001DFC3D88009E5BC4 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; }; 14AF6B011DFC3D88009E5BC4 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; }; - 14D93C0B1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C0D1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C131E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93BFF1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m */; }; - 14D93C141E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93BFF1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m */; }; - 14D93C151E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93BFF1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m */; }; - 14D93C161E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93BFF1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m */; }; - 14D93C171E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C191E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C1F1E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C021E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m */; }; - 14D93C201E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C021E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m */; }; - 14D93C211E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C021E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m */; }; - 14D93C221E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C021E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m */; }; - 14D93C231E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C041E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C251E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C041E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C2B1E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C051E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m */; }; - 14D93C2C1E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C051E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m */; }; - 14D93C2D1E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C051E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m */; }; - 14D93C2E1E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C051E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m */; }; - 14D93C2F1E4E65C700DED595 /* SYNCPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C061E4E65C700DED595 /* SYNCPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C311E4E65C700DED595 /* SYNCPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C061E4E65C700DED595 /* SYNCPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C371E4E65C700DED595 /* SYNCPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C071E4E65C700DED595 /* SYNCPropertyMapper.m */; }; - 14D93C381E4E65C700DED595 /* SYNCPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C071E4E65C700DED595 /* SYNCPropertyMapper.m */; }; - 14D93C391E4E65C700DED595 /* SYNCPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C071E4E65C700DED595 /* SYNCPropertyMapper.m */; }; - 14D93C3A1E4E65C700DED595 /* SYNCPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C071E4E65C700DED595 /* SYNCPropertyMapper.m */; }; - 14D93C3B1E4E65C700DED595 /* NSString+SYNCInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C091E4E65C700DED595 /* NSString+SYNCInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C3D1E4E65C700DED595 /* NSString+SYNCInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C091E4E65C700DED595 /* NSString+SYNCInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C431E4E65C700DED595 /* NSString+SYNCInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C0A1E4E65C700DED595 /* NSString+SYNCInflections.m */; }; - 14D93C441E4E65C700DED595 /* NSString+SYNCInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C0A1E4E65C700DED595 /* NSString+SYNCInflections.m */; }; - 14D93C451E4E65C700DED595 /* NSString+SYNCInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C0A1E4E65C700DED595 /* NSString+SYNCInflections.m */; }; - 14D93C461E4E65C700DED595 /* NSString+SYNCInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C0A1E4E65C700DED595 /* NSString+SYNCInflections.m */; }; + 14D93C0B1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C0D1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C131E4E65C700DED595 /* NSDate+SyncPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93BFF1E4E65C700DED595 /* NSDate+SyncPropertyMapper.m */; }; + 14D93C141E4E65C700DED595 /* NSDate+SyncPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93BFF1E4E65C700DED595 /* NSDate+SyncPropertyMapper.m */; }; + 14D93C151E4E65C700DED595 /* NSDate+SyncPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93BFF1E4E65C700DED595 /* NSDate+SyncPropertyMapper.m */; }; + 14D93C161E4E65C700DED595 /* NSDate+SyncPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93BFF1E4E65C700DED595 /* NSDate+SyncPropertyMapper.m */; }; + 14D93C171E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C191E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C1F1E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C021E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m */; }; + 14D93C201E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C021E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m */; }; + 14D93C211E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C021E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m */; }; + 14D93C221E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C021E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m */; }; + 14D93C231E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C041E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C251E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C041E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C2B1E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C051E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m */; }; + 14D93C2C1E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C051E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m */; }; + 14D93C2D1E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C051E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m */; }; + 14D93C2E1E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C051E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m */; }; + 14D93C2F1E4E65C700DED595 /* SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C061E4E65C700DED595 /* SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C311E4E65C700DED595 /* SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C061E4E65C700DED595 /* SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C371E4E65C700DED595 /* SyncPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C071E4E65C700DED595 /* SyncPropertyMapper.m */; }; + 14D93C381E4E65C700DED595 /* SyncPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C071E4E65C700DED595 /* SyncPropertyMapper.m */; }; + 14D93C391E4E65C700DED595 /* SyncPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C071E4E65C700DED595 /* SyncPropertyMapper.m */; }; + 14D93C3A1E4E65C700DED595 /* SyncPropertyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C071E4E65C700DED595 /* SyncPropertyMapper.m */; }; + 14D93C3B1E4E65C700DED595 /* NSString+SyncInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C3D1E4E65C700DED595 /* NSString+SyncInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C431E4E65C700DED595 /* NSString+SyncInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */; }; + 14D93C441E4E65C700DED595 /* NSString+SyncInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */; }; + 14D93C451E4E65C700DED595 /* NSString+SyncInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */; }; + 14D93C461E4E65C700DED595 /* NSString+SyncInflections.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */; }; 14D93C471E4E669C00DED595 /* Sync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14241E711DBC39520042ED81 /* Sync.framework */; }; 14D93C481E4E67A200DED595 /* Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C491E4E67A200DED595 /* Sync+DATAStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; + 14D93C491E4E67A200DED595 /* Sync+DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14D93C4A1E4E67A200DED595 /* Sync+NSPersistentContainer.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14D93C4B1E4E67A200DED595 /* NSArray+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14D93C4C1E4E67A200DED595 /* NSEntityDescription+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -341,7 +341,7 @@ 14D93C581E4E689F00DED595 /* UpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 444546D51DF06E2600CC7928 /* UpdateTests.swift */; }; 14D93C591E4E689F00DED595 /* DeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146EB24C1DEF75D70068EDC3 /* DeleteTests.swift */; }; 14D93C5A1E4E689F00DED595 /* FetchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44584FDB1DF2EE550082D7A0 /* FetchTests.swift */; }; - 14D93C5B1E4E68A400DED595 /* DATAFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DATAFilterTests.swift */; }; + 14D93C5B1E4E68A400DED595 /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */; }; 14D93C5C1E4E68AF00DED595 /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CC760F1D9F9076003545A4 /* TestCheckTests.swift */; }; 14D93C5D1E4E68BA00DED595 /* 3ca82a0.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4E28B59E1DEE43F8007FED27 /* 3ca82a0.xcdatamodeld */; }; 14D93C5E1E4E68BA00DED595 /* 84.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC351D9F90B5001C8DA6 /* 84.xcdatamodeld */; }; @@ -389,14 +389,14 @@ 14E2F0A51E7ADFB500DF1776 /* SimpleModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */; }; 14E2F0A61E7ADFB500DF1776 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146738951E7ADC1900913C8E /* Tests.swift */; }; 14E2F0A71E7ADFBA00DF1776 /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84E9F1E4E748000701B8A /* DateTests.swift */; }; - 14E2F0A81E7ADFC100DF1776 /* SYNCPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SYNCPrimaryKey.xcdatamodeld */; }; + 14E2F0A81E7ADFC100DF1776 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */; }; 14E2F0A91E7ADFC100DF1776 /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */; }; - 14E2F0AA1E7ADFC600DF1776 /* NSString_SYNCInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SYNCInflectionsTests.m */; }; + 14E2F0AA1E7ADFC600DF1776 /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */; }; 14E2F0AB1E7ADFD200DF1776 /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA71E4E748000701B8A /* DictionaryTests.swift */; }; 14E2F0AC1E7ADFD200DF1776 /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */; }; 14E2F0AD1E7ADFD200DF1776 /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAA1E4E748000701B8A /* HelperTests.m */; }; - 14E2F0AE1E7ADFD200DF1776 /* HYPDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* HYPDictionaryTests.m */; }; - 14E2F0AF1E7ADFD200DF1776 /* HYPFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* HYPFillWithDictionaryTests.m */; }; + 14E2F0AE1E7ADFD200DF1776 /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */; }; + 14E2F0AF1E7ADFD200DF1776 /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */; }; 14E2F0B01E7ADFE000DF1776 /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAE1E4E748000701B8A /* 112.xcdatamodeld */; }; 14E2F0B11E7ADFE000DF1776 /* 121.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB01E4E748000701B8A /* 121.xcdatamodeld */; }; 14E2F0B21E7ADFE000DF1776 /* 123.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB21E4E748000701B8A /* 123.xcdatamodeld */; }; @@ -408,7 +408,7 @@ 14E2F0B81E7ADFE000DF1776 /* Ordered.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBE1E4E748000701B8A /* Ordered.xcdatamodeld */; }; 14E2F0B91E7ADFE700DF1776 /* BadAPIValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */; }; 14E2F0BB1E7ADFE700DF1776 /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC31E4E748000701B8A /* DateStringTransformer.m */; }; - 14E2F0BD1E7ADFE700DF1776 /* HYPTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* HYPTestValueTransformer.m */; }; + 14E2F0BD1E7ADFE700DF1776 /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */; }; 14E2F0BE1E7ADFEC00DF1776 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C046341DBC19D300CB6C16 /* JSON.swift */; }; 14E2F0BF1E7ADFF900DF1776 /* NSArray+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC551D9F90B5001C8DA6 /* NSArray+SyncTests.swift */; }; 14E2F0C01E7ADFF900DF1776 /* NSEntityDescription+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC561D9F90B5001C8DA6 /* NSEntityDescription+SyncTests.swift */; }; @@ -459,8 +459,8 @@ 14E2F0ED1E7AE00200DF1776 /* ToOne.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC511D9F90B5001C8DA6 /* ToOne.xcdatamodeld */; }; 14E2F0EE1E7AE00200DF1776 /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC531D9F90B5001C8DA6 /* Unique.xcdatamodeld */; }; 14E2F0EF1E7AE01600DF1776 /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DBDD1D9F90B5001C8DA6 /* Helper.swift */; }; - 14E2F0F01E7AE02F00DF1776 /* DATAFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DATAFilterTests.swift */; }; - 14E2F0F11E7AE02F00DF1776 /* DATAFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DATAFilter.xcdatamodeld */; }; + 14E2F0F01E7AE02F00DF1776 /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */; }; + 14E2F0F11E7AE02F00DF1776 /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */; }; 14E2F0F21E7AE03400DF1776 /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CC760F1D9F9076003545A4 /* TestCheckTests.swift */; }; 14E2F0F31E7AE12200DF1776 /* Sync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14241E711DBC39520042ED81 /* Sync.framework */; }; 14E93C441DBCCD2800E3304E /* Sync.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E93C431DBCCD2800E3304E /* Sync.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -468,38 +468,38 @@ 14E9C1401DEA2EE100A21B9E /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14E9C13E1DEA2EE100A21B9E /* 320.json */; }; 14E9C1411DEA2EE100A21B9E /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14E9C13E1DEA2EE100A21B9E /* 320.json */; }; 14E9C1421DEA2EE100A21B9E /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14E9C13E1DEA2EE100A21B9E /* 320.json */; }; - 14F6275B1E7AE6B2001C2EA0 /* DATAStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DATAStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6275C1E7AE6B2001C2EA0 /* NSDate+SYNCPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6275D1E7AE6B2001C2EA0 /* NSEntityDescription+SYNCPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6275E1E7AE6B2001C2EA0 /* NSManagedObject+SYNCPropertyMapperHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C041E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6275F1E7AE6B2001C2EA0 /* SYNCPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C061E4E65C700DED595 /* SYNCPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F627601E7AE6B2001C2EA0 /* NSString+SYNCInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C091E4E65C700DED595 /* NSString+SYNCInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6275B1E7AE6B2001C2EA0 /* DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6275C1E7AE6B2001C2EA0 /* NSDate+SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6275D1E7AE6B2001C2EA0 /* NSEntityDescription+SyncPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6275E1E7AE6B2001C2EA0 /* NSManagedObject+SyncPropertyMapperHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C041E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6275F1E7AE6B2001C2EA0 /* SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C061E4E65C700DED595 /* SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F627601E7AE6B2001C2EA0 /* NSString+SyncInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627611E7AE6B2001C2EA0 /* Sync.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E93C431DBCCD2800E3304E /* Sync.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627621E7AE6B2001C2EA0 /* Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F627631E7AE6B2001C2EA0 /* Sync+DATAStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F627631E7AE6B2001C2EA0 /* Sync+DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627641E7AE6B2001C2EA0 /* Sync+NSPersistentContainer.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627651E7AE6B2001C2EA0 /* NSArray+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627661E7AE6B2001C2EA0 /* NSEntityDescription+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627671E7AE6B2001C2EA0 /* NSManagedObject+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627681E7AE6B2001C2EA0 /* NSManagedObjectContext+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF81DA0021300E71A53 /* NSManagedObjectContext+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627691E7AE6B2001C2EA0 /* Result.swift in Headers */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6276A1E7AE6B5001C2EA0 /* DATAStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DATAStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6276B1E7AE6B5001C2EA0 /* NSDate+SYNCPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6276C1E7AE6B5001C2EA0 /* NSEntityDescription+SYNCPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6276D1E7AE6B5001C2EA0 /* NSManagedObject+SYNCPropertyMapperHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C041E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6276E1E7AE6B5001C2EA0 /* SYNCPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C061E4E65C700DED595 /* SYNCPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6276F1E7AE6B5001C2EA0 /* NSString+SYNCInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C091E4E65C700DED595 /* NSString+SYNCInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6276A1E7AE6B5001C2EA0 /* DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6276B1E7AE6B5001C2EA0 /* NSDate+SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6276C1E7AE6B5001C2EA0 /* NSEntityDescription+SyncPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6276D1E7AE6B5001C2EA0 /* NSManagedObject+SyncPropertyMapperHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C041E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6276E1E7AE6B5001C2EA0 /* SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C061E4E65C700DED595 /* SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6276F1E7AE6B5001C2EA0 /* NSString+SyncInflections.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627701E7AE6B5001C2EA0 /* Sync.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E93C431DBCCD2800E3304E /* Sync.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627711E7AE6B5001C2EA0 /* Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F627721E7AE6B5001C2EA0 /* Sync+DATAStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F627721E7AE6B5001C2EA0 /* Sync+DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627731E7AE6B5001C2EA0 /* Sync+NSPersistentContainer.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627741E7AE6B5001C2EA0 /* NSArray+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627751E7AE6B5001C2EA0 /* NSEntityDescription+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627761E7AE6B5001C2EA0 /* NSManagedObject+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627771E7AE6B5001C2EA0 /* NSManagedObjectContext+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF81DA0021300E71A53 /* NSManagedObjectContext+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627781E7AE6B5001C2EA0 /* Result.swift in Headers */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F627791E7AE6CF001C2EA0 /* DATAStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DATAStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14F6277A1E7AE6E1001C2EA0 /* DATAStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DATAStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F627791E7AE6CF001C2EA0 /* DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; + 14F6277A1E7AE6E1001C2EA0 /* DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 4403DC5B1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBDF1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json */; }; 4403DC5C1D9F90B5001C8DA6 /* 151-many-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE01D9F90B5001C8DA6 /* 151-many-to-many-notes.json */; }; 4403DC5D1D9F90B5001C8DA6 /* 151-many-to-many-tags.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE11D9F90B5001C8DA6 /* 151-many-to-many-tags.json */; }; @@ -555,8 +555,8 @@ 4403DC8F1D9F90B5001C8DA6 /* users_c.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC131D9F90B5001C8DA6 /* users_c.json */; }; 4403DC901D9F90B5001C8DA6 /* users_company.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC141D9F90B5001C8DA6 /* users_company.json */; }; 4403DC911D9F90B5001C8DA6 /* users_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC151D9F90B5001C8DA6 /* users_notes.json */; }; - 441FA7B41E4EFF7C00023821 /* SYNCPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SYNCPrimaryKey.xcdatamodeld */; }; - 441FA7B51E4EFF7D00023821 /* SYNCPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SYNCPrimaryKey.xcdatamodeld */; }; + 441FA7B41E4EFF7C00023821 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */; }; + 441FA7B51E4EFF7D00023821 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */; }; 441FA7B91E4F00D300023821 /* User+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7B71E4F00D300023821 /* User+CoreDataClass.swift */; }; 441FA7BA1E4F00D300023821 /* User+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7B81E4F00D300023821 /* User+CoreDataProperties.swift */; }; 445D3BC71D9F9373007F9E26 /* note.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BBE1D9F9373007F9E26 /* note.json */; }; @@ -670,9 +670,9 @@ 14241E8B1DBC39690042ED81 /* Sync.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sync.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 14241E981DBC39730042ED81 /* Sync.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sync.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 14241EC01DBC3AAA0042ED81 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Sync+DATAStack.swift"; sourceTree = "<group>"; }; + 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Sync+DataStack.swift"; sourceTree = "<group>"; }; 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Sync+NSPersistentContainer.swift"; sourceTree = "<group>"; }; - 1467388B1E7ADBA700913C8E /* DATAStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DATAStack.swift; sourceTree = "<group>"; }; + 1467388B1E7ADBA700913C8E /* DataStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataStack.swift; sourceTree = "<group>"; }; 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = LightweightMigrationModel.xcdatamodel; sourceTree = "<group>"; }; 146738931E7ADC1900913C8E /* ModelGroup.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ModelGroup.xcdatamodel; sourceTree = "<group>"; }; 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SimpleModel.xcdatamodel; sourceTree = "<group>"; }; @@ -685,12 +685,12 @@ 14975BF41DBC36960024901A /* macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 14A84E9F1E4E748000701B8A /* DateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = "<group>"; }; 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimaryKeyTests.m; sourceTree = "<group>"; }; - 14A84EA51E4E748000701B8A /* NSString_SYNCInflectionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSString_SYNCInflectionsTests.m; sourceTree = "<group>"; }; + 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSString_SyncInflectionsTests.m; sourceTree = "<group>"; }; 14A84EA71E4E748000701B8A /* DictionaryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DictionaryTests.swift; sourceTree = "<group>"; }; 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FillWithDictionaryTests.swift; sourceTree = "<group>"; }; 14A84EAA1E4E748000701B8A /* HelperTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelperTests.m; sourceTree = "<group>"; }; - 14A84EAB1E4E748000701B8A /* HYPDictionaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYPDictionaryTests.m; sourceTree = "<group>"; }; - 14A84EAC1E4E748000701B8A /* HYPFillWithDictionaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYPFillWithDictionaryTests.m; sourceTree = "<group>"; }; + 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncDictionaryTests.m; sourceTree = "<group>"; }; + 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncFillWithDictionaryTests.m; sourceTree = "<group>"; }; 14A84EAF1E4E748000701B8A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; 14A84EB11E4E748000701B8A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; 14A84EB31E4E748000701B8A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; @@ -703,24 +703,24 @@ 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BadAPIValueTransformer.swift; sourceTree = "<group>"; }; 14A84EC21E4E748000701B8A /* DateStringTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateStringTransformer.h; sourceTree = "<group>"; }; 14A84EC31E4E748000701B8A /* DateStringTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateStringTransformer.m; sourceTree = "<group>"; }; - 14A84EC41E4E748000701B8A /* HYPTestValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYPTestValueTransformer.h; sourceTree = "<group>"; }; - 14A84EC51E4E748000701B8A /* HYPTestValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYPTestValueTransformer.m; sourceTree = "<group>"; }; + 14A84EC41E4E748000701B8A /* SyncTestValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncTestValueTransformer.h; sourceTree = "<group>"; }; + 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncTestValueTransformer.m; sourceTree = "<group>"; }; 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = "<group>"; }; 14BA60E81DC0247700C97D6F /* SyncDelegateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncDelegateTests.swift; sourceTree = "<group>"; }; 14C046341DBC19D300CB6C16 /* JSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSON.swift; sourceTree = "<group>"; }; 14C0AF811BD6D4230009ECBE /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; }; 14C0AF821BD6D4230009ECBE /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = "<group>"; }; 14C0AF831BD6D4230009ECBE /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; - 14D93BFE1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+SYNCPropertyMapper.h"; sourceTree = "<group>"; }; - 14D93BFF1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+SYNCPropertyMapper.m"; sourceTree = "<group>"; }; - 14D93C011E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSEntityDescription+SYNCPrimaryKey.h"; sourceTree = "<group>"; }; - 14D93C021E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSEntityDescription+SYNCPrimaryKey.m"; sourceTree = "<group>"; }; - 14D93C041E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSManagedObject+SYNCPropertyMapperHelpers.h"; sourceTree = "<group>"; }; - 14D93C051E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSManagedObject+SYNCPropertyMapperHelpers.m"; sourceTree = "<group>"; }; - 14D93C061E4E65C700DED595 /* SYNCPropertyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SYNCPropertyMapper.h; sourceTree = "<group>"; }; - 14D93C071E4E65C700DED595 /* SYNCPropertyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SYNCPropertyMapper.m; sourceTree = "<group>"; }; - 14D93C091E4E65C700DED595 /* NSString+SYNCInflections.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SYNCInflections.h"; sourceTree = "<group>"; }; - 14D93C0A1E4E65C700DED595 /* NSString+SYNCInflections.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SYNCInflections.m"; sourceTree = "<group>"; }; + 14D93BFE1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+SyncPropertyMapper.h"; sourceTree = "<group>"; }; + 14D93BFF1E4E65C700DED595 /* NSDate+SyncPropertyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+SyncPropertyMapper.m"; sourceTree = "<group>"; }; + 14D93C011E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSEntityDescription+SyncPrimaryKey.h"; sourceTree = "<group>"; }; + 14D93C021E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSEntityDescription+SyncPrimaryKey.m"; sourceTree = "<group>"; }; + 14D93C041E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSManagedObject+SyncPropertyMapperHelpers.h"; sourceTree = "<group>"; }; + 14D93C051E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSManagedObject+SyncPropertyMapperHelpers.m"; sourceTree = "<group>"; }; + 14D93C061E4E65C700DED595 /* SyncPropertyMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncPropertyMapper.h; sourceTree = "<group>"; }; + 14D93C071E4E65C700DED595 /* SyncPropertyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncPropertyMapper.m; sourceTree = "<group>"; }; + 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SyncInflections.h"; sourceTree = "<group>"; }; + 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SyncInflections.m"; sourceTree = "<group>"; }; 14E2852E1DC173A800C4E461 /* NSPersistentContainerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSPersistentContainerTests.swift; sourceTree = "<group>"; }; 14E93C431DBCCD2800E3304E /* Sync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sync.h; sourceTree = "<group>"; }; 14E9C13A1DEA2ECD00A21B9E /* 320.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 320.xcdatamodel; sourceTree = "<group>"; }; @@ -817,14 +817,14 @@ 4403DC571D9F90B5001C8DA6 /* NSManagedObject+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObject+SyncTests.swift"; sourceTree = "<group>"; }; 4403DC581D9F90B5001C8DA6 /* NSManagedObjectContext+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObjectContext+SyncTests.swift"; sourceTree = "<group>"; }; 4403DC591D9F90B5001C8DA6 /* SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncTests.swift; sourceTree = "<group>"; }; - 441FA7AF1E4EFF4E00023821 /* SYNCPrimaryKey.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SYNCPrimaryKey.xcdatamodel; sourceTree = "<group>"; }; + 441FA7AF1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SyncPrimaryKey.xcdatamodel; sourceTree = "<group>"; }; 441FA7B71E4F00D300023821 /* User+CoreDataClass.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "User+CoreDataClass.swift"; sourceTree = "<group>"; }; 441FA7B81E4F00D300023821 /* User+CoreDataProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "User+CoreDataProperties.swift"; sourceTree = "<group>"; }; 444546D51DF06E2600CC7928 /* UpdateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateTests.swift; sourceTree = "<group>"; }; 44584FDB1DF2EE550082D7A0 /* FetchTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchTests.swift; sourceTree = "<group>"; }; - 445D3BB81D9F932C007F9E26 /* DATAFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DATAFilter.swift; sourceTree = "<group>"; }; - 445D3BBB1D9F9373007F9E26 /* DATAFilterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DATAFilterTests.swift; sourceTree = "<group>"; }; - 445D3BBD1D9F9373007F9E26 /* DATAFilter.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = DATAFilter.xcdatamodel; sourceTree = "<group>"; }; + 445D3BB81D9F932C007F9E26 /* DataFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataFilter.swift; sourceTree = "<group>"; }; + 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataFilterTests.swift; sourceTree = "<group>"; }; + 445D3BBD1D9F9373007F9E26 /* DataFilter.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = DataFilter.xcdatamodel; sourceTree = "<group>"; }; 445D3BBE1D9F9373007F9E26 /* note.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = note.json; sourceTree = "<group>"; }; 445D3BBF1D9F9373007F9E26 /* simple.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = simple.json; sourceTree = "<group>"; }; 445D3BC01D9F9373007F9E26 /* users-with-nil.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "users-with-nil.json"; sourceTree = "<group>"; }; @@ -921,28 +921,29 @@ 1425D59A1CC65BEB00EC49D4 /* Source */ = { isa = PBXGroup; children = ( - 1467388A1E7ADBA700913C8E /* DATAStack */, + 1467388A1E7ADBA700913C8E /* DataStack */, 14D93BFD1E4E65C700DED595 /* DateParser */, - 14D93C001E4E65C700DED595 /* NSEntityDescription-SYNCPrimaryKey */, - 14D93C031E4E65C700DED595 /* NSManagedObject-SYNCPropertyMapper */, - 14D93C081E4E65C700DED595 /* NSString-SYNCInflections */, + 14D93C001E4E65C700DED595 /* NSEntityDescription-SyncPrimaryKey */, + 14D93C031E4E65C700DED595 /* NSManagedObject-SyncPropertyMapper */, + 14D93C081E4E65C700DED595 /* NSString-SyncInflections */, 14E93C431DBCCD2800E3304E /* Sync.h */, 44968BF41DA0021300E71A53 /* Sync */, - 445D3BB71D9F932C007F9E26 /* DATAFilter */, + 445D3BB71D9F932C007F9E26 /* DataFilter */, 449828021D9F8F2D00E2BCA3 /* TestCheck */, ); path = Source; sourceTree = "<group>"; }; - 1467388A1E7ADBA700913C8E /* DATAStack */ = { + 1467388A1E7ADBA700913C8E /* DataStack */ = { isa = PBXGroup; children = ( - 1467388B1E7ADBA700913C8E /* DATAStack.swift */, + 1467388B1E7ADBA700913C8E /* DataStack.swift */, ); - path = DATAStack; + name = DataStack; + path = DataStack; sourceTree = "<group>"; }; - 146738901E7ADC1900913C8E /* DATAStack */ = { + 146738901E7ADC1900913C8E /* DataStack */ = { isa = PBXGroup; children = ( 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */, @@ -950,7 +951,8 @@ 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */, 146738951E7ADC1900913C8E /* Tests.swift */, ); - path = DATAStack; + name = DataStack; + path = DataStack; sourceTree = "<group>"; }; 146D728A1AB782920058798C = { @@ -985,14 +987,14 @@ 146D72AF1AB782920058798C /* Tests */ = { isa = PBXGroup; children = ( - 146738901E7ADC1900913C8E /* DATAStack */, + 146738901E7ADC1900913C8E /* DataStack */, 14A84E9E1E4E748000701B8A /* DateParser */, - 14A84EA01E4E748000701B8A /* NSEntityDescription-SYNCPrimaryKey */, - 14A84EA41E4E748000701B8A /* NSString-SYNCInflections */, - 14A84EA61E4E748000701B8A /* SYNCPropertyMapper */, + 14A84EA01E4E748000701B8A /* NSEntityDescription-SyncPrimaryKey */, + 14A84EA41E4E748000701B8A /* NSString-SyncInflections */, + 14A84EA61E4E748000701B8A /* SyncPropertyMapper */, 14C046331DBC19D300CB6C16 /* Vendor */, 4403DBDB1D9F90B5001C8DA6 /* Sync */, - 445D3BBA1D9F9373007F9E26 /* DATAFilter */, + 445D3BBA1D9F9373007F9E26 /* DataFilter */, 44CC760E1D9F9076003545A4 /* TestCheck */, 146D72B01AB782920058798C /* Supporting Files */, ); @@ -1015,35 +1017,38 @@ path = DateParser; sourceTree = "<group>"; }; - 14A84EA01E4E748000701B8A /* NSEntityDescription-SYNCPrimaryKey */ = { + 14A84EA01E4E748000701B8A /* NSEntityDescription-SyncPrimaryKey */ = { isa = PBXGroup; children = ( - 441FA7AE1E4EFF4E00023821 /* SYNCPrimaryKey.xcdatamodeld */, + 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */, 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */, ); - path = "NSEntityDescription-SYNCPrimaryKey"; + name = "NSEntityDescription-SyncPrimaryKey"; + path = "NSEntityDescription-SyncPrimaryKey"; sourceTree = "<group>"; }; - 14A84EA41E4E748000701B8A /* NSString-SYNCInflections */ = { + 14A84EA41E4E748000701B8A /* NSString-SyncInflections */ = { isa = PBXGroup; children = ( - 14A84EA51E4E748000701B8A /* NSString_SYNCInflectionsTests.m */, + 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */, ); - path = "NSString-SYNCInflections"; + name = "NSString-SyncInflections"; + path = "NSString-SyncInflections"; sourceTree = "<group>"; }; - 14A84EA61E4E748000701B8A /* SYNCPropertyMapper */ = { + 14A84EA61E4E748000701B8A /* SyncPropertyMapper */ = { isa = PBXGroup; children = ( 14A84EA71E4E748000701B8A /* DictionaryTests.swift */, 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */, 14A84EAA1E4E748000701B8A /* HelperTests.m */, - 14A84EAB1E4E748000701B8A /* HYPDictionaryTests.m */, - 14A84EAC1E4E748000701B8A /* HYPFillWithDictionaryTests.m */, + 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */, + 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */, 14A84EAD1E4E748000701B8A /* Models */, 14A84EC01E4E748000701B8A /* Transformers */, ); - path = SYNCPropertyMapper; + name = SyncPropertyMapper; + path = SyncPropertyMapper; sourceTree = "<group>"; }; 14A84EAD1E4E748000701B8A /* Models */ = { @@ -1068,8 +1073,8 @@ 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */, 14A84EC21E4E748000701B8A /* DateStringTransformer.h */, 14A84EC31E4E748000701B8A /* DateStringTransformer.m */, - 14A84EC41E4E748000701B8A /* HYPTestValueTransformer.h */, - 14A84EC51E4E748000701B8A /* HYPTestValueTransformer.m */, + 14A84EC41E4E748000701B8A /* SyncTestValueTransformer.h */, + 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */, ); path = Transformers; sourceTree = "<group>"; @@ -1096,39 +1101,41 @@ 14D93BFD1E4E65C700DED595 /* DateParser */ = { isa = PBXGroup; children = ( - 14D93BFE1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h */, - 14D93BFF1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m */, + 14D93BFE1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h */, + 14D93BFF1E4E65C700DED595 /* NSDate+SyncPropertyMapper.m */, ); path = DateParser; sourceTree = "<group>"; }; - 14D93C001E4E65C700DED595 /* NSEntityDescription-SYNCPrimaryKey */ = { + 14D93C001E4E65C700DED595 /* NSEntityDescription-SyncPrimaryKey */ = { isa = PBXGroup; children = ( - 14D93C011E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h */, - 14D93C021E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m */, + 14D93C011E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h */, + 14D93C021E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m */, ); - path = "NSEntityDescription-SYNCPrimaryKey"; + name = "NSEntityDescription-SyncPrimaryKey"; + path = "NSEntityDescription-SyncPrimaryKey"; sourceTree = "<group>"; }; - 14D93C031E4E65C700DED595 /* NSManagedObject-SYNCPropertyMapper */ = { + 14D93C031E4E65C700DED595 /* NSManagedObject-SyncPropertyMapper */ = { isa = PBXGroup; children = ( - 14D93C041E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h */, - 14D93C051E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m */, - 14D93C061E4E65C700DED595 /* SYNCPropertyMapper.h */, - 14D93C071E4E65C700DED595 /* SYNCPropertyMapper.m */, + 14D93C041E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h */, + 14D93C051E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m */, + 14D93C061E4E65C700DED595 /* SyncPropertyMapper.h */, + 14D93C071E4E65C700DED595 /* SyncPropertyMapper.m */, ); - path = "NSManagedObject-SYNCPropertyMapper"; + path = "NSManagedObject-SyncPropertyMapper"; sourceTree = "<group>"; }; - 14D93C081E4E65C700DED595 /* NSString-SYNCInflections */ = { + 14D93C081E4E65C700DED595 /* NSString-SyncInflections */ = { isa = PBXGroup; children = ( - 14D93C091E4E65C700DED595 /* NSString+SYNCInflections.h */, - 14D93C0A1E4E65C700DED595 /* NSString+SYNCInflections.m */, + 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */, + 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */, ); - path = "NSString-SYNCInflections"; + name = "NSString-SyncInflections"; + path = "NSString-SyncInflections"; sourceTree = "<group>"; }; 4403DBDB1D9F90B5001C8DA6 /* Sync */ = { @@ -1272,19 +1279,19 @@ path = Models; sourceTree = "<group>"; }; - 445D3BB71D9F932C007F9E26 /* DATAFilter */ = { + 445D3BB71D9F932C007F9E26 /* DataFilter */ = { isa = PBXGroup; children = ( - 445D3BB81D9F932C007F9E26 /* DATAFilter.swift */, + 445D3BB81D9F932C007F9E26 /* DataFilter.swift */, ); - path = DATAFilter; + path = DataFilter; sourceTree = "<group>"; }; - 445D3BBA1D9F9373007F9E26 /* DATAFilter */ = { + 445D3BBA1D9F9373007F9E26 /* DataFilter */ = { isa = PBXGroup; children = ( - 445D3BBB1D9F9373007F9E26 /* DATAFilterTests.swift */, - 445D3BBC1D9F9373007F9E26 /* DATAFilter.xcdatamodeld */, + 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */, + 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */, 445D3BBE1D9F9373007F9E26 /* note.json */, 445D3BBF1D9F9373007F9E26 /* simple.json */, 445D3BC01D9F9373007F9E26 /* users-with-nil.json */, @@ -1293,14 +1300,15 @@ 445D3BC31D9F9373007F9E26 /* users2.json */, 445D3BC41D9F9373007F9E26 /* users3.json */, ); - path = DATAFilter; + name = DataFilter; + path = DataFilter; sourceTree = "<group>"; }; 44968BF41DA0021300E71A53 /* Sync */ = { isa = PBXGroup; children = ( 44968BF91DA0021300E71A53 /* Sync.swift */, - 142CD2A31DEF39AE002FDABE /* Sync+DATAStack.swift */, + 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */, 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */, 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */, 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */, @@ -1357,21 +1365,21 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 14D93C2F1E4E65C700DED595 /* SYNCPropertyMapper.h in Headers */, - 14D93C0B1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h in Headers */, + 14D93C2F1E4E65C700DED595 /* SyncPropertyMapper.h in Headers */, + 14D93C0B1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h in Headers */, 14E93C441DBCCD2800E3304E /* Sync.h in Headers */, - 14D93C171E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h in Headers */, - 14D93C3B1E4E65C700DED595 /* NSString+SYNCInflections.h in Headers */, - 14D93C231E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h in Headers */, + 14D93C171E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h in Headers */, + 14D93C3B1E4E65C700DED595 /* NSString+SyncInflections.h in Headers */, + 14D93C231E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h in Headers */, 14D93C481E4E67A200DED595 /* Sync.swift in Headers */, - 14D93C491E4E67A200DED595 /* Sync+DATAStack.swift in Headers */, + 14D93C491E4E67A200DED595 /* Sync+DataStack.swift in Headers */, 14D93C4A1E4E67A200DED595 /* Sync+NSPersistentContainer.swift in Headers */, 14D93C4B1E4E67A200DED595 /* NSArray+Sync.swift in Headers */, 14D93C4C1E4E67A200DED595 /* NSEntityDescription+Sync.swift in Headers */, 14D93C4D1E4E67A200DED595 /* NSManagedObject+Sync.swift in Headers */, 14D93C4E1E4E67A200DED595 /* NSManagedObjectContext+Sync.swift in Headers */, 14D93C4F1E4E67A200DED595 /* Result.swift in Headers */, - 14F627791E7AE6CF001C2EA0 /* DATAStack.swift in Headers */, + 14F627791E7AE6CF001C2EA0 /* DataStack.swift in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1379,15 +1387,15 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 14F6276A1E7AE6B5001C2EA0 /* DATAStack.swift in Headers */, - 14F6276B1E7AE6B5001C2EA0 /* NSDate+SYNCPropertyMapper.h in Headers */, - 14F6276C1E7AE6B5001C2EA0 /* NSEntityDescription+SYNCPrimaryKey.h in Headers */, - 14F6276D1E7AE6B5001C2EA0 /* NSManagedObject+SYNCPropertyMapperHelpers.h in Headers */, - 14F6276E1E7AE6B5001C2EA0 /* SYNCPropertyMapper.h in Headers */, - 14F6276F1E7AE6B5001C2EA0 /* NSString+SYNCInflections.h in Headers */, + 14F6276A1E7AE6B5001C2EA0 /* DataStack.swift in Headers */, + 14F6276B1E7AE6B5001C2EA0 /* NSDate+SyncPropertyMapper.h in Headers */, + 14F6276C1E7AE6B5001C2EA0 /* NSEntityDescription+SyncPrimaryKey.h in Headers */, + 14F6276D1E7AE6B5001C2EA0 /* NSManagedObject+SyncPropertyMapperHelpers.h in Headers */, + 14F6276E1E7AE6B5001C2EA0 /* SyncPropertyMapper.h in Headers */, + 14F6276F1E7AE6B5001C2EA0 /* NSString+SyncInflections.h in Headers */, 14F627701E7AE6B5001C2EA0 /* Sync.h in Headers */, 14F627711E7AE6B5001C2EA0 /* Sync.swift in Headers */, - 14F627721E7AE6B5001C2EA0 /* Sync+DATAStack.swift in Headers */, + 14F627721E7AE6B5001C2EA0 /* Sync+DataStack.swift in Headers */, 14F627731E7AE6B5001C2EA0 /* Sync+NSPersistentContainer.swift in Headers */, 14F627741E7AE6B5001C2EA0 /* NSArray+Sync.swift in Headers */, 14F627751E7AE6B5001C2EA0 /* NSEntityDescription+Sync.swift in Headers */, @@ -1402,20 +1410,20 @@ buildActionMask = 2147483647; files = ( 14E93C461DBCCD2800E3304E /* Sync.h in Headers */, - 14D93C311E4E65C700DED595 /* SYNCPropertyMapper.h in Headers */, - 14D93C0D1E4E65C700DED595 /* NSDate+SYNCPropertyMapper.h in Headers */, - 14D93C191E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.h in Headers */, - 14D93C3D1E4E65C700DED595 /* NSString+SYNCInflections.h in Headers */, - 14D93C251E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.h in Headers */, + 14D93C311E4E65C700DED595 /* SyncPropertyMapper.h in Headers */, + 14D93C0D1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h in Headers */, + 14D93C191E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h in Headers */, + 14D93C3D1E4E65C700DED595 /* NSString+SyncInflections.h in Headers */, + 14D93C251E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.h in Headers */, 14A84E951E4E70B900701B8A /* Sync.swift in Headers */, - 14A84E961E4E70B900701B8A /* Sync+DATAStack.swift in Headers */, + 14A84E961E4E70B900701B8A /* Sync+DataStack.swift in Headers */, 14A84E971E4E70B900701B8A /* Sync+NSPersistentContainer.swift in Headers */, 14A84E981E4E70B900701B8A /* NSArray+Sync.swift in Headers */, 14A84E991E4E70B900701B8A /* NSEntityDescription+Sync.swift in Headers */, 14A84E9A1E4E70B900701B8A /* NSManagedObject+Sync.swift in Headers */, 14A84E9B1E4E70B900701B8A /* NSManagedObjectContext+Sync.swift in Headers */, 14A84E9C1E4E70B900701B8A /* Result.swift in Headers */, - 14F6277A1E7AE6E1001C2EA0 /* DATAStack.swift in Headers */, + 14F6277A1E7AE6E1001C2EA0 /* DataStack.swift in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1423,15 +1431,15 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 14F6275B1E7AE6B2001C2EA0 /* DATAStack.swift in Headers */, - 14F6275C1E7AE6B2001C2EA0 /* NSDate+SYNCPropertyMapper.h in Headers */, - 14F6275D1E7AE6B2001C2EA0 /* NSEntityDescription+SYNCPrimaryKey.h in Headers */, - 14F6275E1E7AE6B2001C2EA0 /* NSManagedObject+SYNCPropertyMapperHelpers.h in Headers */, - 14F6275F1E7AE6B2001C2EA0 /* SYNCPropertyMapper.h in Headers */, - 14F627601E7AE6B2001C2EA0 /* NSString+SYNCInflections.h in Headers */, + 14F6275B1E7AE6B2001C2EA0 /* DataStack.swift in Headers */, + 14F6275C1E7AE6B2001C2EA0 /* NSDate+SyncPropertyMapper.h in Headers */, + 14F6275D1E7AE6B2001C2EA0 /* NSEntityDescription+SyncPrimaryKey.h in Headers */, + 14F6275E1E7AE6B2001C2EA0 /* NSManagedObject+SyncPropertyMapperHelpers.h in Headers */, + 14F6275F1E7AE6B2001C2EA0 /* SyncPropertyMapper.h in Headers */, + 14F627601E7AE6B2001C2EA0 /* NSString+SyncInflections.h in Headers */, 14F627611E7AE6B2001C2EA0 /* Sync.h in Headers */, 14F627621E7AE6B2001C2EA0 /* Sync.swift in Headers */, - 14F627631E7AE6B2001C2EA0 /* Sync+DATAStack.swift in Headers */, + 14F627631E7AE6B2001C2EA0 /* Sync+DataStack.swift in Headers */, 14F627641E7AE6B2001C2EA0 /* Sync+NSPersistentContainer.swift in Headers */, 14F627651E7AE6B2001C2EA0 /* NSArray+Sync.swift in Headers */, 14F627661E7AE6B2001C2EA0 /* NSEntityDescription+Sync.swift in Headers */, @@ -1948,15 +1956,15 @@ 14241EA41DBC3A6F0042ED81 /* Sync.swift in Sources */, 142CD2B11DEF3A01002FDABE /* Sync+NSPersistentContainer.swift in Sources */, 14AF6AFE1DFC3D88009E5BC4 /* Result.swift in Sources */, - 14241EA51DBC3A6F0042ED81 /* DATAFilter.swift in Sources */, + 14241EA51DBC3A6F0042ED81 /* DataFilter.swift in Sources */, 14241EA71DBC3A6F0042ED81 /* TestCheck.swift in Sources */, - 142CD2A81DEF39AE002FDABE /* Sync+DATAStack.swift in Sources */, - 1467388C1E7ADBA700913C8E /* DATAStack.swift in Sources */, - 14D93C2B1E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m in Sources */, - 14D93C431E4E65C700DED595 /* NSString+SYNCInflections.m in Sources */, - 14D93C1F1E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m in Sources */, - 14D93C371E4E65C700DED595 /* SYNCPropertyMapper.m in Sources */, - 14D93C131E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m in Sources */, + 142CD2A81DEF39AE002FDABE /* Sync+DataStack.swift in Sources */, + 1467388C1E7ADBA700913C8E /* DataStack.swift in Sources */, + 14D93C2B1E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m in Sources */, + 14D93C431E4E65C700DED595 /* NSString+SyncInflections.m in Sources */, + 14D93C1F1E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m in Sources */, + 14D93C371E4E65C700DED595 /* SyncPropertyMapper.m in Sources */, + 14D93C131E4E65C700DED595 /* NSDate+SyncPropertyMapper.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1966,20 +1974,20 @@ files = ( 14241EA81DBC3A770042ED81 /* NSArray+Sync.swift in Sources */, 14241EA91DBC3A770042ED81 /* NSEntityDescription+Sync.swift in Sources */, - 14D93C2C1E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m in Sources */, + 14D93C2C1E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m in Sources */, 14241EAA1DBC3A770042ED81 /* NSManagedObject+Sync.swift in Sources */, 14241EAB1DBC3A770042ED81 /* NSManagedObjectContext+Sync.swift in Sources */, - 14D93C441E4E65C700DED595 /* NSString+SYNCInflections.m in Sources */, + 14D93C441E4E65C700DED595 /* NSString+SyncInflections.m in Sources */, 14241EAC1DBC3A770042ED81 /* Sync.swift in Sources */, 142CD2B21DEF3A01002FDABE /* Sync+NSPersistentContainer.swift in Sources */, - 14D93C201E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m in Sources */, - 14D93C381E4E65C700DED595 /* SYNCPropertyMapper.m in Sources */, - 1467388F1E7ADBA700913C8E /* DATAStack.swift in Sources */, + 14D93C201E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m in Sources */, + 14D93C381E4E65C700DED595 /* SyncPropertyMapper.m in Sources */, + 1467388F1E7ADBA700913C8E /* DataStack.swift in Sources */, 14AF6AFF1DFC3D88009E5BC4 /* Result.swift in Sources */, - 14D93C141E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m in Sources */, - 14241EAD1DBC3A770042ED81 /* DATAFilter.swift in Sources */, + 14D93C141E4E65C700DED595 /* NSDate+SyncPropertyMapper.m in Sources */, + 14241EAD1DBC3A770042ED81 /* DataFilter.swift in Sources */, 14241EAF1DBC3A770042ED81 /* TestCheck.swift in Sources */, - 142CD2A91DEF39AE002FDABE /* Sync+DATAStack.swift in Sources */, + 142CD2A91DEF39AE002FDABE /* Sync+DataStack.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1989,20 +1997,20 @@ files = ( 14241EB01DBC3A7F0042ED81 /* NSArray+Sync.swift in Sources */, 14241EB11DBC3A7F0042ED81 /* NSEntityDescription+Sync.swift in Sources */, - 14D93C2D1E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m in Sources */, + 14D93C2D1E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m in Sources */, 14241EB21DBC3A7F0042ED81 /* NSManagedObject+Sync.swift in Sources */, 14241EB31DBC3A7F0042ED81 /* NSManagedObjectContext+Sync.swift in Sources */, - 14D93C451E4E65C700DED595 /* NSString+SYNCInflections.m in Sources */, + 14D93C451E4E65C700DED595 /* NSString+SyncInflections.m in Sources */, 14241EB41DBC3A7F0042ED81 /* Sync.swift in Sources */, 142CD2B31DEF3A01002FDABE /* Sync+NSPersistentContainer.swift in Sources */, - 14D93C211E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m in Sources */, - 14D93C391E4E65C700DED595 /* SYNCPropertyMapper.m in Sources */, - 1467388D1E7ADBA700913C8E /* DATAStack.swift in Sources */, + 14D93C211E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m in Sources */, + 14D93C391E4E65C700DED595 /* SyncPropertyMapper.m in Sources */, + 1467388D1E7ADBA700913C8E /* DataStack.swift in Sources */, 14AF6B001DFC3D88009E5BC4 /* Result.swift in Sources */, - 14D93C151E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m in Sources */, - 14241EB51DBC3A7F0042ED81 /* DATAFilter.swift in Sources */, + 14D93C151E4E65C700DED595 /* NSDate+SyncPropertyMapper.m in Sources */, + 14241EB51DBC3A7F0042ED81 /* DataFilter.swift in Sources */, 14241EB71DBC3A7F0042ED81 /* TestCheck.swift in Sources */, - 142CD2AA1DEF39AE002FDABE /* Sync+DATAStack.swift in Sources */, + 142CD2AA1DEF39AE002FDABE /* Sync+DataStack.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2012,20 +2020,20 @@ files = ( 14241EB81DBC3A880042ED81 /* NSArray+Sync.swift in Sources */, 14241EB91DBC3A880042ED81 /* NSEntityDescription+Sync.swift in Sources */, - 14D93C2E1E4E65C700DED595 /* NSManagedObject+SYNCPropertyMapperHelpers.m in Sources */, + 14D93C2E1E4E65C700DED595 /* NSManagedObject+SyncPropertyMapperHelpers.m in Sources */, 14241EBA1DBC3A880042ED81 /* NSManagedObject+Sync.swift in Sources */, 14241EBB1DBC3A880042ED81 /* NSManagedObjectContext+Sync.swift in Sources */, - 14D93C461E4E65C700DED595 /* NSString+SYNCInflections.m in Sources */, + 14D93C461E4E65C700DED595 /* NSString+SyncInflections.m in Sources */, 14241EBC1DBC3A880042ED81 /* Sync.swift in Sources */, 142CD2B41DEF3A01002FDABE /* Sync+NSPersistentContainer.swift in Sources */, - 14D93C221E4E65C700DED595 /* NSEntityDescription+SYNCPrimaryKey.m in Sources */, - 14D93C3A1E4E65C700DED595 /* SYNCPropertyMapper.m in Sources */, - 1467388E1E7ADBA700913C8E /* DATAStack.swift in Sources */, + 14D93C221E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m in Sources */, + 14D93C3A1E4E65C700DED595 /* SyncPropertyMapper.m in Sources */, + 1467388E1E7ADBA700913C8E /* DataStack.swift in Sources */, 14AF6B011DFC3D88009E5BC4 /* Result.swift in Sources */, - 14D93C161E4E65C700DED595 /* NSDate+SYNCPropertyMapper.m in Sources */, - 14241EBD1DBC3A880042ED81 /* DATAFilter.swift in Sources */, + 14D93C161E4E65C700DED595 /* NSDate+SyncPropertyMapper.m in Sources */, + 14241EBD1DBC3A880042ED81 /* DataFilter.swift in Sources */, 14241EBF1DBC3A880042ED81 /* TestCheck.swift in Sources */, - 142CD2AB1DEF39AE002FDABE /* Sync+DATAStack.swift in Sources */, + 142CD2AB1DEF39AE002FDABE /* Sync+DataStack.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2046,7 +2054,7 @@ 14D93C631E4E68BA00DED595 /* 151-ordered-to-many.xcdatamodeld in Sources */, 14D93C641E4E68BA00DED595 /* 151-to-many.xcdatamodeld in Sources */, 14D93C651E4E68BA00DED595 /* 157.xcdatamodeld in Sources */, - 441FA7B41E4EFF7C00023821 /* SYNCPrimaryKey.xcdatamodeld in Sources */, + 441FA7B41E4EFF7C00023821 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14D93C661E4E68BA00DED595 /* 179.xcdatamodeld in Sources */, 14A84EEA1E4E748000701B8A /* 123.xcdatamodeld in Sources */, 14A84EFF1E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */, @@ -2067,7 +2075,7 @@ 14A84ECC1E4E748000701B8A /* PrimaryKeyTests.m in Sources */, 14D93C711E4E68BA00DED595 /* 320.xcdatamodeld in Sources */, 14D93C721E4E68BA00DED595 /* Camelcase.xcdatamodeld in Sources */, - 14A84F051E4E748000701B8A /* HYPTestValueTransformer.m in Sources */, + 14A84F051E4E748000701B8A /* SyncTestValueTransformer.m in Sources */, 14A84EF01E4E748000701B8A /* 137.xcdatamodeld in Sources */, 14D93C731E4E68BA00DED595 /* Contacts.xcdatamodeld in Sources */, 1467389F1E7ADC1900913C8E /* Tests.swift in Sources */, @@ -2077,18 +2085,18 @@ 14D93C771E4E68BA00DED595 /* Markets.xcdatamodeld in Sources */, 14D93C781E4E68BA00DED595 /* Notes.xcdatamodeld in Sources */, 14D93C791E4E68BA00DED595 /* NotesB.xcdatamodeld in Sources */, - 14A84ECF1E4E748000701B8A /* NSString_SYNCInflectionsTests.m in Sources */, + 14A84ECF1E4E748000701B8A /* NSString_SyncInflectionsTests.m in Sources */, 14D93C7A1E4E68BA00DED595 /* OrderedSocial.xcdatamodeld in Sources */, 14D93C7B1E4E68BA00DED595 /* Organizations.xcdatamodeld in Sources */, 14D93C7C1E4E68BA00DED595 /* Patients.xcdatamodeld in Sources */, 14D93C7D1E4E68BA00DED595 /* Recursive.xcdatamodeld in Sources */, 14A84ED51E4E748000701B8A /* FillWithDictionaryTests.swift in Sources */, - 14A84EE11E4E748000701B8A /* HYPFillWithDictionaryTests.m in Sources */, + 14A84EE11E4E748000701B8A /* SyncFillWithDictionaryTests.m in Sources */, 14D93C7E1E4E68BA00DED595 /* Social.xcdatamodeld in Sources */, 14D93C7F1E4E68BA00DED595 /* Tests.xcdatamodeld in Sources */, 14D93C801E4E68BA00DED595 /* ToOne.xcdatamodeld in Sources */, 14D93C811E4E68BA00DED595 /* Unique.xcdatamodeld in Sources */, - 14A84E931E4E6B4A00701B8A /* DATAFilter.xcdatamodeld in Sources */, + 14A84E931E4E6B4A00701B8A /* DataFilter.xcdatamodeld in Sources */, 14D93C831E4E68FA00DED595 /* Helper.swift in Sources */, 14D93C841E4E690A00DED595 /* JSON.swift in Sources */, 14D93C501E4E689F00DED595 /* NSArray+SyncTests.swift in Sources */, @@ -2106,11 +2114,11 @@ 14A84EF91E4E748000701B8A /* Model.xcdatamodeld in Sources */, 14D93C5A1E4E689F00DED595 /* FetchTests.swift in Sources */, 14A84EE41E4E748000701B8A /* 112.xcdatamodeld in Sources */, - 14D93C5B1E4E68A400DED595 /* DATAFilterTests.swift in Sources */, + 14D93C5B1E4E68A400DED595 /* DataFilterTests.swift in Sources */, 14D93C5C1E4E68AF00DED595 /* TestCheckTests.swift in Sources */, 146738991E7ADC1900913C8E /* ModelGroup.xcdatamodeld in Sources */, 14A84EE71E4E748000701B8A /* 121.xcdatamodeld in Sources */, - 14A84EDE1E4E748000701B8A /* HYPDictionaryTests.m in Sources */, + 14A84EDE1E4E748000701B8A /* SyncDictionaryTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2131,20 +2139,20 @@ 14A84E641E4E6B2800701B8A /* SyncTests.swift in Sources */, 14A84E651E4E6B2800701B8A /* SyncDelegateTests.swift in Sources */, 14A84E661E4E6B2800701B8A /* NSPersistentContainerTests.swift in Sources */, - 441FA7B51E4EFF7D00023821 /* SYNCPrimaryKey.xcdatamodeld in Sources */, + 441FA7B51E4EFF7D00023821 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14A84E671E4E6B2800701B8A /* InsertOrUpdateTests.swift in Sources */, 14A84EEB1E4E748000701B8A /* 123.xcdatamodeld in Sources */, 14A84F001E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */, 14A84E681E4E6B2800701B8A /* UpdateTests.swift in Sources */, 14A84E691E4E6B2800701B8A /* DeleteTests.swift in Sources */, 14A84E6A1E4E6B2800701B8A /* FetchTests.swift in Sources */, - 14A84E6B1E4E6B2F00701B8A /* DATAFilterTests.swift in Sources */, + 14A84E6B1E4E6B2F00701B8A /* DataFilterTests.swift in Sources */, 14A84EFD1E4E748000701B8A /* Ordered.xcdatamodeld in Sources */, 14A84E6C1E4E6B2F00701B8A /* TestCheckTests.swift in Sources */, 14A84ED31E4E748000701B8A /* DictionaryTests.swift in Sources */, 14A84EDC1E4E748000701B8A /* HelperTests.m in Sources */, 14A84EF41E4E748000701B8A /* 140.xcdatamodeld in Sources */, - 14A84E6D1E4E6B3400701B8A /* DATAFilter.xcdatamodeld in Sources */, + 14A84E6D1E4E6B3400701B8A /* DataFilter.xcdatamodeld in Sources */, 14A84E6E1E4E6B4100701B8A /* 3ca82a0.xcdatamodeld in Sources */, 14A84E6F1E4E6B4100701B8A /* 84.xcdatamodeld in Sources */, 14A84E701E4E6B4100701B8A /* 113.xcdatamodeld in Sources */, @@ -2152,7 +2160,7 @@ 14A84ECD1E4E748000701B8A /* PrimaryKeyTests.m in Sources */, 14A84E721E4E6B4100701B8A /* 151-many-to-many.xcdatamodeld in Sources */, 14A84E731E4E6B4100701B8A /* 151-ordered-many-to-many.xcdatamodeld in Sources */, - 14A84F061E4E748000701B8A /* HYPTestValueTransformer.m in Sources */, + 14A84F061E4E748000701B8A /* SyncTestValueTransformer.m in Sources */, 14A84EF11E4E748000701B8A /* 137.xcdatamodeld in Sources */, 14A84E741E4E6B4100701B8A /* 151-ordered-to-many.xcdatamodeld in Sources */, 146738A01E7ADC1900913C8E /* Tests.swift in Sources */, @@ -2162,13 +2170,13 @@ 14A84E781E4E6B4100701B8A /* 202.xcdatamodeld in Sources */, 14A84E791E4E6B4100701B8A /* 225.xcdatamodeld in Sources */, 14A84E7A1E4E6B4100701B8A /* 233.xcdatamodeld in Sources */, - 14A84ED01E4E748000701B8A /* NSString_SYNCInflectionsTests.m in Sources */, + 14A84ED01E4E748000701B8A /* NSString_SyncInflectionsTests.m in Sources */, 14A84E7B1E4E6B4100701B8A /* 239.xcdatamodeld in Sources */, 14A84E7C1E4E6B4100701B8A /* 254.xcdatamodeld in Sources */, 14A84E7D1E4E6B4100701B8A /* 257.xcdatamodeld in Sources */, 14A84E7E1E4E6B4100701B8A /* 265.xcdatamodeld in Sources */, 14A84ED61E4E748000701B8A /* FillWithDictionaryTests.swift in Sources */, - 14A84EE21E4E748000701B8A /* HYPFillWithDictionaryTests.m in Sources */, + 14A84EE21E4E748000701B8A /* SyncFillWithDictionaryTests.m in Sources */, 14A84E7F1E4E6B4100701B8A /* 277.xcdatamodeld in Sources */, 14A84E801E4E6B4100701B8A /* 280.xcdatamodeld in Sources */, 14A84E811E4E6B4100701B8A /* 283.xcdatamodeld in Sources */, @@ -2195,7 +2203,7 @@ 14A84E921E4E6B4100701B8A /* Unique.xcdatamodeld in Sources */, 1467389A1E7ADC1900913C8E /* ModelGroup.xcdatamodeld in Sources */, 14A84EE81E4E748000701B8A /* 121.xcdatamodeld in Sources */, - 14A84EDF1E4E748000701B8A /* HYPDictionaryTests.m in Sources */, + 14A84EDF1E4E748000701B8A /* SyncDictionaryTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2203,20 +2211,20 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14E2F0AA1E7ADFC600DF1776 /* NSString_SYNCInflectionsTests.m in Sources */, + 14E2F0AA1E7ADFC600DF1776 /* NSString_SyncInflectionsTests.m in Sources */, 14E2F0A31E7ADFB500DF1776 /* LightweightMigrationModel.xcdatamodel in Sources */, 14E2F0A41E7ADFB500DF1776 /* ModelGroup.xcdatamodeld in Sources */, 14E2F0A51E7ADFB500DF1776 /* SimpleModel.xcdatamodel in Sources */, 14E2F0A61E7ADFB500DF1776 /* Tests.swift in Sources */, 14E2F0EF1E7AE01600DF1776 /* Helper.swift in Sources */, 14E2F0A71E7ADFBA00DF1776 /* DateTests.swift in Sources */, - 14E2F0A81E7ADFC100DF1776 /* SYNCPrimaryKey.xcdatamodeld in Sources */, + 14E2F0A81E7ADFC100DF1776 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14E2F0A91E7ADFC100DF1776 /* PrimaryKeyTests.m in Sources */, 14E2F0AB1E7ADFD200DF1776 /* DictionaryTests.swift in Sources */, 14E2F0AC1E7ADFD200DF1776 /* FillWithDictionaryTests.swift in Sources */, 14E2F0AD1E7ADFD200DF1776 /* HelperTests.m in Sources */, - 14E2F0AE1E7ADFD200DF1776 /* HYPDictionaryTests.m in Sources */, - 14E2F0AF1E7ADFD200DF1776 /* HYPFillWithDictionaryTests.m in Sources */, + 14E2F0AE1E7ADFD200DF1776 /* SyncDictionaryTests.m in Sources */, + 14E2F0AF1E7ADFD200DF1776 /* SyncFillWithDictionaryTests.m in Sources */, 14E2F0B01E7ADFE000DF1776 /* 112.xcdatamodeld in Sources */, 14E2F0B11E7ADFE000DF1776 /* 121.xcdatamodeld in Sources */, 14E2F0B21E7ADFE000DF1776 /* 123.xcdatamodeld in Sources */, @@ -2228,7 +2236,7 @@ 14E2F0B81E7ADFE000DF1776 /* Ordered.xcdatamodeld in Sources */, 14E2F0B91E7ADFE700DF1776 /* BadAPIValueTransformer.swift in Sources */, 14E2F0BB1E7ADFE700DF1776 /* DateStringTransformer.m in Sources */, - 14E2F0BD1E7ADFE700DF1776 /* HYPTestValueTransformer.m in Sources */, + 14E2F0BD1E7ADFE700DF1776 /* SyncTestValueTransformer.m in Sources */, 14E2F0BE1E7ADFEC00DF1776 /* JSON.swift in Sources */, 14E2F0BF1E7ADFF900DF1776 /* NSArray+SyncTests.swift in Sources */, 14E2F0C01E7ADFF900DF1776 /* NSEntityDescription+SyncTests.swift in Sources */, @@ -2278,8 +2286,8 @@ 14E2F0EC1E7AE00200DF1776 /* Tests.xcdatamodeld in Sources */, 14E2F0ED1E7AE00200DF1776 /* ToOne.xcdatamodeld in Sources */, 14E2F0EE1E7AE00200DF1776 /* Unique.xcdatamodeld in Sources */, - 14E2F0F01E7AE02F00DF1776 /* DATAFilterTests.swift in Sources */, - 14E2F0F11E7AE02F00DF1776 /* DATAFilter.xcdatamodeld in Sources */, + 14E2F0F01E7AE02F00DF1776 /* DataFilterTests.swift in Sources */, + 14E2F0F11E7AE02F00DF1776 /* DataFilter.xcdatamodeld in Sources */, 14E2F0F21E7AE03400DF1776 /* TestCheckTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -3334,23 +3342,23 @@ sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 441FA7AE1E4EFF4E00023821 /* SYNCPrimaryKey.xcdatamodeld */ = { + 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 441FA7AF1E4EFF4E00023821 /* SYNCPrimaryKey.xcdatamodel */, + 441FA7AF1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodel */, ); - currentVersion = 441FA7AF1E4EFF4E00023821 /* SYNCPrimaryKey.xcdatamodel */; - path = SYNCPrimaryKey.xcdatamodeld; + currentVersion = 441FA7AF1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodel */; + path = SyncPrimaryKey.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 445D3BBC1D9F9373007F9E26 /* DATAFilter.xcdatamodeld */ = { + 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 445D3BBD1D9F9373007F9E26 /* DATAFilter.xcdatamodel */, + 445D3BBD1D9F9373007F9E26 /* DataFilter.xcdatamodel */, ); - currentVersion = 445D3BBD1D9F9373007F9E26 /* DATAFilter.xcdatamodel */; - path = DATAFilter.xcdatamodeld; + currentVersion = 445D3BBD1D9F9373007F9E26 /* DataFilter.xcdatamodel */; + path = DataFilter.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; diff --git a/README.md b/README.md index fde14c97..da9d7fca 100755 --- a/README.md +++ b/README.md @@ -70,13 +70,13 @@ Syncing JSON to Core Data is a repetitive tasks that often demands adding a lot Sync.changes( changes: [[String : Any]], inEntityNamed: String, - dataStack: DATAStack, + dataStack: DataStack, completion: ((NSError?) -> Void)?) ``` * `changes`: JSON response * `entityName`: Core Data’s Model Entity Name (such as User, Note, Task) -* `dataStack`: Your [DATAStack](https://github.com/SyncDB/DATAStack) +* `dataStack`: Your [DataStack](https://github.com/SyncDB/DataStack) ### Model @@ -171,10 +171,10 @@ github "SyncDB/Sync" ~> 2.0 ### Core Data Stack -Replace your Core Data stack with an instance of [DATAStack](https://github.com/SyncDB/DATAStack). +Replace your Core Data stack with an instance of [DataStack](https://github.com/SyncDB/DataStack). ```swift -self.dataStack = DATAStack(modelName: "Demo") +self.dataStack = DataStack(modelName: "Demo") ``` ### Primary key @@ -203,8 +203,8 @@ Your attributes should match their JSON counterparts in `camelCase` notation ins There are some exception to this rule: -* Reserved attributes should be prefixed with the `entityName` (`type` becomes `userType`, `description` becomes `userDescription` and so on). In the JSON they don't need to change, you can keep `type` and `description` for example. A full list of reserved attributes can be found [here](https://github.com/SyncDB/SYNCPropertyMapper/blob/master/Sources/NSManagedObject-SYNCPropertyMapper/NSManagedObject%2BSYNCPropertyMapperHelpers.m#L282-L284) -* Attributes with acronyms will be normalized (`id`, `pdf`, `url`, `png`, `jpg`, `uri`, `json`, `xml`). For example `user_id` will be mapped to `userID` and so on. You can find the entire list of supported acronyms [here](https://github.com/SyncDB/SYNCPropertyMapper/blob/master/Sources/NSString-SYNCInflections/NSString%2BSYNCInflections.m#L204-L206). +* Reserved attributes should be prefixed with the `entityName` (`type` becomes `userType`, `description` becomes `userDescription` and so on). In the JSON they don't need to change, you can keep `type` and `description` for example. A full list of reserved attributes can be found [here](https://github.com/SyncDB/SyncPropertyMapper/blob/master/Sources/NSManagedObject-SyncPropertyMapper/NSManagedObject%2BSyncPropertyMapperHelpers.m#L282-L284) +* Attributes with acronyms will be normalized (`id`, `pdf`, `url`, `png`, `jpg`, `uri`, `json`, `xml`). For example `user_id` will be mapped to `userID` and so on. You can find the entire list of supported acronyms [here](https://github.com/SyncDB/SyncPropertyMapper/blob/master/Sources/NSString-SyncInflections/NSString%2BSyncInflections.m#L204-L206). If you want to map your Core Data attribute with a JSON attribute that has different naming, you can do by adding `hyper.remoteKey` in the user info box with the value you want to map. @@ -252,7 +252,7 @@ let expenses = NSKeyedUnarchiver.unarchiveObjectWithData(managedObject.expenses) #### Dates -We went for supporting [ISO8601](http://en.wikipedia.org/wiki/ISO_8601) and unix timestamp out of the box because those are the most common formats when parsing dates, also we have a [quite performant way to parse this strings](https://github.com/SyncDB/SYNCPropertyMapper/blob/master/Sources/DateParser/NSDate%2BSYNCPropertyMapper.m) which overcomes the [performance issues of using `NSDateFormatter`](http://blog.soff.es/how-to-drastically-improve-your-app-with-an-afternoon-and-instruments/). +We went for supporting [ISO8601](http://en.wikipedia.org/wiki/ISO_8601) and unix timestamp out of the box because those are the most common formats when parsing dates, also we have a [quite performant way to parse this strings](https://github.com/SyncDB/SyncPropertyMapper/blob/master/Sources/DateParser/NSDate%2BSyncPropertyMapper.m) which overcomes the [performance issues of using `NSDateFormatter`](http://blog.soff.es/how-to-drastically-improve-your-app-with-an-afternoon-and-instruments/). ```swift let values = ["created_at" : "2014-01-01T00:00:00+00:00", @@ -274,7 +274,7 @@ let publishedAt = managedObject.value(forKey: "publishedAt") #### JSON representation from a NSManagedObject -**Sync**'s dependency [**SYNCPropertyMapper**](https://github.com/SyncDB/SYNCPropertyMapper) provides a method to generate a JSON object from any NSManagedObject instance. [More information here.](https://github.com/SyncDB/SYNCPropertyMapper#json-representation-from-a-nsmanagedobject) +**Sync**'s dependency [**SyncPropertyMapper**](https://github.com/SyncDB/SyncPropertyMapper) provides a method to generate a JSON object from any NSManagedObject instance. [More information here.](https://github.com/SyncDB/SyncPropertyMapper#json-representation-from-a-nsmanagedobject) ### Relationship mapping @@ -373,11 +373,11 @@ You are free to use any networking library. **Sync** wouldn’t be possible without the help of this *fully tested* components: -* [**DATAStack**](https://github.com/SyncDB/DATAStack): Core Data stack and thread safe saving +* [**DataStack**](https://github.com/SyncDB/DataStack): Core Data stack and thread safe saving -* [**DATAFilter**](https://github.com/SyncDB/DATAFilter): Helps you purge deleted objects. Internally we use it to diff inserts, updates and deletes. Also it’s used for uniquing Core Data does this based on objectIDs, DATAFilter uses your remote keys (such as id) for this +* [**DataFilter**](https://github.com/SyncDB/DataFilter): Helps you purge deleted objects. Internally we use it to diff inserts, updates and deletes. Also it’s used for uniquing Core Data does this based on objectIDs, DataFilter uses your remote keys (such as id) for this -* [**SYNCPropertyMapper**](https://github.com/SyncDB/SYNCPropertyMapper): Maps JSON fields with their Core Data counterparts, it does most of it’s job using the paradigm “_convention over configuration_” +* [**SyncPropertyMapper**](https://github.com/SyncDB/SyncPropertyMapper): Maps JSON fields with their Core Data counterparts, it does most of it’s job using the paradigm “_convention over configuration_” ## FAQ @@ -493,7 +493,7 @@ Sync.changes(secondImport, inEntityNamed: "User", dataStack: dataStack, operatio #### How can I load tens of thousands of objects without blocking my UI? -Saving to a background context or a main context could still block the UI since merging to the main thread is a task that of course is done in the main thread. Luckily `DATAStack` has a `newNonMergingBackgroundContext` context that helps us to perform saves without hitting the main thread and any point. If you want to load new items, let's say using a `NSFetchedResultController` you can do it like this: +Saving to a background context or a main context could still block the UI since merging to the main thread is a task that of course is done in the main thread. Luckily `DataStack` has a `newNonMergingBackgroundContext` context that helps us to perform saves without hitting the main thread and any point. If you want to load new items, let's say using a `NSFetchedResultController` you can do it like this: ```swift try self.fetchedResultsController.performFetch() @@ -520,9 +520,9 @@ Sync uses an extensive and [blazing fast ISO 8601 parser](https://github.com/Syn #### Infinite loop in hyp_dictionary() with relationships -If you're using hyp_dictionary() and you get a stack overflow because of recursive calls, then is probably because somewhere in your relationships, your model is referencing a model that it's referencing the previous model and so on, then `SYNCPropertyMapper` doesn't know when to stop. For this reason we've introduced `hyper.nonExportable`, this flag can be used for both fields and relationships. To fix your issue you need to add the flag to the relationship that shouldn't be exported. +If you're using hyp_dictionary() and you get a stack overflow because of recursive calls, then is probably because somewhere in your relationships, your model is referencing a model that it's referencing the previous model and so on, then `SyncPropertyMapper` doesn't know when to stop. For this reason we've introduced `hyper.nonExportable`, this flag can be used for both fields and relationships. To fix your issue you need to add the flag to the relationship that shouldn't be exported. -[More information here.](https://github.com/SyncDB/SYNCPropertyMapper#excluding) +[More information here.](https://github.com/SyncDB/SyncPropertyMapper#excluding) ## License diff --git a/Source/DATAFilter/DATAFilter.swift b/Source/DATAFilter/DataFilter.swift similarity index 87% rename from Source/DATAFilter/DATAFilter.swift rename to Source/DATAFilter/DataFilter.swift index 414662b6..85139cb9 100755 --- a/Source/DATAFilter/DATAFilter.swift +++ b/Source/DATAFilter/DataFilter.swift @@ -5,7 +5,7 @@ import CoreData Helps you filter insertions, deletions and updates by comparing your JSON dictionary with your Core Data local objects. It also provides uniquing for you locally stored objects and automatic removal of not found ones. */ -class DATAFilter: NSObject { +class DataFilter: NSObject { struct Operation: OptionSet { let rawValue: Int @@ -13,10 +13,10 @@ class DATAFilter: NSObject { self.rawValue = rawValue } - static let Insert = Operation(rawValue: 1 << 0) - static let Update = Operation(rawValue: 1 << 1) - static let Delete = Operation(rawValue: 1 << 2) - static let All: Operation = [.Insert, .Update, .Delete] + static let insert = Operation(rawValue: 1 << 0) + static let update = Operation(rawValue: 1 << 1) + static let delete = Operation(rawValue: 1 << 2) + static let all: Operation = [.insert, .update, .delete] } class func changes(_ changes: [[String: Any]], @@ -26,7 +26,7 @@ class DATAFilter: NSObject { context: NSManagedObjectContext, inserted: (_ json: [String: Any]) -> Void, updated: (_ json: [String: Any], _ updatedObject: NSManagedObject) -> Void) { - self.changes(changes, inEntityNamed: entityName, predicate: nil, operations: .All, localPrimaryKey: localPrimaryKey, remotePrimaryKey: remotePrimaryKey, context: context, inserted: inserted, updated: updated) + self.changes(changes, inEntityNamed: entityName, predicate: nil, operations: .all, localPrimaryKey: localPrimaryKey, remotePrimaryKey: remotePrimaryKey, context: context, inserted: inserted, updated: updated) } class func changes(_ changes: [[String: Any]], @@ -38,7 +38,7 @@ class DATAFilter: NSObject { context: NSManagedObjectContext, inserted: (_ json: [String: Any]) -> Void, updated: (_ json: [String: Any], _ updatedObject: NSManagedObject) -> Void) { - // `DATAObjectIDs.objectIDsInEntityNamed` also deletes all objects that don't have a primary key or that have the same primary key already found in the context + // `DataObjectIDs.objectIDsInEntityNamed` also deletes all objects that don't have a primary key or that have the same primary key already found in the context let primaryKeysAndObjectIDs = context.managedObjectIDs(in: entityName, usingAsKey: localPrimaryKey, predicate: predicate) as [NSObject: NSManagedObjectID] let localPrimaryKeys = Array(primaryKeysAndObjectIDs.keys) let remotePrimaryKeys = changes.map { $0[remotePrimaryKey] } @@ -63,7 +63,7 @@ class DATAFilter: NSObject { !localPrimaryKeys.contains { $0.isEqual(value) } } - if operations.contains(.Delete) { + if operations.contains(.delete) { for fetchedID in deletedObjectIDs { let objectID = primaryKeysAndObjectIDs[fetchedID]! let object = context.object(with: objectID) @@ -71,14 +71,14 @@ class DATAFilter: NSObject { } } - if operations.contains(.Insert) { + if operations.contains(.insert) { for fetchedID in insertedObjectIDs { let objectDictionary = remotePrimaryKeysAndChanges[fetchedID]! inserted(objectDictionary) } } - if operations.contains(.Update) { + if operations.contains(.update) { for fetchedID in updatedObjectIDs { let JSON = remotePrimaryKeysAndChanges[fetchedID]! let objectID = primaryKeysAndObjectIDs[fetchedID]! diff --git a/Source/DATAStack/DATAStack.swift b/Source/DATAStack/DataStack.swift similarity index 91% rename from Source/DATAStack/DATAStack.swift rename to Source/DATAStack/DataStack.swift index 6b8c8bec..36544ac6 100755 --- a/Source/DATAStack/DATAStack.swift +++ b/Source/DATAStack/DataStack.swift @@ -1,7 +1,7 @@ import Foundation import CoreData -@objc public enum DATAStackStoreType: Int { +@objc public enum DataStackStoreType: Int { case inMemory, sqLite var type: String { @@ -14,8 +14,8 @@ import CoreData } } -@objc public class DATAStack: NSObject { - private var storeType = DATAStackStoreType.sqLite +@objc public class DataStack: NSObject { + private var storeType = DataStackStoreType.sqLite private var storeName: String? @@ -39,7 +39,7 @@ import CoreData context.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy context.persistentStoreCoordinator = self.persistentStoreCoordinator - NotificationCenter.default.addObserver(self, selector: #selector(DATAStack.mainContextDidSave(_:)), name: .NSManagedObjectContextDidSave, object: context) + NotificationCenter.default.addObserver(self, selector: #selector(DataStack.mainContextDidSave(_:)), name: .NSManagedObjectContextDidSave, object: context) return context }() @@ -53,7 +53,7 @@ import CoreData } private lazy var writerContext: NSManagedObjectContext = { - let context = NSManagedObjectContext(concurrencyType: DATAStack.backgroundConcurrencyType()) + let context = NSManagedObjectContext(concurrencyType: DataStack.backgroundConcurrencyType()) context.undoManager = nil context.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy context.persistentStoreCoordinator = self.persistentStoreCoordinator @@ -77,7 +77,7 @@ import CoreData }() /** - Initializes a DATAStack using the bundle name as the model name, so if your target is called ModernApp, + Initializes a DataStack using the bundle name as the model name, so if your target is called ModernApp, it will look for a ModernApp.xcdatamodeld. */ public override init() { @@ -91,7 +91,7 @@ import CoreData } /** - Initializes a DATAStack using the provided model name. + Initializes a DataStack using the provided model name. - parameter modelName: The name of your Core Data model (xcdatamodeld). */ public init(modelName: String) { @@ -102,12 +102,12 @@ import CoreData } /** - Initializes a DATAStack using the provided model name, bundle and storeType. + Initializes a DataStack using the provided model name, bundle and storeType. - parameter modelName: The name of your Core Data model (xcdatamodeld). - parameter storeType: The store type to be used, you have .InMemory and .SQLite, the first one is memory based and doesn't save to disk, while the second one creates a .sqlite file and stores things there. */ - public init(modelName: String, storeType: DATAStackStoreType) { + public init(modelName: String, storeType: DataStackStoreType) { self.modelName = modelName self.storeType = storeType self.model = NSManagedObjectModel(bundle: self.modelBundle, name: self.modelName) @@ -116,7 +116,7 @@ import CoreData } /** - Initializes a DATAStack using the provided model name, bundle and storeType. + Initializes a DataStack using the provided model name, bundle and storeType. - parameter modelName: The name of your Core Data model (xcdatamodeld). - parameter bundle: The bundle where your Core Data model is located, normally your Core Data model is in the main bundle but when using unit tests sometimes your Core Data model could be located where your tests @@ -124,7 +124,7 @@ import CoreData - parameter storeType: The store type to be used, you have .InMemory and .SQLite, the first one is memory based and doesn't save to disk, while the second one creates a .sqlite file and stores things there. */ - public init(modelName: String, bundle: Bundle, storeType: DATAStackStoreType) { + public init(modelName: String, bundle: Bundle, storeType: DataStackStoreType) { self.modelName = modelName self.modelBundle = bundle self.storeType = storeType @@ -134,7 +134,7 @@ import CoreData } /** - Initializes a DATAStack using the provided model name, bundle, storeType and store name. + Initializes a DataStack using the provided model name, bundle, storeType and store name. - parameter modelName: The name of your Core Data model (xcdatamodeld). - parameter bundle: The bundle where your Core Data model is located, normally your Core Data model is in the main bundle but when using unit tests sometimes your Core Data model could be located where your tests @@ -145,7 +145,7 @@ import CoreData name is AwesomeApp then the .sqlite file will be named AwesomeApp.sqlite, this attribute allows your to change that. */ - public init(modelName: String, bundle: Bundle, storeType: DATAStackStoreType, storeName: String) { + public init(modelName: String, bundle: Bundle, storeType: DataStackStoreType, storeName: String) { self.modelName = modelName self.modelBundle = bundle self.storeType = storeType @@ -156,7 +156,7 @@ import CoreData } /** - Initializes a DATAStack using the provided model name, bundle, storeType and store name. + Initializes a DataStack using the provided model name, bundle, storeType and store name. - parameter modelName: The name of your Core Data model (xcdatamodeld). - parameter bundle: The bundle where your Core Data model is located, normally your Core Data model is in the main bundle but when using unit tests sometimes your Core Data model could be located where your tests @@ -168,7 +168,7 @@ import CoreData change that. - parameter containerURL: The container URL for the sqlite file when a store type of SQLite is used. */ - public init(modelName: String, bundle: Bundle, storeType: DATAStackStoreType, storeName: String, containerURL: URL) { + public init(modelName: String, bundle: Bundle, storeType: DataStackStoreType, storeName: String, containerURL: URL) { self.modelName = modelName self.modelBundle = bundle self.storeType = storeType @@ -180,12 +180,12 @@ import CoreData } /** - Initializes a DATAStack using the provided model name, bundle and storeType. - - parameter model: The model that we'll use to set up your DATAStack. + Initializes a DataStack using the provided model name, bundle and storeType. + - parameter model: The model that we'll use to set up your DataStack. - parameter storeType: The store type to be used, you have .InMemory and .SQLite, the first one is memory based and doesn't save to disk, while the second one creates a .sqlite file and stores things there. */ - public init(model: NSManagedObjectModel, storeType: DATAStackStoreType) { + public init(model: NSManagedObjectModel, storeType: DataStackStoreType) { self.model = model self.storeType = storeType @@ -210,7 +210,7 @@ import CoreData context.persistentStoreCoordinator = self.disposablePersistentStoreCoordinator context.undoManager = nil - NotificationCenter.default.addObserver(self, selector: #selector(DATAStack.newDisposableMainContextWillSave(_:)), name: NSNotification.Name.NSManagedObjectContextWillSave, object: context) + NotificationCenter.default.addObserver(self, selector: #selector(DataStack.newDisposableMainContextWillSave(_:)), name: NSNotification.Name.NSManagedObjectContextWillSave, object: context) return context } @@ -221,7 +221,7 @@ import CoreData example when using a NSFetchedResultsController use `try self.fetchedResultsController.performFetch()`. */ public func newNonMergingBackgroundContext() -> NSManagedObjectContext { - let context = NSManagedObjectContext(concurrencyType: DATAStack.backgroundConcurrencyType()) + let context = NSManagedObjectContext(concurrencyType: DataStack.backgroundConcurrencyType()) context.persistentStoreCoordinator = self.persistentStoreCoordinator context.undoManager = nil context.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy @@ -233,12 +233,12 @@ import CoreData Returns a background context perfect for data mutability operations. Make sure to never use it on the main thread. Use `performBlock` or `performBlockAndWait` to use it. */ public func newBackgroundContext() -> NSManagedObjectContext { - let context = NSManagedObjectContext(concurrencyType: DATAStack.backgroundConcurrencyType()) + let context = NSManagedObjectContext(concurrencyType: DataStack.backgroundConcurrencyType()) context.persistentStoreCoordinator = self.persistentStoreCoordinator context.undoManager = nil context.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy - NotificationCenter.default.addObserver(self, selector: #selector(DATAStack.backgroundContextDidSave(_:)), name: .NSManagedObjectContextDidSave, object: context) + NotificationCenter.default.addObserver(self, selector: #selector(DataStack.backgroundContextDidSave(_:)), name: .NSManagedObjectContextDidSave, object: context) return context } @@ -253,7 +253,7 @@ import CoreData operation(context) } let blockObject: AnyObject = unsafeBitCast(contextBlock, to: AnyObject.self) - context.perform(DATAStack.performSelectorForBackgroundContext(), with: blockObject) + context.perform(DataStack.performSelectorForBackgroundContext(), with: blockObject) } /** @@ -279,13 +279,13 @@ import CoreData let writerContextBlockObject: AnyObject = unsafeBitCast(writerContextBlock, to: AnyObject.self) let mainContextBlock: @convention(block) () -> Void = { - self.writerContext.perform(DATAStack.performSelectorForBackgroundContext(), with: writerContextBlockObject) + self.writerContext.perform(DataStack.performSelectorForBackgroundContext(), with: writerContextBlockObject) DispatchQueue.main.async { completion?(writerContextError) } } let mainContextBlockObject: AnyObject = unsafeBitCast(mainContextBlock, to: AnyObject.self) - self.mainContext.perform(DATAStack.performSelectorForBackgroundContext(), with: mainContextBlockObject) + self.mainContext.perform(DataStack.performSelectorForBackgroundContext(), with: mainContextBlockObject) } /** @@ -356,7 +356,7 @@ import CoreData self.mainContext.mergeChanges(fromContextDidSave: notification) } let blockObject: AnyObject = unsafeBitCast(contextBlock, to: AnyObject.self) - self.mainContext.perform(DATAStack.performSelectorForBackgroundContext(), with: blockObject) + self.mainContext.perform(DataStack.performSelectorForBackgroundContext(), with: blockObject) } } @@ -370,7 +370,7 @@ import CoreData } extension NSPersistentStoreCoordinator { - func addPersistentStore(storeType: DATAStackStoreType, bundle: Bundle, modelName: String, storeName: String?, containerURL: URL) throws { + func addPersistentStore(storeType: DataStackStoreType, bundle: Bundle, modelName: String, storeName: String?, containerURL: URL) throws { let filePath = (storeName ?? modelName) + ".sqlite" switch storeType { case .inMemory: @@ -454,7 +454,7 @@ extension NSError { } else { var userInfo = [String: String]() userInfo[NSLocalizedDescriptionKey] = info - self.init(domain: "com.SyncDB.DATAStack", code: 9999, userInfo: userInfo) + self.init(domain: "com.SyncDB.DataStack", code: 9999, userInfo: userInfo) } } } diff --git a/Source/DateParser/NSDate+SYNCPropertyMapper.h b/Source/DateParser/NSDate+SyncPropertyMapper.h similarity index 98% rename from Source/DateParser/NSDate+SYNCPropertyMapper.h rename to Source/DateParser/NSDate+SyncPropertyMapper.h index 2f78488c..b30eefa1 100755 --- a/Source/DateParser/NSDate+SYNCPropertyMapper.h +++ b/Source/DateParser/NSDate+SyncPropertyMapper.h @@ -17,7 +17,7 @@ typedef NS_ENUM(NSInteger, DateType) { unixTimestamp }; -@interface NSDate (SYNCPropertyMapper) +@interface NSDate (SyncPropertyMapper) /** Converts the provided string into a NSDate object. diff --git a/Source/DateParser/NSDate+SYNCPropertyMapper.m b/Source/DateParser/NSDate+SyncPropertyMapper.m similarity index 99% rename from Source/DateParser/NSDate+SYNCPropertyMapper.m rename to Source/DateParser/NSDate+SyncPropertyMapper.m index 5d15e428..798110e1 100755 --- a/Source/DateParser/NSDate+SYNCPropertyMapper.m +++ b/Source/DateParser/NSDate+SyncPropertyMapper.m @@ -1,6 +1,6 @@ -#import "NSDate+SYNCPropertyMapper.h" +#import "NSDate+SyncPropertyMapper.h" -@implementation NSDate (SYNCPropertyMapper) +@implementation NSDate (SyncPropertyMapper) + (NSDate *)dateFromDateString:(NSString *)dateString { NSDate *parsedDate = nil; diff --git a/Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SYNCPrimaryKey.h b/Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SyncPrimaryKey.h similarity index 62% rename from Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SYNCPrimaryKey.h rename to Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SyncPrimaryKey.h index d0914590..1beaec27 100755 --- a/Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SYNCPrimaryKey.h +++ b/Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SyncPrimaryKey.h @@ -2,18 +2,18 @@ NS_ASSUME_NONNULL_BEGIN -static NSString * const SYNCDefaultLocalPrimaryKey = @"id"; -static NSString * const SYNCDefaultLocalCompatiblePrimaryKey = @"remoteID"; +static NSString * const SyncDefaultLocalPrimaryKey = @"id"; +static NSString * const SyncDefaultLocalCompatiblePrimaryKey = @"remoteID"; -static NSString * const SYNCDefaultRemotePrimaryKey = @"id"; +static NSString * const SyncDefaultRemotePrimaryKey = @"id"; -static NSString * const SYNCCustomLocalPrimaryKey = @"hyper.isPrimaryKey"; -static NSString * const SYNCCustomLocalPrimaryKeyValue = @"YES"; -static NSString * const SYNCCustomLocalPrimaryKeyAlternativeValue = @"true"; +static NSString * const SyncCustomLocalPrimaryKey = @"hyper.isPrimaryKey"; +static NSString * const SyncCustomLocalPrimaryKeyValue = @"YES"; +static NSString * const SyncCustomLocalPrimaryKeyAlternativeValue = @"true"; -static NSString * const SYNCCustomRemoteKey = @"hyper.remoteKey"; +static NSString * const SyncCustomRemoteKey = @"hyper.remoteKey"; -@interface NSEntityDescription (SYNCPrimaryKey) +@interface NSEntityDescription (SyncPrimaryKey) /** Returns the Core Data attribute used as the primary key. By default it will look for the attribute named `id`. diff --git a/Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SYNCPrimaryKey.m b/Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SyncPrimaryKey.m similarity index 68% rename from Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SYNCPrimaryKey.m rename to Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SyncPrimaryKey.m index 70698ca0..7b965d69 100755 --- a/Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SYNCPrimaryKey.m +++ b/Source/NSEntityDescription-SYNCPrimaryKey/NSEntityDescription+SyncPrimaryKey.m @@ -1,8 +1,8 @@ -#import "NSEntityDescription+SYNCPrimaryKey.h" +#import "NSEntityDescription+SyncPrimaryKey.h" -#import "NSString+SYNCInflections.h" +#import "NSString+SyncInflections.h" -@implementation NSEntityDescription (SYNCPrimaryKey) +@implementation NSEntityDescription (SyncPrimaryKey) - (nonnull NSAttributeDescription *)sync_primaryKeyAttribute { __block NSAttributeDescription *primaryKeyAttribute; @@ -10,15 +10,15 @@ - (nonnull NSAttributeDescription *)sync_primaryKeyAttribute { [self.propertiesByName enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSAttributeDescription *attributeDescription, BOOL *stop) { - NSString *isPrimaryKey = attributeDescription.userInfo[SYNCCustomLocalPrimaryKey]; + NSString *isPrimaryKey = attributeDescription.userInfo[SyncCustomLocalPrimaryKey]; BOOL hasCustomPrimaryKey = (isPrimaryKey && - ([isPrimaryKey isEqualToString:SYNCCustomLocalPrimaryKeyValue] || [isPrimaryKey isEqualToString:SYNCCustomLocalPrimaryKeyAlternativeValue]) ); + ([isPrimaryKey isEqualToString:SyncCustomLocalPrimaryKeyValue] || [isPrimaryKey isEqualToString:SyncCustomLocalPrimaryKeyAlternativeValue]) ); if (hasCustomPrimaryKey) { primaryKeyAttribute = attributeDescription; *stop = YES; } - if ([key isEqualToString:SYNCDefaultLocalPrimaryKey] || [key isEqualToString:SYNCDefaultLocalCompatiblePrimaryKey]) { + if ([key isEqualToString:SyncDefaultLocalPrimaryKey] || [key isEqualToString:SyncDefaultLocalCompatiblePrimaryKey]) { primaryKeyAttribute = attributeDescription; } }]; @@ -35,11 +35,11 @@ - (nonnull NSString *)sync_localPrimaryKey { - (nonnull NSString *)sync_remotePrimaryKey { NSAttributeDescription *primaryKeyAttribute = [self sync_primaryKeyAttribute]; - NSString *remoteKey = primaryKeyAttribute.userInfo[SYNCCustomRemoteKey]; + NSString *remoteKey = primaryKeyAttribute.userInfo[SyncCustomRemoteKey]; if (!remoteKey) { - if ([primaryKeyAttribute.name isEqualToString:SYNCDefaultLocalPrimaryKey] || [primaryKeyAttribute.name isEqualToString:SYNCDefaultLocalCompatiblePrimaryKey]) { - remoteKey = SYNCDefaultRemotePrimaryKey; + if ([primaryKeyAttribute.name isEqualToString:SyncDefaultLocalPrimaryKey] || [primaryKeyAttribute.name isEqualToString:SyncDefaultLocalCompatiblePrimaryKey]) { + remoteKey = SyncDefaultRemotePrimaryKey; } else { remoteKey = [primaryKeyAttribute.name hyp_snakeCase]; } diff --git a/Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SYNCPropertyMapperHelpers.h b/Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SyncPropertyMapperHelpers.h similarity index 61% rename from Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SYNCPropertyMapperHelpers.h rename to Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SyncPropertyMapperHelpers.h index 2add8a92..6421e31e 100755 --- a/Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SYNCPropertyMapperHelpers.h +++ b/Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SyncPropertyMapperHelpers.h @@ -1,25 +1,25 @@ @import CoreData; -#import "SYNCPropertyMapper.h" +#import "SyncPropertyMapper.h" -static NSString * const SYNCPropertyMapperDestroyKey = @"destroy"; -static NSString * const SYNCPropertyMapperCustomValueTransformerKey = @"hyper.valueTransformer"; -static NSString * const SYNCPropertyMapperCustomRemoteKey = @"hyper.remoteKey"; -static NSString * const SYNCPropertyMapperNonExportableKey = @"hyper.nonExportable"; +static NSString * const SyncPropertyMapperDestroyKey = @"destroy"; +static NSString * const SyncPropertyMapperCustomValueTransformerKey = @"hyper.valueTransformer"; +static NSString * const SyncPropertyMapperCustomRemoteKey = @"hyper.remoteKey"; +static NSString * const SyncPropertyMapperNonExportableKey = @"hyper.nonExportable"; /** Internal helpers, not meant to be included in the public APIs. */ -@interface NSManagedObject (SYNCPropertyMapperHelpers) +@interface NSManagedObject (SyncPropertyMapperHelpers) - (id)valueForAttributeDescription:(NSAttributeDescription *)attributeDescription dateFormatter:(NSDateFormatter *)dateFormatter - relationshipType:(SYNCPropertyMapperRelationshipType)relationshipType; + relationshipType:(SyncPropertyMapperRelationshipType)relationshipType; - (NSAttributeDescription *)attributeDescriptionForRemoteKey:(NSString *)remoteKey; - (NSAttributeDescription *)attributeDescriptionForRemoteKey:(NSString *)remoteKey - usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType; + usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType; - (NSArray *)attributeDescriptionsForRemoteKeyPath:(NSString *)key; @@ -29,18 +29,18 @@ static NSString * const SYNCPropertyMapperNonExportableKey = @"hyper.nonExportab - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attributeDescription; - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attributeDescription - inflectionType:(SYNCPropertyMapperInflectionType)inflectionType; + inflectionType:(SyncPropertyMapperInflectionType)inflectionType; - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attributeDescription - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType; + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType; - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attributeDescription - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType - inflectionType:(SYNCPropertyMapperInflectionType)inflectionType; + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType + inflectionType:(SyncPropertyMapperInflectionType)inflectionType; + (NSArray *)reservedAttributes; - (NSString *)prefixedAttribute:(NSString *)attribute - usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType; + usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType; @end diff --git a/Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SYNCPropertyMapperHelpers.m b/Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SyncPropertyMapperHelpers.m similarity index 81% rename from Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SYNCPropertyMapperHelpers.m rename to Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SyncPropertyMapperHelpers.m index 64777e54..12a0f949 100755 --- a/Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SYNCPropertyMapperHelpers.m +++ b/Source/NSManagedObject-SYNCPropertyMapper/NSManagedObject+SyncPropertyMapperHelpers.m @@ -1,21 +1,21 @@ -#import "NSManagedObject+SYNCPropertyMapperHelpers.h" +#import "NSManagedObject+SyncPropertyMapperHelpers.h" -#import "SYNCPropertyMapper.h" -#import "NSString+SYNCInflections.h" -#import "NSEntityDescription+SYNCPrimaryKey.h" -#import "NSDate+SYNCPropertyMapper.h" +#import "SyncPropertyMapper.h" +#import "NSString+SyncInflections.h" +#import "NSEntityDescription+SyncPrimaryKey.h" +#import "NSDate+SyncPropertyMapper.h" -@implementation NSManagedObject (SYNCPropertyMapperHelpers) +@implementation NSManagedObject (SyncPropertyMapperHelpers) - (id)valueForAttributeDescription:(NSAttributeDescription *)attributeDescription dateFormatter:(NSDateFormatter *)dateFormatter - relationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { + relationshipType:(SyncPropertyMapperRelationshipType)relationshipType { id value; if (attributeDescription.attributeType != NSTransformableAttributeType) { value = [self valueForKey:attributeDescription.name]; BOOL nilOrNullValue = (!value || [value isKindOfClass:[NSNull class]]); - NSString *customTransformerName = attributeDescription.userInfo[SYNCPropertyMapperCustomValueTransformerKey]; + NSString *customTransformerName = attributeDescription.userInfo[SyncPropertyMapperCustomValueTransformerKey]; if (nilOrNullValue) { value = [NSNull null]; } else if ([value isKindOfClass:[NSDate class]]) { @@ -32,11 +32,11 @@ - (id)valueForAttributeDescription:(NSAttributeDescription *)attributeDescriptio } - (NSAttributeDescription *)attributeDescriptionForRemoteKey:(NSString *)remoteKey { - return [self attributeDescriptionForRemoteKey:remoteKey usingInflectionType:SYNCPropertyMapperInflectionTypeSnakeCase]; + return [self attributeDescriptionForRemoteKey:remoteKey usingInflectionType:SyncPropertyMapperInflectionTypeSnakeCase]; } - (NSAttributeDescription *)attributeDescriptionForRemoteKey:(NSString *)remoteKey - usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType { + usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType { __block NSAttributeDescription *foundAttributeDescription; [self.entity.properties enumerateObjectsUsingBlock:^(id propertyDescription, NSUInteger idx, BOOL *stop) { @@ -44,7 +44,7 @@ - (NSAttributeDescription *)attributeDescriptionForRemoteKey:(NSString *)remoteK NSAttributeDescription *attributeDescription = (NSAttributeDescription *)propertyDescription; NSDictionary *userInfo = [self.entity.propertiesByName[attributeDescription.name] userInfo]; - NSString *customRemoteKey = userInfo[SYNCPropertyMapperCustomRemoteKey]; + NSString *customRemoteKey = userInfo[SyncPropertyMapperCustomRemoteKey]; BOOL currentAttributeHasTheSameRemoteKey = (customRemoteKey.length > 0 && [customRemoteKey isEqualToString:remoteKey]); if (currentAttributeHasTheSameRemoteKey) { foundAttributeDescription = attributeDescription; @@ -82,8 +82,8 @@ - (NSAttributeDescription *)attributeDescriptionForRemoteKey:(NSString *)remoteK if ([propertyDescription isKindOfClass:[NSAttributeDescription class]]) { NSAttributeDescription *attributeDescription = (NSAttributeDescription *)propertyDescription; - if ([remoteKey isEqualToString:SYNCDefaultRemotePrimaryKey] && - ([attributeDescription.name isEqualToString:SYNCDefaultLocalPrimaryKey] || [attributeDescription.name isEqualToString:SYNCDefaultLocalCompatiblePrimaryKey])) { + if ([remoteKey isEqualToString:SyncDefaultRemotePrimaryKey] && + ([attributeDescription.name isEqualToString:SyncDefaultLocalPrimaryKey] || [attributeDescription.name isEqualToString:SyncDefaultLocalCompatiblePrimaryKey])) { foundAttributeDescription = self.entity.propertiesByName[attributeDescription.name]; } @@ -105,7 +105,7 @@ - (NSArray *)attributeDescriptionsForRemoteKeyPath:(NSString *)remoteKey { NSAttributeDescription *attributeDescription = (NSAttributeDescription *)propertyDescription; NSDictionary *userInfo = [self.entity.propertiesByName[attributeDescription.name] userInfo]; - NSString *customRemoteKeyPath = userInfo[SYNCPropertyMapperCustomRemoteKey]; + NSString *customRemoteKeyPath = userInfo[SyncPropertyMapperCustomRemoteKey]; NSString *customRootRemoteKey = [[customRemoteKeyPath componentsSeparatedByString:@"."] firstObject]; NSString *rootRemoteKey = [[remoteKey componentsSeparatedByString:@"."] firstObject]; BOOL currentAttributeHasTheSameRootRemoteKey = (customRootRemoteKey.length > 0 && [customRootRemoteKey isEqualToString:rootRemoteKey]); @@ -119,40 +119,40 @@ - (NSArray *)attributeDescriptionsForRemoteKeyPath:(NSString *)remoteKey { } - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attributeDescription { - return [self remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:SYNCPropertyMapperRelationshipTypeNested inflectionType:SYNCPropertyMapperInflectionTypeSnakeCase]; + return [self remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:SyncPropertyMapperRelationshipTypeNested inflectionType:SyncPropertyMapperInflectionTypeSnakeCase]; } - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attributeDescription - inflectionType:(SYNCPropertyMapperInflectionType)inflectionType { - return [self remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:SYNCPropertyMapperRelationshipTypeNested inflectionType:inflectionType]; + inflectionType:(SyncPropertyMapperInflectionType)inflectionType { + return [self remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:SyncPropertyMapperRelationshipTypeNested inflectionType:inflectionType]; } - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attributeDescription - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { - return [self remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:relationshipType inflectionType:SYNCPropertyMapperInflectionTypeSnakeCase]; + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType { + return [self remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:relationshipType inflectionType:SyncPropertyMapperInflectionTypeSnakeCase]; } - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attributeDescription - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType - inflectionType:(SYNCPropertyMapperInflectionType)inflectionType { + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType + inflectionType:(SyncPropertyMapperInflectionType)inflectionType { NSDictionary *userInfo = attributeDescription.userInfo; NSString *localKey = attributeDescription.name; NSString *remoteKey; - NSString *customRemoteKey = userInfo[SYNCPropertyMapperCustomRemoteKey]; + NSString *customRemoteKey = userInfo[SyncPropertyMapperCustomRemoteKey]; if (customRemoteKey) { remoteKey = customRemoteKey; - } else if ([localKey isEqualToString:SYNCDefaultLocalPrimaryKey] || [localKey isEqualToString:SYNCDefaultLocalCompatiblePrimaryKey]) { - remoteKey = SYNCDefaultRemotePrimaryKey; - } else if ([localKey isEqualToString:SYNCPropertyMapperDestroyKey] && - relationshipType == SYNCPropertyMapperRelationshipTypeNested) { - remoteKey = [NSString stringWithFormat:@"_%@", SYNCPropertyMapperDestroyKey]; + } else if ([localKey isEqualToString:SyncDefaultLocalPrimaryKey] || [localKey isEqualToString:SyncDefaultLocalCompatiblePrimaryKey]) { + remoteKey = SyncDefaultRemotePrimaryKey; + } else if ([localKey isEqualToString:SyncPropertyMapperDestroyKey] && + relationshipType == SyncPropertyMapperRelationshipTypeNested) { + remoteKey = [NSString stringWithFormat:@"_%@", SyncPropertyMapperDestroyKey]; } else { switch (inflectionType) { - case SYNCPropertyMapperInflectionTypeSnakeCase: + case SyncPropertyMapperInflectionTypeSnakeCase: remoteKey = [localKey hyp_snakeCase]; break; - case SYNCPropertyMapperInflectionTypeCamelCase: + case SyncPropertyMapperInflectionTypeCamelCase: remoteKey = localKey; break; } @@ -166,7 +166,7 @@ - (NSString *)remoteKeyForAttributeDescription:(NSAttributeDescription *)attribu options:NSCaseInsensitiveSearch range:NSMakeRange(0, prefixedKey.length)]; remoteKey = [prefixedKey copy]; - if (inflectionType == SYNCPropertyMapperInflectionTypeCamelCase) { + if (inflectionType == SyncPropertyMapperInflectionTypeCamelCase) { remoteKey = [remoteKey hyp_camelCase]; } } @@ -184,7 +184,7 @@ - (id)valueForAttributeDescription:(NSAttributeDescription *)attributeDescriptio value = remoteValue; } - NSString *customTransformerName = attributeDescription.userInfo[SYNCPropertyMapperCustomValueTransformerKey]; + NSString *customTransformerName = attributeDescription.userInfo[SyncPropertyMapperCustomValueTransformerKey]; if (customTransformerName) { NSValueTransformer *transformer = [NSValueTransformer valueTransformerForName:customTransformerName]; if (transformer) { @@ -244,31 +244,31 @@ - (id)valueForAttributeDescription:(NSAttributeDescription *)attributeDescriptio return value; } -- (NSString *)remotePrefixUsingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType { +- (NSString *)remotePrefixUsingInflectionType:(SyncPropertyMapperInflectionType)inflectionType { switch (inflectionType) { - case SYNCPropertyMapperInflectionTypeSnakeCase: + case SyncPropertyMapperInflectionTypeSnakeCase: return [NSString stringWithFormat:@"%@_", [self.entity.name hyp_snakeCase]]; break; - case SYNCPropertyMapperInflectionTypeCamelCase: + case SyncPropertyMapperInflectionTypeCamelCase: return [self.entity.name hyp_camelCase]; break; } } -- (NSString *)prefixedAttribute:(NSString *)attribute usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType { +- (NSString *)prefixedAttribute:(NSString *)attribute usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType { NSString *remotePrefix = [self remotePrefixUsingInflectionType:inflectionType]; switch (inflectionType) { - case SYNCPropertyMapperInflectionTypeSnakeCase: { + case SyncPropertyMapperInflectionTypeSnakeCase: { return [NSString stringWithFormat:@"%@%@", remotePrefix, attribute]; } break; - case SYNCPropertyMapperInflectionTypeCamelCase: { + case SyncPropertyMapperInflectionTypeCamelCase: { return [NSString stringWithFormat:@"%@%@", remotePrefix, [attribute capitalizedString]]; } break; } } -- (NSArray *)reservedKeysUsingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType { +- (NSArray *)reservedKeysUsingInflectionType:(SyncPropertyMapperInflectionType)inflectionType { NSMutableArray *keys = [NSMutableArray new]; NSArray *reservedAttributes = [NSManagedObject reservedAttributes]; diff --git a/Source/NSManagedObject-SYNCPropertyMapper/SYNCPropertyMapper.h b/Source/NSManagedObject-SYNCPropertyMapper/SyncPropertyMapper.h similarity index 82% rename from Source/NSManagedObject-SYNCPropertyMapper/SYNCPropertyMapper.h rename to Source/NSManagedObject-SYNCPropertyMapper/SyncPropertyMapper.h index 5ba8916b..ea88064a 100755 --- a/Source/NSManagedObject-SYNCPropertyMapper/SYNCPropertyMapper.h +++ b/Source/NSManagedObject-SYNCPropertyMapper/SyncPropertyMapper.h @@ -1,44 +1,44 @@ @import CoreData; @import Foundation; -#import "NSDate+SYNCPropertyMapper.h" -#import "NSEntityDescription+SYNCPrimaryKey.h" -#import "NSString+SYNCInflections.h" +#import "NSDate+SyncPropertyMapper.h" +#import "NSEntityDescription+SyncPrimaryKey.h" +#import "NSString+SyncInflections.h" -FOUNDATION_EXPORT double SYNCPropertyMapperVersionNumber; -FOUNDATION_EXPORT const unsigned char SYNCPropertyMapperVersionString[]; +FOUNDATION_EXPORT double SyncPropertyMapperVersionNumber; +FOUNDATION_EXPORT const unsigned char SyncPropertyMapperVersionString[]; NS_ASSUME_NONNULL_BEGIN /** The relationship type used to export the NSManagedObject as JSON. - - SYNCPropertyMapperRelationshipTypeNone: Skip all relationships. - - SYNCPropertyMapperRelationshipTypeArray: Normal JSON representation of relationships. - - SYNCPropertyMapperRelationshipTypeNested: Uses Ruby on Rails's accepts_nested_attributes_for notation to represent relationships. + - SyncPropertyMapperRelationshipTypeNone: Skip all relationships. + - SyncPropertyMapperRelationshipTypeArray: Normal JSON representation of relationships. + - SyncPropertyMapperRelationshipTypeNested: Uses Ruby on Rails's accepts_nested_attributes_for notation to represent relationships. */ -typedef NS_ENUM(NSInteger, SYNCPropertyMapperRelationshipType) { - SYNCPropertyMapperRelationshipTypeNone = 0, - SYNCPropertyMapperRelationshipTypeArray, - SYNCPropertyMapperRelationshipTypeNested +typedef NS_ENUM(NSInteger, SyncPropertyMapperRelationshipType) { + SyncPropertyMapperRelationshipTypeNone = 0, + SyncPropertyMapperRelationshipTypeArray, + SyncPropertyMapperRelationshipTypeNested }; /** The relationship type used to export the NSManagedObject as JSON. - - SYNCPropertyMapperRelationshipTypeNone: Skip all relationships. - - SYNCPropertyMapperRelationshipTypeArray: Normal JSON representation of relationships. - - SYNCPropertyMapperRelationshipTypeNested: Uses Ruby on Rails's accepts_nested_attributes_for notation to represent relationships. + - SyncPropertyMapperRelationshipTypeNone: Skip all relationships. + - SyncPropertyMapperRelationshipTypeArray: Normal JSON representation of relationships. + - SyncPropertyMapperRelationshipTypeNested: Uses Ruby on Rails's accepts_nested_attributes_for notation to represent relationships. */ -typedef NS_ENUM(NSInteger, SYNCPropertyMapperInflectionType) { - SYNCPropertyMapperInflectionTypeSnakeCase = 0, - SYNCPropertyMapperInflectionTypeCamelCase +typedef NS_ENUM(NSInteger, SyncPropertyMapperInflectionType) { + SyncPropertyMapperInflectionTypeSnakeCase = 0, + SyncPropertyMapperInflectionTypeCamelCase }; /** Collection of helper methods to facilitate mapping JSON to NSManagedObject. */ -@interface NSManagedObject (SYNCPropertyMapper) +@interface NSManagedObject (SyncPropertyMapper) /** Fills the @c NSManagedObject with the contents of the dictionary using a convention-over-configuration paradigm mapping the Core Data attributes to their conterparts in JSON using snake_case. @@ -63,7 +63,7 @@ typedef NS_ENUM(NSInteger, SYNCPropertyMapperInflectionType) { @return The JSON representation of the @c NSManagedObject in the form of a @c NSDictionary. */ -- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType; +- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingInflectionType:(SyncPropertyMapperInflectionType)inflectionType; /** Creates a @c NSDictionary of values based on the @c NSManagedObject subclass that can be serialized by @c NSJSONSerialization. Could include relationships to other models. @@ -73,7 +73,7 @@ typedef NS_ENUM(NSInteger, SYNCPropertyMapperInflectionType) { @return The JSON representation of the @c NSManagedObject in the form of a @c NSDictionary. */ -- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType; +- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType; /** @@ -84,8 +84,8 @@ typedef NS_ENUM(NSInteger, SYNCPropertyMapperInflectionType) { @param relationshipType It indicates wheter the result dictionary should include no relationships, nested attributes or normal attributes. @return The JSON representation of the @c NSManagedObject in the form of a @c NSDictionary. */ -- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType - andRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType; +- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingInflectionType:(SyncPropertyMapperInflectionType)inflectionType + andRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType; /** Creates a @c NSDictionary of values based on the @c NSManagedObject subclass that can be serialized by @c NSJSONSerialization. Includes relationships to other models using Ruby on Rail's nested attributes model. @@ -105,7 +105,7 @@ typedef NS_ENUM(NSInteger, SYNCPropertyMapperInflectionType) { @return The JSON representation of the @c NSManagedObject in the form of a @c NSDictionary. */ - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType; + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType; /** Creates a @c NSDictionary of values based on the @c NSManagedObject subclass that can be serialized by @c NSJSONSerialization. Could include relationships to other models using Ruby on Rail's nested attributes model. @@ -116,7 +116,7 @@ typedef NS_ENUM(NSInteger, SYNCPropertyMapperInflectionType) { @return The JSON representation of the @c NSManagedObject in the form of a @c NSDictionary. */ - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter - usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType; + usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType; /** Creates a @c NSDictionary of values based on the @c NSManagedObject subclass that can be serialized by @c NSJSONSerialization. Could include relationships to other models using Ruby on Rail's nested attributes model. @@ -128,8 +128,8 @@ typedef NS_ENUM(NSInteger, SYNCPropertyMapperInflectionType) { @return The JSON representation of the @c NSManagedObject in the form of a @c NSDictionary. */ - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter - usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType - andRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType; + usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType + andRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType; /** Creates a @c NSDictionary of values based on the @c NSManagedObject subclass that can be serialized by @c NSJSONSerialization. Could include relationships to other models using Ruby on Rail's nested attributes model. @@ -142,7 +142,7 @@ typedef NS_ENUM(NSInteger, SYNCPropertyMapperInflectionType) { */ - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter parent:( NSManagedObject * _Nullable)parent - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType; + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType; @end diff --git a/Source/NSManagedObject-SYNCPropertyMapper/SYNCPropertyMapper.m b/Source/NSManagedObject-SYNCPropertyMapper/SyncPropertyMapper.m similarity index 83% rename from Source/NSManagedObject-SYNCPropertyMapper/SYNCPropertyMapper.m rename to Source/NSManagedObject-SYNCPropertyMapper/SyncPropertyMapper.m index 5f4a99f4..7ef4892c 100755 --- a/Source/NSManagedObject-SYNCPropertyMapper/SYNCPropertyMapper.m +++ b/Source/NSManagedObject-SYNCPropertyMapper/SyncPropertyMapper.m @@ -1,12 +1,12 @@ -#import "SYNCPropertyMapper.h" +#import "SyncPropertyMapper.h" -#import "NSString+SYNCInflections.h" -#import "NSManagedObject+SYNCPropertyMapperHelpers.h" -#import "NSDate+SYNCPropertyMapper.h" +#import "NSString+SyncInflections.h" +#import "NSManagedObject+SyncPropertyMapperHelpers.h" +#import "NSDate+SyncPropertyMapper.h" -static NSString * const SYNCPropertyMapperNestedAttributesKey = @"attributes"; +static NSString * const SyncPropertyMapperNestedAttributesKey = @"attributes"; -@implementation NSManagedObject (SYNCPropertyMapper) +@implementation NSManagedObject (SyncPropertyMapper) #pragma mark - Public methods @@ -19,13 +19,13 @@ - (void)hyp_fillWithDictionary:(NSDictionary<NSString *, id> *)dictionary { BOOL valueExists = (value && ![value isKindOfClass:[NSNull class]]); if (valueExists && [value isKindOfClass:[NSDictionary class]] && attributeDescription.attributeType != NSBinaryDataAttributeType) { NSString *remoteKey = [self remoteKeyForAttributeDescription:attributeDescription - inflectionType:SYNCPropertyMapperInflectionTypeSnakeCase]; + inflectionType:SyncPropertyMapperInflectionTypeSnakeCase]; BOOL hasCustomKeyPath = remoteKey && [remoteKey rangeOfString:@"."].location != NSNotFound; if (hasCustomKeyPath) { NSArray *keyPathAttributeDescriptions = [self attributeDescriptionsForRemoteKeyPath:remoteKey]; for (NSAttributeDescription *keyPathAttributeDescription in keyPathAttributeDescriptions) { NSString *remoteKey = [self remoteKeyForAttributeDescription:keyPathAttributeDescription - inflectionType:SYNCPropertyMapperInflectionTypeSnakeCase]; + inflectionType:SyncPropertyMapperInflectionTypeSnakeCase]; NSString *localKey = keyPathAttributeDescription.name; [self hyp_setDictionaryValue:[dictionary valueForKeyPath:remoteKey] forKey:localKey @@ -59,31 +59,31 @@ - (void)hyp_setDictionaryValue:(id)value forKey:(NSString *)key } - (NSDictionary<NSString *, id> *)hyp_dictionary { - return [self hyp_dictionaryUsingInflectionType:SYNCPropertyMapperInflectionTypeSnakeCase]; + return [self hyp_dictionaryUsingInflectionType:SyncPropertyMapperInflectionTypeSnakeCase]; } -- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType { +- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingInflectionType:(SyncPropertyMapperInflectionType)inflectionType { return [self hyp_dictionaryWithDateFormatter:[self defaultDateFormatter] parent:nil usingInflectionType:inflectionType - andRelationshipType:SYNCPropertyMapperRelationshipTypeNested]; + andRelationshipType:SyncPropertyMapperRelationshipTypeNested]; } -- (NSDictionary<NSString *, id> *)hyp_dictionaryUsinginflectionType:(SYNCPropertyMapperInflectionType)inflectionType - andRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { +- (NSDictionary<NSString *, id> *)hyp_dictionaryUsinginflectionType:(SyncPropertyMapperInflectionType)inflectionType + andRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType { return [self hyp_dictionaryWithDateFormatter:[self defaultDateFormatter] parent:nil usingInflectionType:inflectionType andRelationshipType:relationshipType]; } -- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { +- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType { return [self hyp_dictionaryWithDateFormatter:[self defaultDateFormatter] usingRelationshipType:relationshipType]; } -- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType - andRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { +- (NSDictionary<NSString *, id> *)hyp_dictionaryUsingInflectionType:(SyncPropertyMapperInflectionType)inflectionType + andRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType { return [self hyp_dictionaryWithDateFormatter:[self defaultDateFormatter] parent:nil usingInflectionType:inflectionType @@ -93,27 +93,27 @@ - (void)hyp_setDictionaryValue:(id)value forKey:(NSString *)key - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter { return [self hyp_dictionaryWithDateFormatter:dateFormatter parent:nil - usingRelationshipType:SYNCPropertyMapperRelationshipTypeNested]; + usingRelationshipType:SyncPropertyMapperRelationshipTypeNested]; } - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType { return [self hyp_dictionaryWithDateFormatter:dateFormatter parent:nil usingRelationshipType:relationshipType]; } - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter - usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType { + usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType { return [self hyp_dictionaryWithDateFormatter:dateFormatter parent:nil usingInflectionType:inflectionType - andRelationshipType:SYNCPropertyMapperRelationshipTypeNested]; + andRelationshipType:SyncPropertyMapperRelationshipTypeNested]; } - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter - usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType - andRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { + usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType + andRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType { return [self hyp_dictionaryWithDateFormatter:dateFormatter parent:nil usingInflectionType:inflectionType @@ -122,23 +122,23 @@ - (void)hyp_setDictionaryValue:(id)value forKey:(NSString *)key - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter parent:( NSManagedObject * _Nullable )parent - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType { return [self hyp_dictionaryWithDateFormatter:dateFormatter parent:parent - usingInflectionType:SYNCPropertyMapperInflectionTypeSnakeCase + usingInflectionType:SyncPropertyMapperInflectionTypeSnakeCase andRelationshipType:relationshipType]; } - (NSDictionary<NSString *, id> *)hyp_dictionaryWithDateFormatter:(NSDateFormatter *)dateFormatter parent:( NSManagedObject * _Nullable )parent - usingInflectionType:(SYNCPropertyMapperInflectionType)inflectionType - andRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType { + usingInflectionType:(SyncPropertyMapperInflectionType)inflectionType + andRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType { NSMutableDictionary *managedObjectAttributes = [NSMutableDictionary new]; for (id propertyDescription in self.entity.properties) { if ([propertyDescription isKindOfClass:[NSAttributeDescription class]]) { NSDictionary *userInfo = [propertyDescription userInfo]; - NSString *nonExportableKey = userInfo[SYNCPropertyMapperNonExportableKey]; + NSString *nonExportableKey = userInfo[SyncPropertyMapperNonExportableKey]; BOOL shouldExportAttribute = (nonExportableKey == nil); if (shouldExportAttribute) { id value = [self valueForAttributeDescription:propertyDescription @@ -152,10 +152,10 @@ - (void)hyp_setDictionaryValue:(id)value forKey:(NSString *)key } } } else if ([propertyDescription isKindOfClass:[NSRelationshipDescription class]] && - relationshipType != SYNCPropertyMapperRelationshipTypeNone) { + relationshipType != SyncPropertyMapperRelationshipTypeNone) { NSRelationshipDescription *relationshipDescription = (NSRelationshipDescription *)propertyDescription; NSDictionary *userInfo = relationshipDescription.userInfo; - NSString *nonExportableKey = userInfo[SYNCPropertyMapperNonExportableKey]; + NSString *nonExportableKey = userInfo[SyncPropertyMapperNonExportableKey]; if (nonExportableKey == nil) { BOOL isValidRelationship = !(parent && [parent.entity isEqual:relationshipDescription.destinationEntity] && !relationshipDescription.isToMany); if (isValidRelationship) { @@ -191,10 +191,10 @@ - (void)hyp_setDictionaryValue:(id)value forKey:(NSString *)key - (NSDictionary *)attributesForToOneRelationship:(NSManagedObject *)relationship relationshipName:(NSString *)relationshipName - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType parent:(NSManagedObject *)parent dateFormatter:(NSDateFormatter *)dateFormatter - inflectionType:(SYNCPropertyMapperInflectionType)inflectionType { + inflectionType:(SyncPropertyMapperInflectionType)inflectionType { NSMutableDictionary *attributesForToOneRelationship = [NSMutableDictionary new]; NSDictionary *attributes = [relationship hyp_dictionaryWithDateFormatter:dateFormatter @@ -204,20 +204,20 @@ - (NSDictionary *)attributesForToOneRelationship:(NSManagedObject *)relationship if (attributes.count > 0) { NSString *key; switch (inflectionType) { - case SYNCPropertyMapperInflectionTypeSnakeCase: + case SyncPropertyMapperInflectionTypeSnakeCase: key = [relationshipName hyp_snakeCase]; break; - case SYNCPropertyMapperInflectionTypeCamelCase: + case SyncPropertyMapperInflectionTypeCamelCase: key = relationshipName; break; } - if (relationshipType == SYNCPropertyMapperRelationshipTypeNested) { + if (relationshipType == SyncPropertyMapperRelationshipTypeNested) { switch (inflectionType) { - case SYNCPropertyMapperInflectionTypeSnakeCase: - key = [NSString stringWithFormat:@"%@_%@", key, SYNCPropertyMapperNestedAttributesKey]; + case SyncPropertyMapperInflectionTypeSnakeCase: + key = [NSString stringWithFormat:@"%@_%@", key, SyncPropertyMapperNestedAttributesKey]; break; - case SYNCPropertyMapperInflectionTypeCamelCase: - key = [NSString stringWithFormat:@"%@%@", key, [SYNCPropertyMapperNestedAttributesKey capitalizedString]]; + case SyncPropertyMapperInflectionTypeCamelCase: + key = [NSString stringWithFormat:@"%@%@", key, [SyncPropertyMapperNestedAttributesKey capitalizedString]]; break; } } @@ -230,10 +230,10 @@ - (NSDictionary *)attributesForToOneRelationship:(NSManagedObject *)relationship - (NSDictionary *)attributesForToManyRelationship:(NSSet *)relationships relationshipName:(NSString *)relationshipName - usingRelationshipType:(SYNCPropertyMapperRelationshipType)relationshipType + usingRelationshipType:(SyncPropertyMapperRelationshipType)relationshipType parent:(NSManagedObject *)parent dateFormatter:(NSDateFormatter *)dateFormatter - inflectionType:(SYNCPropertyMapperInflectionType)inflectionType { + inflectionType:(SyncPropertyMapperInflectionType)inflectionType { NSMutableDictionary *attributesForToManyRelationship = [NSMutableDictionary new]; NSUInteger relationIndex = 0; @@ -245,9 +245,9 @@ - (NSDictionary *)attributesForToManyRelationship:(NSSet *)relationships usingInflectionType:inflectionType andRelationshipType:relationshipType]; if (attributes.count > 0) { - if (relationshipType == SYNCPropertyMapperRelationshipTypeArray) { + if (relationshipType == SyncPropertyMapperRelationshipTypeArray) { [relationsArray addObject:attributes]; - } else if (relationshipType == SYNCPropertyMapperRelationshipTypeNested) { + } else if (relationshipType == SyncPropertyMapperRelationshipTypeNested) { NSString *relationIndexString = [NSString stringWithFormat:@"%lu", (unsigned long)relationIndex]; relationsDictionary[relationIndexString] = attributes; relationIndex++; @@ -257,17 +257,17 @@ - (NSDictionary *)attributesForToManyRelationship:(NSSet *)relationships NSString *key; switch (inflectionType) { - case SYNCPropertyMapperInflectionTypeSnakeCase: { + case SyncPropertyMapperInflectionTypeSnakeCase: { key = [relationshipName hyp_snakeCase]; } break; - case SYNCPropertyMapperInflectionTypeCamelCase: { + case SyncPropertyMapperInflectionTypeCamelCase: { key = [relationshipName hyp_camelCase]; } break; } - if (relationshipType == SYNCPropertyMapperRelationshipTypeArray) { + if (relationshipType == SyncPropertyMapperRelationshipTypeArray) { [attributesForToManyRelationship setValue:relationsArray forKey:key]; - } else if (relationshipType == SYNCPropertyMapperRelationshipTypeNested) { - NSString *nestedAttributesPrefix = [NSString stringWithFormat:@"%@_%@", key, SYNCPropertyMapperNestedAttributesKey]; + } else if (relationshipType == SyncPropertyMapperRelationshipTypeNested) { + NSString *nestedAttributesPrefix = [NSString stringWithFormat:@"%@_%@", key, SyncPropertyMapperNestedAttributesKey]; [attributesForToManyRelationship setValue:relationsDictionary forKey:nestedAttributesPrefix]; } diff --git a/Source/NSString-SYNCInflections/NSString+SYNCInflections.h b/Source/NSString-SYNCInflections/NSString+SyncInflections.h similarity index 73% rename from Source/NSString-SYNCInflections/NSString+SYNCInflections.h rename to Source/NSString-SYNCInflections/NSString+SyncInflections.h index abbd1b2f..cfdebef4 100755 --- a/Source/NSString-SYNCInflections/NSString+SYNCInflections.h +++ b/Source/NSString-SYNCInflections/NSString+SyncInflections.h @@ -1,6 +1,6 @@ @import Foundation; -@interface NSString (SYNCInflections) +@interface NSString (SyncInflections) - (nonnull NSString *)hyp_snakeCase; diff --git a/Source/NSString-SYNCInflections/NSString+SYNCInflections.m b/Source/NSString-SYNCInflections/NSString+SyncInflections.m similarity index 91% rename from Source/NSString-SYNCInflections/NSString+SYNCInflections.m rename to Source/NSString-SYNCInflections/NSString+SyncInflections.m index 8dde3289..5d4a7f84 100755 --- a/Source/NSString-SYNCInflections/NSString+SYNCInflections.m +++ b/Source/NSString-SYNCInflections/NSString+SyncInflections.m @@ -1,8 +1,8 @@ -#import "NSString+SYNCInflections.h" +#import "NSString+SyncInflections.h" -typedef void (^SYNCInflectionsStringStorageBlock)(void); +typedef void (^SyncInflectionsStringStorageBlock)(void); -@interface SYNCInflectionsStringStorage : NSObject +@interface SyncInflectionsStringStorage : NSObject @property (nonatomic, strong) NSMutableDictionary *snakeCaseStorage; @property (nonatomic, strong) NSMutableDictionary *camelCaseStorage; @@ -10,11 +10,11 @@ @interface SYNCInflectionsStringStorage : NSObject @end -@implementation SYNCInflectionsStringStorage +@implementation SyncInflectionsStringStorage + (instancetype)sharedInstance { static dispatch_once_t once; - static SYNCInflectionsStringStorage *sharedInstance; + static SyncInflectionsStringStorage *sharedInstance; dispatch_once(&once, ^{ sharedInstance = [self new]; }); @@ -24,7 +24,7 @@ + (instancetype)sharedInstance { - (instancetype)init { self = [super init]; if (self) { - _serialQueue = dispatch_queue_create("com.syncdb.NSString_SYNCInflections.serialQueue", DISPATCH_QUEUE_SERIAL); + _serialQueue = dispatch_queue_create("com.syncdb.NSString_SyncInflections.serialQueue", DISPATCH_QUEUE_SERIAL); } return self; @@ -47,7 +47,7 @@ - (NSMutableDictionary *)camelCaseStorage { return _camelCaseStorage; } -- (void)performOnDictionary:(SYNCInflectionsStringStorageBlock)block { +- (void)performOnDictionary:(SyncInflectionsStringStorageBlock)block { dispatch_sync(_serialQueue, block); } @@ -62,12 +62,12 @@ - (NSString *)hyp_replaceIdentifierWithString:(NSString *)replacementString; @end -@implementation NSString (SYNCInflections) +@implementation NSString (SyncInflections) #pragma mark - Private methods - (nonnull NSString *)hyp_snakeCase { - SYNCInflectionsStringStorage *const stringStorage = [SYNCInflectionsStringStorage sharedInstance]; + SyncInflectionsStringStorage *const stringStorage = [SyncInflectionsStringStorage sharedInstance]; __block NSString *storedResult = nil; [stringStorage performOnDictionary:^{ @@ -89,7 +89,7 @@ - (nonnull NSString *)hyp_snakeCase { } - (nullable NSString *)hyp_camelCase { - SYNCInflectionsStringStorage *const stringStorage = [SYNCInflectionsStringStorage sharedInstance]; + SyncInflectionsStringStorage *const stringStorage = [SyncInflectionsStringStorage sharedInstance]; __block NSString *storedResult = nil; [stringStorage performOnDictionary:^{ diff --git a/Source/Sync.h b/Source/Sync.h index 0ce95058..ea46df00 100644 --- a/Source/Sync.h +++ b/Source/Sync.h @@ -5,6 +5,6 @@ FOUNDATION_EXPORT double SyncVersionNumber; FOUNDATION_EXPORT const unsigned char SyncVersionString[]; -#import "SYNCPropertyMapper.h" -#import "NSEntityDescription+SYNCPrimaryKey.h" -#import "NSManagedObject+SYNCPropertyMapperHelpers.h" +#import "SyncPropertyMapper.h" +#import "NSEntityDescription+SyncPrimaryKey.h" +#import "NSManagedObject+SyncPropertyMapperHelpers.h" diff --git a/Source/Sync/NSArray+Sync.swift b/Source/Sync/NSArray+Sync.swift index c2c36f67..b9295edb 100644 --- a/Source/Sync/NSArray+Sync.swift +++ b/Source/Sync/NSArray+Sync.swift @@ -7,10 +7,10 @@ extension NSArray { - parameter entityName: The name of the entity to be synced. - parameter predicate: The predicate used to filter out changes, if you want to exclude some items, you just need to provide this predicate. - parameter parent: The parent of the entity, optional since many entities are orphans. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. */ /* - func preprocessForEntityNamed(_ entityName: String, predicate: NSPredicate, parent: NSManagedObject?, dataStack: DATAStack, operations: Sync.OperationOptions) -> [[String : Any]] { + func preprocessForEntityNamed(_ entityName: String, predicate: NSPredicate, parent: NSManagedObject?, dataStack: DataStack, operations: Sync.OperationOptions) -> [[String : Any]] { var filteredChanges = [[String : Any]]() let validClasses = [NSDate.classForCoder(), NSNumber.classForCoder(), NSString.classForCoder()] if let predicate = predicate as? NSComparisonPredicate, let selfArray = self as? [[String : Any]] , validClasses.contains(where: { $0 == predicate.rightExpression.classForCoder }) { diff --git a/Source/Sync/NSManagedObject+Sync.swift b/Source/Sync/NSManagedObject+Sync.swift index 258d6ec1..a7273254 100644 --- a/Source/Sync/NSManagedObject+Sync.swift +++ b/Source/Sync/NSManagedObject+Sync.swift @@ -26,7 +26,7 @@ extension NSManagedObject { entire company object inside the employees dictionary. - parameter dictionary: The JSON with the changes to be applied to the entity. - parameter parent: The parent of the entity, optional since many entities are orphans. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. */ func sync_fill(with dictionary: [String: Any], parent: NSManagedObject?, parentRelationship: NSRelationshipDescription?, context: NSManagedObjectContext, operations: Sync.OperationOptions, shouldContinueBlock: (() -> Bool)?, objectJSONBlock: ((_ objectJSON: [String: Any]) -> [String: Any])?) { hyp_fill(with: dictionary) @@ -34,7 +34,7 @@ extension NSManagedObject { for relationship in entity.sync_relationships() { let suffix = relationship.isToMany ? "_ids" : "_id" let constructedKeyName = relationship.name.hyp_snakeCase() + suffix - let keyName = relationship.userInfo?[SYNCCustomRemoteKey] as? String ?? constructedKeyName + let keyName = relationship.userInfo?[SyncCustomRemoteKey] as? String ?? constructedKeyName if relationship.isToMany { if let localPrimaryKey = dictionary[keyName], localPrimaryKey is Array < String> || localPrimaryKey is Array < Int> || localPrimaryKey is NSNull { @@ -165,11 +165,11 @@ extension NSManagedObject { - parameter relationship: The relationship to be synced. - parameter dictionary: The JSON with the changes to be applied to the entity. - parameter parent: The parent of the entity, optional since many entities are orphans. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. */ func sync_toManyRelationship(_ relationship: NSRelationshipDescription, dictionary: [String: Any], parent: NSManagedObject?, parentRelationship: NSRelationshipDescription?, context: NSManagedObjectContext, operations: Sync.OperationOptions, shouldContinueBlock: (() -> Bool)?, objectJSONBlock: ((_ objectJSON: [String: Any]) -> [String: Any])?) throws { var children: [[String: Any]]? - let childrenIsNull = relationship.userInfo?[SYNCCustomRemoteKey] is NSNull || dictionary[relationship.name.hyp_snakeCase()] is NSNull || dictionary[relationship.name] is NSNull + let childrenIsNull = relationship.userInfo?[SyncCustomRemoteKey] is NSNull || dictionary[relationship.name.hyp_snakeCase()] is NSNull || dictionary[relationship.name] is NSNull if childrenIsNull { children = [[String: Any]]() @@ -177,7 +177,7 @@ extension NSManagedObject { setValue(nil, forKey: relationship.name) } } else { - if let customRelationshipName = relationship.userInfo?[SYNCCustomRemoteKey] as? String { + if let customRelationshipName = relationship.userInfo?[SyncCustomRemoteKey] as? String { children = dictionary[customRelationshipName] as? [[String: Any]] } else if let result = dictionary[relationship.name.hyp_snakeCase()] as? [[String: Any]] { children = result @@ -313,7 +313,7 @@ extension NSManagedObject { entire company object inside the employees dictionary. - parameter relationship: The relationship to be synced. - parameter localPrimaryKey: The localPrimaryKey of the relationship to be synced, usually a number or an integer. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. */ func sync_toOneRelationshipUsingIDInsteadOfDictionary(_ relationship: NSRelationshipDescription, localPrimaryKey: Any) { guard let managedObjectContext = self.managedObjectContext else { fatalError("managedObjectContext not found") } @@ -337,12 +337,12 @@ extension NSManagedObject { Syncs the entity's to-one relationship, it will also sync the child of this entity. - parameter relationship: The relationship to be synced. - parameter dictionary: The JSON with the changes to be applied to the entity. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. */ func sync_toOneRelationship(_ relationship: NSRelationshipDescription, dictionary: [String: Any], context: NSManagedObjectContext, operations: Sync.OperationOptions, shouldContinueBlock: (() -> Bool)?, objectJSONBlock: ((_ objectJSON: [String: Any]) -> [String: Any])?) { var filteredObjectDictionary: [String: Any]? - if let customRelationshipName = relationship.userInfo?[SYNCCustomRemoteKey] as? String { + if let customRelationshipName = relationship.userInfo?[SyncCustomRemoteKey] as? String { filteredObjectDictionary = dictionary[customRelationshipName] as? [String: Any] } else if let result = dictionary[relationship.name.hyp_snakeCase()] as? [String: Any] { filteredObjectDictionary = result diff --git a/Source/Sync/NSManagedObjectContext+Sync.swift b/Source/Sync/NSManagedObjectContext+Sync.swift index ddb3feb3..edfc5180 100644 --- a/Source/Sync/NSManagedObjectContext+Sync.swift +++ b/Source/Sync/NSManagedObjectContext+Sync.swift @@ -1,5 +1,5 @@ import CoreData -import Sync.NSEntityDescription_SYNCPrimaryKey +import Sync.NSEntityDescription_SyncPrimaryKey public extension NSManagedObjectContext { /** diff --git a/Source/Sync/Sync+DATAStack.swift b/Source/Sync/Sync+DataStack.swift similarity index 91% rename from Source/Sync/Sync+DATAStack.swift rename to Source/Sync/Sync+DataStack.swift index c9e46f0d..28126938 100644 --- a/Source/Sync/Sync+DATAStack.swift +++ b/Source/Sync/Sync+DataStack.swift @@ -8,11 +8,11 @@ public extension Sync { entire company object inside the employees dictionary. - parameter changes: The array of dictionaries used in the sync process. - parameter entityName: The name of the entity to be synced. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. - parameter completion: The completion block, it returns an error if something in the Sync process goes wrong. */ - public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, dataStack: DATAStack, completion: ((_ error: NSError?) -> Void)?) { - self.changes(changes, inEntityNamed: entityName, predicate: nil, dataStack: dataStack, operations: .All, completion: completion) + public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, dataStack: DataStack, completion: ((_ error: NSError?) -> Void)?) { + self.changes(changes, inEntityNamed: entityName, predicate: nil, dataStack: dataStack, operations: .all, completion: completion) } /** @@ -22,11 +22,11 @@ public extension Sync { entire company object inside the employees dictionary. - parameter changes: The array of dictionaries used in the sync process. - parameter entityName: The name of the entity to be synced. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. - parameter operations: The type of operations to be applied to the data, Insert, Update, Delete or any possible combination. - parameter completion: The completion block, it returns an error if something in the Sync process goes wrong. */ - public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, dataStack: DATAStack, operations: Sync.OperationOptions, completion: ((_ error: NSError?) -> Void)?) { + public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, dataStack: DataStack, operations: Sync.OperationOptions, completion: ((_ error: NSError?) -> Void)?) { self.changes(changes, inEntityNamed: entityName, predicate: nil, dataStack: dataStack, operations: operations, completion: completion) } @@ -39,12 +39,12 @@ public extension Sync { - parameter entityName: The name of the entity to be synced. - parameter predicate: The predicate used to filter out changes, if you want to exclude some local items to be taken in account in the Sync process, you just need to provide this predicate. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. - parameter completion: The completion block, it returns an error if something in the Sync process goes wrong. */ - public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate?, dataStack: DATAStack, completion: ((_ error: NSError?) -> Void)?) { + public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate?, dataStack: DataStack, completion: ((_ error: NSError?) -> Void)?) { dataStack.performInNewBackgroundContext { backgroundContext in - self.changes(changes, inEntityNamed: entityName, predicate: predicate, parent: nil, parentRelationship: nil, inContext: backgroundContext, operations: .All, completion: completion) + self.changes(changes, inEntityNamed: entityName, predicate: predicate, parent: nil, parentRelationship: nil, inContext: backgroundContext, operations: .all, completion: completion) } } @@ -57,11 +57,11 @@ public extension Sync { - parameter entityName: The name of the entity to be synced. - parameter predicate: The predicate used to filter out changes, if you want to exclude some local items to be taken in account in the Sync process, you just need to provide this predicate. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. - parameter operations: The type of operations to be applied to the data, Insert, Update, Delete or any possible combination. - parameter completion: The completion block, it returns an error if something in the Sync process goes wrong. */ - public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate?, dataStack: DATAStack, operations: Sync.OperationOptions, completion: ((_ error: NSError?) -> Void)?) { + public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate?, dataStack: DataStack, operations: Sync.OperationOptions, completion: ((_ error: NSError?) -> Void)?) { dataStack.performInNewBackgroundContext { backgroundContext in self.changes(changes, inEntityNamed: entityName, predicate: predicate, parent: nil, parentRelationship: nil, inContext: backgroundContext, operations: operations, completion: completion) } @@ -77,10 +77,10 @@ public extension Sync { - parameter parent: The parent of the synced items, useful if you are syncing the childs of an object, for example an Album has many photos, if this photos don't incldue the album's JSON object, syncing the photos JSON requires you to send the parent album to do the proper mapping. - - parameter dataStack: The DATAStack instance. + - parameter dataStack: The DataStack instance. - parameter completion: The completion block, it returns an error if something in the Sync process goes wrong. */ - public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, parent: NSManagedObject, dataStack: DATAStack, completion: ((_ error: NSError?) -> Void)?) { + public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, parent: NSManagedObject, dataStack: DataStack, completion: ((_ error: NSError?) -> Void)?) { dataStack.performInNewBackgroundContext { backgroundContext in let safeParent = parent.sync_copyInContext(backgroundContext) guard let entity = NSEntityDescription.entity(forEntityName: entityName, in: backgroundContext) else { fatalError("Couldn't find entity named: \(entityName)") } @@ -91,7 +91,7 @@ public extension Sync { if let firstRelationship = firstRelationship { predicate = NSPredicate(format: "%K = %@", firstRelationship.name, safeParent) } - self.changes(changes, inEntityNamed: entityName, predicate: predicate, parent: safeParent, parentRelationship: firstRelationship?.inverseRelationship, inContext: backgroundContext, operations: .All, completion: completion) + self.changes(changes, inEntityNamed: entityName, predicate: predicate, parent: safeParent, parentRelationship: firstRelationship?.inverseRelationship, inContext: backgroundContext, operations: .all, completion: completion) } } @@ -110,6 +110,6 @@ public extension Sync { - parameter completion: The completion block, it returns an error if something in the Sync process goes wrong. */ public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate?, parent: NSManagedObject?, inContext context: NSManagedObjectContext, completion: ((_ error: NSError?) -> Void)?) { - self.changes(changes, inEntityNamed: entityName, predicate: predicate, parent: parent, parentRelationship: nil, inContext: context, operations: .All, completion: completion) + self.changes(changes, inEntityNamed: entityName, predicate: predicate, parent: parent, parentRelationship: nil, inContext: context, operations: .all, completion: completion) } } diff --git a/Source/Sync/Sync+NSPersistentContainer.swift b/Source/Sync/Sync+NSPersistentContainer.swift index 2a93416d..3ab7adc1 100644 --- a/Source/Sync/Sync+NSPersistentContainer.swift +++ b/Source/Sync/Sync+NSPersistentContainer.swift @@ -13,7 +13,7 @@ public extension NSPersistentContainer { */ @available(iOS 10, watchOS 3, tvOS 10, OSX 10.12, *) public func sync(_ changes: [[String: Any]], inEntityNamed entityName: String, completion: ((_ error: NSError?) -> Void)?) { - self.sync(changes, inEntityNamed: entityName, predicate: nil, parent: nil, parentRelationship: nil, operations: .All, completion: completion) + self.sync(changes, inEntityNamed: entityName, predicate: nil, parent: nil, parentRelationship: nil, operations: .all, completion: completion) } /** @@ -126,7 +126,7 @@ public extension Sync { */ @available(iOS 10, watchOS 3, tvOS 10, OSX 10.12, *) public class func changes(_ changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate?, persistentContainer: NSPersistentContainer, completion: ((_ error: NSError?) -> Void)?) { - self.changes(changes, inEntityNamed: entityName, predicate: predicate, persistentContainer: persistentContainer, operations: .All, completion: completion) + self.changes(changes, inEntityNamed: entityName, predicate: predicate, persistentContainer: persistentContainer, operations: .all, completion: completion) } /** diff --git a/Source/Sync/Sync.swift b/Source/Sync/Sync.swift index 55f0b164..fe54453a 100644 --- a/Source/Sync/Sync.swift +++ b/Source/Sync/Sync.swift @@ -23,10 +23,10 @@ public protocol SyncDelegate: class { self.rawValue = rawValue } - public static let Insert = OperationOptions(rawValue: 1 << 0) - public static let Update = OperationOptions(rawValue: 1 << 1) - public static let Delete = OperationOptions(rawValue: 1 << 2) - public static let All: OperationOptions = [.Insert, .Update, .Delete] + public static let insert = OperationOptions(rawValue: 1 << 0) + public static let update = OperationOptions(rawValue: 1 << 1) + public static let delete = OperationOptions(rawValue: 1 << 2) + public static let all: OperationOptions = [.insert, .update, .delete] } var downloadFinished = false @@ -52,13 +52,13 @@ public protocol SyncDelegate: class { var changes: [[String: Any]] var entityName: String var predicate: NSPredicate? - var filterOperations = Sync.OperationOptions.All + var filterOperations = Sync.OperationOptions.all var parent: NSManagedObject? var parentRelationship: NSRelationshipDescription? var context: NSManagedObjectContext? - unowned var dataStack: DATAStack + unowned var dataStack: DataStack - public init(changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate? = nil, parent: NSManagedObject? = nil, parentRelationship: NSRelationshipDescription? = nil, context: NSManagedObjectContext? = nil, dataStack: DATAStack, operations: Sync.OperationOptions = .All) { + public init(changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate? = nil, parent: NSManagedObject? = nil, parentRelationship: NSRelationshipDescription? = nil, context: NSManagedObjectContext? = nil, dataStack: DataStack, operations: Sync.OperationOptions = .all) { self.changes = changes self.entityName = entityName self.predicate = predicate @@ -162,8 +162,8 @@ public protocol SyncDelegate: class { fatalError("Remote primary key not found for entity: \(entityName), we were looking for id, if your remote ID has a different name consider using hyper.remoteKey to map to the right value") } - let dataFilterOperations = DATAFilter.Operation(rawValue: operations.rawValue) - DATAFilter.changes(changes, inEntityNamed: entityName, predicate: finalPredicate, operations: dataFilterOperations, localPrimaryKey: localPrimaryKey, remotePrimaryKey: remotePrimaryKey, context: context, inserted: { JSON in + let dataFilterOperations = DataFilter.Operation(rawValue: operations.rawValue) + DataFilter.changes(changes, inEntityNamed: entityName, predicate: finalPredicate, operations: dataFilterOperations, localPrimaryKey: localPrimaryKey, remotePrimaryKey: remotePrimaryKey, context: context, inserted: { JSON in let shouldContinue = shouldContinueBlock?() ?? true guard shouldContinue else { return } @@ -238,7 +238,7 @@ public protocol SyncDelegate: class { } for object in insertedOrUpdatedObjects { - object.sync_fill(with: changes, parent: nil, parentRelationship: nil, context: context, operations: [.All], shouldContinueBlock: nil, objectJSONBlock: nil) + object.sync_fill(with: changes, parent: nil, parentRelationship: nil, context: context, operations: [.all], shouldContinueBlock: nil, objectJSONBlock: nil) } if context.hasChanges { @@ -268,7 +268,7 @@ public protocol SyncDelegate: class { let objects = try context.fetch(fetchRequest) for updated in objects { - updated.sync_fill(with: changes, parent: nil, parentRelationship: nil, context: context, operations: [.All], shouldContinueBlock: nil, objectJSONBlock: nil) + updated.sync_fill(with: changes, parent: nil, parentRelationship: nil, context: context, operations: [.all], shouldContinueBlock: nil, objectJSONBlock: nil) } if context.hasChanges { diff --git a/Sync.podspec b/Sync.podspec index a395e001..de0a1c74 100755 --- a/Sync.podspec +++ b/Sync.podspec @@ -28,6 +28,6 @@ s.source_files = 'Source/**/*' s.frameworks = 'Foundation', 'CoreData' -s.dependency 'DATAStack', '~> 7.0.1' -s.dependency 'SYNCPropertyMapper', '~> 5.2.0' +s.dependency 'DataStack', '~> 7.0.1' +s.dependency 'SyncPropertyMapper', '~> 5.2.0' end diff --git a/Tests/DATAFilter/DATAFilterTests.swift b/Tests/DATAFilter/DataFilterTests.swift similarity index 78% rename from Tests/DATAFilter/DATAFilterTests.swift rename to Tests/DATAFilter/DataFilterTests.swift index 8e462300..fc6b63b6 100755 --- a/Tests/DATAFilter/DATAFilterTests.swift +++ b/Tests/DATAFilter/DataFilterTests.swift @@ -2,7 +2,7 @@ import XCTest import CoreData import Sync -class DATAFilterTests: XCTestCase { +class DataFilterTests: XCTestCase { @discardableResult func user(remoteID: Int, firstName: String, lastName: String, age: Int, context: NSManagedObjectContext) -> NSManagedObject { let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: context) user.setValue(remoteID, forKey: "remoteID") @@ -34,7 +34,7 @@ class DATAFilterTests: XCTestCase { } func testUsersCount() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) self.createUsers(context: dataStack.mainContext) let request = NSFetchRequest<NSFetchRequestResult>(entityName: "User") @@ -51,16 +51,16 @@ class DATAFilterTests: XCTestCase { - Deleted: 4 */ func testMapChangesA() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.createUsers(context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 @@ -80,16 +80,16 @@ class DATAFilterTests: XCTestCase { - Deleted: 4 */ func testMapChangesAWitNull() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.createUsers(context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users-with-null.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users-with-null.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 @@ -109,16 +109,16 @@ class DATAFilterTests: XCTestCase { - Deleted: 4 */ func testMapChangesAWithNil() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.createUsers(context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users-with-nil.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users-with-nil.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 @@ -138,16 +138,16 @@ class DATAFilterTests: XCTestCase { - Deleted: None */ func testMapChangesB() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.createUsers(context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users2.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users2.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 @@ -167,16 +167,16 @@ class DATAFilterTests: XCTestCase { - Deleted: None */ func testMapChangesC() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.createUsers(context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users3.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users3.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 @@ -197,7 +197,7 @@ class DATAFilterTests: XCTestCase { - Deleted: 4 */ func testUniquing() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.createUsers(context: backgroundContext) @@ -210,8 +210,8 @@ class DATAFilterTests: XCTestCase { let numberOfUsers = try! backgroundContext.count(for: request) XCTAssertEqual(numberOfUsers, 8) - let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] - DATAFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in }, updated: { objectJSON, updatedObject in }) @@ -228,7 +228,7 @@ class DATAFilterTests: XCTestCase { - Deleted: 0 */ func testStringID() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.note(remoteID: "123", text: "text", context: backgroundContext) try! backgroundContext.save() @@ -237,8 +237,8 @@ class DATAFilterTests: XCTestCase { let count = try! backgroundContext.count(for: request) XCTAssertEqual(count, 1) - let JSONObjects = try! JSON.from("note.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] - DATAFilter.changes(JSONObjects, inEntityNamed: "Note", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + let JSONObjects = try! JSON.from("note.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + DataFilter.changes(JSONObjects, inEntityNamed: "Note", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in XCTAssertFalse(true) }, updated: { objectJSON, updatedObject in XCTAssertEqual(objectJSON["id"] as? String, "123") @@ -247,17 +247,17 @@ class DATAFilterTests: XCTestCase { } func testInsertOnly() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Insert], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Insert], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 @@ -270,17 +270,17 @@ class DATAFilterTests: XCTestCase { } func testUpdateOnly() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Update], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Update], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 @@ -293,17 +293,17 @@ class DATAFilterTests: XCTestCase { } func testDeleteOnly() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Delete], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Delete], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 @@ -321,16 +321,16 @@ class DATAFilterTests: XCTestCase { the set existing ID: 1, meaning that if an item with ID: 2 appears, then this item will be inserted. */ func testPredicate() { - let dataStack = DATAStack(modelName: "DATAFilter", bundle: Bundle(for: DATAFilterTests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) dataStack.performInNewBackgroundContext { backgroundContext in self.createUsers(context: backgroundContext) - let before = DATAObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DATAFilterTests.self)) as! [[String: Any]] + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] var inserted = 0 var updated = 0 var deleted = before.count - DATAFilter.changes(JSONObjects, inEntityNamed: "User", predicate: NSPredicate(format: "remoteID == \(0)"), operations: [.All], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: NSPredicate(format: "remoteID == \(0)"), operations: [.All], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in inserted += 1 }, updated: { objectJSON, updatedObject in updated += 1 diff --git a/Tests/DATAStack/Tests.swift b/Tests/DATAStack/Tests.swift index 93891a39..29269561 100755 --- a/Tests/DATAStack/Tests.swift +++ b/Tests/DATAStack/Tests.swift @@ -3,8 +3,8 @@ import CoreData @testable import Sync extension XCTestCase { - func createDataStack(_ storeType: DATAStackStoreType = .inMemory) -> DATAStack { - let dataStack = DATAStack(modelName: "ModelGroup", bundle: Bundle(for: Tests.self), storeType: storeType) + func createDataStack(_ storeType: DataStackStoreType = .inMemory) -> DataStack { + let dataStack = DataStack(modelName: "ModelGroup", bundle: Bundle(for: Tests.self), storeType: storeType) return dataStack } @@ -29,7 +29,7 @@ extension XCTestCase { class InitializerTests: XCTestCase { func testInitializeUsingXCDataModel() { - let dataStack = DATAStack(modelName: "SimpleModel", bundle: Bundle(for: Tests.self), storeType: .inMemory) + let dataStack = DataStack(modelName: "SimpleModel", bundle: Bundle(for: Tests.self), storeType: .inMemory) self.insertUser(in: dataStack.mainContext) let objects = self.fetch(in: dataStack.mainContext) @@ -48,7 +48,7 @@ class InitializerTests: XCTestCase { func testInitializingUsingNSManagedObjectModel() { let model = NSManagedObjectModel(bundle: Bundle(for: Tests.self), name: "ModelGroup") - let dataStack = DATAStack(model: model, storeType: .inMemory) + let dataStack = DataStack(model: model, storeType: .inMemory) self.insertUser(in: dataStack.mainContext) let objects = self.fetch(in: dataStack.mainContext) @@ -155,13 +155,13 @@ class Tests: XCTestCase { } func testAutomaticMigration() { - let firstDataStack = DATAStack(modelName: "SimpleModel", bundle: Bundle(for: Tests.self), storeType: .sqLite, storeName: "Shared") + let firstDataStack = DataStack(modelName: "SimpleModel", bundle: Bundle(for: Tests.self), storeType: .sqLite, storeName: "Shared") self.insertUser(in: firstDataStack.mainContext) let objects = self.fetch(in: firstDataStack.mainContext) XCTAssertEqual(objects.count, 1) // LightweightMigrationModel is a copy of DataModel with the main difference that adds the updatedDate attribute. - let secondDataStack = DATAStack(modelName: "LightweightMigrationModel", bundle: Bundle(for: Tests.self), storeType: .sqLite, storeName: "Shared") + let secondDataStack = DataStack(modelName: "LightweightMigrationModel", bundle: Bundle(for: Tests.self), storeType: .sqLite, storeName: "Shared") let fetchRequest = NSFetchRequest<NSManagedObject>(entityName: "User") fetchRequest.predicate = NSPredicate(format: "remoteID = %@", NSNumber(value: 1)) let user = try! secondDataStack.mainContext.fetch(fetchRequest).first diff --git a/Tests/NSEntityDescription-SYNCPrimaryKey/PrimaryKeyTests.m b/Tests/NSEntityDescription-SYNCPrimaryKey/PrimaryKeyTests.m index 91687ca5..d3be57d9 100755 --- a/Tests/NSEntityDescription-SYNCPrimaryKey/PrimaryKeyTests.m +++ b/Tests/NSEntityDescription-SYNCPrimaryKey/PrimaryKeyTests.m @@ -2,7 +2,7 @@ @import XCTest; @import Sync; -#import "NSEntityDescription+SYNCPrimaryKey.h" +#import "NSEntityDescription+SyncPrimaryKey.h" @interface PrimaryKeyTests : XCTestCase @@ -11,9 +11,9 @@ @interface PrimaryKeyTests : XCTestCase @implementation PrimaryKeyTests - (NSEntityDescription *)entityForName:(NSString *)name { - DATAStack *dataStack = [[DATAStack alloc] initWithModelName:@"SYNCPrimaryKey" + DataStack *dataStack = [[DataStack alloc] initWithModelName:@"SyncPrimaryKey" bundle:[NSBundle bundleForClass:[self class]] - storeType:DATAStackStoreTypeInMemory]; + storeType:DataStackStoreTypeInMemory]; return [NSEntityDescription entityForName:name inManagedObjectContext:dataStack.mainContext]; diff --git a/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/.xccurrentversion b/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/.xccurrentversion index f7a0ac44..62cddee8 100755 --- a/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/.xccurrentversion +++ b/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/.xccurrentversion @@ -3,6 +3,6 @@ <plist version="1.0"> <dict> <key>_XCCurrentVersionName</key> - <string>SYNCPrimaryKey.xcdatamodel</string> + <string>SyncPrimaryKey.xcdatamodel</string> </dict> </plist> diff --git a/Tests/NSString-SYNCInflections/NSString_SYNCInflectionsTests.m b/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m similarity index 96% rename from Tests/NSString-SYNCInflections/NSString_SYNCInflectionsTests.m rename to Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m index 4c4d8fdd..975ad329 100755 --- a/Tests/NSString-SYNCInflections/NSString_SYNCInflectionsTests.m +++ b/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m @@ -1,6 +1,6 @@ @import XCTest; -#import "NSString+SYNCInflections.h" +#import "NSString+SyncInflections.h" @interface NSString (PrivateInflections) @@ -10,11 +10,11 @@ - (NSString *)hyp_replaceIdentifierWithString:(NSString *)replacementString; @end -@interface NSString_SYNCInflectionsTests : XCTestCase +@interface NSString_SyncInflectionsTests : XCTestCase @end -@implementation NSString_SYNCInflectionsTests +@implementation NSString_SyncInflectionsTests #pragma mark - Inflections diff --git a/Tests/SYNCPropertyMapper/DictionaryTests.swift b/Tests/SYNCPropertyMapper/DictionaryTests.swift index b1d6075c..dd167475 100755 --- a/Tests/SYNCPropertyMapper/DictionaryTests.swift +++ b/Tests/SYNCPropertyMapper/DictionaryTests.swift @@ -220,7 +220,7 @@ class DictionaryTests: XCTestCase { dataStack.drop() } - func setUpWorkout(dataStack: DATAStack) -> NSManagedObject { + func setUpWorkout(dataStack: DataStack) -> NSManagedObject { let workout = NSEntityDescription.insertNewObject(forEntityName: "Workout", into: dataStack.mainContext) workout.setValue(UUID().uuidString, forKey: "id") workout.setValue(UUID().uuidString, forKey: "workoutDesc") diff --git a/Tests/SYNCPropertyMapper/HelperTests.m b/Tests/SYNCPropertyMapper/HelperTests.m index 64b6e662..89c5b630 100755 --- a/Tests/SYNCPropertyMapper/HelperTests.m +++ b/Tests/SYNCPropertyMapper/HelperTests.m @@ -2,7 +2,7 @@ @import XCTest; @import Sync; -#import "NSManagedObject+SYNCPropertyMapperHelpers.h" +#import "NSManagedObject+SyncPropertyMapperHelpers.h" @interface PrivateTests : XCTestCase @@ -16,9 +16,9 @@ - (id)entityNamed:(NSString *)entityName { } - (NSManagedObjectContext *)managedObjectContext { - DATAStack *dataStack = [[DATAStack alloc] initWithModelName:@"Model" + DataStack *dataStack = [[DataStack alloc] initWithModelName:@"Model" bundle:[NSBundle bundleForClass:[self class]] - storeType:DATAStackStoreTypeInMemory]; + storeType:DataStackStoreTypeInMemory]; return dataStack.mainContext; } @@ -135,7 +135,7 @@ - (void)testDestroyKey { XCTAssertEqualObjects([note remoteKeyForAttributeDescription:attributeDescription], @"_destroy"); attributeDescription = note.entity.propertiesByName[@"destroy"]; - XCTAssertEqualObjects([note remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:SYNCPropertyMapperRelationshipTypeArray], @"destroy"); + XCTAssertEqualObjects([note remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:SyncPropertyMapperRelationshipTypeArray], @"destroy"); } @end diff --git a/Tests/SYNCPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents index 15524981..49e034ca 100644 --- a/Tests/SYNCPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents +++ b/Tests/SYNCPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents @@ -11,7 +11,7 @@ <attribute name="boolean" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/> <attribute name="customTransformerString" optional="YES" attributeType="String" syncable="YES"> <userInfo> - <entry key="hyper.valueTransformer" value="HYPTestValueTransformer"/> + <entry key="hyper.valueTransformer" value="SyncTestValueTransformer"/> </userInfo> </attribute> <attribute name="decimal" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES"/> diff --git a/Tests/SYNCPropertyMapper/HYPDictionaryTests.m b/Tests/SYNCPropertyMapper/SyncDictionaryTests.m similarity index 94% rename from Tests/SYNCPropertyMapper/HYPDictionaryTests.m rename to Tests/SYNCPropertyMapper/SyncDictionaryTests.m index 33af4b81..d5ad5fd8 100755 --- a/Tests/SYNCPropertyMapper/HYPDictionaryTests.m +++ b/Tests/SYNCPropertyMapper/SyncDictionaryTests.m @@ -2,17 +2,17 @@ @import XCTest; @import Sync; -#import "SYNCPropertyMapper.h" -#import "HYPTestValueTransformer.h" +#import "SyncPropertyMapper.h" +#import "SyncTestValueTransformer.h" -@interface HYPDictionaryTests : XCTestCase +@interface SyncDictionaryTests : XCTestCase @property (nonatomic) NSDate *testDate; @end -@implementation HYPDictionaryTests +@implementation SyncDictionaryTests - (NSDate *)testDate { if (!_testDate) { @@ -24,10 +24,10 @@ - (NSDate *)testDate { #pragma mark - Set up -- (DATAStack *)dataStack { - return [[DATAStack alloc] initWithModelName:@"Model" +- (DataStack *)dataStack { + return [[DataStack alloc] initWithModelName:@"Model" bundle:[NSBundle bundleForClass:[self class]] - storeType:DATAStackStoreTypeInMemory]; + storeType:DataStackStoreTypeInMemory]; } - (id)entityNamed:(NSString *)entityName inContext:(NSManagedObjectContext *)context { @@ -35,7 +35,7 @@ - (id)entityNamed:(NSString *)entityName inContext:(NSManagedObjectContext *)con inManagedObjectContext:context]; } -- (NSManagedObject *)userUsingDataStack:(DATAStack *)dataStack { +- (NSManagedObject *)userUsingDataStack:(DataStack *)dataStack { NSManagedObject *user = [self entityNamed:@"User" inContext:dataStack.mainContext]; [user setValue:@25 forKey:@"age"]; [user setValue:self.testDate forKey:@"birthDate"]; @@ -139,17 +139,17 @@ - (NSDictionary *)userDictionaryWithNoRelationships { } - (void)testDictionaryNoRelationships { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; - NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SYNCPropertyMapperRelationshipTypeNone]; + NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeNone]; NSDictionary *comparedDictionary = [self userDictionaryWithNoRelationships]; XCTAssertEqualObjects(dictionary, [comparedDictionary copy]); } - (void)testDictionaryArrayRelationships { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; - NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SYNCPropertyMapperRelationshipTypeArray]; + NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; comparedDictionary[@"company"] = @{@"id" : @1, @"name" : @"Facebook"}; @@ -176,9 +176,9 @@ - (void)testDictionaryArrayRelationships { } - (void)testDictionaryArrayRelationshipsOrdered { - DATAStack *dataStack = [[DATAStack alloc] initWithModelName:@"Ordered" + DataStack *dataStack = [[DataStack alloc] initWithModelName:@"Ordered" bundle:[NSBundle bundleForClass:[self class]] - storeType:DATAStackStoreTypeInMemory]; + storeType:DataStackStoreTypeInMemory]; NSManagedObject *user = [self entityNamed:@"OrderedUser" inContext:dataStack.mainContext]; [user setValue:@"raw" forKey:@"rawSigned"]; @@ -217,7 +217,7 @@ - (void)testDictionaryArrayRelationshipsOrdered { note = [self orderedNoteWithID:@7 inContext:dataStack.mainContext]; [note setValue:user forKey:@"user"]; - NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SYNCPropertyMapperRelationshipTypeArray]; + NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; NSArray *notes = dictionary[@"notes"]; @@ -248,7 +248,7 @@ - (void)testDictionaryArrayRelationshipsOrdered { } - (void)testDictionaryNestedRelationships { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; NSDictionary *dictionary = [user hyp_dictionary]; NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; @@ -278,7 +278,7 @@ - (void)testDictionaryNestedRelationships { } - (void)testDictionaryDeepRelationships { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *building = [self entityNamed:@"Building" inContext:dataStack.mainContext]; [building setValue:@1 forKey:@"remoteID"]; @@ -304,7 +304,7 @@ - (void)testDictionaryDeepRelationships { [apartments addObject:apartment]; [building setValue:apartments forKey:@"apartments"]; - NSDictionary *buildingDictionary = [building hyp_dictionaryUsingRelationshipType:SYNCPropertyMapperRelationshipTypeArray]; + NSDictionary *buildingDictionary = [building hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; NSMutableDictionary *compared = [NSMutableDictionary new]; NSArray *roomsArray = @[@{@"id" : @1}]; NSArray *apartmentsArray = @[@{@"id" : @1, @@ -318,7 +318,7 @@ - (void)testDictionaryDeepRelationships { } - (void)testDictionaryValuesKindOfClass { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; NSDictionary *dictionary = [user hyp_dictionary]; @@ -358,7 +358,7 @@ - (void)testDictionaryValuesKindOfClass { } - (void)testRecursive { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *megachild = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; [megachild setValue:@"megachild" forKey:@"remoteID"]; @@ -387,7 +387,7 @@ - (void)testRecursive { [parent setValue:recursives forKey:@"recursives"]; [child setValue:parent forKey:@"recursive"]; - NSDictionary *dictionary = [parent hyp_dictionaryUsingRelationshipType:SYNCPropertyMapperRelationshipTypeArray]; + NSDictionary *dictionary = [parent hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; NSArray *megachildArray = @[@{@"id" : @"megachild", @"recursives": @[]}]; NSArray *grandchildArray = @[@{@"id" : @"grandchild", @"recursives": megachildArray}]; NSArray *childArray = @[@{@"id" : @"child", @"recursives": grandchildArray}]; diff --git a/Tests/SYNCPropertyMapper/HYPFillWithDictionaryTests.m b/Tests/SYNCPropertyMapper/SyncFillWithDictionaryTests.m similarity index 92% rename from Tests/SYNCPropertyMapper/HYPFillWithDictionaryTests.m rename to Tests/SYNCPropertyMapper/SyncFillWithDictionaryTests.m index 04a9cce7..77f830f9 100755 --- a/Tests/SYNCPropertyMapper/HYPFillWithDictionaryTests.m +++ b/Tests/SYNCPropertyMapper/SyncFillWithDictionaryTests.m @@ -2,16 +2,16 @@ @import XCTest; @import Sync; -#import "SYNCPropertyMapper.h" -#import "HYPTestValueTransformer.h" +#import "SyncPropertyMapper.h" +#import "SyncTestValueTransformer.h" -@interface HYPFillWithDictionaryTests : XCTestCase +@interface SyncFillWithDictionaryTests : XCTestCase @property (nonatomic) NSDate *testDate; @end -@implementation HYPFillWithDictionaryTests +@implementation SyncFillWithDictionaryTests - (NSDate *)testDate { if (!_testDate) { @@ -23,10 +23,10 @@ - (NSDate *)testDate { #pragma mark - Set up -- (DATAStack *)dataStack { - return [[DATAStack alloc] initWithModelName:@"Model" +- (DataStack *)dataStack { + return [[DataStack alloc] initWithModelName:@"Model" bundle:[NSBundle bundleForClass:[self class]] - storeType:DATAStackStoreTypeInMemory]; + storeType:DataStackStoreTypeInMemory]; } - (id)entityNamed:(NSString *)entityName inContext:(NSManagedObjectContext *)context { @@ -34,7 +34,7 @@ - (id)entityNamed:(NSString *)entityName inContext:(NSManagedObjectContext *)con inManagedObjectContext:context]; } -- (NSManagedObject *)userUsingDataStack:(DATAStack *)dataStack { +- (NSManagedObject *)userUsingDataStack:(DataStack *)dataStack { NSManagedObject *user = [self entityNamed:@"User" inContext:dataStack.mainContext]; [user setValue:@25 forKey:@"age"]; [user setValue:self.testDate forKey:@"birthDate"]; @@ -114,9 +114,9 @@ - (void)testAllAttributes { @"transformable" : @"Ignore me, too", @"custom_transformer_string" : @"Foo & bar"}; - [NSValueTransformer setValueTransformer:[[HYPTestValueTransformer alloc] init] forName:@"HYPTestValueTransformer"]; + [NSValueTransformer setValueTransformer:[[SyncTestValueTransformer alloc] init] forName:@"SyncTestValueTransformer"]; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *attributes = [self entityNamed:@"Attribute" inContext:dataStack.mainContext]; [attributes hyp_fillWithDictionary:values]; @@ -161,9 +161,9 @@ - (void)testAllAttributesInCamelCase { @"transformable" : @"Ignore me, too", @"customTransformerString" : @"Foo & bar"}; - [NSValueTransformer setValueTransformer:[[HYPTestValueTransformer alloc] init] forName:@"HYPTestValueTransformer"]; + [NSValueTransformer setValueTransformer:[[SyncTestValueTransformer alloc] init] forName:@"SyncTestValueTransformer"]; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *attributes = [self entityNamed:@"Attribute" inContext:dataStack.mainContext]; [attributes hyp_fillWithDictionary:values]; @@ -195,7 +195,7 @@ - (void)testFillManagedObjectWithDictionary { NSDictionary *values = @{@"first_name" : @"Jane", @"last_name" : @"Hyperseed"}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -206,7 +206,7 @@ - (void)testUpdatingExistingValueWithNull { NSDictionary *values = @{@"first_name" : @"Jane", @"last_name" : @"Hyperseed"}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -221,7 +221,7 @@ - (void)testUpdatingExistingValueWithNull { - (void)testAgeNumber { NSDictionary *values = @{@"age" : @24}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -231,7 +231,7 @@ - (void)testAgeNumber { - (void)testAgeString { NSDictionary *values = @{@"age" : @"24"}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -244,7 +244,7 @@ - (void)testAgeString { - (void)testBornDate { NSDictionary *values = @{@"birth_date" : @"1989-02-14T00:00:00+00:00"}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -261,7 +261,7 @@ - (void)testUpdate { @"last_name" : @"Hyperseed", @"age" : @30}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -279,7 +279,7 @@ - (void)testUpdateIgnoringEqualValues { @"last_name" : @"Hyperseed", @"age" : @30}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -297,7 +297,7 @@ - (void)testUpdateIgnoringEqualValues { - (void)testAcronyms { NSDictionary *values = @{@"contract_id" : @100}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -309,7 +309,7 @@ - (void)testArrayStorage { @"soccer", @"code"]}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -324,7 +324,7 @@ - (void)testDictionaryStorage { NSDictionary *values = @{@"expenses" : @{@"cake" : @12.50, @"juice" : @0.50}}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -337,7 +337,7 @@ - (void)testReservedWords { NSDictionary *values = @{@"id": @100, @"description": @"This is the description?", @"type": @"user type"}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -351,7 +351,7 @@ - (void)testCreatedAt { @"updated_at" : @"2014-01-02", @"number_of_attendes": @20}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -373,7 +373,7 @@ - (void)testCustomRemoteKeys { @"driver_identifier_str" : @"123", @"signed" : @"salesman"}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -385,7 +385,7 @@ - (void)testCustomRemoteKeys { - (void)testIgnoredTransformables { NSDictionary *values = @{@"ignoreTransformable" : @"I'm going to be ignored"}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -395,7 +395,7 @@ - (void)testIgnoredTransformables { - (void)testRegisteredTransformables { NSDictionary *values = @{@"registeredTransformable" : @"/Date(1451606400000)/"}; - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSManagedObject *user = [self userUsingDataStack:dataStack]; [user hyp_fillWithDictionary:values]; @@ -409,7 +409,7 @@ - (void)testRegisteredTransformables { } - (void)testCustomKey { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSDictionary *values = @{@"id": @"1", @"other_attribute": @"Market 1"}; @@ -423,7 +423,7 @@ - (void)testCustomKey { } - (void)testCustomKeyPathSnakeCase { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSDictionary *values = @{@"snake_parent": @{ @"value_one": @"Value 1", @@ -441,7 +441,7 @@ - (void)testCustomKeyPathSnakeCase { } - (void)testCustomKeyPathCamelCase { - DATAStack *dataStack = [self dataStack]; + DataStack *dataStack = [self dataStack]; NSDictionary *values = @{@"camelParent": @{ @"valueOne": @"Value 1", diff --git a/Tests/SYNCPropertyMapper/Transformers/HYPTestValueTransformer.h b/Tests/SYNCPropertyMapper/Transformers/HYPTestValueTransformer.h deleted file mode 100755 index 7a8e4023..00000000 --- a/Tests/SYNCPropertyMapper/Transformers/HYPTestValueTransformer.h +++ /dev/null @@ -1,5 +0,0 @@ -@import Foundation; - -@interface HYPTestValueTransformer : NSValueTransformer - -@end diff --git a/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.h b/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.h new file mode 100755 index 00000000..9ae32ca4 --- /dev/null +++ b/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.h @@ -0,0 +1,5 @@ +@import Foundation; + +@interface SyncTestValueTransformer : NSValueTransformer + +@end diff --git a/Tests/SYNCPropertyMapper/Transformers/HYPTestValueTransformer.m b/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.m similarity index 93% rename from Tests/SYNCPropertyMapper/Transformers/HYPTestValueTransformer.m rename to Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.m index 4c940322..8c331fc4 100755 --- a/Tests/SYNCPropertyMapper/Transformers/HYPTestValueTransformer.m +++ b/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.m @@ -1,6 +1,6 @@ -#import "HYPTestValueTransformer.h" +#import "SyncTestValueTransformer.h" -@implementation HYPTestValueTransformer +@implementation SyncTestValueTransformer + (Class)transformedValueClass { return [NSString class]; diff --git a/Tests/Sync/Helpers/Helper.swift b/Tests/Sync/Helpers/Helper.swift index 31fc2021..77525ed0 100644 --- a/Tests/Sync/Helpers/Helper.swift +++ b/Tests/Sync/Helpers/Helper.swift @@ -10,9 +10,9 @@ import Sync return objects } - class func dataStackWithModelName(_ modelName: String) -> DATAStack { + class func dataStackWithModelName(_ modelName: String) -> DataStack { let bundle = Bundle(for: Helper.self) - let dataStack = DATAStack(modelName: modelName, bundle: bundle, storeType: .sqLite) + let dataStack = DataStack(modelName: modelName, bundle: bundle, storeType: .sqLite) return dataStack } @@ -60,13 +60,13 @@ import Sync return objects } - class func dataStackWithModelName(_ modelName: String, storeType: DATAStackStoreType = .sqLite) -> DATAStack { + class func dataStackWithModelName(_ modelName: String, storeType: DataStackStoreType = .sqLite) -> DataStack { let bundle = Bundle(for: Helper.self) - let dataStack = DATAStack(modelName: modelName, bundle: bundle, storeType: storeType) + let dataStack = DataStack(modelName: modelName, bundle: bundle, storeType: storeType) return dataStack } - class func insertEntity(_ name: String, dataStack: DATAStack) -> NSManagedObject { + class func insertEntity(_ name: String, dataStack: DataStack) -> NSManagedObject { let entity = NSEntityDescription.entity(forEntityName: name, in: dataStack.mainContext)! return NSManagedObject(entity: entity, insertInto: dataStack.mainContext) } diff --git a/Tests/Sync/NSManagedObjectContext+SyncTests.swift b/Tests/Sync/NSManagedObjectContext+SyncTests.swift index 918ea493..d11933a5 100644 --- a/Tests/Sync/NSManagedObjectContext+SyncTests.swift +++ b/Tests/Sync/NSManagedObjectContext+SyncTests.swift @@ -7,7 +7,7 @@ class NSManagedObjectContext_SyncTests: XCTestCase { } func configureUserWithRemoteID(remoteID: NSNumber?, localID: String?, name: String, block: @escaping (_ user: NSManagedObject, _ context: NSManagedObjectContext) -> Void) { - let stack = DATAStack(modelName: "Tests", bundle: Bundle(for: NSManagedObjectContext_SyncTests.self), storeType: .inMemory) + let stack = DataStack(modelName: "Tests", bundle: Bundle(for: NSManagedObjectContext_SyncTests.self), storeType: .inMemory) stack.performInNewBackgroundContext { context in let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: context) user.setValue(remoteID, forKey: "remoteID") diff --git a/iOSDemo/AppDelegate.swift b/iOSDemo/AppDelegate.swift index 6f6c1344..c73880c5 100644 --- a/iOSDemo/AppDelegate.swift +++ b/iOSDemo/AppDelegate.swift @@ -5,7 +5,7 @@ import Sync @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - lazy var dataStack: DATAStack = DATAStack(modelName: "iOSDemo") + lazy var dataStack: DataStack = DataStack(modelName: "iOSDemo") func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { self.window = UIWindow(frame: UIScreen.main.bounds) diff --git a/iOSDemo/ViewController.swift b/iOSDemo/ViewController.swift index 4b79047d..836db203 100644 --- a/iOSDemo/ViewController.swift +++ b/iOSDemo/ViewController.swift @@ -3,10 +3,10 @@ import CoreData import Sync class ViewController: UITableViewController { - unowned var dataStack: DATAStack + unowned var dataStack: DataStack var items = [NSManagedObject]() - required init(dataStack: DATAStack) { + required init(dataStack: DataStack) { self.dataStack = dataStack super.init(nibName: nil, bundle: nil) } From 73775b3a208f8afcb9368bb4d78907793e08e5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Nu=C3=B1ez?= <elvisnunez@me.com> Date: Thu, 16 Mar 2017 17:11:06 +0100 Subject: [PATCH 2/8] Fix errors --- Source/Sync/Sync+NSPersistentContainer.swift | 6 +++--- Tests/Sync/SyncTests.swift | 22 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Source/Sync/Sync+NSPersistentContainer.swift b/Source/Sync/Sync+NSPersistentContainer.swift index 3ab7adc1..bd6ef28f 100644 --- a/Source/Sync/Sync+NSPersistentContainer.swift +++ b/Source/Sync/Sync+NSPersistentContainer.swift @@ -42,7 +42,7 @@ public extension NSPersistentContainer { /// - changes: The dictionary to be used to update or create the object. /// - entityName: The name of the entity. /// - id: The primary key. - /// - error: The Core Data error. + /// - completion: The completion block. @available(iOS 10, watchOS 3, tvOS 10, OSX 10.12, *) public func insertOrUpdate(_ changes: [String: Any], inEntityNamed entityName: String, completion: @escaping (_ result: Result<Any>) -> Void) { self.performBackgroundTask { backgroundContext in @@ -67,7 +67,7 @@ public extension NSPersistentContainer { /// - id: The primary key. /// - changes: The dictionary to be used to update the object. /// - entityName: The name of the entity. - /// - error: The Core Data error. + /// - completion: The completion block. @available(iOS 10, watchOS 3, tvOS 10, OSX 10.12, *) public func update(_ id: Any, with changes: [String: Any], inEntityNamed entityName: String, completion: @escaping (_ result: Result<Any>) -> Void) { self.performBackgroundTask { backgroundContext in @@ -93,7 +93,7 @@ public extension NSPersistentContainer { /// - Parameters: /// - id: The primary key. /// - entityName: The name of the entity. - /// - error: The Core Data error. + /// - completion: The completion block. @available(iOS 10, watchOS 3, tvOS 10, OSX 10.12, *) public func delete(_ id: Any, inEntityNamed entityName: String, completion: @escaping (_ error: NSError?) -> Void) { self.performBackgroundTask { backgroundContext in diff --git a/Tests/Sync/SyncTests.swift b/Tests/Sync/SyncTests.swift index 24f317c0..cd1bb1de 100644 --- a/Tests/Sync/SyncTests.swift +++ b/Tests/Sync/SyncTests.swift @@ -122,11 +122,11 @@ class SyncTests: XCTestCase { let dataStack = Helper.dataStackWithModelName("Contacts") let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.All], completion: nil) + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.Insert], completion: nil) + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! @@ -142,17 +142,17 @@ class SyncTests: XCTestCase { let dataStack = Helper.dataStackWithModelName("Contacts") let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.All], completion: nil) + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.Insert], completion: nil) + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! XCTAssertEqual(result.value(forKey: "email") as? String, "melisawhite@ovium.com") - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.Insert], completion: nil) + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) dataStack.drop() @@ -165,11 +165,11 @@ class SyncTests: XCTestCase { let dataStack = Helper.dataStackWithModelName("Contacts") let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.All], completion: nil) + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.Update], completion: nil) + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.update], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! @@ -185,11 +185,11 @@ class SyncTests: XCTestCase { let dataStack = Helper.dataStackWithModelName("Contacts") let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.All], completion: nil) + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.Delete], completion: nil) + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.delete], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! @@ -205,11 +205,11 @@ class SyncTests: XCTestCase { let dataStack = Helper.dataStackWithModelName("Contacts") let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.All], completion: nil) + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.Insert, .Update], completion: nil) + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert, .update], completion: nil) XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) let user0 = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! From 8947a92762c2e65f58af96177d427ddf5c081e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Nu=C3=B1ez?= <elvisnunez@me.com> Date: Thu, 16 Mar 2017 17:24:18 +0100 Subject: [PATCH 3/8] Update files --- Demo.xcodeproj/project.pbxproj | 44 ++++++++++++++-------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/Demo.xcodeproj/project.pbxproj b/Demo.xcodeproj/project.pbxproj index 16dd9f14..3b5241f9 100644 --- a/Demo.xcodeproj/project.pbxproj +++ b/Demo.xcodeproj/project.pbxproj @@ -382,6 +382,9 @@ 14D93C811E4E68BA00DED595 /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC531D9F90B5001C8DA6 /* Unique.xcdatamodeld */; }; 14D93C831E4E68FA00DED595 /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DBDD1D9F90B5001C8DA6 /* Helper.swift */; }; 14D93C841E4E690A00DED595 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C046341DBC19D300CB6C16 /* JSON.swift */; }; + 14E269031E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */; }; + 14E269041E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */; }; + 14E269051E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */; }; 14E2F0A11E7ADE0E00DF1776 /* Sync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14241E981DBC39730042ED81 /* Sync.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 14E2F0A21E7ADE1400DF1776 /* Sync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14241E8B1DBC39690042ED81 /* Sync.framework */; }; 14E2F0A31E7ADFB500DF1776 /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */; }; @@ -389,7 +392,6 @@ 14E2F0A51E7ADFB500DF1776 /* SimpleModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */; }; 14E2F0A61E7ADFB500DF1776 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146738951E7ADC1900913C8E /* Tests.swift */; }; 14E2F0A71E7ADFBA00DF1776 /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84E9F1E4E748000701B8A /* DateTests.swift */; }; - 14E2F0A81E7ADFC100DF1776 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */; }; 14E2F0A91E7ADFC100DF1776 /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */; }; 14E2F0AA1E7ADFC600DF1776 /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */; }; 14E2F0AB1E7ADFD200DF1776 /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA71E4E748000701B8A /* DictionaryTests.swift */; }; @@ -555,8 +557,6 @@ 4403DC8F1D9F90B5001C8DA6 /* users_c.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC131D9F90B5001C8DA6 /* users_c.json */; }; 4403DC901D9F90B5001C8DA6 /* users_company.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC141D9F90B5001C8DA6 /* users_company.json */; }; 4403DC911D9F90B5001C8DA6 /* users_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC151D9F90B5001C8DA6 /* users_notes.json */; }; - 441FA7B41E4EFF7C00023821 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */; }; - 441FA7B51E4EFF7D00023821 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */; }; 441FA7B91E4F00D300023821 /* User+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7B71E4F00D300023821 /* User+CoreDataClass.swift */; }; 441FA7BA1E4F00D300023821 /* User+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7B81E4F00D300023821 /* User+CoreDataProperties.swift */; }; 445D3BC71D9F9373007F9E26 /* note.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BBE1D9F9373007F9E26 /* note.json */; }; @@ -721,6 +721,7 @@ 14D93C071E4E65C700DED595 /* SyncPropertyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncPropertyMapper.m; sourceTree = "<group>"; }; 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SyncInflections.h"; sourceTree = "<group>"; }; 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SyncInflections.m"; sourceTree = "<group>"; }; + 14E269021E7AF345007658C0 /* SyncPrimaryKey.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SyncPrimaryKey.xcdatamodel; sourceTree = "<group>"; }; 14E2852E1DC173A800C4E461 /* NSPersistentContainerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSPersistentContainerTests.swift; sourceTree = "<group>"; }; 14E93C431DBCCD2800E3304E /* Sync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sync.h; sourceTree = "<group>"; }; 14E9C13A1DEA2ECD00A21B9E /* 320.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 320.xcdatamodel; sourceTree = "<group>"; }; @@ -817,7 +818,6 @@ 4403DC571D9F90B5001C8DA6 /* NSManagedObject+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObject+SyncTests.swift"; sourceTree = "<group>"; }; 4403DC581D9F90B5001C8DA6 /* NSManagedObjectContext+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObjectContext+SyncTests.swift"; sourceTree = "<group>"; }; 4403DC591D9F90B5001C8DA6 /* SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncTests.swift; sourceTree = "<group>"; }; - 441FA7AF1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SyncPrimaryKey.xcdatamodel; sourceTree = "<group>"; }; 441FA7B71E4F00D300023821 /* User+CoreDataClass.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "User+CoreDataClass.swift"; sourceTree = "<group>"; }; 441FA7B81E4F00D300023821 /* User+CoreDataProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "User+CoreDataProperties.swift"; sourceTree = "<group>"; }; 444546D51DF06E2600CC7928 /* UpdateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateTests.swift; sourceTree = "<group>"; }; @@ -939,7 +939,6 @@ children = ( 1467388B1E7ADBA700913C8E /* DataStack.swift */, ); - name = DataStack; path = DataStack; sourceTree = "<group>"; }; @@ -951,7 +950,6 @@ 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */, 146738951E7ADC1900913C8E /* Tests.swift */, ); - name = DataStack; path = DataStack; sourceTree = "<group>"; }; @@ -1020,10 +1018,9 @@ 14A84EA01E4E748000701B8A /* NSEntityDescription-SyncPrimaryKey */ = { isa = PBXGroup; children = ( - 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */, + 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */, 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */, ); - name = "NSEntityDescription-SyncPrimaryKey"; path = "NSEntityDescription-SyncPrimaryKey"; sourceTree = "<group>"; }; @@ -1032,7 +1029,6 @@ children = ( 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */, ); - name = "NSString-SyncInflections"; path = "NSString-SyncInflections"; sourceTree = "<group>"; }; @@ -1047,7 +1043,6 @@ 14A84EAD1E4E748000701B8A /* Models */, 14A84EC01E4E748000701B8A /* Transformers */, ); - name = SyncPropertyMapper; path = SyncPropertyMapper; sourceTree = "<group>"; }; @@ -1113,7 +1108,6 @@ 14D93C011E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h */, 14D93C021E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.m */, ); - name = "NSEntityDescription-SyncPrimaryKey"; path = "NSEntityDescription-SyncPrimaryKey"; sourceTree = "<group>"; }; @@ -1134,7 +1128,6 @@ 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */, 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */, ); - name = "NSString-SyncInflections"; path = "NSString-SyncInflections"; sourceTree = "<group>"; }; @@ -1300,7 +1293,6 @@ 445D3BC31D9F9373007F9E26 /* users2.json */, 445D3BC41D9F9373007F9E26 /* users3.json */, ); - name = DataFilter; path = DataFilter; sourceTree = "<group>"; }; @@ -2044,6 +2036,7 @@ 14D93C5D1E4E68BA00DED595 /* 3ca82a0.xcdatamodeld in Sources */, 14D93C5E1E4E68BA00DED595 /* 84.xcdatamodeld in Sources */, 14D93C5F1E4E68BA00DED595 /* 113.xcdatamodeld in Sources */, + 14E269031E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14D93C601E4E68BA00DED595 /* 125.xcdatamodeld in Sources */, 1467389C1E7ADC1900913C8E /* SimpleModel.xcdatamodel in Sources */, 14D93C611E4E68BA00DED595 /* 151-many-to-many.xcdatamodeld in Sources */, @@ -2054,7 +2047,6 @@ 14D93C631E4E68BA00DED595 /* 151-ordered-to-many.xcdatamodeld in Sources */, 14D93C641E4E68BA00DED595 /* 151-to-many.xcdatamodeld in Sources */, 14D93C651E4E68BA00DED595 /* 157.xcdatamodeld in Sources */, - 441FA7B41E4EFF7C00023821 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14D93C661E4E68BA00DED595 /* 179.xcdatamodeld in Sources */, 14A84EEA1E4E748000701B8A /* 123.xcdatamodeld in Sources */, 14A84EFF1E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */, @@ -2129,6 +2121,7 @@ 14A84E5E1E4E6B2200701B8A /* JSON.swift in Sources */, 14A84E5F1E4E6B2300701B8A /* Helper.swift in Sources */, 14A84E601E4E6B2800701B8A /* NSArray+SyncTests.swift in Sources */, + 14E269041E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14A84E611E4E6B2800701B8A /* NSEntityDescription+SyncTests.swift in Sources */, 1467389D1E7ADC1900913C8E /* SimpleModel.xcdatamodel in Sources */, 14A84E621E4E6B2800701B8A /* NSManagedObject+SyncTests.swift in Sources */, @@ -2139,7 +2132,6 @@ 14A84E641E4E6B2800701B8A /* SyncTests.swift in Sources */, 14A84E651E4E6B2800701B8A /* SyncDelegateTests.swift in Sources */, 14A84E661E4E6B2800701B8A /* NSPersistentContainerTests.swift in Sources */, - 441FA7B51E4EFF7D00023821 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14A84E671E4E6B2800701B8A /* InsertOrUpdateTests.swift in Sources */, 14A84EEB1E4E748000701B8A /* 123.xcdatamodeld in Sources */, 14A84F001E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */, @@ -2214,11 +2206,11 @@ 14E2F0AA1E7ADFC600DF1776 /* NSString_SyncInflectionsTests.m in Sources */, 14E2F0A31E7ADFB500DF1776 /* LightweightMigrationModel.xcdatamodel in Sources */, 14E2F0A41E7ADFB500DF1776 /* ModelGroup.xcdatamodeld in Sources */, + 14E269051E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14E2F0A51E7ADFB500DF1776 /* SimpleModel.xcdatamodel in Sources */, 14E2F0A61E7ADFB500DF1776 /* Tests.swift in Sources */, 14E2F0EF1E7AE01600DF1776 /* Helper.swift in Sources */, 14E2F0A71E7ADFBA00DF1776 /* DateTests.swift in Sources */, - 14E2F0A81E7ADFC100DF1776 /* SyncPrimaryKey.xcdatamodeld in Sources */, 14E2F0A91E7ADFC100DF1776 /* PrimaryKeyTests.m in Sources */, 14E2F0AB1E7ADFD200DF1776 /* DictionaryTests.swift in Sources */, 14E2F0AC1E7ADFD200DF1776 /* FillWithDictionaryTests.swift in Sources */, @@ -3022,6 +3014,16 @@ sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; + 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 14E269021E7AF345007658C0 /* SyncPrimaryKey.xcdatamodel */, + ); + currentVersion = 14E269021E7AF345007658C0 /* SyncPrimaryKey.xcdatamodel */; + path = SyncPrimaryKey.xcdatamodeld; + sourceTree = "<group>"; + versionGroupType = wrapper.xcdatamodel; + }; 14E9C1391DEA2ECD00A21B9E /* 320.xcdatamodeld */ = { isa = XCVersionGroup; children = ( @@ -3342,16 +3344,6 @@ sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 441FA7AE1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodeld */ = { - isa = XCVersionGroup; - children = ( - 441FA7AF1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodel */, - ); - currentVersion = 441FA7AF1E4EFF4E00023821 /* SyncPrimaryKey.xcdatamodel */; - path = SyncPrimaryKey.xcdatamodeld; - sourceTree = "<group>"; - versionGroupType = wrapper.xcdatamodel; - }; 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */ = { isa = XCVersionGroup; children = ( From bea4a4a3f79250a1056881d28dfa75cd68d9b1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Nu=C3=B1ez?= <elvisnunez@me.com> Date: Thu, 16 Mar 2017 17:29:37 +0100 Subject: [PATCH 4/8] Update files --- Demo.xcodeproj/project.pbxproj | 2884 ++++++++++++++++---------------- 1 file changed, 1442 insertions(+), 1442 deletions(-) diff --git a/Demo.xcodeproj/project.pbxproj b/Demo.xcodeproj/project.pbxproj index 3b5241f9..afb2c53b 100644 --- a/Demo.xcodeproj/project.pbxproj +++ b/Demo.xcodeproj/project.pbxproj @@ -7,12 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 140944AB1DF0B9840037F85A /* 265.json in Resources */ = {isa = PBXBuildFile; fileRef = 140944AA1DF0B9840037F85A /* 265.json */; }; - 140944AC1DF0B9840037F85A /* 265.json in Resources */ = {isa = PBXBuildFile; fileRef = 140944AA1DF0B9840037F85A /* 265.json */; }; - 140944AD1DF0B9840037F85A /* 265.json in Resources */ = {isa = PBXBuildFile; fileRef = 140944AA1DF0B9840037F85A /* 265.json */; }; - 140D43281DFF4DBC00E3B159 /* 277.json in Resources */ = {isa = PBXBuildFile; fileRef = 140D43271DFF4DBC00E3B159 /* 277.json */; }; - 140D43291DFF4DBC00E3B159 /* 277.json in Resources */ = {isa = PBXBuildFile; fileRef = 140D43271DFF4DBC00E3B159 /* 277.json */; }; - 140D432A1DFF4DBC00E3B159 /* 277.json in Resources */ = {isa = PBXBuildFile; fileRef = 140D43271DFF4DBC00E3B159 /* 277.json */; }; 14241EA01DBC3A6F0042ED81 /* NSArray+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */; }; 14241EA11DBC3A6F0042ED81 /* NSEntityDescription+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */; }; 14241EA21DBC3A6F0042ED81 /* NSManagedObject+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; }; @@ -53,192 +47,444 @@ 1467388D1E7ADBA700913C8E /* DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; }; 1467388E1E7ADBA700913C8E /* DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; }; 1467388F1E7ADBA700913C8E /* DataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; }; - 146738961E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */; }; - 146738971E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */; }; - 146738991E7ADC1900913C8E /* ModelGroup.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 146738921E7ADC1900913C8E /* ModelGroup.xcdatamodeld */; }; - 1467389A1E7ADC1900913C8E /* ModelGroup.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 146738921E7ADC1900913C8E /* ModelGroup.xcdatamodeld */; }; - 1467389C1E7ADC1900913C8E /* SimpleModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */; }; - 1467389D1E7ADC1900913C8E /* SimpleModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */; }; - 1467389F1E7ADC1900913C8E /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146738951E7ADC1900913C8E /* Tests.swift */; }; - 146738A01E7ADC1900913C8E /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146738951E7ADC1900913C8E /* Tests.swift */; }; - 14975C641DBC373A0024901A /* 151-many-to-many-notes-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBDF1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json */; }; - 14975C651DBC373A0024901A /* 151-many-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE01D9F90B5001C8DA6 /* 151-many-to-many-notes.json */; }; - 14975C661DBC373A0024901A /* 151-many-to-many-tags.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE11D9F90B5001C8DA6 /* 151-many-to-many-tags.json */; }; - 14975C671DBC373A0024901A /* 151-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE21D9F90B5001C8DA6 /* 151-to-many-notes.json */; }; - 14975C681DBC373A0024901A /* 151-to-many-users-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE31D9F90B5001C8DA6 /* 151-to-many-users-update.json */; }; - 14975C691DBC373A0024901A /* 151-to-many-users.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE41D9F90B5001C8DA6 /* 151-to-many-users.json */; }; - 14975C6A1DBC373A0024901A /* 157-cities.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE51D9F90B5001C8DA6 /* 157-cities.json */; }; - 14975C6B1DBC373A0024901A /* 157-locations-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE61D9F90B5001C8DA6 /* 157-locations-update.json */; }; - 14975C6C1DBC373A0024901A /* 157-locations.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE71D9F90B5001C8DA6 /* 157-locations.json */; }; - 14975C6D1DBC373A0024901A /* 225-a-empty.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE81D9F90B5001C8DA6 /* 225-a-empty.json */; }; - 14975C6E1DBC373A0024901A /* 225-a-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE91D9F90B5001C8DA6 /* 225-a-null.json */; }; - 14975C6F1DBC373A0024901A /* 225-a-replaced.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEA1D9F90B5001C8DA6 /* 225-a-replaced.json */; }; - 14975C701DBC373A0024901A /* 225-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEB1D9F90B5001C8DA6 /* 225-a.json */; }; - 14975C711DBC373A0024901A /* 280.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEC1D9F90B5001C8DA6 /* 280.json */; }; - 14975C721DBC373A0024901A /* 283.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBED1D9F90B5001C8DA6 /* 283.json */; }; - 14975C731DBC373A0024901A /* bug-113-comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEE1D9F90B5001C8DA6 /* bug-113-comments-no-id.json */; }; - 14975C741DBC373A0024901A /* bug-113-custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEF1D9F90B5001C8DA6 /* bug-113-custom_relationship_key_to_one.json */; }; - 14975C751DBC373A0024901A /* bug-113-stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF01D9F90B5001C8DA6 /* bug-113-stories-comments-no-ids.json */; }; - 14975C761DBC373A0024901A /* bug-125-light.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF11D9F90B5001C8DA6 /* bug-125-light.json */; }; - 14975C771DBC373A0024901A /* bug-125.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF21D9F90B5001C8DA6 /* bug-125.json */; }; - 14975C781DBC373A0024901A /* bug-179-places.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF31D9F90B5001C8DA6 /* bug-179-places.json */; }; - 14975C791DBC373A0024901A /* bug-179-routes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF41D9F90B5001C8DA6 /* bug-179-routes.json */; }; - 14975C7A1DBC373A0024901A /* bug-202-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF51D9F90B5001C8DA6 /* bug-202-a.json */; }; - 14975C7B1DBC373A0024901A /* bug-202-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF61D9F90B5001C8DA6 /* bug-202-b.json */; }; - 14975C7C1DBC373A0024901A /* bug-239.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF71D9F90B5001C8DA6 /* bug-239.json */; }; - 14975C7D1DBC373A0024901A /* bug-254.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF81D9F90B5001C8DA6 /* bug-254.json */; }; - 14975C7E1DBC373A0024901A /* bug-257.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF91D9F90B5001C8DA6 /* bug-257.json */; }; - 14975C7F1DBC373A0024901A /* bug-number-84.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFA1D9F90B5001C8DA6 /* bug-number-84.json */; }; - 14975C801DBC373A0024901A /* camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFB1D9F90B5001C8DA6 /* camelcase.json */; }; - 14975C811DBC373A0024901A /* comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFC1D9F90B5001C8DA6 /* comments-no-id.json */; }; - 14975C821DBC373A0024901A /* custom_relationship_key_to_many.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFD1D9F90B5001C8DA6 /* custom_relationship_key_to_many.json */; }; - 14975C831DBC373A0024901A /* custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFE1D9F90B5001C8DA6 /* custom_relationship_key_to_one.json */; }; - 14975C841DBC373A0024901A /* id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFF1D9F90B5001C8DA6 /* id.json */; }; - 14975C851DBC373A0024901A /* images.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC001D9F90B5001C8DA6 /* images.json */; }; - 14975C861DBC373A0024901A /* markets_items.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC011D9F90B5001C8DA6 /* markets_items.json */; }; - 14975C871DBC373A0024901A /* notes_for_user_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC021D9F90B5001C8DA6 /* notes_for_user_a.json */; }; - 14975C881DBC373A0024901A /* notes_with_user_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC031D9F90B5001C8DA6 /* notes_with_user_id.json */; }; - 14975C891DBC373A0024901A /* notes_with_user_id_custom.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC041D9F90B5001C8DA6 /* notes_with_user_id_custom.json */; }; - 14975C8A1DBC373A0024901A /* numbers.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC051D9F90B5001C8DA6 /* numbers.json */; }; - 14975C8B1DBC373A0024901A /* numbers_in_collection.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC061D9F90B5001C8DA6 /* numbers_in_collection.json */; }; - 14975C8C1DBC373A0024901A /* operation-types-users-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC071D9F90B5001C8DA6 /* operation-types-users-a.json */; }; - 14975C8D1DBC373A0024901A /* operation-types-users-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC081D9F90B5001C8DA6 /* operation-types-users-b.json */; }; - 14975C8E1DBC373A0024901A /* organizations-tree.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC091D9F90B5001C8DA6 /* organizations-tree.json */; }; - 14975C8F1DBC373A0024901A /* patients.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0A1D9F90B5001C8DA6 /* patients.json */; }; - 14975C901DBC373A0024901A /* stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0B1D9F90B5001C8DA6 /* stories-comments-no-ids.json */; }; - 14975C911DBC373A0024901A /* story-summarize.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0C1D9F90B5001C8DA6 /* story-summarize.json */; }; - 14975C921DBC373A0024901A /* tagged_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0D1D9F90B5001C8DA6 /* tagged_notes.json */; }; - 14975C931DBC373A0024901A /* to-one-camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0E1D9F90B5001C8DA6 /* to-one-camelcase.json */; }; - 14975C941DBC373A0024901A /* to-one-snakecase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0F1D9F90B5001C8DA6 /* to-one-snakecase.json */; }; - 14975C951DBC373A0024901A /* unique.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC101D9F90B5001C8DA6 /* unique.json */; }; - 14975C961DBC373A0024901A /* users_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC111D9F90B5001C8DA6 /* users_a.json */; }; - 14975C971DBC373A0024901A /* users_b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC121D9F90B5001C8DA6 /* users_b.json */; }; - 14975C981DBC373A0024901A /* users_c.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC131D9F90B5001C8DA6 /* users_c.json */; }; - 14975C991DBC373A0024901A /* users_company.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC141D9F90B5001C8DA6 /* users_company.json */; }; - 14975C9A1DBC373A0024901A /* users_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC151D9F90B5001C8DA6 /* users_notes.json */; }; - 14975C9B1DBC373A0024901A /* note.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BBE1D9F9373007F9E26 /* note.json */; }; - 14975C9C1DBC373A0024901A /* simple.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BBF1D9F9373007F9E26 /* simple.json */; }; - 14975C9D1DBC373A0024901A /* users-with-nil.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC01D9F9373007F9E26 /* users-with-nil.json */; }; - 14975C9E1DBC373A0024901A /* users-with-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC11D9F9373007F9E26 /* users-with-null.json */; }; - 14975C9F1DBC373A0024901A /* users.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC21D9F9373007F9E26 /* users.json */; }; - 14975CA01DBC373A0024901A /* users2.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC31D9F9373007F9E26 /* users2.json */; }; - 14975CA11DBC373A0024901A /* users3.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC41D9F9373007F9E26 /* users3.json */; }; - 14975CA21DBC374C0024901A /* 151-many-to-many-notes-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBDF1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json */; }; - 14975CA31DBC374C0024901A /* 151-many-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE01D9F90B5001C8DA6 /* 151-many-to-many-notes.json */; }; - 14975CA41DBC374C0024901A /* 151-many-to-many-tags.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE11D9F90B5001C8DA6 /* 151-many-to-many-tags.json */; }; - 14975CA51DBC374C0024901A /* 151-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE21D9F90B5001C8DA6 /* 151-to-many-notes.json */; }; - 14975CA61DBC374C0024901A /* 151-to-many-users-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE31D9F90B5001C8DA6 /* 151-to-many-users-update.json */; }; - 14975CA71DBC374C0024901A /* 151-to-many-users.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE41D9F90B5001C8DA6 /* 151-to-many-users.json */; }; - 14975CA81DBC374C0024901A /* 157-cities.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE51D9F90B5001C8DA6 /* 157-cities.json */; }; - 14975CA91DBC374C0024901A /* 157-locations-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE61D9F90B5001C8DA6 /* 157-locations-update.json */; }; - 14975CAA1DBC374C0024901A /* 157-locations.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE71D9F90B5001C8DA6 /* 157-locations.json */; }; - 14975CAB1DBC374C0024901A /* 225-a-empty.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE81D9F90B5001C8DA6 /* 225-a-empty.json */; }; - 14975CAC1DBC374C0024901A /* 225-a-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE91D9F90B5001C8DA6 /* 225-a-null.json */; }; - 14975CAD1DBC374C0024901A /* 225-a-replaced.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEA1D9F90B5001C8DA6 /* 225-a-replaced.json */; }; - 14975CAE1DBC374C0024901A /* 225-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEB1D9F90B5001C8DA6 /* 225-a.json */; }; - 14975CAF1DBC374C0024901A /* 280.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEC1D9F90B5001C8DA6 /* 280.json */; }; - 14975CB01DBC374C0024901A /* 283.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBED1D9F90B5001C8DA6 /* 283.json */; }; - 14975CB11DBC374C0024901A /* bug-113-comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEE1D9F90B5001C8DA6 /* bug-113-comments-no-id.json */; }; - 14975CB21DBC374C0024901A /* bug-113-custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEF1D9F90B5001C8DA6 /* bug-113-custom_relationship_key_to_one.json */; }; - 14975CB31DBC374C0024901A /* bug-113-stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF01D9F90B5001C8DA6 /* bug-113-stories-comments-no-ids.json */; }; - 14975CB41DBC374C0024901A /* bug-125-light.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF11D9F90B5001C8DA6 /* bug-125-light.json */; }; - 14975CB51DBC374C0024901A /* bug-125.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF21D9F90B5001C8DA6 /* bug-125.json */; }; - 14975CB61DBC374C0024901A /* bug-179-places.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF31D9F90B5001C8DA6 /* bug-179-places.json */; }; - 14975CB71DBC374C0024901A /* bug-179-routes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF41D9F90B5001C8DA6 /* bug-179-routes.json */; }; - 14975CB81DBC374C0024901A /* bug-202-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF51D9F90B5001C8DA6 /* bug-202-a.json */; }; - 14975CB91DBC374C0024901A /* bug-202-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF61D9F90B5001C8DA6 /* bug-202-b.json */; }; - 14975CBA1DBC374C0024901A /* bug-239.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF71D9F90B5001C8DA6 /* bug-239.json */; }; - 14975CBB1DBC374C0024901A /* bug-254.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF81D9F90B5001C8DA6 /* bug-254.json */; }; - 14975CBC1DBC374C0024901A /* bug-257.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF91D9F90B5001C8DA6 /* bug-257.json */; }; - 14975CBD1DBC374C0024901A /* bug-number-84.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFA1D9F90B5001C8DA6 /* bug-number-84.json */; }; - 14975CBE1DBC374C0024901A /* camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFB1D9F90B5001C8DA6 /* camelcase.json */; }; - 14975CBF1DBC374C0024901A /* comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFC1D9F90B5001C8DA6 /* comments-no-id.json */; }; - 14975CC01DBC374C0024901A /* custom_relationship_key_to_many.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFD1D9F90B5001C8DA6 /* custom_relationship_key_to_many.json */; }; - 14975CC11DBC374C0024901A /* custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFE1D9F90B5001C8DA6 /* custom_relationship_key_to_one.json */; }; - 14975CC21DBC374C0024901A /* id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFF1D9F90B5001C8DA6 /* id.json */; }; - 14975CC31DBC374C0024901A /* images.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC001D9F90B5001C8DA6 /* images.json */; }; - 14975CC41DBC374C0024901A /* markets_items.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC011D9F90B5001C8DA6 /* markets_items.json */; }; - 14975CC51DBC374C0024901A /* notes_for_user_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC021D9F90B5001C8DA6 /* notes_for_user_a.json */; }; - 14975CC61DBC374C0024901A /* notes_with_user_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC031D9F90B5001C8DA6 /* notes_with_user_id.json */; }; - 14975CC71DBC374C0024901A /* notes_with_user_id_custom.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC041D9F90B5001C8DA6 /* notes_with_user_id_custom.json */; }; - 14975CC81DBC374C0024901A /* numbers.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC051D9F90B5001C8DA6 /* numbers.json */; }; - 14975CC91DBC374C0024901A /* numbers_in_collection.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC061D9F90B5001C8DA6 /* numbers_in_collection.json */; }; - 14975CCA1DBC374C0024901A /* operation-types-users-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC071D9F90B5001C8DA6 /* operation-types-users-a.json */; }; - 14975CCB1DBC374C0024901A /* operation-types-users-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC081D9F90B5001C8DA6 /* operation-types-users-b.json */; }; - 14975CCC1DBC374C0024901A /* organizations-tree.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC091D9F90B5001C8DA6 /* organizations-tree.json */; }; - 14975CCD1DBC374C0024901A /* patients.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0A1D9F90B5001C8DA6 /* patients.json */; }; - 14975CCE1DBC374C0024901A /* stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0B1D9F90B5001C8DA6 /* stories-comments-no-ids.json */; }; - 14975CCF1DBC374C0024901A /* story-summarize.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0C1D9F90B5001C8DA6 /* story-summarize.json */; }; - 14975CD01DBC374C0024901A /* tagged_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0D1D9F90B5001C8DA6 /* tagged_notes.json */; }; - 14975CD11DBC374C0024901A /* to-one-camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0E1D9F90B5001C8DA6 /* to-one-camelcase.json */; }; - 14975CD21DBC374C0024901A /* to-one-snakecase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0F1D9F90B5001C8DA6 /* to-one-snakecase.json */; }; - 14975CD31DBC374C0024901A /* unique.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC101D9F90B5001C8DA6 /* unique.json */; }; - 14975CD41DBC374C0024901A /* users_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC111D9F90B5001C8DA6 /* users_a.json */; }; - 14975CD51DBC374C0024901A /* users_b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC121D9F90B5001C8DA6 /* users_b.json */; }; - 14975CD61DBC374C0024901A /* users_c.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC131D9F90B5001C8DA6 /* users_c.json */; }; - 14975CD71DBC374C0024901A /* users_company.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC141D9F90B5001C8DA6 /* users_company.json */; }; - 14975CD81DBC374C0024901A /* users_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC151D9F90B5001C8DA6 /* users_notes.json */; }; - 14975CD91DBC374C0024901A /* note.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BBE1D9F9373007F9E26 /* note.json */; }; - 14975CDA1DBC374C0024901A /* simple.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BBF1D9F9373007F9E26 /* simple.json */; }; - 14975CDB1DBC374C0024901A /* users-with-nil.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC01D9F9373007F9E26 /* users-with-nil.json */; }; - 14975CDC1DBC374C0024901A /* users-with-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC11D9F9373007F9E26 /* users-with-null.json */; }; - 14975CDD1DBC374C0024901A /* users.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC21D9F9373007F9E26 /* users.json */; }; - 14975CDE1DBC374C0024901A /* users2.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC31D9F9373007F9E26 /* users2.json */; }; - 14975CDF1DBC374C0024901A /* users3.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC41D9F9373007F9E26 /* users3.json */; }; - 14A84E5E1E4E6B2200701B8A /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C046341DBC19D300CB6C16 /* JSON.swift */; }; - 14A84E5F1E4E6B2300701B8A /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DBDD1D9F90B5001C8DA6 /* Helper.swift */; }; - 14A84E601E4E6B2800701B8A /* NSArray+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC551D9F90B5001C8DA6 /* NSArray+SyncTests.swift */; }; - 14A84E611E4E6B2800701B8A /* NSEntityDescription+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC561D9F90B5001C8DA6 /* NSEntityDescription+SyncTests.swift */; }; - 14A84E621E4E6B2800701B8A /* NSManagedObject+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC571D9F90B5001C8DA6 /* NSManagedObject+SyncTests.swift */; }; - 14A84E631E4E6B2800701B8A /* NSManagedObjectContext+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC581D9F90B5001C8DA6 /* NSManagedObjectContext+SyncTests.swift */; }; - 14A84E641E4E6B2800701B8A /* SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC591D9F90B5001C8DA6 /* SyncTests.swift */; }; - 14A84E651E4E6B2800701B8A /* SyncDelegateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14BA60E81DC0247700C97D6F /* SyncDelegateTests.swift */; }; - 14A84E661E4E6B2800701B8A /* NSPersistentContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14E2852E1DC173A800C4E461 /* NSPersistentContainerTests.swift */; }; - 14A84E671E4E6B2800701B8A /* InsertOrUpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146EB24D1DEF75D70068EDC3 /* InsertOrUpdateTests.swift */; }; - 14A84E681E4E6B2800701B8A /* UpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 444546D51DF06E2600CC7928 /* UpdateTests.swift */; }; - 14A84E691E4E6B2800701B8A /* DeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146EB24C1DEF75D70068EDC3 /* DeleteTests.swift */; }; - 14A84E6A1E4E6B2800701B8A /* FetchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44584FDB1DF2EE550082D7A0 /* FetchTests.swift */; }; - 14A84E6B1E4E6B2F00701B8A /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */; }; - 14A84E6C1E4E6B2F00701B8A /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CC760F1D9F9076003545A4 /* TestCheckTests.swift */; }; - 14A84E6D1E4E6B3400701B8A /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */; }; - 14A84E6E1E4E6B4100701B8A /* 3ca82a0.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4E28B59E1DEE43F8007FED27 /* 3ca82a0.xcdatamodeld */; }; - 14A84E6F1E4E6B4100701B8A /* 84.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC351D9F90B5001C8DA6 /* 84.xcdatamodeld */; }; - 14A84E701E4E6B4100701B8A /* 113.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC251D9F90B5001C8DA6 /* 113.xcdatamodeld */; }; - 14A84E711E4E6B4100701B8A /* 125.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC271D9F90B5001C8DA6 /* 125.xcdatamodeld */; }; - 14A84E721E4E6B4100701B8A /* 151-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC171D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodeld */; }; - 14A84E731E4E6B4100701B8A /* 151-ordered-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC191D9F90B5001C8DA6 /* 151-ordered-many-to-many.xcdatamodeld */; }; - 14A84E741E4E6B4100701B8A /* 151-ordered-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1B1D9F90B5001C8DA6 /* 151-ordered-to-many.xcdatamodeld */; }; - 14A84E751E4E6B4100701B8A /* 151-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1D1D9F90B5001C8DA6 /* 151-to-many.xcdatamodeld */; }; - 14A84E761E4E6B4100701B8A /* 157.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC291D9F90B5001C8DA6 /* 157.xcdatamodeld */; }; - 14A84E771E4E6B4100701B8A /* 179.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2B1D9F90B5001C8DA6 /* 179.xcdatamodeld */; }; - 14A84E781E4E6B4100701B8A /* 202.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2D1D9F90B5001C8DA6 /* 202.xcdatamodeld */; }; - 14A84E791E4E6B4100701B8A /* 225.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1F1D9F90B5001C8DA6 /* 225.xcdatamodeld */; }; - 14A84E7A1E4E6B4100701B8A /* 233.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4E2F71E71DD3DD56003F0108 /* 233.xcdatamodeld */; }; - 14A84E7B1E4E6B4100701B8A /* 239.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2F1D9F90B5001C8DA6 /* 239.xcdatamodeld */; }; - 14A84E7C1E4E6B4100701B8A /* 254.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC311D9F90B5001C8DA6 /* 254.xcdatamodeld */; }; - 14A84E7D1E4E6B4100701B8A /* 257.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC331D9F90B5001C8DA6 /* 257.xcdatamodeld */; }; - 14A84E7E1E4E6B4100701B8A /* 265.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 140944AE1DF0BC280037F85A /* 265.xcdatamodeld */; }; - 14A84E7F1E4E6B4100701B8A /* 277.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 140D43221DFF4D3A00E3B159 /* 277.xcdatamodeld */; }; - 14A84E801E4E6B4100701B8A /* 280.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC211D9F90B5001C8DA6 /* 280.xcdatamodeld */; }; - 14A84E811E4E6B4100701B8A /* 283.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC231D9F90B5001C8DA6 /* 283.xcdatamodeld */; }; - 14A84E821E4E6B4100701B8A /* 320.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E9C1391DEA2ECD00A21B9E /* 320.xcdatamodeld */; }; - 14A84E831E4E6B4100701B8A /* Camelcase.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC371D9F90B5001C8DA6 /* Camelcase.xcdatamodeld */; }; - 14A84E841E4E6B4100701B8A /* Contacts.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC391D9F90B5001C8DA6 /* Contacts.xcdatamodeld */; }; - 14A84E851E4E6B4100701B8A /* CustomRelationshipKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3B1D9F90B5001C8DA6 /* CustomRelationshipKey.xcdatamodeld */; }; - 14A84E861E4E6B4100701B8A /* id.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3D1D9F90B5001C8DA6 /* id.xcdatamodeld */; }; - 14A84E871E4E6B4100701B8A /* InsertObjectsInParent.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3F1D9F90B5001C8DA6 /* InsertObjectsInParent.xcdatamodeld */; }; - 14A84E881E4E6B4100701B8A /* Markets.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC411D9F90B5001C8DA6 /* Markets.xcdatamodeld */; }; - 14A84E891E4E6B4100701B8A /* Notes.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC431D9F90B5001C8DA6 /* Notes.xcdatamodeld */; }; - 14A84E8A1E4E6B4100701B8A /* NotesB.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC451D9F90B5001C8DA6 /* NotesB.xcdatamodeld */; }; - 14A84E8B1E4E6B4100701B8A /* OrderedSocial.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC471D9F90B5001C8DA6 /* OrderedSocial.xcdatamodeld */; }; - 14A84E8C1E4E6B4100701B8A /* Organizations.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC491D9F90B5001C8DA6 /* Organizations.xcdatamodeld */; }; - 14A84E8D1E4E6B4100701B8A /* Patients.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4B1D9F90B5001C8DA6 /* Patients.xcdatamodeld */; }; - 14A84E8E1E4E6B4100701B8A /* Recursive.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4D1D9F90B5001C8DA6 /* Recursive.xcdatamodeld */; }; - 14A84E8F1E4E6B4100701B8A /* Social.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4F1D9F90B5001C8DA6 /* Social.xcdatamodeld */; }; - 14A84E901E4E6B4100701B8A /* Tests.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 1421405B1DBCDD52000FF107 /* Tests.xcdatamodeld */; }; - 14A84E911E4E6B4100701B8A /* ToOne.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC511D9F90B5001C8DA6 /* ToOne.xcdatamodeld */; }; - 14A84E921E4E6B4100701B8A /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC531D9F90B5001C8DA6 /* Unique.xcdatamodeld */; }; - 14A84E931E4E6B4A00701B8A /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */; }; + 14867DD31E7AF4D2001D228A /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D011E7AF4D1001D228A /* DataFilter.xcdatamodeld */; }; + 14867DD41E7AF4D2001D228A /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D011E7AF4D1001D228A /* DataFilter.xcdatamodeld */; }; + 14867DD51E7AF4D2001D228A /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D011E7AF4D1001D228A /* DataFilter.xcdatamodeld */; }; + 14867DD61E7AF4D2001D228A /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D031E7AF4D1001D228A /* DataFilterTests.swift */; }; + 14867DD71E7AF4D2001D228A /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D031E7AF4D1001D228A /* DataFilterTests.swift */; }; + 14867DD81E7AF4D2001D228A /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D031E7AF4D1001D228A /* DataFilterTests.swift */; }; + 14867DD91E7AF4D2001D228A /* note.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D041E7AF4D1001D228A /* note.json */; }; + 14867DDA1E7AF4D2001D228A /* note.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D041E7AF4D1001D228A /* note.json */; }; + 14867DDB1E7AF4D2001D228A /* note.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D041E7AF4D1001D228A /* note.json */; }; + 14867DDC1E7AF4D2001D228A /* simple.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D051E7AF4D1001D228A /* simple.json */; }; + 14867DDD1E7AF4D2001D228A /* simple.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D051E7AF4D1001D228A /* simple.json */; }; + 14867DDE1E7AF4D2001D228A /* simple.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D051E7AF4D1001D228A /* simple.json */; }; + 14867DDF1E7AF4D2001D228A /* users-with-nil.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D061E7AF4D1001D228A /* users-with-nil.json */; }; + 14867DE01E7AF4D2001D228A /* users-with-nil.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D061E7AF4D1001D228A /* users-with-nil.json */; }; + 14867DE11E7AF4D2001D228A /* users-with-nil.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D061E7AF4D1001D228A /* users-with-nil.json */; }; + 14867DE21E7AF4D2001D228A /* users-with-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D071E7AF4D1001D228A /* users-with-null.json */; }; + 14867DE31E7AF4D2001D228A /* users-with-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D071E7AF4D1001D228A /* users-with-null.json */; }; + 14867DE41E7AF4D2001D228A /* users-with-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D071E7AF4D1001D228A /* users-with-null.json */; }; + 14867DE51E7AF4D2001D228A /* users.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D081E7AF4D1001D228A /* users.json */; }; + 14867DE61E7AF4D2001D228A /* users.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D081E7AF4D1001D228A /* users.json */; }; + 14867DE71E7AF4D2001D228A /* users.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D081E7AF4D1001D228A /* users.json */; }; + 14867DE81E7AF4D2001D228A /* users2.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D091E7AF4D1001D228A /* users2.json */; }; + 14867DE91E7AF4D2001D228A /* users2.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D091E7AF4D1001D228A /* users2.json */; }; + 14867DEA1E7AF4D2001D228A /* users2.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D091E7AF4D1001D228A /* users2.json */; }; + 14867DEB1E7AF4D2001D228A /* users3.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D0A1E7AF4D2001D228A /* users3.json */; }; + 14867DEC1E7AF4D2001D228A /* users3.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D0A1E7AF4D2001D228A /* users3.json */; }; + 14867DED1E7AF4D2001D228A /* users3.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D0A1E7AF4D2001D228A /* users3.json */; }; + 14867DEE1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0C1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel */; }; + 14867DEF1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0C1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel */; }; + 14867DF01E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0C1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel */; }; + 14867DF11E7AF4D2001D228A /* ModelGroup.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0D1E7AF4D2001D228A /* ModelGroup.xcdatamodeld */; }; + 14867DF21E7AF4D2001D228A /* ModelGroup.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0D1E7AF4D2001D228A /* ModelGroup.xcdatamodeld */; }; + 14867DF31E7AF4D2001D228A /* ModelGroup.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0D1E7AF4D2001D228A /* ModelGroup.xcdatamodeld */; }; + 14867DF41E7AF4D2001D228A /* SimpleModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0F1E7AF4D2001D228A /* SimpleModel.xcdatamodel */; }; + 14867DF51E7AF4D2001D228A /* SimpleModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0F1E7AF4D2001D228A /* SimpleModel.xcdatamodel */; }; + 14867DF61E7AF4D2001D228A /* SimpleModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 14867D0F1E7AF4D2001D228A /* SimpleModel.xcdatamodel */; }; + 14867DF71E7AF4D2001D228A /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D101E7AF4D2001D228A /* Tests.swift */; }; + 14867DF81E7AF4D2001D228A /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D101E7AF4D2001D228A /* Tests.swift */; }; + 14867DF91E7AF4D2001D228A /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D101E7AF4D2001D228A /* Tests.swift */; }; + 14867DFA1E7AF4D2001D228A /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D121E7AF4D2001D228A /* DateTests.swift */; }; + 14867DFB1E7AF4D2001D228A /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D121E7AF4D2001D228A /* DateTests.swift */; }; + 14867DFC1E7AF4D2001D228A /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D121E7AF4D2001D228A /* DateTests.swift */; }; + 14867DFD1E7AF4D2001D228A /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867D141E7AF4D2001D228A /* PrimaryKeyTests.m */; }; + 14867DFE1E7AF4D2001D228A /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867D141E7AF4D2001D228A /* PrimaryKeyTests.m */; }; + 14867DFF1E7AF4D2001D228A /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867D141E7AF4D2001D228A /* PrimaryKeyTests.m */; }; + 14867E001E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D151E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld */; }; + 14867E011E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D151E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld */; }; + 14867E021E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D151E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld */; }; + 14867E031E7AF4D2001D228A /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867D181E7AF4D2001D228A /* NSString_SyncInflectionsTests.m */; }; + 14867E041E7AF4D2001D228A /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867D181E7AF4D2001D228A /* NSString_SyncInflectionsTests.m */; }; + 14867E051E7AF4D2001D228A /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867D181E7AF4D2001D228A /* NSString_SyncInflectionsTests.m */; }; + 14867E061E7AF4D2001D228A /* DeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1A1E7AF4D2001D228A /* DeleteTests.swift */; }; + 14867E071E7AF4D2001D228A /* DeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1A1E7AF4D2001D228A /* DeleteTests.swift */; }; + 14867E081E7AF4D2001D228A /* DeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1A1E7AF4D2001D228A /* DeleteTests.swift */; }; + 14867E091E7AF4D2001D228A /* FetchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1B1E7AF4D2001D228A /* FetchTests.swift */; }; + 14867E0A1E7AF4D2001D228A /* FetchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1B1E7AF4D2001D228A /* FetchTests.swift */; }; + 14867E0B1E7AF4D2001D228A /* FetchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1B1E7AF4D2001D228A /* FetchTests.swift */; }; + 14867E0C1E7AF4D2001D228A /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1D1E7AF4D2001D228A /* Helper.swift */; }; + 14867E0D1E7AF4D2001D228A /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1D1E7AF4D2001D228A /* Helper.swift */; }; + 14867E0E1E7AF4D2001D228A /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1D1E7AF4D2001D228A /* Helper.swift */; }; + 14867E0F1E7AF4D2001D228A /* InsertOrUpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1E1E7AF4D2001D228A /* InsertOrUpdateTests.swift */; }; + 14867E101E7AF4D2001D228A /* InsertOrUpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1E1E7AF4D2001D228A /* InsertOrUpdateTests.swift */; }; + 14867E111E7AF4D2001D228A /* InsertOrUpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867D1E1E7AF4D2001D228A /* InsertOrUpdateTests.swift */; }; + 14867E121E7AF4D2001D228A /* 151-many-to-many-notes-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D201E7AF4D2001D228A /* 151-many-to-many-notes-update.json */; }; + 14867E131E7AF4D2001D228A /* 151-many-to-many-notes-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D201E7AF4D2001D228A /* 151-many-to-many-notes-update.json */; }; + 14867E141E7AF4D2001D228A /* 151-many-to-many-notes-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D201E7AF4D2001D228A /* 151-many-to-many-notes-update.json */; }; + 14867E151E7AF4D2001D228A /* 151-many-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D211E7AF4D2001D228A /* 151-many-to-many-notes.json */; }; + 14867E161E7AF4D2001D228A /* 151-many-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D211E7AF4D2001D228A /* 151-many-to-many-notes.json */; }; + 14867E171E7AF4D2001D228A /* 151-many-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D211E7AF4D2001D228A /* 151-many-to-many-notes.json */; }; + 14867E181E7AF4D2001D228A /* 151-many-to-many-tags.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D221E7AF4D2001D228A /* 151-many-to-many-tags.json */; }; + 14867E191E7AF4D2001D228A /* 151-many-to-many-tags.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D221E7AF4D2001D228A /* 151-many-to-many-tags.json */; }; + 14867E1A1E7AF4D2001D228A /* 151-many-to-many-tags.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D221E7AF4D2001D228A /* 151-many-to-many-tags.json */; }; + 14867E1B1E7AF4D2001D228A /* 151-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D231E7AF4D2001D228A /* 151-to-many-notes.json */; }; + 14867E1C1E7AF4D2001D228A /* 151-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D231E7AF4D2001D228A /* 151-to-many-notes.json */; }; + 14867E1D1E7AF4D2001D228A /* 151-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D231E7AF4D2001D228A /* 151-to-many-notes.json */; }; + 14867E1E1E7AF4D2001D228A /* 151-to-many-users-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D241E7AF4D2001D228A /* 151-to-many-users-update.json */; }; + 14867E1F1E7AF4D2001D228A /* 151-to-many-users-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D241E7AF4D2001D228A /* 151-to-many-users-update.json */; }; + 14867E201E7AF4D2001D228A /* 151-to-many-users-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D241E7AF4D2001D228A /* 151-to-many-users-update.json */; }; + 14867E211E7AF4D2001D228A /* 151-to-many-users.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D251E7AF4D2001D228A /* 151-to-many-users.json */; }; + 14867E221E7AF4D2001D228A /* 151-to-many-users.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D251E7AF4D2001D228A /* 151-to-many-users.json */; }; + 14867E231E7AF4D2001D228A /* 151-to-many-users.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D251E7AF4D2001D228A /* 151-to-many-users.json */; }; + 14867E241E7AF4D2001D228A /* 157-cities.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D261E7AF4D2001D228A /* 157-cities.json */; }; + 14867E251E7AF4D2001D228A /* 157-cities.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D261E7AF4D2001D228A /* 157-cities.json */; }; + 14867E261E7AF4D2001D228A /* 157-cities.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D261E7AF4D2001D228A /* 157-cities.json */; }; + 14867E271E7AF4D2001D228A /* 157-locations-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D271E7AF4D2001D228A /* 157-locations-update.json */; }; + 14867E281E7AF4D2001D228A /* 157-locations-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D271E7AF4D2001D228A /* 157-locations-update.json */; }; + 14867E291E7AF4D2001D228A /* 157-locations-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D271E7AF4D2001D228A /* 157-locations-update.json */; }; + 14867E2A1E7AF4D2001D228A /* 157-locations.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D281E7AF4D2001D228A /* 157-locations.json */; }; + 14867E2B1E7AF4D2001D228A /* 157-locations.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D281E7AF4D2001D228A /* 157-locations.json */; }; + 14867E2C1E7AF4D2001D228A /* 157-locations.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D281E7AF4D2001D228A /* 157-locations.json */; }; + 14867E2D1E7AF4D2001D228A /* 225-a-empty.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D291E7AF4D2001D228A /* 225-a-empty.json */; }; + 14867E2E1E7AF4D2001D228A /* 225-a-empty.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D291E7AF4D2001D228A /* 225-a-empty.json */; }; + 14867E2F1E7AF4D2001D228A /* 225-a-empty.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D291E7AF4D2001D228A /* 225-a-empty.json */; }; + 14867E301E7AF4D2001D228A /* 225-a-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2A1E7AF4D2001D228A /* 225-a-null.json */; }; + 14867E311E7AF4D2001D228A /* 225-a-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2A1E7AF4D2001D228A /* 225-a-null.json */; }; + 14867E321E7AF4D2001D228A /* 225-a-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2A1E7AF4D2001D228A /* 225-a-null.json */; }; + 14867E331E7AF4D2001D228A /* 225-a-replaced.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2B1E7AF4D2001D228A /* 225-a-replaced.json */; }; + 14867E341E7AF4D2001D228A /* 225-a-replaced.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2B1E7AF4D2001D228A /* 225-a-replaced.json */; }; + 14867E351E7AF4D2001D228A /* 225-a-replaced.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2B1E7AF4D2001D228A /* 225-a-replaced.json */; }; + 14867E361E7AF4D2001D228A /* 225-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2C1E7AF4D2001D228A /* 225-a.json */; }; + 14867E371E7AF4D2001D228A /* 225-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2C1E7AF4D2001D228A /* 225-a.json */; }; + 14867E381E7AF4D2001D228A /* 225-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2C1E7AF4D2001D228A /* 225-a.json */; }; + 14867E391E7AF4D2001D228A /* 233.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2D1E7AF4D2001D228A /* 233.json */; }; + 14867E3A1E7AF4D2001D228A /* 233.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2D1E7AF4D2001D228A /* 233.json */; }; + 14867E3B1E7AF4D2001D228A /* 233.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2D1E7AF4D2001D228A /* 233.json */; }; + 14867E3C1E7AF4D2001D228A /* 237.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2E1E7AF4D2001D228A /* 237.json */; }; + 14867E3D1E7AF4D2001D228A /* 237.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2E1E7AF4D2001D228A /* 237.json */; }; + 14867E3E1E7AF4D2001D228A /* 237.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2E1E7AF4D2001D228A /* 237.json */; }; + 14867E3F1E7AF4D2001D228A /* 265.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2F1E7AF4D2001D228A /* 265.json */; }; + 14867E401E7AF4D2001D228A /* 265.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2F1E7AF4D2001D228A /* 265.json */; }; + 14867E411E7AF4D2001D228A /* 265.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D2F1E7AF4D2001D228A /* 265.json */; }; + 14867E421E7AF4D2001D228A /* 277.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D301E7AF4D2001D228A /* 277.json */; }; + 14867E431E7AF4D2001D228A /* 277.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D301E7AF4D2001D228A /* 277.json */; }; + 14867E441E7AF4D2001D228A /* 277.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D301E7AF4D2001D228A /* 277.json */; }; + 14867E451E7AF4D2001D228A /* 280.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D311E7AF4D2001D228A /* 280.json */; }; + 14867E461E7AF4D2001D228A /* 280.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D311E7AF4D2001D228A /* 280.json */; }; + 14867E471E7AF4D2001D228A /* 280.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D311E7AF4D2001D228A /* 280.json */; }; + 14867E481E7AF4D2001D228A /* 283.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D321E7AF4D2001D228A /* 283.json */; }; + 14867E491E7AF4D2001D228A /* 283.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D321E7AF4D2001D228A /* 283.json */; }; + 14867E4A1E7AF4D2001D228A /* 283.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D321E7AF4D2001D228A /* 283.json */; }; + 14867E4B1E7AF4D2001D228A /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D331E7AF4D2001D228A /* 320.json */; }; + 14867E4C1E7AF4D2001D228A /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D331E7AF4D2001D228A /* 320.json */; }; + 14867E4D1E7AF4D2001D228A /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D331E7AF4D2001D228A /* 320.json */; }; + 14867E4E1E7AF4D2001D228A /* 3ca82a0.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D341E7AF4D2001D228A /* 3ca82a0.json */; }; + 14867E4F1E7AF4D2001D228A /* 3ca82a0.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D341E7AF4D2001D228A /* 3ca82a0.json */; }; + 14867E501E7AF4D2001D228A /* 3ca82a0.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D341E7AF4D2001D228A /* 3ca82a0.json */; }; + 14867E511E7AF4D2001D228A /* bug-113-comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D351E7AF4D2001D228A /* bug-113-comments-no-id.json */; }; + 14867E521E7AF4D2001D228A /* bug-113-comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D351E7AF4D2001D228A /* bug-113-comments-no-id.json */; }; + 14867E531E7AF4D2001D228A /* bug-113-comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D351E7AF4D2001D228A /* bug-113-comments-no-id.json */; }; + 14867E541E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D361E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json */; }; + 14867E551E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D361E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json */; }; + 14867E561E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D361E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json */; }; + 14867E571E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D371E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json */; }; + 14867E581E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D371E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json */; }; + 14867E591E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D371E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json */; }; + 14867E5A1E7AF4D2001D228A /* bug-125-light.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D381E7AF4D2001D228A /* bug-125-light.json */; }; + 14867E5B1E7AF4D2001D228A /* bug-125-light.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D381E7AF4D2001D228A /* bug-125-light.json */; }; + 14867E5C1E7AF4D2001D228A /* bug-125-light.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D381E7AF4D2001D228A /* bug-125-light.json */; }; + 14867E5D1E7AF4D2001D228A /* bug-125.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D391E7AF4D2001D228A /* bug-125.json */; }; + 14867E5E1E7AF4D2001D228A /* bug-125.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D391E7AF4D2001D228A /* bug-125.json */; }; + 14867E5F1E7AF4D2001D228A /* bug-125.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D391E7AF4D2001D228A /* bug-125.json */; }; + 14867E601E7AF4D2001D228A /* bug-179-places.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3A1E7AF4D2001D228A /* bug-179-places.json */; }; + 14867E611E7AF4D2001D228A /* bug-179-places.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3A1E7AF4D2001D228A /* bug-179-places.json */; }; + 14867E621E7AF4D2001D228A /* bug-179-places.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3A1E7AF4D2001D228A /* bug-179-places.json */; }; + 14867E631E7AF4D2001D228A /* bug-179-routes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3B1E7AF4D2001D228A /* bug-179-routes.json */; }; + 14867E641E7AF4D2001D228A /* bug-179-routes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3B1E7AF4D2001D228A /* bug-179-routes.json */; }; + 14867E651E7AF4D2001D228A /* bug-179-routes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3B1E7AF4D2001D228A /* bug-179-routes.json */; }; + 14867E661E7AF4D2001D228A /* bug-202-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3C1E7AF4D2001D228A /* bug-202-a.json */; }; + 14867E671E7AF4D2001D228A /* bug-202-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3C1E7AF4D2001D228A /* bug-202-a.json */; }; + 14867E681E7AF4D2001D228A /* bug-202-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3C1E7AF4D2001D228A /* bug-202-a.json */; }; + 14867E691E7AF4D2001D228A /* bug-202-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3D1E7AF4D2001D228A /* bug-202-b.json */; }; + 14867E6A1E7AF4D2001D228A /* bug-202-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3D1E7AF4D2001D228A /* bug-202-b.json */; }; + 14867E6B1E7AF4D2001D228A /* bug-202-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3D1E7AF4D2001D228A /* bug-202-b.json */; }; + 14867E6C1E7AF4D2001D228A /* bug-239.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3E1E7AF4D2001D228A /* bug-239.json */; }; + 14867E6D1E7AF4D2001D228A /* bug-239.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3E1E7AF4D2001D228A /* bug-239.json */; }; + 14867E6E1E7AF4D2001D228A /* bug-239.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3E1E7AF4D2001D228A /* bug-239.json */; }; + 14867E6F1E7AF4D2001D228A /* bug-254.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3F1E7AF4D2001D228A /* bug-254.json */; }; + 14867E701E7AF4D2001D228A /* bug-254.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3F1E7AF4D2001D228A /* bug-254.json */; }; + 14867E711E7AF4D2001D228A /* bug-254.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D3F1E7AF4D2001D228A /* bug-254.json */; }; + 14867E721E7AF4D2001D228A /* bug-257.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D401E7AF4D2001D228A /* bug-257.json */; }; + 14867E731E7AF4D2001D228A /* bug-257.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D401E7AF4D2001D228A /* bug-257.json */; }; + 14867E741E7AF4D2001D228A /* bug-257.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D401E7AF4D2001D228A /* bug-257.json */; }; + 14867E751E7AF4D2001D228A /* bug-number-84.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D411E7AF4D2001D228A /* bug-number-84.json */; }; + 14867E761E7AF4D2001D228A /* bug-number-84.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D411E7AF4D2001D228A /* bug-number-84.json */; }; + 14867E771E7AF4D2001D228A /* bug-number-84.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D411E7AF4D2001D228A /* bug-number-84.json */; }; + 14867E781E7AF4D2001D228A /* camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D421E7AF4D2001D228A /* camelcase.json */; }; + 14867E791E7AF4D2001D228A /* camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D421E7AF4D2001D228A /* camelcase.json */; }; + 14867E7A1E7AF4D2001D228A /* camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D421E7AF4D2001D228A /* camelcase.json */; }; + 14867E7B1E7AF4D2001D228A /* comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D431E7AF4D2001D228A /* comments-no-id.json */; }; + 14867E7C1E7AF4D2001D228A /* comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D431E7AF4D2001D228A /* comments-no-id.json */; }; + 14867E7D1E7AF4D2001D228A /* comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D431E7AF4D2001D228A /* comments-no-id.json */; }; + 14867E7E1E7AF4D2001D228A /* custom_relationship_key_to_many.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D441E7AF4D2001D228A /* custom_relationship_key_to_many.json */; }; + 14867E7F1E7AF4D2001D228A /* custom_relationship_key_to_many.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D441E7AF4D2001D228A /* custom_relationship_key_to_many.json */; }; + 14867E801E7AF4D2001D228A /* custom_relationship_key_to_many.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D441E7AF4D2001D228A /* custom_relationship_key_to_many.json */; }; + 14867E811E7AF4D2001D228A /* custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D451E7AF4D2001D228A /* custom_relationship_key_to_one.json */; }; + 14867E821E7AF4D2001D228A /* custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D451E7AF4D2001D228A /* custom_relationship_key_to_one.json */; }; + 14867E831E7AF4D2001D228A /* custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D451E7AF4D2001D228A /* custom_relationship_key_to_one.json */; }; + 14867E841E7AF4D2001D228A /* id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D461E7AF4D2001D228A /* id.json */; }; + 14867E851E7AF4D2001D228A /* id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D461E7AF4D2001D228A /* id.json */; }; + 14867E861E7AF4D2001D228A /* id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D461E7AF4D2001D228A /* id.json */; }; + 14867E871E7AF4D2001D228A /* images.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D471E7AF4D2001D228A /* images.json */; }; + 14867E881E7AF4D2001D228A /* images.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D471E7AF4D2001D228A /* images.json */; }; + 14867E891E7AF4D2001D228A /* images.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D471E7AF4D2001D228A /* images.json */; }; + 14867E8A1E7AF4D2001D228A /* markets_items.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D481E7AF4D2001D228A /* markets_items.json */; }; + 14867E8B1E7AF4D2001D228A /* markets_items.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D481E7AF4D2001D228A /* markets_items.json */; }; + 14867E8C1E7AF4D2001D228A /* markets_items.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D481E7AF4D2001D228A /* markets_items.json */; }; + 14867E8D1E7AF4D2001D228A /* notes_for_user_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D491E7AF4D2001D228A /* notes_for_user_a.json */; }; + 14867E8E1E7AF4D2001D228A /* notes_for_user_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D491E7AF4D2001D228A /* notes_for_user_a.json */; }; + 14867E8F1E7AF4D2001D228A /* notes_for_user_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D491E7AF4D2001D228A /* notes_for_user_a.json */; }; + 14867E901E7AF4D2001D228A /* notes_with_user_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4A1E7AF4D2001D228A /* notes_with_user_id.json */; }; + 14867E911E7AF4D2001D228A /* notes_with_user_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4A1E7AF4D2001D228A /* notes_with_user_id.json */; }; + 14867E921E7AF4D2001D228A /* notes_with_user_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4A1E7AF4D2001D228A /* notes_with_user_id.json */; }; + 14867E931E7AF4D2001D228A /* notes_with_user_id_custom.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4B1E7AF4D2001D228A /* notes_with_user_id_custom.json */; }; + 14867E941E7AF4D2001D228A /* notes_with_user_id_custom.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4B1E7AF4D2001D228A /* notes_with_user_id_custom.json */; }; + 14867E951E7AF4D2001D228A /* notes_with_user_id_custom.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4B1E7AF4D2001D228A /* notes_with_user_id_custom.json */; }; + 14867E961E7AF4D2001D228A /* numbers.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4C1E7AF4D2001D228A /* numbers.json */; }; + 14867E971E7AF4D2001D228A /* numbers.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4C1E7AF4D2001D228A /* numbers.json */; }; + 14867E981E7AF4D2001D228A /* numbers.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4C1E7AF4D2001D228A /* numbers.json */; }; + 14867E991E7AF4D2001D228A /* numbers_in_collection.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4D1E7AF4D2001D228A /* numbers_in_collection.json */; }; + 14867E9A1E7AF4D2001D228A /* numbers_in_collection.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4D1E7AF4D2001D228A /* numbers_in_collection.json */; }; + 14867E9B1E7AF4D2001D228A /* numbers_in_collection.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4D1E7AF4D2001D228A /* numbers_in_collection.json */; }; + 14867E9C1E7AF4D2001D228A /* operation-types-users-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4E1E7AF4D2001D228A /* operation-types-users-a.json */; }; + 14867E9D1E7AF4D2001D228A /* operation-types-users-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4E1E7AF4D2001D228A /* operation-types-users-a.json */; }; + 14867E9E1E7AF4D2001D228A /* operation-types-users-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4E1E7AF4D2001D228A /* operation-types-users-a.json */; }; + 14867E9F1E7AF4D2001D228A /* operation-types-users-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4F1E7AF4D2001D228A /* operation-types-users-b.json */; }; + 14867EA01E7AF4D2001D228A /* operation-types-users-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4F1E7AF4D2001D228A /* operation-types-users-b.json */; }; + 14867EA11E7AF4D2001D228A /* operation-types-users-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D4F1E7AF4D2001D228A /* operation-types-users-b.json */; }; + 14867EA21E7AF4D2001D228A /* organizations-tree.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D501E7AF4D2001D228A /* organizations-tree.json */; }; + 14867EA31E7AF4D2001D228A /* organizations-tree.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D501E7AF4D2001D228A /* organizations-tree.json */; }; + 14867EA41E7AF4D2001D228A /* organizations-tree.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D501E7AF4D2001D228A /* organizations-tree.json */; }; + 14867EA51E7AF4D2001D228A /* patients.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D511E7AF4D2001D228A /* patients.json */; }; + 14867EA61E7AF4D2001D228A /* patients.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D511E7AF4D2001D228A /* patients.json */; }; + 14867EA71E7AF4D2001D228A /* patients.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D511E7AF4D2001D228A /* patients.json */; }; + 14867EA81E7AF4D2001D228A /* stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D521E7AF4D2001D228A /* stories-comments-no-ids.json */; }; + 14867EA91E7AF4D2001D228A /* stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D521E7AF4D2001D228A /* stories-comments-no-ids.json */; }; + 14867EAA1E7AF4D2001D228A /* stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D521E7AF4D2001D228A /* stories-comments-no-ids.json */; }; + 14867EAB1E7AF4D2001D228A /* story-summarize.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D531E7AF4D2001D228A /* story-summarize.json */; }; + 14867EAC1E7AF4D2001D228A /* story-summarize.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D531E7AF4D2001D228A /* story-summarize.json */; }; + 14867EAD1E7AF4D2001D228A /* story-summarize.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D531E7AF4D2001D228A /* story-summarize.json */; }; + 14867EAE1E7AF4D2001D228A /* tagged_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D541E7AF4D2001D228A /* tagged_notes.json */; }; + 14867EAF1E7AF4D2001D228A /* tagged_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D541E7AF4D2001D228A /* tagged_notes.json */; }; + 14867EB01E7AF4D2001D228A /* tagged_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D541E7AF4D2001D228A /* tagged_notes.json */; }; + 14867EB11E7AF4D2001D228A /* to-one-camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D551E7AF4D2001D228A /* to-one-camelcase.json */; }; + 14867EB21E7AF4D2001D228A /* to-one-camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D551E7AF4D2001D228A /* to-one-camelcase.json */; }; + 14867EB31E7AF4D2001D228A /* to-one-camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D551E7AF4D2001D228A /* to-one-camelcase.json */; }; + 14867EB41E7AF4D2001D228A /* to-one-snakecase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D561E7AF4D2001D228A /* to-one-snakecase.json */; }; + 14867EB51E7AF4D2001D228A /* to-one-snakecase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D561E7AF4D2001D228A /* to-one-snakecase.json */; }; + 14867EB61E7AF4D2001D228A /* to-one-snakecase.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D561E7AF4D2001D228A /* to-one-snakecase.json */; }; + 14867EB71E7AF4D2001D228A /* unique.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D571E7AF4D2001D228A /* unique.json */; }; + 14867EB81E7AF4D2001D228A /* unique.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D571E7AF4D2001D228A /* unique.json */; }; + 14867EB91E7AF4D2001D228A /* unique.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D571E7AF4D2001D228A /* unique.json */; }; + 14867EBA1E7AF4D2001D228A /* users_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D581E7AF4D2001D228A /* users_a.json */; }; + 14867EBB1E7AF4D2001D228A /* users_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D581E7AF4D2001D228A /* users_a.json */; }; + 14867EBC1E7AF4D2001D228A /* users_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D581E7AF4D2001D228A /* users_a.json */; }; + 14867EBD1E7AF4D2001D228A /* users_b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D591E7AF4D2001D228A /* users_b.json */; }; + 14867EBE1E7AF4D2001D228A /* users_b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D591E7AF4D2001D228A /* users_b.json */; }; + 14867EBF1E7AF4D2001D228A /* users_b.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D591E7AF4D2001D228A /* users_b.json */; }; + 14867EC01E7AF4D2001D228A /* users_c.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5A1E7AF4D2001D228A /* users_c.json */; }; + 14867EC11E7AF4D2001D228A /* users_c.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5A1E7AF4D2001D228A /* users_c.json */; }; + 14867EC21E7AF4D2001D228A /* users_c.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5A1E7AF4D2001D228A /* users_c.json */; }; + 14867EC31E7AF4D2001D228A /* users_company.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5B1E7AF4D2001D228A /* users_company.json */; }; + 14867EC41E7AF4D2001D228A /* users_company.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5B1E7AF4D2001D228A /* users_company.json */; }; + 14867EC51E7AF4D2001D228A /* users_company.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5B1E7AF4D2001D228A /* users_company.json */; }; + 14867EC61E7AF4D2001D228A /* users_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5C1E7AF4D2001D228A /* users_notes.json */; }; + 14867EC71E7AF4D2001D228A /* users_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5C1E7AF4D2001D228A /* users_notes.json */; }; + 14867EC81E7AF4D2001D228A /* users_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 14867D5C1E7AF4D2001D228A /* users_notes.json */; }; + 14867EC91E7AF4D2001D228A /* 113.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D5E1E7AF4D2001D228A /* 113.xcdatamodeld */; }; + 14867ECA1E7AF4D2001D228A /* 113.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D5E1E7AF4D2001D228A /* 113.xcdatamodeld */; }; + 14867ECB1E7AF4D2001D228A /* 113.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D5E1E7AF4D2001D228A /* 113.xcdatamodeld */; }; + 14867ECC1E7AF4D2001D228A /* 125.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D601E7AF4D2001D228A /* 125.xcdatamodeld */; }; + 14867ECD1E7AF4D2001D228A /* 125.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D601E7AF4D2001D228A /* 125.xcdatamodeld */; }; + 14867ECE1E7AF4D2001D228A /* 125.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D601E7AF4D2001D228A /* 125.xcdatamodeld */; }; + 14867ECF1E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D621E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld */; }; + 14867ED01E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D621E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld */; }; + 14867ED11E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D621E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld */; }; + 14867ED21E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D641E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld */; }; + 14867ED31E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D641E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld */; }; + 14867ED41E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D641E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld */; }; + 14867ED51E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D661E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld */; }; + 14867ED61E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D661E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld */; }; + 14867ED71E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D661E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld */; }; + 14867ED81E7AF4D2001D228A /* 151-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D681E7AF4D2001D228A /* 151-to-many.xcdatamodeld */; }; + 14867ED91E7AF4D2001D228A /* 151-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D681E7AF4D2001D228A /* 151-to-many.xcdatamodeld */; }; + 14867EDA1E7AF4D2001D228A /* 151-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D681E7AF4D2001D228A /* 151-to-many.xcdatamodeld */; }; + 14867EDB1E7AF4D2001D228A /* 157.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6A1E7AF4D2001D228A /* 157.xcdatamodeld */; }; + 14867EDC1E7AF4D2001D228A /* 157.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6A1E7AF4D2001D228A /* 157.xcdatamodeld */; }; + 14867EDD1E7AF4D2001D228A /* 157.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6A1E7AF4D2001D228A /* 157.xcdatamodeld */; }; + 14867EDE1E7AF4D2001D228A /* 179.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6C1E7AF4D2001D228A /* 179.xcdatamodeld */; }; + 14867EDF1E7AF4D2001D228A /* 179.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6C1E7AF4D2001D228A /* 179.xcdatamodeld */; }; + 14867EE01E7AF4D2001D228A /* 179.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6C1E7AF4D2001D228A /* 179.xcdatamodeld */; }; + 14867EE11E7AF4D2001D228A /* 202.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6E1E7AF4D2001D228A /* 202.xcdatamodeld */; }; + 14867EE21E7AF4D2001D228A /* 202.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6E1E7AF4D2001D228A /* 202.xcdatamodeld */; }; + 14867EE31E7AF4D2001D228A /* 202.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D6E1E7AF4D2001D228A /* 202.xcdatamodeld */; }; + 14867EE41E7AF4D2001D228A /* 225.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D701E7AF4D2001D228A /* 225.xcdatamodeld */; }; + 14867EE51E7AF4D2001D228A /* 225.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D701E7AF4D2001D228A /* 225.xcdatamodeld */; }; + 14867EE61E7AF4D2001D228A /* 225.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D701E7AF4D2001D228A /* 225.xcdatamodeld */; }; + 14867EE71E7AF4D2001D228A /* 233.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D721E7AF4D2001D228A /* 233.xcdatamodeld */; }; + 14867EE81E7AF4D2001D228A /* 233.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D721E7AF4D2001D228A /* 233.xcdatamodeld */; }; + 14867EE91E7AF4D2001D228A /* 233.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D721E7AF4D2001D228A /* 233.xcdatamodeld */; }; + 14867EEA1E7AF4D2001D228A /* 239.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D741E7AF4D2001D228A /* 239.xcdatamodeld */; }; + 14867EEB1E7AF4D2001D228A /* 239.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D741E7AF4D2001D228A /* 239.xcdatamodeld */; }; + 14867EEC1E7AF4D2001D228A /* 239.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D741E7AF4D2001D228A /* 239.xcdatamodeld */; }; + 14867EED1E7AF4D2001D228A /* 254.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D761E7AF4D2001D228A /* 254.xcdatamodeld */; }; + 14867EEE1E7AF4D2001D228A /* 254.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D761E7AF4D2001D228A /* 254.xcdatamodeld */; }; + 14867EEF1E7AF4D2001D228A /* 254.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D761E7AF4D2001D228A /* 254.xcdatamodeld */; }; + 14867EF01E7AF4D2001D228A /* 257.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D781E7AF4D2001D228A /* 257.xcdatamodeld */; }; + 14867EF11E7AF4D2001D228A /* 257.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D781E7AF4D2001D228A /* 257.xcdatamodeld */; }; + 14867EF21E7AF4D2001D228A /* 257.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D781E7AF4D2001D228A /* 257.xcdatamodeld */; }; + 14867EF31E7AF4D2001D228A /* 265.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7A1E7AF4D2001D228A /* 265.xcdatamodeld */; }; + 14867EF41E7AF4D2001D228A /* 265.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7A1E7AF4D2001D228A /* 265.xcdatamodeld */; }; + 14867EF51E7AF4D2001D228A /* 265.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7A1E7AF4D2001D228A /* 265.xcdatamodeld */; }; + 14867EF61E7AF4D2001D228A /* 277.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7C1E7AF4D2001D228A /* 277.xcdatamodeld */; }; + 14867EF71E7AF4D2001D228A /* 277.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7C1E7AF4D2001D228A /* 277.xcdatamodeld */; }; + 14867EF81E7AF4D2001D228A /* 277.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7C1E7AF4D2001D228A /* 277.xcdatamodeld */; }; + 14867EF91E7AF4D2001D228A /* 280.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7E1E7AF4D2001D228A /* 280.xcdatamodeld */; }; + 14867EFA1E7AF4D2001D228A /* 280.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7E1E7AF4D2001D228A /* 280.xcdatamodeld */; }; + 14867EFB1E7AF4D2001D228A /* 280.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D7E1E7AF4D2001D228A /* 280.xcdatamodeld */; }; + 14867EFC1E7AF4D2001D228A /* 283.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D801E7AF4D2001D228A /* 283.xcdatamodeld */; }; + 14867EFD1E7AF4D2001D228A /* 283.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D801E7AF4D2001D228A /* 283.xcdatamodeld */; }; + 14867EFE1E7AF4D2001D228A /* 283.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D801E7AF4D2001D228A /* 283.xcdatamodeld */; }; + 14867EFF1E7AF4D2001D228A /* 320.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D821E7AF4D2001D228A /* 320.xcdatamodeld */; }; + 14867F001E7AF4D2001D228A /* 320.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D821E7AF4D2001D228A /* 320.xcdatamodeld */; }; + 14867F011E7AF4D2001D228A /* 320.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D821E7AF4D2001D228A /* 320.xcdatamodeld */; }; + 14867F021E7AF4D2001D228A /* 3ca82a0.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D841E7AF4D2001D228A /* 3ca82a0.xcdatamodeld */; }; + 14867F031E7AF4D2001D228A /* 3ca82a0.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D841E7AF4D2001D228A /* 3ca82a0.xcdatamodeld */; }; + 14867F041E7AF4D2001D228A /* 3ca82a0.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D841E7AF4D2001D228A /* 3ca82a0.xcdatamodeld */; }; + 14867F051E7AF4D2001D228A /* 84.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D861E7AF4D2001D228A /* 84.xcdatamodeld */; }; + 14867F061E7AF4D2001D228A /* 84.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D861E7AF4D2001D228A /* 84.xcdatamodeld */; }; + 14867F071E7AF4D2001D228A /* 84.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D861E7AF4D2001D228A /* 84.xcdatamodeld */; }; + 14867F081E7AF4D2001D228A /* Camelcase.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D881E7AF4D2001D228A /* Camelcase.xcdatamodeld */; }; + 14867F091E7AF4D2001D228A /* Camelcase.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D881E7AF4D2001D228A /* Camelcase.xcdatamodeld */; }; + 14867F0A1E7AF4D2001D228A /* Camelcase.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D881E7AF4D2001D228A /* Camelcase.xcdatamodeld */; }; + 14867F0B1E7AF4D2001D228A /* Contacts.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8A1E7AF4D2001D228A /* Contacts.xcdatamodeld */; }; + 14867F0C1E7AF4D2001D228A /* Contacts.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8A1E7AF4D2001D228A /* Contacts.xcdatamodeld */; }; + 14867F0D1E7AF4D2001D228A /* Contacts.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8A1E7AF4D2001D228A /* Contacts.xcdatamodeld */; }; + 14867F0E1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8C1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld */; }; + 14867F0F1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8C1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld */; }; + 14867F101E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8C1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld */; }; + 14867F111E7AF4D2001D228A /* id.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8E1E7AF4D2001D228A /* id.xcdatamodeld */; }; + 14867F121E7AF4D2001D228A /* id.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8E1E7AF4D2001D228A /* id.xcdatamodeld */; }; + 14867F131E7AF4D2001D228A /* id.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D8E1E7AF4D2001D228A /* id.xcdatamodeld */; }; + 14867F141E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D901E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld */; }; + 14867F151E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D901E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld */; }; + 14867F161E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D901E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld */; }; + 14867F171E7AF4D2001D228A /* Markets.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D921E7AF4D2001D228A /* Markets.xcdatamodeld */; }; + 14867F181E7AF4D2001D228A /* Markets.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D921E7AF4D2001D228A /* Markets.xcdatamodeld */; }; + 14867F191E7AF4D2001D228A /* Markets.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D921E7AF4D2001D228A /* Markets.xcdatamodeld */; }; + 14867F1A1E7AF4D2001D228A /* Notes.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D941E7AF4D2001D228A /* Notes.xcdatamodeld */; }; + 14867F1B1E7AF4D2001D228A /* Notes.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D941E7AF4D2001D228A /* Notes.xcdatamodeld */; }; + 14867F1C1E7AF4D2001D228A /* Notes.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D941E7AF4D2001D228A /* Notes.xcdatamodeld */; }; + 14867F1D1E7AF4D2001D228A /* NotesB.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D961E7AF4D2001D228A /* NotesB.xcdatamodeld */; }; + 14867F1E1E7AF4D2001D228A /* NotesB.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D961E7AF4D2001D228A /* NotesB.xcdatamodeld */; }; + 14867F1F1E7AF4D2001D228A /* NotesB.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D961E7AF4D2001D228A /* NotesB.xcdatamodeld */; }; + 14867F201E7AF4D2001D228A /* OrderedSocial.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D981E7AF4D2001D228A /* OrderedSocial.xcdatamodeld */; }; + 14867F211E7AF4D2001D228A /* OrderedSocial.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D981E7AF4D2001D228A /* OrderedSocial.xcdatamodeld */; }; + 14867F221E7AF4D2001D228A /* OrderedSocial.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D981E7AF4D2001D228A /* OrderedSocial.xcdatamodeld */; }; + 14867F231E7AF4D2001D228A /* Organizations.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9A1E7AF4D2001D228A /* Organizations.xcdatamodeld */; }; + 14867F241E7AF4D2001D228A /* Organizations.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9A1E7AF4D2001D228A /* Organizations.xcdatamodeld */; }; + 14867F251E7AF4D2001D228A /* Organizations.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9A1E7AF4D2001D228A /* Organizations.xcdatamodeld */; }; + 14867F261E7AF4D2001D228A /* Patients.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9C1E7AF4D2001D228A /* Patients.xcdatamodeld */; }; + 14867F271E7AF4D2001D228A /* Patients.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9C1E7AF4D2001D228A /* Patients.xcdatamodeld */; }; + 14867F281E7AF4D2001D228A /* Patients.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9C1E7AF4D2001D228A /* Patients.xcdatamodeld */; }; + 14867F291E7AF4D2001D228A /* Recursive.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9E1E7AF4D2001D228A /* Recursive.xcdatamodeld */; }; + 14867F2A1E7AF4D2001D228A /* Recursive.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9E1E7AF4D2001D228A /* Recursive.xcdatamodeld */; }; + 14867F2B1E7AF4D2001D228A /* Recursive.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867D9E1E7AF4D2001D228A /* Recursive.xcdatamodeld */; }; + 14867F2C1E7AF4D2001D228A /* Social.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA01E7AF4D2001D228A /* Social.xcdatamodeld */; }; + 14867F2D1E7AF4D2001D228A /* Social.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA01E7AF4D2001D228A /* Social.xcdatamodeld */; }; + 14867F2E1E7AF4D2001D228A /* Social.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA01E7AF4D2001D228A /* Social.xcdatamodeld */; }; + 14867F2F1E7AF4D2001D228A /* Tests.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA21E7AF4D2001D228A /* Tests.xcdatamodeld */; }; + 14867F301E7AF4D2001D228A /* Tests.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA21E7AF4D2001D228A /* Tests.xcdatamodeld */; }; + 14867F311E7AF4D2001D228A /* Tests.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA21E7AF4D2001D228A /* Tests.xcdatamodeld */; }; + 14867F321E7AF4D2001D228A /* ToOne.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA41E7AF4D2001D228A /* ToOne.xcdatamodeld */; }; + 14867F331E7AF4D2001D228A /* ToOne.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA41E7AF4D2001D228A /* ToOne.xcdatamodeld */; }; + 14867F341E7AF4D2001D228A /* ToOne.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA41E7AF4D2001D228A /* ToOne.xcdatamodeld */; }; + 14867F351E7AF4D2001D228A /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA61E7AF4D2001D228A /* Unique.xcdatamodeld */; }; + 14867F361E7AF4D2001D228A /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA61E7AF4D2001D228A /* Unique.xcdatamodeld */; }; + 14867F371E7AF4D2001D228A /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA61E7AF4D2001D228A /* Unique.xcdatamodeld */; }; + 14867F381E7AF4D2001D228A /* NSArray+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA81E7AF4D2001D228A /* NSArray+SyncTests.swift */; }; + 14867F391E7AF4D2001D228A /* NSArray+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA81E7AF4D2001D228A /* NSArray+SyncTests.swift */; }; + 14867F3A1E7AF4D2001D228A /* NSArray+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA81E7AF4D2001D228A /* NSArray+SyncTests.swift */; }; + 14867F3B1E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA91E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift */; }; + 14867F3C1E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA91E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift */; }; + 14867F3D1E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DA91E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift */; }; + 14867F3E1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAA1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift */; }; + 14867F3F1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAA1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift */; }; + 14867F401E7AF4D2001D228A /* NSManagedObject+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAA1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift */; }; + 14867F411E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAB1E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift */; }; + 14867F421E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAB1E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift */; }; + 14867F431E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAB1E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift */; }; + 14867F441E7AF4D2001D228A /* NSPersistentContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAC1E7AF4D2001D228A /* NSPersistentContainerTests.swift */; }; + 14867F451E7AF4D2001D228A /* NSPersistentContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAC1E7AF4D2001D228A /* NSPersistentContainerTests.swift */; }; + 14867F461E7AF4D2001D228A /* NSPersistentContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAC1E7AF4D2001D228A /* NSPersistentContainerTests.swift */; }; + 14867F471E7AF4D2001D228A /* SyncDelegateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAD1E7AF4D2001D228A /* SyncDelegateTests.swift */; }; + 14867F481E7AF4D2001D228A /* SyncDelegateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAD1E7AF4D2001D228A /* SyncDelegateTests.swift */; }; + 14867F491E7AF4D2001D228A /* SyncDelegateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAD1E7AF4D2001D228A /* SyncDelegateTests.swift */; }; + 14867F4A1E7AF4D2001D228A /* SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAE1E7AF4D2001D228A /* SyncTests.swift */; }; + 14867F4B1E7AF4D2001D228A /* SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAE1E7AF4D2001D228A /* SyncTests.swift */; }; + 14867F4C1E7AF4D2001D228A /* SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAE1E7AF4D2001D228A /* SyncTests.swift */; }; + 14867F4D1E7AF4D2001D228A /* UpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAF1E7AF4D2001D228A /* UpdateTests.swift */; }; + 14867F4E1E7AF4D2001D228A /* UpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAF1E7AF4D2001D228A /* UpdateTests.swift */; }; + 14867F4F1E7AF4D2001D228A /* UpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DAF1E7AF4D2001D228A /* UpdateTests.swift */; }; + 14867F501E7AF4D2001D228A /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB11E7AF4D2001D228A /* DictionaryTests.swift */; }; + 14867F511E7AF4D2001D228A /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB11E7AF4D2001D228A /* DictionaryTests.swift */; }; + 14867F521E7AF4D2001D228A /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB11E7AF4D2001D228A /* DictionaryTests.swift */; }; + 14867F531E7AF4D2001D228A /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB21E7AF4D2001D228A /* FillWithDictionaryTests.swift */; }; + 14867F541E7AF4D2001D228A /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB21E7AF4D2001D228A /* FillWithDictionaryTests.swift */; }; + 14867F551E7AF4D2001D228A /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB21E7AF4D2001D228A /* FillWithDictionaryTests.swift */; }; + 14867F561E7AF4D2001D228A /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB31E7AF4D2001D228A /* HelperTests.m */; }; + 14867F571E7AF4D2001D228A /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB31E7AF4D2001D228A /* HelperTests.m */; }; + 14867F581E7AF4D2001D228A /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB31E7AF4D2001D228A /* HelperTests.m */; }; + 14867F591E7AF4D2001D228A /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB51E7AF4D2001D228A /* 112.xcdatamodeld */; }; + 14867F5A1E7AF4D2001D228A /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB51E7AF4D2001D228A /* 112.xcdatamodeld */; }; + 14867F5B1E7AF4D2001D228A /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB51E7AF4D2001D228A /* 112.xcdatamodeld */; }; + 14867F5C1E7AF4D2001D228A /* 121.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB71E7AF4D2001D228A /* 121.xcdatamodeld */; }; + 14867F5D1E7AF4D2001D228A /* 121.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB71E7AF4D2001D228A /* 121.xcdatamodeld */; }; + 14867F5E1E7AF4D2001D228A /* 121.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB71E7AF4D2001D228A /* 121.xcdatamodeld */; }; + 14867F5F1E7AF4D2001D228A /* 123.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB91E7AF4D2001D228A /* 123.xcdatamodeld */; }; + 14867F601E7AF4D2001D228A /* 123.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB91E7AF4D2001D228A /* 123.xcdatamodeld */; }; + 14867F611E7AF4D2001D228A /* 123.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DB91E7AF4D2001D228A /* 123.xcdatamodeld */; }; + 14867F621E7AF4D2001D228A /* 129.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBB1E7AF4D2001D228A /* 129.xcdatamodeld */; }; + 14867F631E7AF4D2001D228A /* 129.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBB1E7AF4D2001D228A /* 129.xcdatamodeld */; }; + 14867F641E7AF4D2001D228A /* 129.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBB1E7AF4D2001D228A /* 129.xcdatamodeld */; }; + 14867F651E7AF4D2001D228A /* 137.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBD1E7AF4D2001D228A /* 137.xcdatamodeld */; }; + 14867F661E7AF4D2001D228A /* 137.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBD1E7AF4D2001D228A /* 137.xcdatamodeld */; }; + 14867F671E7AF4D2001D228A /* 137.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBD1E7AF4D2001D228A /* 137.xcdatamodeld */; }; + 14867F681E7AF4D2001D228A /* 140.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBF1E7AF4D2001D228A /* 140.xcdatamodeld */; }; + 14867F691E7AF4D2001D228A /* 140.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBF1E7AF4D2001D228A /* 140.xcdatamodeld */; }; + 14867F6A1E7AF4D2001D228A /* 140.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DBF1E7AF4D2001D228A /* 140.xcdatamodeld */; }; + 14867F6B1E7AF4D2001D228A /* 142.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC11E7AF4D2001D228A /* 142.xcdatamodeld */; }; + 14867F6C1E7AF4D2001D228A /* 142.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC11E7AF4D2001D228A /* 142.xcdatamodeld */; }; + 14867F6D1E7AF4D2001D228A /* 142.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC11E7AF4D2001D228A /* 142.xcdatamodeld */; }; + 14867F6E1E7AF4D2001D228A /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC31E7AF4D2001D228A /* Model.xcdatamodeld */; }; + 14867F6F1E7AF4D2001D228A /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC31E7AF4D2001D228A /* Model.xcdatamodeld */; }; + 14867F701E7AF4D2001D228A /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC31E7AF4D2001D228A /* Model.xcdatamodeld */; }; + 14867F711E7AF4D2001D228A /* Ordered.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC51E7AF4D2001D228A /* Ordered.xcdatamodeld */; }; + 14867F721E7AF4D2001D228A /* Ordered.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC51E7AF4D2001D228A /* Ordered.xcdatamodeld */; }; + 14867F731E7AF4D2001D228A /* Ordered.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC51E7AF4D2001D228A /* Ordered.xcdatamodeld */; }; + 14867F741E7AF4D2001D228A /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC71E7AF4D2001D228A /* SyncDictionaryTests.m */; }; + 14867F751E7AF4D2001D228A /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC71E7AF4D2001D228A /* SyncDictionaryTests.m */; }; + 14867F761E7AF4D2001D228A /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC71E7AF4D2001D228A /* SyncDictionaryTests.m */; }; + 14867F771E7AF4D2001D228A /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC81E7AF4D2001D228A /* SyncFillWithDictionaryTests.m */; }; + 14867F781E7AF4D2001D228A /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC81E7AF4D2001D228A /* SyncFillWithDictionaryTests.m */; }; + 14867F791E7AF4D2001D228A /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DC81E7AF4D2001D228A /* SyncFillWithDictionaryTests.m */; }; + 14867F7A1E7AF4D2001D228A /* BadAPIValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCA1E7AF4D2001D228A /* BadAPIValueTransformer.swift */; }; + 14867F7B1E7AF4D2001D228A /* BadAPIValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCA1E7AF4D2001D228A /* BadAPIValueTransformer.swift */; }; + 14867F7C1E7AF4D2001D228A /* BadAPIValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCA1E7AF4D2001D228A /* BadAPIValueTransformer.swift */; }; + 14867F7D1E7AF4D2001D228A /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCC1E7AF4D2001D228A /* DateStringTransformer.m */; }; + 14867F7E1E7AF4D2001D228A /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCC1E7AF4D2001D228A /* DateStringTransformer.m */; }; + 14867F7F1E7AF4D2001D228A /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCC1E7AF4D2001D228A /* DateStringTransformer.m */; }; + 14867F801E7AF4D2001D228A /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCE1E7AF4D2001D228A /* SyncTestValueTransformer.m */; }; + 14867F811E7AF4D2001D228A /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCE1E7AF4D2001D228A /* SyncTestValueTransformer.m */; }; + 14867F821E7AF4D2001D228A /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14867DCE1E7AF4D2001D228A /* SyncTestValueTransformer.m */; }; + 14867F831E7AF4D2001D228A /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DD01E7AF4D2001D228A /* TestCheckTests.swift */; }; + 14867F841E7AF4D2001D228A /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DD01E7AF4D2001D228A /* TestCheckTests.swift */; }; + 14867F851E7AF4D2001D228A /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DD01E7AF4D2001D228A /* TestCheckTests.swift */; }; + 14867F861E7AF4D2001D228A /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DD21E7AF4D2001D228A /* JSON.swift */; }; + 14867F871E7AF4D2001D228A /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DD21E7AF4D2001D228A /* JSON.swift */; }; + 14867F881E7AF4D2001D228A /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14867DD21E7AF4D2001D228A /* JSON.swift */; }; 14A84E951E4E70B900701B8A /* Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF91DA0021300E71A53 /* Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14A84E961E4E70B900701B8A /* Sync+DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14A84E971E4E70B900701B8A /* Sync+NSPersistentContainer.swift in Headers */ = {isa = PBXBuildFile; fileRef = 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -247,46 +493,6 @@ 14A84E9A1E4E70B900701B8A /* NSManagedObject+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14A84E9B1E4E70B900701B8A /* NSManagedObjectContext+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF81DA0021300E71A53 /* NSManagedObjectContext+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14A84E9C1E4E70B900701B8A /* Result.swift in Headers */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14A84EC61E4E748000701B8A /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84E9F1E4E748000701B8A /* DateTests.swift */; }; - 14A84EC71E4E748000701B8A /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84E9F1E4E748000701B8A /* DateTests.swift */; }; - 14A84ECC1E4E748000701B8A /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */; }; - 14A84ECD1E4E748000701B8A /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */; }; - 14A84ECF1E4E748000701B8A /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */; }; - 14A84ED01E4E748000701B8A /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */; }; - 14A84ED21E4E748000701B8A /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA71E4E748000701B8A /* DictionaryTests.swift */; }; - 14A84ED31E4E748000701B8A /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA71E4E748000701B8A /* DictionaryTests.swift */; }; - 14A84ED51E4E748000701B8A /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */; }; - 14A84ED61E4E748000701B8A /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */; }; - 14A84EDB1E4E748000701B8A /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAA1E4E748000701B8A /* HelperTests.m */; }; - 14A84EDC1E4E748000701B8A /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAA1E4E748000701B8A /* HelperTests.m */; }; - 14A84EDE1E4E748000701B8A /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */; }; - 14A84EDF1E4E748000701B8A /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */; }; - 14A84EE11E4E748000701B8A /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */; }; - 14A84EE21E4E748000701B8A /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */; }; - 14A84EE41E4E748000701B8A /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAE1E4E748000701B8A /* 112.xcdatamodeld */; }; - 14A84EE51E4E748000701B8A /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAE1E4E748000701B8A /* 112.xcdatamodeld */; }; - 14A84EE71E4E748000701B8A /* 121.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB01E4E748000701B8A /* 121.xcdatamodeld */; }; - 14A84EE81E4E748000701B8A /* 121.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB01E4E748000701B8A /* 121.xcdatamodeld */; }; - 14A84EEA1E4E748000701B8A /* 123.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB21E4E748000701B8A /* 123.xcdatamodeld */; }; - 14A84EEB1E4E748000701B8A /* 123.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB21E4E748000701B8A /* 123.xcdatamodeld */; }; - 14A84EED1E4E748000701B8A /* 129.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB41E4E748000701B8A /* 129.xcdatamodeld */; }; - 14A84EEE1E4E748000701B8A /* 129.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB41E4E748000701B8A /* 129.xcdatamodeld */; }; - 14A84EF01E4E748000701B8A /* 137.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB61E4E748000701B8A /* 137.xcdatamodeld */; }; - 14A84EF11E4E748000701B8A /* 137.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB61E4E748000701B8A /* 137.xcdatamodeld */; }; - 14A84EF31E4E748000701B8A /* 140.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB81E4E748000701B8A /* 140.xcdatamodeld */; }; - 14A84EF41E4E748000701B8A /* 140.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB81E4E748000701B8A /* 140.xcdatamodeld */; }; - 14A84EF61E4E748000701B8A /* 142.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBA1E4E748000701B8A /* 142.xcdatamodeld */; }; - 14A84EF71E4E748000701B8A /* 142.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBA1E4E748000701B8A /* 142.xcdatamodeld */; }; - 14A84EF91E4E748000701B8A /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBC1E4E748000701B8A /* Model.xcdatamodeld */; }; - 14A84EFA1E4E748000701B8A /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBC1E4E748000701B8A /* Model.xcdatamodeld */; }; - 14A84EFC1E4E748000701B8A /* Ordered.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBE1E4E748000701B8A /* Ordered.xcdatamodeld */; }; - 14A84EFD1E4E748000701B8A /* Ordered.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBE1E4E748000701B8A /* Ordered.xcdatamodeld */; }; - 14A84EFF1E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */; }; - 14A84F001E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */; }; - 14A84F021E4E748000701B8A /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC31E4E748000701B8A /* DateStringTransformer.m */; }; - 14A84F031E4E748000701B8A /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC31E4E748000701B8A /* DateStringTransformer.m */; }; - 14A84F051E4E748000701B8A /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */; }; - 14A84F061E4E748000701B8A /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */; }; 14AF6AFE1DFC3D88009E5BC4 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; }; 14AF6AFF1DFC3D88009E5BC4 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; }; 14AF6B001DFC3D88009E5BC4 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; }; @@ -330,146 +536,11 @@ 14D93C4D1E4E67A200DED595 /* NSManagedObject+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14D93C4E1E4E67A200DED595 /* NSManagedObjectContext+Sync.swift in Headers */ = {isa = PBXBuildFile; fileRef = 44968BF81DA0021300E71A53 /* NSManagedObjectContext+Sync.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14D93C4F1E4E67A200DED595 /* Result.swift in Headers */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 14D93C501E4E689F00DED595 /* NSArray+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC551D9F90B5001C8DA6 /* NSArray+SyncTests.swift */; }; - 14D93C511E4E689F00DED595 /* NSEntityDescription+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC561D9F90B5001C8DA6 /* NSEntityDescription+SyncTests.swift */; }; - 14D93C521E4E689F00DED595 /* NSManagedObject+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC571D9F90B5001C8DA6 /* NSManagedObject+SyncTests.swift */; }; - 14D93C531E4E689F00DED595 /* NSManagedObjectContext+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC581D9F90B5001C8DA6 /* NSManagedObjectContext+SyncTests.swift */; }; - 14D93C541E4E689F00DED595 /* SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC591D9F90B5001C8DA6 /* SyncTests.swift */; }; - 14D93C551E4E689F00DED595 /* SyncDelegateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14BA60E81DC0247700C97D6F /* SyncDelegateTests.swift */; }; - 14D93C561E4E689F00DED595 /* NSPersistentContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14E2852E1DC173A800C4E461 /* NSPersistentContainerTests.swift */; }; - 14D93C571E4E689F00DED595 /* InsertOrUpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146EB24D1DEF75D70068EDC3 /* InsertOrUpdateTests.swift */; }; - 14D93C581E4E689F00DED595 /* UpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 444546D51DF06E2600CC7928 /* UpdateTests.swift */; }; - 14D93C591E4E689F00DED595 /* DeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146EB24C1DEF75D70068EDC3 /* DeleteTests.swift */; }; - 14D93C5A1E4E689F00DED595 /* FetchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44584FDB1DF2EE550082D7A0 /* FetchTests.swift */; }; - 14D93C5B1E4E68A400DED595 /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */; }; - 14D93C5C1E4E68AF00DED595 /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CC760F1D9F9076003545A4 /* TestCheckTests.swift */; }; - 14D93C5D1E4E68BA00DED595 /* 3ca82a0.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4E28B59E1DEE43F8007FED27 /* 3ca82a0.xcdatamodeld */; }; - 14D93C5E1E4E68BA00DED595 /* 84.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC351D9F90B5001C8DA6 /* 84.xcdatamodeld */; }; - 14D93C5F1E4E68BA00DED595 /* 113.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC251D9F90B5001C8DA6 /* 113.xcdatamodeld */; }; - 14D93C601E4E68BA00DED595 /* 125.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC271D9F90B5001C8DA6 /* 125.xcdatamodeld */; }; - 14D93C611E4E68BA00DED595 /* 151-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC171D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodeld */; }; - 14D93C621E4E68BA00DED595 /* 151-ordered-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC191D9F90B5001C8DA6 /* 151-ordered-many-to-many.xcdatamodeld */; }; - 14D93C631E4E68BA00DED595 /* 151-ordered-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1B1D9F90B5001C8DA6 /* 151-ordered-to-many.xcdatamodeld */; }; - 14D93C641E4E68BA00DED595 /* 151-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1D1D9F90B5001C8DA6 /* 151-to-many.xcdatamodeld */; }; - 14D93C651E4E68BA00DED595 /* 157.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC291D9F90B5001C8DA6 /* 157.xcdatamodeld */; }; - 14D93C661E4E68BA00DED595 /* 179.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2B1D9F90B5001C8DA6 /* 179.xcdatamodeld */; }; - 14D93C671E4E68BA00DED595 /* 202.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2D1D9F90B5001C8DA6 /* 202.xcdatamodeld */; }; - 14D93C681E4E68BA00DED595 /* 225.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1F1D9F90B5001C8DA6 /* 225.xcdatamodeld */; }; - 14D93C691E4E68BA00DED595 /* 233.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4E2F71E71DD3DD56003F0108 /* 233.xcdatamodeld */; }; - 14D93C6A1E4E68BA00DED595 /* 239.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2F1D9F90B5001C8DA6 /* 239.xcdatamodeld */; }; - 14D93C6B1E4E68BA00DED595 /* 254.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC311D9F90B5001C8DA6 /* 254.xcdatamodeld */; }; - 14D93C6C1E4E68BA00DED595 /* 257.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC331D9F90B5001C8DA6 /* 257.xcdatamodeld */; }; - 14D93C6D1E4E68BA00DED595 /* 265.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 140944AE1DF0BC280037F85A /* 265.xcdatamodeld */; }; - 14D93C6E1E4E68BA00DED595 /* 277.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 140D43221DFF4D3A00E3B159 /* 277.xcdatamodeld */; }; - 14D93C6F1E4E68BA00DED595 /* 280.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC211D9F90B5001C8DA6 /* 280.xcdatamodeld */; }; - 14D93C701E4E68BA00DED595 /* 283.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC231D9F90B5001C8DA6 /* 283.xcdatamodeld */; }; - 14D93C711E4E68BA00DED595 /* 320.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E9C1391DEA2ECD00A21B9E /* 320.xcdatamodeld */; }; - 14D93C721E4E68BA00DED595 /* Camelcase.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC371D9F90B5001C8DA6 /* Camelcase.xcdatamodeld */; }; - 14D93C731E4E68BA00DED595 /* Contacts.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC391D9F90B5001C8DA6 /* Contacts.xcdatamodeld */; }; - 14D93C741E4E68BA00DED595 /* CustomRelationshipKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3B1D9F90B5001C8DA6 /* CustomRelationshipKey.xcdatamodeld */; }; - 14D93C751E4E68BA00DED595 /* id.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3D1D9F90B5001C8DA6 /* id.xcdatamodeld */; }; - 14D93C761E4E68BA00DED595 /* InsertObjectsInParent.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3F1D9F90B5001C8DA6 /* InsertObjectsInParent.xcdatamodeld */; }; - 14D93C771E4E68BA00DED595 /* Markets.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC411D9F90B5001C8DA6 /* Markets.xcdatamodeld */; }; - 14D93C781E4E68BA00DED595 /* Notes.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC431D9F90B5001C8DA6 /* Notes.xcdatamodeld */; }; - 14D93C791E4E68BA00DED595 /* NotesB.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC451D9F90B5001C8DA6 /* NotesB.xcdatamodeld */; }; - 14D93C7A1E4E68BA00DED595 /* OrderedSocial.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC471D9F90B5001C8DA6 /* OrderedSocial.xcdatamodeld */; }; - 14D93C7B1E4E68BA00DED595 /* Organizations.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC491D9F90B5001C8DA6 /* Organizations.xcdatamodeld */; }; - 14D93C7C1E4E68BA00DED595 /* Patients.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4B1D9F90B5001C8DA6 /* Patients.xcdatamodeld */; }; - 14D93C7D1E4E68BA00DED595 /* Recursive.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4D1D9F90B5001C8DA6 /* Recursive.xcdatamodeld */; }; - 14D93C7E1E4E68BA00DED595 /* Social.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4F1D9F90B5001C8DA6 /* Social.xcdatamodeld */; }; - 14D93C7F1E4E68BA00DED595 /* Tests.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 1421405B1DBCDD52000FF107 /* Tests.xcdatamodeld */; }; - 14D93C801E4E68BA00DED595 /* ToOne.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC511D9F90B5001C8DA6 /* ToOne.xcdatamodeld */; }; - 14D93C811E4E68BA00DED595 /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC531D9F90B5001C8DA6 /* Unique.xcdatamodeld */; }; - 14D93C831E4E68FA00DED595 /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DBDD1D9F90B5001C8DA6 /* Helper.swift */; }; - 14D93C841E4E690A00DED595 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C046341DBC19D300CB6C16 /* JSON.swift */; }; - 14E269031E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */; }; - 14E269041E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */; }; - 14E269051E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */; }; 14E2F0A11E7ADE0E00DF1776 /* Sync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14241E981DBC39730042ED81 /* Sync.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 14E2F0A21E7ADE1400DF1776 /* Sync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14241E8B1DBC39690042ED81 /* Sync.framework */; }; - 14E2F0A31E7ADFB500DF1776 /* LightweightMigrationModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */; }; - 14E2F0A41E7ADFB500DF1776 /* ModelGroup.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 146738921E7ADC1900913C8E /* ModelGroup.xcdatamodeld */; }; - 14E2F0A51E7ADFB500DF1776 /* SimpleModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */; }; - 14E2F0A61E7ADFB500DF1776 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146738951E7ADC1900913C8E /* Tests.swift */; }; - 14E2F0A71E7ADFBA00DF1776 /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84E9F1E4E748000701B8A /* DateTests.swift */; }; - 14E2F0A91E7ADFC100DF1776 /* PrimaryKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */; }; - 14E2F0AA1E7ADFC600DF1776 /* NSString_SyncInflectionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */; }; - 14E2F0AB1E7ADFD200DF1776 /* DictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA71E4E748000701B8A /* DictionaryTests.swift */; }; - 14E2F0AC1E7ADFD200DF1776 /* FillWithDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */; }; - 14E2F0AD1E7ADFD200DF1776 /* HelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAA1E4E748000701B8A /* HelperTests.m */; }; - 14E2F0AE1E7ADFD200DF1776 /* SyncDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */; }; - 14E2F0AF1E7ADFD200DF1776 /* SyncFillWithDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */; }; - 14E2F0B01E7ADFE000DF1776 /* 112.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EAE1E4E748000701B8A /* 112.xcdatamodeld */; }; - 14E2F0B11E7ADFE000DF1776 /* 121.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB01E4E748000701B8A /* 121.xcdatamodeld */; }; - 14E2F0B21E7ADFE000DF1776 /* 123.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB21E4E748000701B8A /* 123.xcdatamodeld */; }; - 14E2F0B31E7ADFE000DF1776 /* 129.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB41E4E748000701B8A /* 129.xcdatamodeld */; }; - 14E2F0B41E7ADFE000DF1776 /* 137.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB61E4E748000701B8A /* 137.xcdatamodeld */; }; - 14E2F0B51E7ADFE000DF1776 /* 140.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EB81E4E748000701B8A /* 140.xcdatamodeld */; }; - 14E2F0B61E7ADFE000DF1776 /* 142.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBA1E4E748000701B8A /* 142.xcdatamodeld */; }; - 14E2F0B71E7ADFE000DF1776 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBC1E4E748000701B8A /* Model.xcdatamodeld */; }; - 14E2F0B81E7ADFE000DF1776 /* Ordered.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EBE1E4E748000701B8A /* Ordered.xcdatamodeld */; }; - 14E2F0B91E7ADFE700DF1776 /* BadAPIValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */; }; - 14E2F0BB1E7ADFE700DF1776 /* DateStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC31E4E748000701B8A /* DateStringTransformer.m */; }; - 14E2F0BD1E7ADFE700DF1776 /* SyncTestValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */; }; - 14E2F0BE1E7ADFEC00DF1776 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C046341DBC19D300CB6C16 /* JSON.swift */; }; - 14E2F0BF1E7ADFF900DF1776 /* NSArray+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC551D9F90B5001C8DA6 /* NSArray+SyncTests.swift */; }; - 14E2F0C01E7ADFF900DF1776 /* NSEntityDescription+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC561D9F90B5001C8DA6 /* NSEntityDescription+SyncTests.swift */; }; - 14E2F0C11E7ADFF900DF1776 /* NSManagedObject+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC571D9F90B5001C8DA6 /* NSManagedObject+SyncTests.swift */; }; - 14E2F0C21E7ADFF900DF1776 /* NSManagedObjectContext+SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC581D9F90B5001C8DA6 /* NSManagedObjectContext+SyncTests.swift */; }; - 14E2F0C31E7ADFF900DF1776 /* SyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC591D9F90B5001C8DA6 /* SyncTests.swift */; }; - 14E2F0C41E7ADFF900DF1776 /* SyncDelegateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14BA60E81DC0247700C97D6F /* SyncDelegateTests.swift */; }; - 14E2F0C51E7ADFF900DF1776 /* NSPersistentContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14E2852E1DC173A800C4E461 /* NSPersistentContainerTests.swift */; }; - 14E2F0C61E7ADFF900DF1776 /* InsertOrUpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146EB24D1DEF75D70068EDC3 /* InsertOrUpdateTests.swift */; }; - 14E2F0C71E7ADFF900DF1776 /* UpdateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 444546D51DF06E2600CC7928 /* UpdateTests.swift */; }; - 14E2F0C81E7ADFF900DF1776 /* DeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 146EB24C1DEF75D70068EDC3 /* DeleteTests.swift */; }; - 14E2F0C91E7ADFF900DF1776 /* FetchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44584FDB1DF2EE550082D7A0 /* FetchTests.swift */; }; - 14E2F0CA1E7AE00200DF1776 /* 3ca82a0.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4E28B59E1DEE43F8007FED27 /* 3ca82a0.xcdatamodeld */; }; - 14E2F0CB1E7AE00200DF1776 /* 84.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC351D9F90B5001C8DA6 /* 84.xcdatamodeld */; }; - 14E2F0CC1E7AE00200DF1776 /* 113.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC251D9F90B5001C8DA6 /* 113.xcdatamodeld */; }; - 14E2F0CD1E7AE00200DF1776 /* 125.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC271D9F90B5001C8DA6 /* 125.xcdatamodeld */; }; - 14E2F0CE1E7AE00200DF1776 /* 151-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC171D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodeld */; }; - 14E2F0CF1E7AE00200DF1776 /* 151-ordered-many-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC191D9F90B5001C8DA6 /* 151-ordered-many-to-many.xcdatamodeld */; }; - 14E2F0D01E7AE00200DF1776 /* 151-ordered-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1B1D9F90B5001C8DA6 /* 151-ordered-to-many.xcdatamodeld */; }; - 14E2F0D11E7AE00200DF1776 /* 151-to-many.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1D1D9F90B5001C8DA6 /* 151-to-many.xcdatamodeld */; }; - 14E2F0D21E7AE00200DF1776 /* 157.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC291D9F90B5001C8DA6 /* 157.xcdatamodeld */; }; - 14E2F0D31E7AE00200DF1776 /* 179.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2B1D9F90B5001C8DA6 /* 179.xcdatamodeld */; }; - 14E2F0D41E7AE00200DF1776 /* 202.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2D1D9F90B5001C8DA6 /* 202.xcdatamodeld */; }; - 14E2F0D51E7AE00200DF1776 /* 225.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC1F1D9F90B5001C8DA6 /* 225.xcdatamodeld */; }; - 14E2F0D61E7AE00200DF1776 /* 233.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4E2F71E71DD3DD56003F0108 /* 233.xcdatamodeld */; }; - 14E2F0D71E7AE00200DF1776 /* 239.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC2F1D9F90B5001C8DA6 /* 239.xcdatamodeld */; }; - 14E2F0D81E7AE00200DF1776 /* 254.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC311D9F90B5001C8DA6 /* 254.xcdatamodeld */; }; - 14E2F0D91E7AE00200DF1776 /* 257.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC331D9F90B5001C8DA6 /* 257.xcdatamodeld */; }; - 14E2F0DA1E7AE00200DF1776 /* 265.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 140944AE1DF0BC280037F85A /* 265.xcdatamodeld */; }; - 14E2F0DB1E7AE00200DF1776 /* 277.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 140D43221DFF4D3A00E3B159 /* 277.xcdatamodeld */; }; - 14E2F0DC1E7AE00200DF1776 /* 280.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC211D9F90B5001C8DA6 /* 280.xcdatamodeld */; }; - 14E2F0DD1E7AE00200DF1776 /* 283.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC231D9F90B5001C8DA6 /* 283.xcdatamodeld */; }; - 14E2F0DE1E7AE00200DF1776 /* 320.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 14E9C1391DEA2ECD00A21B9E /* 320.xcdatamodeld */; }; - 14E2F0DF1E7AE00200DF1776 /* Camelcase.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC371D9F90B5001C8DA6 /* Camelcase.xcdatamodeld */; }; - 14E2F0E01E7AE00200DF1776 /* Contacts.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC391D9F90B5001C8DA6 /* Contacts.xcdatamodeld */; }; - 14E2F0E11E7AE00200DF1776 /* CustomRelationshipKey.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3B1D9F90B5001C8DA6 /* CustomRelationshipKey.xcdatamodeld */; }; - 14E2F0E21E7AE00200DF1776 /* id.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3D1D9F90B5001C8DA6 /* id.xcdatamodeld */; }; - 14E2F0E31E7AE00200DF1776 /* InsertObjectsInParent.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC3F1D9F90B5001C8DA6 /* InsertObjectsInParent.xcdatamodeld */; }; - 14E2F0E41E7AE00200DF1776 /* Markets.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC411D9F90B5001C8DA6 /* Markets.xcdatamodeld */; }; - 14E2F0E51E7AE00200DF1776 /* Notes.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC431D9F90B5001C8DA6 /* Notes.xcdatamodeld */; }; - 14E2F0E61E7AE00200DF1776 /* NotesB.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC451D9F90B5001C8DA6 /* NotesB.xcdatamodeld */; }; - 14E2F0E71E7AE00200DF1776 /* OrderedSocial.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC471D9F90B5001C8DA6 /* OrderedSocial.xcdatamodeld */; }; - 14E2F0E81E7AE00200DF1776 /* Organizations.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC491D9F90B5001C8DA6 /* Organizations.xcdatamodeld */; }; - 14E2F0E91E7AE00200DF1776 /* Patients.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4B1D9F90B5001C8DA6 /* Patients.xcdatamodeld */; }; - 14E2F0EA1E7AE00200DF1776 /* Recursive.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4D1D9F90B5001C8DA6 /* Recursive.xcdatamodeld */; }; - 14E2F0EB1E7AE00200DF1776 /* Social.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC4F1D9F90B5001C8DA6 /* Social.xcdatamodeld */; }; - 14E2F0EC1E7AE00200DF1776 /* Tests.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 1421405B1DBCDD52000FF107 /* Tests.xcdatamodeld */; }; - 14E2F0ED1E7AE00200DF1776 /* ToOne.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC511D9F90B5001C8DA6 /* ToOne.xcdatamodeld */; }; - 14E2F0EE1E7AE00200DF1776 /* Unique.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 4403DC531D9F90B5001C8DA6 /* Unique.xcdatamodeld */; }; - 14E2F0EF1E7AE01600DF1776 /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4403DBDD1D9F90B5001C8DA6 /* Helper.swift */; }; - 14E2F0F01E7AE02F00DF1776 /* DataFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */; }; - 14E2F0F11E7AE02F00DF1776 /* DataFilter.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */; }; - 14E2F0F21E7AE03400DF1776 /* TestCheckTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CC760F1D9F9076003545A4 /* TestCheckTests.swift */; }; 14E2F0F31E7AE12200DF1776 /* Sync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14241E711DBC39520042ED81 /* Sync.framework */; }; 14E93C441DBCCD2800E3304E /* Sync.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E93C431DBCCD2800E3304E /* Sync.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14E93C461DBCCD2800E3304E /* Sync.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E93C431DBCCD2800E3304E /* Sync.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14E9C1401DEA2EE100A21B9E /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14E9C13E1DEA2EE100A21B9E /* 320.json */; }; - 14E9C1411DEA2EE100A21B9E /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14E9C13E1DEA2EE100A21B9E /* 320.json */; }; - 14E9C1421DEA2EE100A21B9E /* 320.json in Resources */ = {isa = PBXBuildFile; fileRef = 14E9C13E1DEA2EE100A21B9E /* 320.json */; }; 14F6275B1E7AE6B2001C2EA0 /* DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F6275C1E7AE6B2001C2EA0 /* NSDate+SyncPropertyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93BFE1E4E65C700DED595 /* NSDate+SyncPropertyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14F6275D1E7AE6B2001C2EA0 /* NSEntityDescription+SyncPrimaryKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D93C011E4E65C700DED595 /* NSEntityDescription+SyncPrimaryKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -502,85 +573,14 @@ 14F627781E7AE6B5001C2EA0 /* Result.swift in Headers */ = {isa = PBXBuildFile; fileRef = 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F627791E7AE6CF001C2EA0 /* DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 14F6277A1E7AE6E1001C2EA0 /* DataStack.swift in Headers */ = {isa = PBXBuildFile; fileRef = 1467388B1E7ADBA700913C8E /* DataStack.swift */; settings = {ATTRIBUTES = (Public, ); }; }; - 4403DC5B1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBDF1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json */; }; - 4403DC5C1D9F90B5001C8DA6 /* 151-many-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE01D9F90B5001C8DA6 /* 151-many-to-many-notes.json */; }; - 4403DC5D1D9F90B5001C8DA6 /* 151-many-to-many-tags.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE11D9F90B5001C8DA6 /* 151-many-to-many-tags.json */; }; - 4403DC5E1D9F90B5001C8DA6 /* 151-to-many-notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE21D9F90B5001C8DA6 /* 151-to-many-notes.json */; }; - 4403DC5F1D9F90B5001C8DA6 /* 151-to-many-users-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE31D9F90B5001C8DA6 /* 151-to-many-users-update.json */; }; - 4403DC601D9F90B5001C8DA6 /* 151-to-many-users.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE41D9F90B5001C8DA6 /* 151-to-many-users.json */; }; - 4403DC611D9F90B5001C8DA6 /* 157-cities.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE51D9F90B5001C8DA6 /* 157-cities.json */; }; - 4403DC621D9F90B5001C8DA6 /* 157-locations-update.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE61D9F90B5001C8DA6 /* 157-locations-update.json */; }; - 4403DC631D9F90B5001C8DA6 /* 157-locations.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE71D9F90B5001C8DA6 /* 157-locations.json */; }; - 4403DC641D9F90B5001C8DA6 /* 225-a-empty.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE81D9F90B5001C8DA6 /* 225-a-empty.json */; }; - 4403DC651D9F90B5001C8DA6 /* 225-a-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBE91D9F90B5001C8DA6 /* 225-a-null.json */; }; - 4403DC661D9F90B5001C8DA6 /* 225-a-replaced.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEA1D9F90B5001C8DA6 /* 225-a-replaced.json */; }; - 4403DC671D9F90B5001C8DA6 /* 225-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEB1D9F90B5001C8DA6 /* 225-a.json */; }; - 4403DC681D9F90B5001C8DA6 /* 280.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEC1D9F90B5001C8DA6 /* 280.json */; }; - 4403DC691D9F90B5001C8DA6 /* 283.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBED1D9F90B5001C8DA6 /* 283.json */; }; - 4403DC6A1D9F90B5001C8DA6 /* bug-113-comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEE1D9F90B5001C8DA6 /* bug-113-comments-no-id.json */; }; - 4403DC6B1D9F90B5001C8DA6 /* bug-113-custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBEF1D9F90B5001C8DA6 /* bug-113-custom_relationship_key_to_one.json */; }; - 4403DC6C1D9F90B5001C8DA6 /* bug-113-stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF01D9F90B5001C8DA6 /* bug-113-stories-comments-no-ids.json */; }; - 4403DC6D1D9F90B5001C8DA6 /* bug-125-light.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF11D9F90B5001C8DA6 /* bug-125-light.json */; }; - 4403DC6E1D9F90B5001C8DA6 /* bug-125.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF21D9F90B5001C8DA6 /* bug-125.json */; }; - 4403DC6F1D9F90B5001C8DA6 /* bug-179-places.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF31D9F90B5001C8DA6 /* bug-179-places.json */; }; - 4403DC701D9F90B5001C8DA6 /* bug-179-routes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF41D9F90B5001C8DA6 /* bug-179-routes.json */; }; - 4403DC711D9F90B5001C8DA6 /* bug-202-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF51D9F90B5001C8DA6 /* bug-202-a.json */; }; - 4403DC721D9F90B5001C8DA6 /* bug-202-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF61D9F90B5001C8DA6 /* bug-202-b.json */; }; - 4403DC731D9F90B5001C8DA6 /* bug-239.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF71D9F90B5001C8DA6 /* bug-239.json */; }; - 4403DC741D9F90B5001C8DA6 /* bug-254.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF81D9F90B5001C8DA6 /* bug-254.json */; }; - 4403DC751D9F90B5001C8DA6 /* bug-257.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBF91D9F90B5001C8DA6 /* bug-257.json */; }; - 4403DC761D9F90B5001C8DA6 /* bug-number-84.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFA1D9F90B5001C8DA6 /* bug-number-84.json */; }; - 4403DC771D9F90B5001C8DA6 /* camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFB1D9F90B5001C8DA6 /* camelcase.json */; }; - 4403DC781D9F90B5001C8DA6 /* comments-no-id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFC1D9F90B5001C8DA6 /* comments-no-id.json */; }; - 4403DC791D9F90B5001C8DA6 /* custom_relationship_key_to_many.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFD1D9F90B5001C8DA6 /* custom_relationship_key_to_many.json */; }; - 4403DC7A1D9F90B5001C8DA6 /* custom_relationship_key_to_one.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFE1D9F90B5001C8DA6 /* custom_relationship_key_to_one.json */; }; - 4403DC7B1D9F90B5001C8DA6 /* id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DBFF1D9F90B5001C8DA6 /* id.json */; }; - 4403DC7C1D9F90B5001C8DA6 /* images.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC001D9F90B5001C8DA6 /* images.json */; }; - 4403DC7D1D9F90B5001C8DA6 /* markets_items.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC011D9F90B5001C8DA6 /* markets_items.json */; }; - 4403DC7E1D9F90B5001C8DA6 /* notes_for_user_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC021D9F90B5001C8DA6 /* notes_for_user_a.json */; }; - 4403DC7F1D9F90B5001C8DA6 /* notes_with_user_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC031D9F90B5001C8DA6 /* notes_with_user_id.json */; }; - 4403DC801D9F90B5001C8DA6 /* notes_with_user_id_custom.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC041D9F90B5001C8DA6 /* notes_with_user_id_custom.json */; }; - 4403DC811D9F90B5001C8DA6 /* numbers.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC051D9F90B5001C8DA6 /* numbers.json */; }; - 4403DC821D9F90B5001C8DA6 /* numbers_in_collection.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC061D9F90B5001C8DA6 /* numbers_in_collection.json */; }; - 4403DC831D9F90B5001C8DA6 /* operation-types-users-a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC071D9F90B5001C8DA6 /* operation-types-users-a.json */; }; - 4403DC841D9F90B5001C8DA6 /* operation-types-users-b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC081D9F90B5001C8DA6 /* operation-types-users-b.json */; }; - 4403DC851D9F90B5001C8DA6 /* organizations-tree.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC091D9F90B5001C8DA6 /* organizations-tree.json */; }; - 4403DC861D9F90B5001C8DA6 /* patients.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0A1D9F90B5001C8DA6 /* patients.json */; }; - 4403DC871D9F90B5001C8DA6 /* stories-comments-no-ids.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0B1D9F90B5001C8DA6 /* stories-comments-no-ids.json */; }; - 4403DC881D9F90B5001C8DA6 /* story-summarize.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0C1D9F90B5001C8DA6 /* story-summarize.json */; }; - 4403DC891D9F90B5001C8DA6 /* tagged_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0D1D9F90B5001C8DA6 /* tagged_notes.json */; }; - 4403DC8A1D9F90B5001C8DA6 /* to-one-camelcase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0E1D9F90B5001C8DA6 /* to-one-camelcase.json */; }; - 4403DC8B1D9F90B5001C8DA6 /* to-one-snakecase.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC0F1D9F90B5001C8DA6 /* to-one-snakecase.json */; }; - 4403DC8C1D9F90B5001C8DA6 /* unique.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC101D9F90B5001C8DA6 /* unique.json */; }; - 4403DC8D1D9F90B5001C8DA6 /* users_a.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC111D9F90B5001C8DA6 /* users_a.json */; }; - 4403DC8E1D9F90B5001C8DA6 /* users_b.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC121D9F90B5001C8DA6 /* users_b.json */; }; - 4403DC8F1D9F90B5001C8DA6 /* users_c.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC131D9F90B5001C8DA6 /* users_c.json */; }; - 4403DC901D9F90B5001C8DA6 /* users_company.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC141D9F90B5001C8DA6 /* users_company.json */; }; - 4403DC911D9F90B5001C8DA6 /* users_notes.json in Resources */ = {isa = PBXBuildFile; fileRef = 4403DC151D9F90B5001C8DA6 /* users_notes.json */; }; 441FA7B91E4F00D300023821 /* User+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7B71E4F00D300023821 /* User+CoreDataClass.swift */; }; 441FA7BA1E4F00D300023821 /* User+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441FA7B81E4F00D300023821 /* User+CoreDataProperties.swift */; }; - 445D3BC71D9F9373007F9E26 /* note.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BBE1D9F9373007F9E26 /* note.json */; }; - 445D3BC81D9F9373007F9E26 /* simple.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BBF1D9F9373007F9E26 /* simple.json */; }; - 445D3BC91D9F9373007F9E26 /* users-with-nil.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC01D9F9373007F9E26 /* users-with-nil.json */; }; - 445D3BCA1D9F9373007F9E26 /* users-with-null.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC11D9F9373007F9E26 /* users-with-null.json */; }; - 445D3BCB1D9F9373007F9E26 /* users.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC21D9F9373007F9E26 /* users.json */; }; - 445D3BCC1D9F9373007F9E26 /* users2.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC31D9F9373007F9E26 /* users2.json */; }; - 445D3BCD1D9F9373007F9E26 /* users3.json in Resources */ = {isa = PBXBuildFile; fileRef = 445D3BC41D9F9373007F9E26 /* users3.json */; }; 44B547F81DCF27FF009215FA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44B547F71DCF27FF009215FA /* AppDelegate.swift */; }; 44B547FA1DCF27FF009215FA /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44B547F91DCF27FF009215FA /* ViewController.swift */; }; 44B548011DCF27FF009215FA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 44B548001DCF27FF009215FA /* Assets.xcassets */; }; 44B548041DCF27FF009215FA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 44B548021DCF27FF009215FA /* LaunchScreen.storyboard */; }; 44B5481B1DCF3DED009215FA /* sample.json in Resources */ = {isa = PBXBuildFile; fileRef = 44B5481A1DCF3DED009215FA /* sample.json */; }; 44B5481E1DCF3E18009215FA /* iOSDemo.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 44B5481C1DCF3E18009215FA /* iOSDemo.xcdatamodeld */; }; - 44CA3F6A1DEB349100F242D0 /* 237.json in Resources */ = {isa = PBXBuildFile; fileRef = 44CA3F691DEB349100F242D0 /* 237.json */; }; - 44CA3F6B1DEB349100F242D0 /* 237.json in Resources */ = {isa = PBXBuildFile; fileRef = 44CA3F691DEB349100F242D0 /* 237.json */; }; - 44CA3F6C1DEB349100F242D0 /* 237.json in Resources */ = {isa = PBXBuildFile; fileRef = 44CA3F691DEB349100F242D0 /* 237.json */; }; - 4E28B5A31DEE446D007FED27 /* 3ca82a0.json in Resources */ = {isa = PBXBuildFile; fileRef = 4E3DF6BC1DEE39F6007BD598 /* 3ca82a0.json */; }; - 4E28B5A41DEE446D007FED27 /* 3ca82a0.json in Resources */ = {isa = PBXBuildFile; fileRef = 4E3DF6BC1DEE39F6007BD598 /* 3ca82a0.json */; }; - 4E28B5A51DEE446E007FED27 /* 3ca82a0.json in Resources */ = {isa = PBXBuildFile; fileRef = 4E3DF6BC1DEE39F6007BD598 /* 3ca82a0.json */; }; - 4E2F71F41DD60115003F0108 /* 233.json in Resources */ = {isa = PBXBuildFile; fileRef = 4E2F71F21DD60110003F0108 /* 233.json */; }; - 4E2F71F51DD60116003F0108 /* 233.json in Resources */ = {isa = PBXBuildFile; fileRef = 4E2F71F21DD60110003F0108 /* 233.json */; }; - 4E2F71F61DD60116003F0108 /* 233.json in Resources */ = {isa = PBXBuildFile; fileRef = 4E2F71F21DD60110003F0108 /* 233.json */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -660,11 +660,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 140944AA1DF0B9840037F85A /* 265.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 265.json; sourceTree = "<group>"; }; - 140944AF1DF0BC280037F85A /* 265.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 265.xcdatamodel; sourceTree = "<group>"; }; - 140D43231DFF4D3A00E3B159 /* 239.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 239.xcdatamodel; sourceTree = "<group>"; }; - 140D43271DFF4DBC00E3B159 /* 277.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 277.json; sourceTree = "<group>"; }; - 1421405C1DBCDD52000FF107 /* Tests.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Tests.xcdatamodel; sourceTree = "<group>"; }; 14241E711DBC39520042ED81 /* Sync.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sync.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 14241E7E1DBC39600042ED81 /* Sync.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sync.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 14241E8B1DBC39690042ED81 /* Sync.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Sync.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -673,41 +668,159 @@ 142CD2A31DEF39AE002FDABE /* Sync+DataStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Sync+DataStack.swift"; sourceTree = "<group>"; }; 142CD2AC1DEF3A01002FDABE /* Sync+NSPersistentContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Sync+NSPersistentContainer.swift"; sourceTree = "<group>"; }; 1467388B1E7ADBA700913C8E /* DataStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataStack.swift; sourceTree = "<group>"; }; - 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = LightweightMigrationModel.xcdatamodel; sourceTree = "<group>"; }; - 146738931E7ADC1900913C8E /* ModelGroup.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ModelGroup.xcdatamodel; sourceTree = "<group>"; }; - 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SimpleModel.xcdatamodel; sourceTree = "<group>"; }; - 146738951E7ADC1900913C8E /* Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; }; 146D72AC1AB782920058798C /* iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 146D72B11AB782920058798C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - 146EB24C1DEF75D70068EDC3 /* DeleteTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeleteTests.swift; sourceTree = "<group>"; }; - 146EB24D1DEF75D70068EDC3 /* InsertOrUpdateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InsertOrUpdateTests.swift; sourceTree = "<group>"; }; + 14867D021E7AF4D1001D228A /* DataFilter.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = DataFilter.xcdatamodel; sourceTree = "<group>"; }; + 14867D031E7AF4D1001D228A /* DataFilterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataFilterTests.swift; sourceTree = "<group>"; }; + 14867D041E7AF4D1001D228A /* note.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = note.json; sourceTree = "<group>"; }; + 14867D051E7AF4D1001D228A /* simple.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = simple.json; sourceTree = "<group>"; }; + 14867D061E7AF4D1001D228A /* users-with-nil.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "users-with-nil.json"; sourceTree = "<group>"; }; + 14867D071E7AF4D1001D228A /* users-with-null.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "users-with-null.json"; sourceTree = "<group>"; }; + 14867D081E7AF4D1001D228A /* users.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users.json; sourceTree = "<group>"; }; + 14867D091E7AF4D1001D228A /* users2.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users2.json; sourceTree = "<group>"; }; + 14867D0A1E7AF4D2001D228A /* users3.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users3.json; sourceTree = "<group>"; }; + 14867D0C1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = LightweightMigrationModel.xcdatamodel; sourceTree = "<group>"; }; + 14867D0E1E7AF4D2001D228A /* ModelGroup.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ModelGroup.xcdatamodel; sourceTree = "<group>"; }; + 14867D0F1E7AF4D2001D228A /* SimpleModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SimpleModel.xcdatamodel; sourceTree = "<group>"; }; + 14867D101E7AF4D2001D228A /* Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; }; + 14867D121E7AF4D2001D228A /* DateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = "<group>"; }; + 14867D141E7AF4D2001D228A /* PrimaryKeyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimaryKeyTests.m; sourceTree = "<group>"; }; + 14867D161E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SyncPrimaryKey.xcdatamodel; sourceTree = "<group>"; }; + 14867D181E7AF4D2001D228A /* NSString_SyncInflectionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSString_SyncInflectionsTests.m; sourceTree = "<group>"; }; + 14867D1A1E7AF4D2001D228A /* DeleteTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeleteTests.swift; sourceTree = "<group>"; }; + 14867D1B1E7AF4D2001D228A /* FetchTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchTests.swift; sourceTree = "<group>"; }; + 14867D1D1E7AF4D2001D228A /* Helper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Helper.swift; sourceTree = "<group>"; }; + 14867D1E1E7AF4D2001D228A /* InsertOrUpdateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InsertOrUpdateTests.swift; sourceTree = "<group>"; }; + 14867D201E7AF4D2001D228A /* 151-many-to-many-notes-update.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-many-to-many-notes-update.json"; sourceTree = "<group>"; }; + 14867D211E7AF4D2001D228A /* 151-many-to-many-notes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-many-to-many-notes.json"; sourceTree = "<group>"; }; + 14867D221E7AF4D2001D228A /* 151-many-to-many-tags.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-many-to-many-tags.json"; sourceTree = "<group>"; }; + 14867D231E7AF4D2001D228A /* 151-to-many-notes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-to-many-notes.json"; sourceTree = "<group>"; }; + 14867D241E7AF4D2001D228A /* 151-to-many-users-update.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-to-many-users-update.json"; sourceTree = "<group>"; }; + 14867D251E7AF4D2001D228A /* 151-to-many-users.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-to-many-users.json"; sourceTree = "<group>"; }; + 14867D261E7AF4D2001D228A /* 157-cities.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "157-cities.json"; sourceTree = "<group>"; }; + 14867D271E7AF4D2001D228A /* 157-locations-update.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "157-locations-update.json"; sourceTree = "<group>"; }; + 14867D281E7AF4D2001D228A /* 157-locations.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "157-locations.json"; sourceTree = "<group>"; }; + 14867D291E7AF4D2001D228A /* 225-a-empty.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "225-a-empty.json"; sourceTree = "<group>"; }; + 14867D2A1E7AF4D2001D228A /* 225-a-null.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "225-a-null.json"; sourceTree = "<group>"; }; + 14867D2B1E7AF4D2001D228A /* 225-a-replaced.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "225-a-replaced.json"; sourceTree = "<group>"; }; + 14867D2C1E7AF4D2001D228A /* 225-a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "225-a.json"; sourceTree = "<group>"; }; + 14867D2D1E7AF4D2001D228A /* 233.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 233.json; sourceTree = "<group>"; }; + 14867D2E1E7AF4D2001D228A /* 237.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 237.json; sourceTree = "<group>"; }; + 14867D2F1E7AF4D2001D228A /* 265.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 265.json; sourceTree = "<group>"; }; + 14867D301E7AF4D2001D228A /* 277.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 277.json; sourceTree = "<group>"; }; + 14867D311E7AF4D2001D228A /* 280.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 280.json; sourceTree = "<group>"; }; + 14867D321E7AF4D2001D228A /* 283.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 283.json; sourceTree = "<group>"; }; + 14867D331E7AF4D2001D228A /* 320.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 320.json; sourceTree = "<group>"; }; + 14867D341E7AF4D2001D228A /* 3ca82a0.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 3ca82a0.json; sourceTree = "<group>"; }; + 14867D351E7AF4D2001D228A /* bug-113-comments-no-id.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-113-comments-no-id.json"; sourceTree = "<group>"; }; + 14867D361E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-113-custom_relationship_key_to_one.json"; sourceTree = "<group>"; }; + 14867D371E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-113-stories-comments-no-ids.json"; sourceTree = "<group>"; }; + 14867D381E7AF4D2001D228A /* bug-125-light.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-125-light.json"; sourceTree = "<group>"; }; + 14867D391E7AF4D2001D228A /* bug-125.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-125.json"; sourceTree = "<group>"; }; + 14867D3A1E7AF4D2001D228A /* bug-179-places.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-179-places.json"; sourceTree = "<group>"; }; + 14867D3B1E7AF4D2001D228A /* bug-179-routes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-179-routes.json"; sourceTree = "<group>"; }; + 14867D3C1E7AF4D2001D228A /* bug-202-a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-202-a.json"; sourceTree = "<group>"; }; + 14867D3D1E7AF4D2001D228A /* bug-202-b.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-202-b.json"; sourceTree = "<group>"; }; + 14867D3E1E7AF4D2001D228A /* bug-239.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-239.json"; sourceTree = "<group>"; }; + 14867D3F1E7AF4D2001D228A /* bug-254.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-254.json"; sourceTree = "<group>"; }; + 14867D401E7AF4D2001D228A /* bug-257.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-257.json"; sourceTree = "<group>"; }; + 14867D411E7AF4D2001D228A /* bug-number-84.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-number-84.json"; sourceTree = "<group>"; }; + 14867D421E7AF4D2001D228A /* camelcase.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = camelcase.json; sourceTree = "<group>"; }; + 14867D431E7AF4D2001D228A /* comments-no-id.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "comments-no-id.json"; sourceTree = "<group>"; }; + 14867D441E7AF4D2001D228A /* custom_relationship_key_to_many.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = custom_relationship_key_to_many.json; sourceTree = "<group>"; }; + 14867D451E7AF4D2001D228A /* custom_relationship_key_to_one.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = custom_relationship_key_to_one.json; sourceTree = "<group>"; }; + 14867D461E7AF4D2001D228A /* id.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = id.json; sourceTree = "<group>"; }; + 14867D471E7AF4D2001D228A /* images.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = images.json; sourceTree = "<group>"; }; + 14867D481E7AF4D2001D228A /* markets_items.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = markets_items.json; sourceTree = "<group>"; }; + 14867D491E7AF4D2001D228A /* notes_for_user_a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = notes_for_user_a.json; sourceTree = "<group>"; }; + 14867D4A1E7AF4D2001D228A /* notes_with_user_id.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = notes_with_user_id.json; sourceTree = "<group>"; }; + 14867D4B1E7AF4D2001D228A /* notes_with_user_id_custom.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = notes_with_user_id_custom.json; sourceTree = "<group>"; }; + 14867D4C1E7AF4D2001D228A /* numbers.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = numbers.json; sourceTree = "<group>"; }; + 14867D4D1E7AF4D2001D228A /* numbers_in_collection.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = numbers_in_collection.json; sourceTree = "<group>"; }; + 14867D4E1E7AF4D2001D228A /* operation-types-users-a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "operation-types-users-a.json"; sourceTree = "<group>"; }; + 14867D4F1E7AF4D2001D228A /* operation-types-users-b.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "operation-types-users-b.json"; sourceTree = "<group>"; }; + 14867D501E7AF4D2001D228A /* organizations-tree.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "organizations-tree.json"; sourceTree = "<group>"; }; + 14867D511E7AF4D2001D228A /* patients.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = patients.json; sourceTree = "<group>"; }; + 14867D521E7AF4D2001D228A /* stories-comments-no-ids.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "stories-comments-no-ids.json"; sourceTree = "<group>"; }; + 14867D531E7AF4D2001D228A /* story-summarize.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "story-summarize.json"; sourceTree = "<group>"; }; + 14867D541E7AF4D2001D228A /* tagged_notes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = tagged_notes.json; sourceTree = "<group>"; }; + 14867D551E7AF4D2001D228A /* to-one-camelcase.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "to-one-camelcase.json"; sourceTree = "<group>"; }; + 14867D561E7AF4D2001D228A /* to-one-snakecase.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "to-one-snakecase.json"; sourceTree = "<group>"; }; + 14867D571E7AF4D2001D228A /* unique.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = unique.json; sourceTree = "<group>"; }; + 14867D581E7AF4D2001D228A /* users_a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_a.json; sourceTree = "<group>"; }; + 14867D591E7AF4D2001D228A /* users_b.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_b.json; sourceTree = "<group>"; }; + 14867D5A1E7AF4D2001D228A /* users_c.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_c.json; sourceTree = "<group>"; }; + 14867D5B1E7AF4D2001D228A /* users_company.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_company.json; sourceTree = "<group>"; }; + 14867D5C1E7AF4D2001D228A /* users_notes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_notes.json; sourceTree = "<group>"; }; + 14867D5F1E7AF4D2001D228A /* 113.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 113.xcdatamodel; sourceTree = "<group>"; }; + 14867D611E7AF4D2001D228A /* 125.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 125.xcdatamodel; sourceTree = "<group>"; }; + 14867D631E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-many-to-many.xcdatamodel"; sourceTree = "<group>"; }; + 14867D651E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-many-to-many.xcdatamodel"; sourceTree = "<group>"; }; + 14867D671E7AF4D2001D228A /* 151-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-to-many.xcdatamodel"; sourceTree = "<group>"; }; + 14867D691E7AF4D2001D228A /* 151-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-to-many.xcdatamodel"; sourceTree = "<group>"; }; + 14867D6B1E7AF4D2001D228A /* 157.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 157.xcdatamodel; sourceTree = "<group>"; }; + 14867D6D1E7AF4D2001D228A /* 179.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 179.xcdatamodel; sourceTree = "<group>"; }; + 14867D6F1E7AF4D2001D228A /* 202.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 202.xcdatamodel; sourceTree = "<group>"; }; + 14867D711E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-many-to-many.xcdatamodel"; sourceTree = "<group>"; }; + 14867D731E7AF4D2001D228A /* 233.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 233.xcdatamodel; sourceTree = "<group>"; }; + 14867D751E7AF4D2001D228A /* 239.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 239.xcdatamodel; sourceTree = "<group>"; }; + 14867D771E7AF4D2001D228A /* 254.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 254.xcdatamodel; sourceTree = "<group>"; }; + 14867D791E7AF4D2001D228A /* 257.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 257.xcdatamodel; sourceTree = "<group>"; }; + 14867D7B1E7AF4D2001D228A /* 265.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 265.xcdatamodel; sourceTree = "<group>"; }; + 14867D7D1E7AF4D2001D228A /* 239.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 239.xcdatamodel; sourceTree = "<group>"; }; + 14867D7F1E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-many-to-many.xcdatamodel"; sourceTree = "<group>"; }; + 14867D811E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D831E7AF4D2001D228A /* 320.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 320.xcdatamodel; sourceTree = "<group>"; }; + 14867D851E7AF4D2001D228A /* 3ca82a0.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 3ca82a0.xcdatamodel; sourceTree = "<group>"; }; + 14867D871E7AF4D2001D228A /* 84.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 84.xcdatamodel; sourceTree = "<group>"; }; + 14867D891E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D8B1E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D8D1E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D8F1E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D911E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D931E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D951E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D971E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D991E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D9B1E7AF4D2001D228A /* Organizations.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Organizations.xcdatamodel; sourceTree = "<group>"; }; + 14867D9D1E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867D9F1E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867DA11E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867DA31E7AF4D2001D228A /* Tests.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Tests.xcdatamodel; sourceTree = "<group>"; }; + 14867DA51E7AF4D2001D228A /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; + 14867DA71E7AF4D2001D228A /* Unique.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Unique.xcdatamodel; sourceTree = "<group>"; }; + 14867DA81E7AF4D2001D228A /* NSArray+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSArray+SyncTests.swift"; sourceTree = "<group>"; }; + 14867DA91E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSEntityDescription+SyncTests.swift"; sourceTree = "<group>"; }; + 14867DAA1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObject+SyncTests.swift"; sourceTree = "<group>"; }; + 14867DAB1E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObjectContext+SyncTests.swift"; sourceTree = "<group>"; }; + 14867DAC1E7AF4D2001D228A /* NSPersistentContainerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSPersistentContainerTests.swift; sourceTree = "<group>"; }; + 14867DAD1E7AF4D2001D228A /* SyncDelegateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncDelegateTests.swift; sourceTree = "<group>"; }; + 14867DAE1E7AF4D2001D228A /* SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncTests.swift; sourceTree = "<group>"; }; + 14867DAF1E7AF4D2001D228A /* UpdateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateTests.swift; sourceTree = "<group>"; }; + 14867DB11E7AF4D2001D228A /* DictionaryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DictionaryTests.swift; sourceTree = "<group>"; }; + 14867DB21E7AF4D2001D228A /* FillWithDictionaryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FillWithDictionaryTests.swift; sourceTree = "<group>"; }; + 14867DB31E7AF4D2001D228A /* HelperTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelperTests.m; sourceTree = "<group>"; }; + 14867DB61E7AF4D2001D228A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; + 14867DB81E7AF4D2001D228A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; + 14867DBA1E7AF4D2001D228A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; + 14867DBC1E7AF4D2001D228A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; + 14867DBE1E7AF4D2001D228A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; + 14867DC01E7AF4D2001D228A /* smartworkout.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = smartworkout.xcdatamodel; sourceTree = "<group>"; }; + 14867DC21E7AF4D2001D228A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; + 14867DC41E7AF4D2001D228A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; + 14867DC61E7AF4D2001D228A /* Ordered.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Ordered.xcdatamodel; sourceTree = "<group>"; }; + 14867DC71E7AF4D2001D228A /* SyncDictionaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncDictionaryTests.m; sourceTree = "<group>"; }; + 14867DC81E7AF4D2001D228A /* SyncFillWithDictionaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncFillWithDictionaryTests.m; sourceTree = "<group>"; }; + 14867DCA1E7AF4D2001D228A /* BadAPIValueTransformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BadAPIValueTransformer.swift; sourceTree = "<group>"; }; + 14867DCB1E7AF4D2001D228A /* DateStringTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateStringTransformer.h; sourceTree = "<group>"; }; + 14867DCC1E7AF4D2001D228A /* DateStringTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateStringTransformer.m; sourceTree = "<group>"; }; + 14867DCD1E7AF4D2001D228A /* SyncTestValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncTestValueTransformer.h; sourceTree = "<group>"; }; + 14867DCE1E7AF4D2001D228A /* SyncTestValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncTestValueTransformer.m; sourceTree = "<group>"; }; + 14867DD01E7AF4D2001D228A /* TestCheckTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestCheckTests.swift; sourceTree = "<group>"; }; + 14867DD21E7AF4D2001D228A /* JSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSON.swift; sourceTree = "<group>"; }; 14975BE81DBC368B0024901A /* tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = tvOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 14975BF41DBC36960024901A /* macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 14A84E9F1E4E748000701B8A /* DateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = "<group>"; }; - 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrimaryKeyTests.m; sourceTree = "<group>"; }; - 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSString_SyncInflectionsTests.m; sourceTree = "<group>"; }; - 14A84EA71E4E748000701B8A /* DictionaryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DictionaryTests.swift; sourceTree = "<group>"; }; - 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FillWithDictionaryTests.swift; sourceTree = "<group>"; }; - 14A84EAA1E4E748000701B8A /* HelperTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelperTests.m; sourceTree = "<group>"; }; - 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncDictionaryTests.m; sourceTree = "<group>"; }; - 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncFillWithDictionaryTests.m; sourceTree = "<group>"; }; - 14A84EAF1E4E748000701B8A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; - 14A84EB11E4E748000701B8A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; - 14A84EB31E4E748000701B8A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; - 14A84EB51E4E748000701B8A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; - 14A84EB71E4E748000701B8A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; - 14A84EB91E4E748000701B8A /* smartworkout.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = smartworkout.xcdatamodel; sourceTree = "<group>"; }; - 14A84EBB1E4E748000701B8A /* hypbug.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = hypbug.xcdatamodel; sourceTree = "<group>"; }; - 14A84EBD1E4E748000701B8A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; - 14A84EBF1E4E748000701B8A /* Ordered.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Ordered.xcdatamodel; sourceTree = "<group>"; }; - 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BadAPIValueTransformer.swift; sourceTree = "<group>"; }; - 14A84EC21E4E748000701B8A /* DateStringTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateStringTransformer.h; sourceTree = "<group>"; }; - 14A84EC31E4E748000701B8A /* DateStringTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateStringTransformer.m; sourceTree = "<group>"; }; - 14A84EC41E4E748000701B8A /* SyncTestValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncTestValueTransformer.h; sourceTree = "<group>"; }; - 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncTestValueTransformer.m; sourceTree = "<group>"; }; 14AF6AFA1DFC3D88009E5BC4 /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = "<group>"; }; - 14BA60E81DC0247700C97D6F /* SyncDelegateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncDelegateTests.swift; sourceTree = "<group>"; }; - 14C046341DBC19D300CB6C16 /* JSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSON.swift; sourceTree = "<group>"; }; 14C0AF811BD6D4230009ECBE /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; }; 14C0AF821BD6D4230009ECBE /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = "<group>"; }; 14C0AF831BD6D4230009ECBE /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; @@ -721,117 +834,10 @@ 14D93C071E4E65C700DED595 /* SyncPropertyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SyncPropertyMapper.m; sourceTree = "<group>"; }; 14D93C091E4E65C700DED595 /* NSString+SyncInflections.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SyncInflections.h"; sourceTree = "<group>"; }; 14D93C0A1E4E65C700DED595 /* NSString+SyncInflections.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SyncInflections.m"; sourceTree = "<group>"; }; - 14E269021E7AF345007658C0 /* SyncPrimaryKey.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SyncPrimaryKey.xcdatamodel; sourceTree = "<group>"; }; - 14E2852E1DC173A800C4E461 /* NSPersistentContainerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSPersistentContainerTests.swift; sourceTree = "<group>"; }; 14E93C431DBCCD2800E3304E /* Sync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sync.h; sourceTree = "<group>"; }; - 14E9C13A1DEA2ECD00A21B9E /* 320.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 320.xcdatamodel; sourceTree = "<group>"; }; - 14E9C13E1DEA2EE100A21B9E /* 320.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 320.json; sourceTree = "<group>"; }; - 4403DBDD1D9F90B5001C8DA6 /* Helper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Helper.swift; sourceTree = "<group>"; }; - 4403DBDF1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-many-to-many-notes-update.json"; sourceTree = "<group>"; }; - 4403DBE01D9F90B5001C8DA6 /* 151-many-to-many-notes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-many-to-many-notes.json"; sourceTree = "<group>"; }; - 4403DBE11D9F90B5001C8DA6 /* 151-many-to-many-tags.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-many-to-many-tags.json"; sourceTree = "<group>"; }; - 4403DBE21D9F90B5001C8DA6 /* 151-to-many-notes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-to-many-notes.json"; sourceTree = "<group>"; }; - 4403DBE31D9F90B5001C8DA6 /* 151-to-many-users-update.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-to-many-users-update.json"; sourceTree = "<group>"; }; - 4403DBE41D9F90B5001C8DA6 /* 151-to-many-users.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "151-to-many-users.json"; sourceTree = "<group>"; }; - 4403DBE51D9F90B5001C8DA6 /* 157-cities.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "157-cities.json"; sourceTree = "<group>"; }; - 4403DBE61D9F90B5001C8DA6 /* 157-locations-update.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "157-locations-update.json"; sourceTree = "<group>"; }; - 4403DBE71D9F90B5001C8DA6 /* 157-locations.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "157-locations.json"; sourceTree = "<group>"; }; - 4403DBE81D9F90B5001C8DA6 /* 225-a-empty.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "225-a-empty.json"; sourceTree = "<group>"; }; - 4403DBE91D9F90B5001C8DA6 /* 225-a-null.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "225-a-null.json"; sourceTree = "<group>"; }; - 4403DBEA1D9F90B5001C8DA6 /* 225-a-replaced.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "225-a-replaced.json"; sourceTree = "<group>"; }; - 4403DBEB1D9F90B5001C8DA6 /* 225-a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "225-a.json"; sourceTree = "<group>"; }; - 4403DBEC1D9F90B5001C8DA6 /* 280.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 280.json; sourceTree = "<group>"; }; - 4403DBED1D9F90B5001C8DA6 /* 283.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 283.json; sourceTree = "<group>"; }; - 4403DBEE1D9F90B5001C8DA6 /* bug-113-comments-no-id.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-113-comments-no-id.json"; sourceTree = "<group>"; }; - 4403DBEF1D9F90B5001C8DA6 /* bug-113-custom_relationship_key_to_one.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-113-custom_relationship_key_to_one.json"; sourceTree = "<group>"; }; - 4403DBF01D9F90B5001C8DA6 /* bug-113-stories-comments-no-ids.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-113-stories-comments-no-ids.json"; sourceTree = "<group>"; }; - 4403DBF11D9F90B5001C8DA6 /* bug-125-light.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-125-light.json"; sourceTree = "<group>"; }; - 4403DBF21D9F90B5001C8DA6 /* bug-125.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-125.json"; sourceTree = "<group>"; }; - 4403DBF31D9F90B5001C8DA6 /* bug-179-places.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-179-places.json"; sourceTree = "<group>"; }; - 4403DBF41D9F90B5001C8DA6 /* bug-179-routes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-179-routes.json"; sourceTree = "<group>"; }; - 4403DBF51D9F90B5001C8DA6 /* bug-202-a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-202-a.json"; sourceTree = "<group>"; }; - 4403DBF61D9F90B5001C8DA6 /* bug-202-b.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-202-b.json"; sourceTree = "<group>"; }; - 4403DBF71D9F90B5001C8DA6 /* bug-239.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-239.json"; sourceTree = "<group>"; }; - 4403DBF81D9F90B5001C8DA6 /* bug-254.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-254.json"; sourceTree = "<group>"; }; - 4403DBF91D9F90B5001C8DA6 /* bug-257.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-257.json"; sourceTree = "<group>"; }; - 4403DBFA1D9F90B5001C8DA6 /* bug-number-84.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "bug-number-84.json"; sourceTree = "<group>"; }; - 4403DBFB1D9F90B5001C8DA6 /* camelcase.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = camelcase.json; sourceTree = "<group>"; }; - 4403DBFC1D9F90B5001C8DA6 /* comments-no-id.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "comments-no-id.json"; sourceTree = "<group>"; }; - 4403DBFD1D9F90B5001C8DA6 /* custom_relationship_key_to_many.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = custom_relationship_key_to_many.json; sourceTree = "<group>"; }; - 4403DBFE1D9F90B5001C8DA6 /* custom_relationship_key_to_one.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = custom_relationship_key_to_one.json; sourceTree = "<group>"; }; - 4403DBFF1D9F90B5001C8DA6 /* id.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = id.json; sourceTree = "<group>"; }; - 4403DC001D9F90B5001C8DA6 /* images.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = images.json; sourceTree = "<group>"; }; - 4403DC011D9F90B5001C8DA6 /* markets_items.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = markets_items.json; sourceTree = "<group>"; }; - 4403DC021D9F90B5001C8DA6 /* notes_for_user_a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = notes_for_user_a.json; sourceTree = "<group>"; }; - 4403DC031D9F90B5001C8DA6 /* notes_with_user_id.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = notes_with_user_id.json; sourceTree = "<group>"; }; - 4403DC041D9F90B5001C8DA6 /* notes_with_user_id_custom.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = notes_with_user_id_custom.json; sourceTree = "<group>"; }; - 4403DC051D9F90B5001C8DA6 /* numbers.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = numbers.json; sourceTree = "<group>"; }; - 4403DC061D9F90B5001C8DA6 /* numbers_in_collection.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = numbers_in_collection.json; sourceTree = "<group>"; }; - 4403DC071D9F90B5001C8DA6 /* operation-types-users-a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "operation-types-users-a.json"; sourceTree = "<group>"; }; - 4403DC081D9F90B5001C8DA6 /* operation-types-users-b.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "operation-types-users-b.json"; sourceTree = "<group>"; }; - 4403DC091D9F90B5001C8DA6 /* organizations-tree.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "organizations-tree.json"; sourceTree = "<group>"; }; - 4403DC0A1D9F90B5001C8DA6 /* patients.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = patients.json; sourceTree = "<group>"; }; - 4403DC0B1D9F90B5001C8DA6 /* stories-comments-no-ids.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "stories-comments-no-ids.json"; sourceTree = "<group>"; }; - 4403DC0C1D9F90B5001C8DA6 /* story-summarize.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "story-summarize.json"; sourceTree = "<group>"; }; - 4403DC0D1D9F90B5001C8DA6 /* tagged_notes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = tagged_notes.json; sourceTree = "<group>"; }; - 4403DC0E1D9F90B5001C8DA6 /* to-one-camelcase.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "to-one-camelcase.json"; sourceTree = "<group>"; }; - 4403DC0F1D9F90B5001C8DA6 /* to-one-snakecase.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "to-one-snakecase.json"; sourceTree = "<group>"; }; - 4403DC101D9F90B5001C8DA6 /* unique.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = unique.json; sourceTree = "<group>"; }; - 4403DC111D9F90B5001C8DA6 /* users_a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_a.json; sourceTree = "<group>"; }; - 4403DC121D9F90B5001C8DA6 /* users_b.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_b.json; sourceTree = "<group>"; }; - 4403DC131D9F90B5001C8DA6 /* users_c.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_c.json; sourceTree = "<group>"; }; - 4403DC141D9F90B5001C8DA6 /* users_company.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_company.json; sourceTree = "<group>"; }; - 4403DC151D9F90B5001C8DA6 /* users_notes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users_notes.json; sourceTree = "<group>"; }; - 4403DC181D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-many-to-many.xcdatamodel"; sourceTree = "<group>"; }; - 4403DC1A1D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-many-to-many.xcdatamodel"; sourceTree = "<group>"; }; - 4403DC1C1D9F90B5001C8DA6 /* 151-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-to-many.xcdatamodel"; sourceTree = "<group>"; }; - 4403DC1E1D9F90B5001C8DA6 /* 151-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-to-many.xcdatamodel"; sourceTree = "<group>"; }; - 4403DC201D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-many-to-many.xcdatamodel"; sourceTree = "<group>"; }; - 4403DC221D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "151-many-to-many.xcdatamodel"; sourceTree = "<group>"; }; - 4403DC241D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC261D9F90B5001C8DA6 /* 113.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 113.xcdatamodel; sourceTree = "<group>"; }; - 4403DC281D9F90B5001C8DA6 /* 125.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 125.xcdatamodel; sourceTree = "<group>"; }; - 4403DC2A1D9F90B5001C8DA6 /* 157.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 157.xcdatamodel; sourceTree = "<group>"; }; - 4403DC2C1D9F90B5001C8DA6 /* 179.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 179.xcdatamodel; sourceTree = "<group>"; }; - 4403DC2E1D9F90B5001C8DA6 /* 202.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 202.xcdatamodel; sourceTree = "<group>"; }; - 4403DC301D9F90B5001C8DA6 /* 239.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 239.xcdatamodel; sourceTree = "<group>"; }; - 4403DC321D9F90B5001C8DA6 /* 254.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 254.xcdatamodel; sourceTree = "<group>"; }; - 4403DC341D9F90B5001C8DA6 /* 257.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 257.xcdatamodel; sourceTree = "<group>"; }; - 4403DC361D9F90B5001C8DA6 /* 84.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 84.xcdatamodel; sourceTree = "<group>"; }; - 4403DC381D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC3A1D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC3C1D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC3E1D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC401D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC421D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC441D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC461D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC481D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC4A1D9F90B5001C8DA6 /* Organizations.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Organizations.xcdatamodel; sourceTree = "<group>"; }; - 4403DC4C1D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC4E1D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC501D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC521D9F90B5001C8DA6 /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = "<group>"; }; - 4403DC541D9F90B5001C8DA6 /* Unique.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Unique.xcdatamodel; sourceTree = "<group>"; }; - 4403DC551D9F90B5001C8DA6 /* NSArray+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSArray+SyncTests.swift"; sourceTree = "<group>"; }; - 4403DC561D9F90B5001C8DA6 /* NSEntityDescription+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSEntityDescription+SyncTests.swift"; sourceTree = "<group>"; }; - 4403DC571D9F90B5001C8DA6 /* NSManagedObject+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObject+SyncTests.swift"; sourceTree = "<group>"; }; - 4403DC581D9F90B5001C8DA6 /* NSManagedObjectContext+SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObjectContext+SyncTests.swift"; sourceTree = "<group>"; }; - 4403DC591D9F90B5001C8DA6 /* SyncTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncTests.swift; sourceTree = "<group>"; }; 441FA7B71E4F00D300023821 /* User+CoreDataClass.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "User+CoreDataClass.swift"; sourceTree = "<group>"; }; 441FA7B81E4F00D300023821 /* User+CoreDataProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "User+CoreDataProperties.swift"; sourceTree = "<group>"; }; - 444546D51DF06E2600CC7928 /* UpdateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateTests.swift; sourceTree = "<group>"; }; - 44584FDB1DF2EE550082D7A0 /* FetchTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchTests.swift; sourceTree = "<group>"; }; 445D3BB81D9F932C007F9E26 /* DataFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataFilter.swift; sourceTree = "<group>"; }; - 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataFilterTests.swift; sourceTree = "<group>"; }; - 445D3BBD1D9F9373007F9E26 /* DataFilter.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = DataFilter.xcdatamodel; sourceTree = "<group>"; }; - 445D3BBE1D9F9373007F9E26 /* note.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = note.json; sourceTree = "<group>"; }; - 445D3BBF1D9F9373007F9E26 /* simple.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = simple.json; sourceTree = "<group>"; }; - 445D3BC01D9F9373007F9E26 /* users-with-nil.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "users-with-nil.json"; sourceTree = "<group>"; }; - 445D3BC11D9F9373007F9E26 /* users-with-null.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "users-with-null.json"; sourceTree = "<group>"; }; - 445D3BC21D9F9373007F9E26 /* users.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users.json; sourceTree = "<group>"; }; - 445D3BC31D9F9373007F9E26 /* users2.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users2.json; sourceTree = "<group>"; }; - 445D3BC41D9F9373007F9E26 /* users3.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = users3.json; sourceTree = "<group>"; }; 44968BF51DA0021300E71A53 /* NSArray+Sync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSArray+Sync.swift"; sourceTree = "<group>"; }; 44968BF61DA0021300E71A53 /* NSEntityDescription+Sync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSEntityDescription+Sync.swift"; sourceTree = "<group>"; }; 44968BF71DA0021300E71A53 /* NSManagedObject+Sync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObject+Sync.swift"; sourceTree = "<group>"; }; @@ -846,12 +852,6 @@ 44B548051DCF27FF009215FA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 44B5481A1DCF3DED009215FA /* sample.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = sample.json; sourceTree = "<group>"; }; 44B5481D1DCF3E18009215FA /* iOSDemo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = iOSDemo.xcdatamodel; sourceTree = "<group>"; }; - 44CA3F691DEB349100F242D0 /* 237.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 237.json; sourceTree = "<group>"; }; - 44CC760F1D9F9076003545A4 /* TestCheckTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestCheckTests.swift; sourceTree = "<group>"; }; - 4E28B59F1DEE43F8007FED27 /* 3ca82a0.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 3ca82a0.xcdatamodel; sourceTree = "<group>"; }; - 4E2F71E81DD3DD56003F0108 /* 233.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = 233.xcdatamodel; sourceTree = "<group>"; }; - 4E2F71F21DD60110003F0108 /* 233.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 233.json; sourceTree = "<group>"; }; - 4E3DF6BC1DEE39F6007BD598 /* 3ca82a0.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 3ca82a0.json; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -942,17 +942,6 @@ path = DataStack; sourceTree = "<group>"; }; - 146738901E7ADC1900913C8E /* DataStack */ = { - isa = PBXGroup; - children = ( - 146738911E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel */, - 146738921E7ADC1900913C8E /* ModelGroup.xcdatamodeld */, - 146738941E7ADC1900913C8E /* SimpleModel.xcdatamodel */, - 146738951E7ADC1900913C8E /* Tests.swift */, - ); - path = DataStack; - sourceTree = "<group>"; - }; 146D728A1AB782920058798C = { isa = PBXGroup; children = ( @@ -985,15 +974,15 @@ 146D72AF1AB782920058798C /* Tests */ = { isa = PBXGroup; children = ( - 146738901E7ADC1900913C8E /* DataStack */, - 14A84E9E1E4E748000701B8A /* DateParser */, - 14A84EA01E4E748000701B8A /* NSEntityDescription-SyncPrimaryKey */, - 14A84EA41E4E748000701B8A /* NSString-SyncInflections */, - 14A84EA61E4E748000701B8A /* SyncPropertyMapper */, - 14C046331DBC19D300CB6C16 /* Vendor */, - 4403DBDB1D9F90B5001C8DA6 /* Sync */, - 445D3BBA1D9F9373007F9E26 /* DataFilter */, - 44CC760E1D9F9076003545A4 /* TestCheck */, + 14867D001E7AF4D1001D228A /* DataFilter */, + 14867D0B1E7AF4D2001D228A /* DataStack */, + 14867D111E7AF4D2001D228A /* DateParser */, + 14867D131E7AF4D2001D228A /* NSEntityDescription-SyncPrimaryKey */, + 14867D171E7AF4D2001D228A /* NSString-SyncInflections */, + 14867D191E7AF4D2001D228A /* Sync */, + 14867DB01E7AF4D2001D228A /* SyncPropertyMapper */, + 14867DCF1E7AF4D2001D228A /* TestCheck */, + 14867DD11E7AF4D2001D228A /* Vendor */, 146D72B01AB782920058798C /* Supporting Files */, ); path = Tests; @@ -1007,77 +996,253 @@ name = "Supporting Files"; sourceTree = "<group>"; }; - 14A84E9E1E4E748000701B8A /* DateParser */ = { + 14867D001E7AF4D1001D228A /* DataFilter */ = { + isa = PBXGroup; + children = ( + 14867D011E7AF4D1001D228A /* DataFilter.xcdatamodeld */, + 14867D031E7AF4D1001D228A /* DataFilterTests.swift */, + 14867D041E7AF4D1001D228A /* note.json */, + 14867D051E7AF4D1001D228A /* simple.json */, + 14867D061E7AF4D1001D228A /* users-with-nil.json */, + 14867D071E7AF4D1001D228A /* users-with-null.json */, + 14867D081E7AF4D1001D228A /* users.json */, + 14867D091E7AF4D1001D228A /* users2.json */, + 14867D0A1E7AF4D2001D228A /* users3.json */, + ); + path = DataFilter; + sourceTree = "<group>"; + }; + 14867D0B1E7AF4D2001D228A /* DataStack */ = { isa = PBXGroup; children = ( - 14A84E9F1E4E748000701B8A /* DateTests.swift */, + 14867D0C1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel */, + 14867D0D1E7AF4D2001D228A /* ModelGroup.xcdatamodeld */, + 14867D0F1E7AF4D2001D228A /* SimpleModel.xcdatamodel */, + 14867D101E7AF4D2001D228A /* Tests.swift */, + ); + path = DataStack; + sourceTree = "<group>"; + }; + 14867D111E7AF4D2001D228A /* DateParser */ = { + isa = PBXGroup; + children = ( + 14867D121E7AF4D2001D228A /* DateTests.swift */, ); path = DateParser; sourceTree = "<group>"; }; - 14A84EA01E4E748000701B8A /* NSEntityDescription-SyncPrimaryKey */ = { + 14867D131E7AF4D2001D228A /* NSEntityDescription-SyncPrimaryKey */ = { isa = PBXGroup; children = ( - 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */, - 14A84EA31E4E748000701B8A /* PrimaryKeyTests.m */, + 14867D141E7AF4D2001D228A /* PrimaryKeyTests.m */, + 14867D151E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld */, ); path = "NSEntityDescription-SyncPrimaryKey"; sourceTree = "<group>"; }; - 14A84EA41E4E748000701B8A /* NSString-SyncInflections */ = { + 14867D171E7AF4D2001D228A /* NSString-SyncInflections */ = { isa = PBXGroup; children = ( - 14A84EA51E4E748000701B8A /* NSString_SyncInflectionsTests.m */, + 14867D181E7AF4D2001D228A /* NSString_SyncInflectionsTests.m */, ); path = "NSString-SyncInflections"; sourceTree = "<group>"; }; - 14A84EA61E4E748000701B8A /* SyncPropertyMapper */ = { + 14867D191E7AF4D2001D228A /* Sync */ = { + isa = PBXGroup; + children = ( + 14867D1A1E7AF4D2001D228A /* DeleteTests.swift */, + 14867D1B1E7AF4D2001D228A /* FetchTests.swift */, + 14867D1C1E7AF4D2001D228A /* Helpers */, + 14867D1E1E7AF4D2001D228A /* InsertOrUpdateTests.swift */, + 14867D1F1E7AF4D2001D228A /* JSONs */, + 14867D5D1E7AF4D2001D228A /* Models */, + 14867DA81E7AF4D2001D228A /* NSArray+SyncTests.swift */, + 14867DA91E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift */, + 14867DAA1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift */, + 14867DAB1E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift */, + 14867DAC1E7AF4D2001D228A /* NSPersistentContainerTests.swift */, + 14867DAD1E7AF4D2001D228A /* SyncDelegateTests.swift */, + 14867DAE1E7AF4D2001D228A /* SyncTests.swift */, + 14867DAF1E7AF4D2001D228A /* UpdateTests.swift */, + ); + path = Sync; + sourceTree = "<group>"; + }; + 14867D1C1E7AF4D2001D228A /* Helpers */ = { isa = PBXGroup; children = ( - 14A84EA71E4E748000701B8A /* DictionaryTests.swift */, - 14A84EA81E4E748000701B8A /* FillWithDictionaryTests.swift */, - 14A84EAA1E4E748000701B8A /* HelperTests.m */, - 14A84EAB1E4E748000701B8A /* SyncDictionaryTests.m */, - 14A84EAC1E4E748000701B8A /* SyncFillWithDictionaryTests.m */, - 14A84EAD1E4E748000701B8A /* Models */, - 14A84EC01E4E748000701B8A /* Transformers */, + 14867D1D1E7AF4D2001D228A /* Helper.swift */, + ); + path = Helpers; + sourceTree = "<group>"; + }; + 14867D1F1E7AF4D2001D228A /* JSONs */ = { + isa = PBXGroup; + children = ( + 14867D201E7AF4D2001D228A /* 151-many-to-many-notes-update.json */, + 14867D211E7AF4D2001D228A /* 151-many-to-many-notes.json */, + 14867D221E7AF4D2001D228A /* 151-many-to-many-tags.json */, + 14867D231E7AF4D2001D228A /* 151-to-many-notes.json */, + 14867D241E7AF4D2001D228A /* 151-to-many-users-update.json */, + 14867D251E7AF4D2001D228A /* 151-to-many-users.json */, + 14867D261E7AF4D2001D228A /* 157-cities.json */, + 14867D271E7AF4D2001D228A /* 157-locations-update.json */, + 14867D281E7AF4D2001D228A /* 157-locations.json */, + 14867D291E7AF4D2001D228A /* 225-a-empty.json */, + 14867D2A1E7AF4D2001D228A /* 225-a-null.json */, + 14867D2B1E7AF4D2001D228A /* 225-a-replaced.json */, + 14867D2C1E7AF4D2001D228A /* 225-a.json */, + 14867D2D1E7AF4D2001D228A /* 233.json */, + 14867D2E1E7AF4D2001D228A /* 237.json */, + 14867D2F1E7AF4D2001D228A /* 265.json */, + 14867D301E7AF4D2001D228A /* 277.json */, + 14867D311E7AF4D2001D228A /* 280.json */, + 14867D321E7AF4D2001D228A /* 283.json */, + 14867D331E7AF4D2001D228A /* 320.json */, + 14867D341E7AF4D2001D228A /* 3ca82a0.json */, + 14867D351E7AF4D2001D228A /* bug-113-comments-no-id.json */, + 14867D361E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json */, + 14867D371E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json */, + 14867D381E7AF4D2001D228A /* bug-125-light.json */, + 14867D391E7AF4D2001D228A /* bug-125.json */, + 14867D3A1E7AF4D2001D228A /* bug-179-places.json */, + 14867D3B1E7AF4D2001D228A /* bug-179-routes.json */, + 14867D3C1E7AF4D2001D228A /* bug-202-a.json */, + 14867D3D1E7AF4D2001D228A /* bug-202-b.json */, + 14867D3E1E7AF4D2001D228A /* bug-239.json */, + 14867D3F1E7AF4D2001D228A /* bug-254.json */, + 14867D401E7AF4D2001D228A /* bug-257.json */, + 14867D411E7AF4D2001D228A /* bug-number-84.json */, + 14867D421E7AF4D2001D228A /* camelcase.json */, + 14867D431E7AF4D2001D228A /* comments-no-id.json */, + 14867D441E7AF4D2001D228A /* custom_relationship_key_to_many.json */, + 14867D451E7AF4D2001D228A /* custom_relationship_key_to_one.json */, + 14867D461E7AF4D2001D228A /* id.json */, + 14867D471E7AF4D2001D228A /* images.json */, + 14867D481E7AF4D2001D228A /* markets_items.json */, + 14867D491E7AF4D2001D228A /* notes_for_user_a.json */, + 14867D4A1E7AF4D2001D228A /* notes_with_user_id.json */, + 14867D4B1E7AF4D2001D228A /* notes_with_user_id_custom.json */, + 14867D4C1E7AF4D2001D228A /* numbers.json */, + 14867D4D1E7AF4D2001D228A /* numbers_in_collection.json */, + 14867D4E1E7AF4D2001D228A /* operation-types-users-a.json */, + 14867D4F1E7AF4D2001D228A /* operation-types-users-b.json */, + 14867D501E7AF4D2001D228A /* organizations-tree.json */, + 14867D511E7AF4D2001D228A /* patients.json */, + 14867D521E7AF4D2001D228A /* stories-comments-no-ids.json */, + 14867D531E7AF4D2001D228A /* story-summarize.json */, + 14867D541E7AF4D2001D228A /* tagged_notes.json */, + 14867D551E7AF4D2001D228A /* to-one-camelcase.json */, + 14867D561E7AF4D2001D228A /* to-one-snakecase.json */, + 14867D571E7AF4D2001D228A /* unique.json */, + 14867D581E7AF4D2001D228A /* users_a.json */, + 14867D591E7AF4D2001D228A /* users_b.json */, + 14867D5A1E7AF4D2001D228A /* users_c.json */, + 14867D5B1E7AF4D2001D228A /* users_company.json */, + 14867D5C1E7AF4D2001D228A /* users_notes.json */, + ); + path = JSONs; + sourceTree = "<group>"; + }; + 14867D5D1E7AF4D2001D228A /* Models */ = { + isa = PBXGroup; + children = ( + 14867D5E1E7AF4D2001D228A /* 113.xcdatamodeld */, + 14867D601E7AF4D2001D228A /* 125.xcdatamodeld */, + 14867D621E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld */, + 14867D641E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld */, + 14867D661E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld */, + 14867D681E7AF4D2001D228A /* 151-to-many.xcdatamodeld */, + 14867D6A1E7AF4D2001D228A /* 157.xcdatamodeld */, + 14867D6C1E7AF4D2001D228A /* 179.xcdatamodeld */, + 14867D6E1E7AF4D2001D228A /* 202.xcdatamodeld */, + 14867D701E7AF4D2001D228A /* 225.xcdatamodeld */, + 14867D721E7AF4D2001D228A /* 233.xcdatamodeld */, + 14867D741E7AF4D2001D228A /* 239.xcdatamodeld */, + 14867D761E7AF4D2001D228A /* 254.xcdatamodeld */, + 14867D781E7AF4D2001D228A /* 257.xcdatamodeld */, + 14867D7A1E7AF4D2001D228A /* 265.xcdatamodeld */, + 14867D7C1E7AF4D2001D228A /* 277.xcdatamodeld */, + 14867D7E1E7AF4D2001D228A /* 280.xcdatamodeld */, + 14867D801E7AF4D2001D228A /* 283.xcdatamodeld */, + 14867D821E7AF4D2001D228A /* 320.xcdatamodeld */, + 14867D841E7AF4D2001D228A /* 3ca82a0.xcdatamodeld */, + 14867D861E7AF4D2001D228A /* 84.xcdatamodeld */, + 14867D881E7AF4D2001D228A /* Camelcase.xcdatamodeld */, + 14867D8A1E7AF4D2001D228A /* Contacts.xcdatamodeld */, + 14867D8C1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld */, + 14867D8E1E7AF4D2001D228A /* id.xcdatamodeld */, + 14867D901E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld */, + 14867D921E7AF4D2001D228A /* Markets.xcdatamodeld */, + 14867D941E7AF4D2001D228A /* Notes.xcdatamodeld */, + 14867D961E7AF4D2001D228A /* NotesB.xcdatamodeld */, + 14867D981E7AF4D2001D228A /* OrderedSocial.xcdatamodeld */, + 14867D9A1E7AF4D2001D228A /* Organizations.xcdatamodeld */, + 14867D9C1E7AF4D2001D228A /* Patients.xcdatamodeld */, + 14867D9E1E7AF4D2001D228A /* Recursive.xcdatamodeld */, + 14867DA01E7AF4D2001D228A /* Social.xcdatamodeld */, + 14867DA21E7AF4D2001D228A /* Tests.xcdatamodeld */, + 14867DA41E7AF4D2001D228A /* ToOne.xcdatamodeld */, + 14867DA61E7AF4D2001D228A /* Unique.xcdatamodeld */, + ); + path = Models; + sourceTree = "<group>"; + }; + 14867DB01E7AF4D2001D228A /* SyncPropertyMapper */ = { + isa = PBXGroup; + children = ( + 14867DB11E7AF4D2001D228A /* DictionaryTests.swift */, + 14867DB21E7AF4D2001D228A /* FillWithDictionaryTests.swift */, + 14867DB31E7AF4D2001D228A /* HelperTests.m */, + 14867DB41E7AF4D2001D228A /* Models */, + 14867DC71E7AF4D2001D228A /* SyncDictionaryTests.m */, + 14867DC81E7AF4D2001D228A /* SyncFillWithDictionaryTests.m */, + 14867DC91E7AF4D2001D228A /* Transformers */, ); path = SyncPropertyMapper; sourceTree = "<group>"; }; - 14A84EAD1E4E748000701B8A /* Models */ = { + 14867DB41E7AF4D2001D228A /* Models */ = { isa = PBXGroup; children = ( - 14A84EAE1E4E748000701B8A /* 112.xcdatamodeld */, - 14A84EB01E4E748000701B8A /* 121.xcdatamodeld */, - 14A84EB21E4E748000701B8A /* 123.xcdatamodeld */, - 14A84EB41E4E748000701B8A /* 129.xcdatamodeld */, - 14A84EB61E4E748000701B8A /* 137.xcdatamodeld */, - 14A84EB81E4E748000701B8A /* 140.xcdatamodeld */, - 14A84EBA1E4E748000701B8A /* 142.xcdatamodeld */, - 14A84EBC1E4E748000701B8A /* Model.xcdatamodeld */, - 14A84EBE1E4E748000701B8A /* Ordered.xcdatamodeld */, + 14867DB51E7AF4D2001D228A /* 112.xcdatamodeld */, + 14867DB71E7AF4D2001D228A /* 121.xcdatamodeld */, + 14867DB91E7AF4D2001D228A /* 123.xcdatamodeld */, + 14867DBB1E7AF4D2001D228A /* 129.xcdatamodeld */, + 14867DBD1E7AF4D2001D228A /* 137.xcdatamodeld */, + 14867DBF1E7AF4D2001D228A /* 140.xcdatamodeld */, + 14867DC11E7AF4D2001D228A /* 142.xcdatamodeld */, + 14867DC31E7AF4D2001D228A /* Model.xcdatamodeld */, + 14867DC51E7AF4D2001D228A /* Ordered.xcdatamodeld */, ); path = Models; sourceTree = "<group>"; }; - 14A84EC01E4E748000701B8A /* Transformers */ = { + 14867DC91E7AF4D2001D228A /* Transformers */ = { isa = PBXGroup; children = ( - 14A84EC11E4E748000701B8A /* BadAPIValueTransformer.swift */, - 14A84EC21E4E748000701B8A /* DateStringTransformer.h */, - 14A84EC31E4E748000701B8A /* DateStringTransformer.m */, - 14A84EC41E4E748000701B8A /* SyncTestValueTransformer.h */, - 14A84EC51E4E748000701B8A /* SyncTestValueTransformer.m */, + 14867DCA1E7AF4D2001D228A /* BadAPIValueTransformer.swift */, + 14867DCB1E7AF4D2001D228A /* DateStringTransformer.h */, + 14867DCC1E7AF4D2001D228A /* DateStringTransformer.m */, + 14867DCD1E7AF4D2001D228A /* SyncTestValueTransformer.h */, + 14867DCE1E7AF4D2001D228A /* SyncTestValueTransformer.m */, ); path = Transformers; sourceTree = "<group>"; }; - 14C046331DBC19D300CB6C16 /* Vendor */ = { + 14867DCF1E7AF4D2001D228A /* TestCheck */ = { + isa = PBXGroup; + children = ( + 14867DD01E7AF4D2001D228A /* TestCheckTests.swift */, + ); + path = TestCheck; + sourceTree = "<group>"; + }; + 14867DD11E7AF4D2001D228A /* Vendor */ = { isa = PBXGroup; children = ( - 14C046341DBC19D300CB6C16 /* JSON.swift */, + 14867DD21E7AF4D2001D228A /* JSON.swift */, ); path = Vendor; sourceTree = "<group>"; @@ -1131,147 +1296,6 @@ path = "NSString-SyncInflections"; sourceTree = "<group>"; }; - 4403DBDB1D9F90B5001C8DA6 /* Sync */ = { - isa = PBXGroup; - children = ( - 4403DBDC1D9F90B5001C8DA6 /* Helpers */, - 4403DBDE1D9F90B5001C8DA6 /* JSONs */, - 4403DC161D9F90B5001C8DA6 /* Models */, - 4403DC551D9F90B5001C8DA6 /* NSArray+SyncTests.swift */, - 4403DC561D9F90B5001C8DA6 /* NSEntityDescription+SyncTests.swift */, - 4403DC571D9F90B5001C8DA6 /* NSManagedObject+SyncTests.swift */, - 4403DC581D9F90B5001C8DA6 /* NSManagedObjectContext+SyncTests.swift */, - 4403DC591D9F90B5001C8DA6 /* SyncTests.swift */, - 14BA60E81DC0247700C97D6F /* SyncDelegateTests.swift */, - 14E2852E1DC173A800C4E461 /* NSPersistentContainerTests.swift */, - 146EB24D1DEF75D70068EDC3 /* InsertOrUpdateTests.swift */, - 444546D51DF06E2600CC7928 /* UpdateTests.swift */, - 146EB24C1DEF75D70068EDC3 /* DeleteTests.swift */, - 44584FDB1DF2EE550082D7A0 /* FetchTests.swift */, - ); - path = Sync; - sourceTree = "<group>"; - }; - 4403DBDC1D9F90B5001C8DA6 /* Helpers */ = { - isa = PBXGroup; - children = ( - 4403DBDD1D9F90B5001C8DA6 /* Helper.swift */, - ); - path = Helpers; - sourceTree = "<group>"; - }; - 4403DBDE1D9F90B5001C8DA6 /* JSONs */ = { - isa = PBXGroup; - children = ( - 4E3DF6BC1DEE39F6007BD598 /* 3ca82a0.json */, - 4403DBDF1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json */, - 4403DBE01D9F90B5001C8DA6 /* 151-many-to-many-notes.json */, - 4403DBE11D9F90B5001C8DA6 /* 151-many-to-many-tags.json */, - 4403DBE21D9F90B5001C8DA6 /* 151-to-many-notes.json */, - 4403DBE31D9F90B5001C8DA6 /* 151-to-many-users-update.json */, - 4403DBE41D9F90B5001C8DA6 /* 151-to-many-users.json */, - 4403DBE51D9F90B5001C8DA6 /* 157-cities.json */, - 4403DBE61D9F90B5001C8DA6 /* 157-locations-update.json */, - 4403DBE71D9F90B5001C8DA6 /* 157-locations.json */, - 4403DBE81D9F90B5001C8DA6 /* 225-a-empty.json */, - 4403DBE91D9F90B5001C8DA6 /* 225-a-null.json */, - 4403DBEA1D9F90B5001C8DA6 /* 225-a-replaced.json */, - 4403DBEB1D9F90B5001C8DA6 /* 225-a.json */, - 4E2F71F21DD60110003F0108 /* 233.json */, - 44CA3F691DEB349100F242D0 /* 237.json */, - 140944AA1DF0B9840037F85A /* 265.json */, - 140D43271DFF4DBC00E3B159 /* 277.json */, - 4403DBEC1D9F90B5001C8DA6 /* 280.json */, - 4403DBED1D9F90B5001C8DA6 /* 283.json */, - 14E9C13E1DEA2EE100A21B9E /* 320.json */, - 4403DBEE1D9F90B5001C8DA6 /* bug-113-comments-no-id.json */, - 4403DBEF1D9F90B5001C8DA6 /* bug-113-custom_relationship_key_to_one.json */, - 4403DBF01D9F90B5001C8DA6 /* bug-113-stories-comments-no-ids.json */, - 4403DBF11D9F90B5001C8DA6 /* bug-125-light.json */, - 4403DBF21D9F90B5001C8DA6 /* bug-125.json */, - 4403DBF31D9F90B5001C8DA6 /* bug-179-places.json */, - 4403DBF41D9F90B5001C8DA6 /* bug-179-routes.json */, - 4403DBF51D9F90B5001C8DA6 /* bug-202-a.json */, - 4403DBF61D9F90B5001C8DA6 /* bug-202-b.json */, - 4403DBF71D9F90B5001C8DA6 /* bug-239.json */, - 4403DBF81D9F90B5001C8DA6 /* bug-254.json */, - 4403DBF91D9F90B5001C8DA6 /* bug-257.json */, - 4403DBFA1D9F90B5001C8DA6 /* bug-number-84.json */, - 4403DBFB1D9F90B5001C8DA6 /* camelcase.json */, - 4403DBFC1D9F90B5001C8DA6 /* comments-no-id.json */, - 4403DBFD1D9F90B5001C8DA6 /* custom_relationship_key_to_many.json */, - 4403DBFE1D9F90B5001C8DA6 /* custom_relationship_key_to_one.json */, - 4403DBFF1D9F90B5001C8DA6 /* id.json */, - 4403DC001D9F90B5001C8DA6 /* images.json */, - 4403DC011D9F90B5001C8DA6 /* markets_items.json */, - 4403DC021D9F90B5001C8DA6 /* notes_for_user_a.json */, - 4403DC041D9F90B5001C8DA6 /* notes_with_user_id_custom.json */, - 4403DC031D9F90B5001C8DA6 /* notes_with_user_id.json */, - 4403DC061D9F90B5001C8DA6 /* numbers_in_collection.json */, - 4403DC051D9F90B5001C8DA6 /* numbers.json */, - 4403DC071D9F90B5001C8DA6 /* operation-types-users-a.json */, - 4403DC081D9F90B5001C8DA6 /* operation-types-users-b.json */, - 4403DC091D9F90B5001C8DA6 /* organizations-tree.json */, - 4403DC0A1D9F90B5001C8DA6 /* patients.json */, - 4403DC0B1D9F90B5001C8DA6 /* stories-comments-no-ids.json */, - 4403DC0C1D9F90B5001C8DA6 /* story-summarize.json */, - 4403DC0D1D9F90B5001C8DA6 /* tagged_notes.json */, - 4403DC0E1D9F90B5001C8DA6 /* to-one-camelcase.json */, - 4403DC0F1D9F90B5001C8DA6 /* to-one-snakecase.json */, - 4403DC101D9F90B5001C8DA6 /* unique.json */, - 4403DC111D9F90B5001C8DA6 /* users_a.json */, - 4403DC121D9F90B5001C8DA6 /* users_b.json */, - 4403DC131D9F90B5001C8DA6 /* users_c.json */, - 4403DC141D9F90B5001C8DA6 /* users_company.json */, - 4403DC151D9F90B5001C8DA6 /* users_notes.json */, - ); - path = JSONs; - sourceTree = "<group>"; - }; - 4403DC161D9F90B5001C8DA6 /* Models */ = { - isa = PBXGroup; - children = ( - 4E28B59E1DEE43F8007FED27 /* 3ca82a0.xcdatamodeld */, - 4403DC351D9F90B5001C8DA6 /* 84.xcdatamodeld */, - 4403DC251D9F90B5001C8DA6 /* 113.xcdatamodeld */, - 4403DC271D9F90B5001C8DA6 /* 125.xcdatamodeld */, - 4403DC171D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodeld */, - 4403DC191D9F90B5001C8DA6 /* 151-ordered-many-to-many.xcdatamodeld */, - 4403DC1B1D9F90B5001C8DA6 /* 151-ordered-to-many.xcdatamodeld */, - 4403DC1D1D9F90B5001C8DA6 /* 151-to-many.xcdatamodeld */, - 4403DC291D9F90B5001C8DA6 /* 157.xcdatamodeld */, - 4403DC2B1D9F90B5001C8DA6 /* 179.xcdatamodeld */, - 4403DC2D1D9F90B5001C8DA6 /* 202.xcdatamodeld */, - 4403DC1F1D9F90B5001C8DA6 /* 225.xcdatamodeld */, - 4E2F71E71DD3DD56003F0108 /* 233.xcdatamodeld */, - 4403DC2F1D9F90B5001C8DA6 /* 239.xcdatamodeld */, - 4403DC311D9F90B5001C8DA6 /* 254.xcdatamodeld */, - 4403DC331D9F90B5001C8DA6 /* 257.xcdatamodeld */, - 140944AE1DF0BC280037F85A /* 265.xcdatamodeld */, - 140D43221DFF4D3A00E3B159 /* 277.xcdatamodeld */, - 4403DC211D9F90B5001C8DA6 /* 280.xcdatamodeld */, - 4403DC231D9F90B5001C8DA6 /* 283.xcdatamodeld */, - 14E9C1391DEA2ECD00A21B9E /* 320.xcdatamodeld */, - 4403DC371D9F90B5001C8DA6 /* Camelcase.xcdatamodeld */, - 4403DC391D9F90B5001C8DA6 /* Contacts.xcdatamodeld */, - 4403DC3B1D9F90B5001C8DA6 /* CustomRelationshipKey.xcdatamodeld */, - 4403DC3D1D9F90B5001C8DA6 /* id.xcdatamodeld */, - 4403DC3F1D9F90B5001C8DA6 /* InsertObjectsInParent.xcdatamodeld */, - 4403DC411D9F90B5001C8DA6 /* Markets.xcdatamodeld */, - 4403DC431D9F90B5001C8DA6 /* Notes.xcdatamodeld */, - 4403DC451D9F90B5001C8DA6 /* NotesB.xcdatamodeld */, - 4403DC471D9F90B5001C8DA6 /* OrderedSocial.xcdatamodeld */, - 4403DC491D9F90B5001C8DA6 /* Organizations.xcdatamodeld */, - 4403DC4B1D9F90B5001C8DA6 /* Patients.xcdatamodeld */, - 4403DC4D1D9F90B5001C8DA6 /* Recursive.xcdatamodeld */, - 4403DC4F1D9F90B5001C8DA6 /* Social.xcdatamodeld */, - 1421405B1DBCDD52000FF107 /* Tests.xcdatamodeld */, - 4403DC511D9F90B5001C8DA6 /* ToOne.xcdatamodeld */, - 4403DC531D9F90B5001C8DA6 /* Unique.xcdatamodeld */, - ); - path = Models; - sourceTree = "<group>"; - }; 445D3BB71D9F932C007F9E26 /* DataFilter */ = { isa = PBXGroup; children = ( @@ -1280,22 +1304,6 @@ path = DataFilter; sourceTree = "<group>"; }; - 445D3BBA1D9F9373007F9E26 /* DataFilter */ = { - isa = PBXGroup; - children = ( - 445D3BBB1D9F9373007F9E26 /* DataFilterTests.swift */, - 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */, - 445D3BBE1D9F9373007F9E26 /* note.json */, - 445D3BBF1D9F9373007F9E26 /* simple.json */, - 445D3BC01D9F9373007F9E26 /* users-with-nil.json */, - 445D3BC11D9F9373007F9E26 /* users-with-null.json */, - 445D3BC21D9F9373007F9E26 /* users.json */, - 445D3BC31D9F9373007F9E26 /* users2.json */, - 445D3BC41D9F9373007F9E26 /* users3.json */, - ); - path = DataFilter; - sourceTree = "<group>"; - }; 44968BF41DA0021300E71A53 /* Sync */ = { isa = PBXGroup; children = ( @@ -1335,14 +1343,6 @@ path = iOSDemo; sourceTree = "<group>"; }; - 44CC760E1D9F9076003545A4 /* TestCheck */ = { - isa = PBXGroup; - children = ( - 44CC760F1D9F9076003545A4 /* TestCheckTests.swift */, - ); - path = TestCheck; - sourceTree = "<group>"; - }; 515545DD1958EE5C50CA007A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1703,74 +1703,74 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 445D3BCB1D9F9373007F9E26 /* users.json in Resources */, - 4403DC611D9F90B5001C8DA6 /* 157-cities.json in Resources */, - 4403DC641D9F90B5001C8DA6 /* 225-a-empty.json in Resources */, - 140944AB1DF0B9840037F85A /* 265.json in Resources */, - 4403DC681D9F90B5001C8DA6 /* 280.json in Resources */, - 4403DC881D9F90B5001C8DA6 /* story-summarize.json in Resources */, - 4403DC771D9F90B5001C8DA6 /* camelcase.json in Resources */, - 4E28B5A51DEE446E007FED27 /* 3ca82a0.json in Resources */, - 4403DC6D1D9F90B5001C8DA6 /* bug-125-light.json in Resources */, - 4403DC8B1D9F90B5001C8DA6 /* to-one-snakecase.json in Resources */, - 4403DC8E1D9F90B5001C8DA6 /* users_b.json in Resources */, - 445D3BC81D9F9373007F9E26 /* simple.json in Resources */, - 4403DC841D9F90B5001C8DA6 /* operation-types-users-b.json in Resources */, - 4403DC751D9F90B5001C8DA6 /* bug-257.json in Resources */, - 4403DC5C1D9F90B5001C8DA6 /* 151-many-to-many-notes.json in Resources */, - 4403DC651D9F90B5001C8DA6 /* 225-a-null.json in Resources */, - 4403DC911D9F90B5001C8DA6 /* users_notes.json in Resources */, - 4403DC741D9F90B5001C8DA6 /* bug-254.json in Resources */, - 4403DC701D9F90B5001C8DA6 /* bug-179-routes.json in Resources */, - 4403DC671D9F90B5001C8DA6 /* 225-a.json in Resources */, - 4403DC6C1D9F90B5001C8DA6 /* bug-113-stories-comments-no-ids.json in Resources */, - 445D3BC91D9F9373007F9E26 /* users-with-nil.json in Resources */, - 4403DC861D9F90B5001C8DA6 /* patients.json in Resources */, - 4403DC7F1D9F90B5001C8DA6 /* notes_with_user_id.json in Resources */, - 445D3BCA1D9F9373007F9E26 /* users-with-null.json in Resources */, - 4403DC811D9F90B5001C8DA6 /* numbers.json in Resources */, - 4403DC761D9F90B5001C8DA6 /* bug-number-84.json in Resources */, - 4403DC901D9F90B5001C8DA6 /* users_company.json in Resources */, - 4403DC821D9F90B5001C8DA6 /* numbers_in_collection.json in Resources */, - 4403DC5E1D9F90B5001C8DA6 /* 151-to-many-notes.json in Resources */, - 4403DC7E1D9F90B5001C8DA6 /* notes_for_user_a.json in Resources */, - 4403DC8D1D9F90B5001C8DA6 /* users_a.json in Resources */, - 4403DC5B1D9F90B5001C8DA6 /* 151-many-to-many-notes-update.json in Resources */, - 4403DC5F1D9F90B5001C8DA6 /* 151-to-many-users-update.json in Resources */, - 4403DC6E1D9F90B5001C8DA6 /* bug-125.json in Resources */, - 445D3BCC1D9F9373007F9E26 /* users2.json in Resources */, - 4403DC7D1D9F90B5001C8DA6 /* markets_items.json in Resources */, - 4403DC8F1D9F90B5001C8DA6 /* users_c.json in Resources */, - 4403DC8C1D9F90B5001C8DA6 /* unique.json in Resources */, - 4403DC7C1D9F90B5001C8DA6 /* images.json in Resources */, - 4403DC781D9F90B5001C8DA6 /* comments-no-id.json in Resources */, - 4403DC831D9F90B5001C8DA6 /* operation-types-users-a.json in Resources */, - 4403DC7B1D9F90B5001C8DA6 /* id.json in Resources */, - 4E2F71F41DD60115003F0108 /* 233.json in Resources */, - 4403DC7A1D9F90B5001C8DA6 /* custom_relationship_key_to_one.json in Resources */, - 4403DC691D9F90B5001C8DA6 /* 283.json in Resources */, - 4403DC6A1D9F90B5001C8DA6 /* bug-113-comments-no-id.json in Resources */, - 4403DC6F1D9F90B5001C8DA6 /* bug-179-places.json in Resources */, - 4403DC851D9F90B5001C8DA6 /* organizations-tree.json in Resources */, - 4403DC6B1D9F90B5001C8DA6 /* bug-113-custom_relationship_key_to_one.json in Resources */, - 4403DC711D9F90B5001C8DA6 /* bug-202-a.json in Resources */, - 4403DC661D9F90B5001C8DA6 /* 225-a-replaced.json in Resources */, - 140D43281DFF4DBC00E3B159 /* 277.json in Resources */, - 4403DC601D9F90B5001C8DA6 /* 151-to-many-users.json in Resources */, - 445D3BCD1D9F9373007F9E26 /* users3.json in Resources */, - 4403DC721D9F90B5001C8DA6 /* bug-202-b.json in Resources */, - 4403DC871D9F90B5001C8DA6 /* stories-comments-no-ids.json in Resources */, - 4403DC801D9F90B5001C8DA6 /* notes_with_user_id_custom.json in Resources */, - 4403DC791D9F90B5001C8DA6 /* custom_relationship_key_to_many.json in Resources */, - 4403DC8A1D9F90B5001C8DA6 /* to-one-camelcase.json in Resources */, - 4403DC731D9F90B5001C8DA6 /* bug-239.json in Resources */, - 14E9C1401DEA2EE100A21B9E /* 320.json in Resources */, - 4403DC5D1D9F90B5001C8DA6 /* 151-many-to-many-tags.json in Resources */, - 4403DC631D9F90B5001C8DA6 /* 157-locations.json in Resources */, - 4403DC891D9F90B5001C8DA6 /* tagged_notes.json in Resources */, - 4403DC621D9F90B5001C8DA6 /* 157-locations-update.json in Resources */, - 445D3BC71D9F9373007F9E26 /* note.json in Resources */, - 44CA3F6A1DEB349100F242D0 /* 237.json in Resources */, + 14867E961E7AF4D2001D228A /* numbers.json in Resources */, + 14867E601E7AF4D2001D228A /* bug-179-places.json in Resources */, + 14867E691E7AF4D2001D228A /* bug-202-b.json in Resources */, + 14867EA81E7AF4D2001D228A /* stories-comments-no-ids.json in Resources */, + 14867EC01E7AF4D2001D228A /* users_c.json in Resources */, + 14867E751E7AF4D2001D228A /* bug-number-84.json in Resources */, + 14867E421E7AF4D2001D228A /* 277.json in Resources */, + 14867E301E7AF4D2001D228A /* 225-a-null.json in Resources */, + 14867E5A1E7AF4D2001D228A /* bug-125-light.json in Resources */, + 14867E2A1E7AF4D2001D228A /* 157-locations.json in Resources */, + 14867E241E7AF4D2001D228A /* 157-cities.json in Resources */, + 14867E451E7AF4D2001D228A /* 280.json in Resources */, + 14867E391E7AF4D2001D228A /* 233.json in Resources */, + 14867E4E1E7AF4D2001D228A /* 3ca82a0.json in Resources */, + 14867E1B1E7AF4D2001D228A /* 151-to-many-notes.json in Resources */, + 14867EB41E7AF4D2001D228A /* to-one-snakecase.json in Resources */, + 14867E511E7AF4D2001D228A /* bug-113-comments-no-id.json in Resources */, + 14867E931E7AF4D2001D228A /* notes_with_user_id_custom.json in Resources */, + 14867DE51E7AF4D2001D228A /* users.json in Resources */, + 14867EB11E7AF4D2001D228A /* to-one-camelcase.json in Resources */, + 14867E841E7AF4D2001D228A /* id.json in Resources */, + 14867EBD1E7AF4D2001D228A /* users_b.json in Resources */, + 14867E211E7AF4D2001D228A /* 151-to-many-users.json in Resources */, + 14867E7B1E7AF4D2001D228A /* comments-no-id.json in Resources */, + 14867DEB1E7AF4D2001D228A /* users3.json in Resources */, + 14867EB71E7AF4D2001D228A /* unique.json in Resources */, + 14867E331E7AF4D2001D228A /* 225-a-replaced.json in Resources */, + 14867E481E7AF4D2001D228A /* 283.json in Resources */, + 14867E871E7AF4D2001D228A /* images.json in Resources */, + 14867E151E7AF4D2001D228A /* 151-many-to-many-notes.json in Resources */, + 14867E8D1E7AF4D2001D228A /* notes_for_user_a.json in Resources */, + 14867E9F1E7AF4D2001D228A /* operation-types-users-b.json in Resources */, + 14867E361E7AF4D2001D228A /* 225-a.json in Resources */, + 14867E6F1E7AF4D2001D228A /* bug-254.json in Resources */, + 14867EC61E7AF4D2001D228A /* users_notes.json in Resources */, + 14867EAE1E7AF4D2001D228A /* tagged_notes.json in Resources */, + 14867E901E7AF4D2001D228A /* notes_with_user_id.json in Resources */, + 14867E7E1E7AF4D2001D228A /* custom_relationship_key_to_many.json in Resources */, + 14867EA51E7AF4D2001D228A /* patients.json in Resources */, + 14867E991E7AF4D2001D228A /* numbers_in_collection.json in Resources */, + 14867DE81E7AF4D2001D228A /* users2.json in Resources */, + 14867EBA1E7AF4D2001D228A /* users_a.json in Resources */, + 14867EAB1E7AF4D2001D228A /* story-summarize.json in Resources */, + 14867E811E7AF4D2001D228A /* custom_relationship_key_to_one.json in Resources */, + 14867E9C1E7AF4D2001D228A /* operation-types-users-a.json in Resources */, + 14867E721E7AF4D2001D228A /* bug-257.json in Resources */, + 14867E661E7AF4D2001D228A /* bug-202-a.json in Resources */, + 14867E6C1E7AF4D2001D228A /* bug-239.json in Resources */, + 14867E1E1E7AF4D2001D228A /* 151-to-many-users-update.json in Resources */, + 14867EC31E7AF4D2001D228A /* users_company.json in Resources */, + 14867DD91E7AF4D2001D228A /* note.json in Resources */, + 14867DDF1E7AF4D2001D228A /* users-with-nil.json in Resources */, + 14867E4B1E7AF4D2001D228A /* 320.json in Resources */, + 14867E8A1E7AF4D2001D228A /* markets_items.json in Resources */, + 14867E631E7AF4D2001D228A /* bug-179-routes.json in Resources */, + 14867DDC1E7AF4D2001D228A /* simple.json in Resources */, + 14867E2D1E7AF4D2001D228A /* 225-a-empty.json in Resources */, + 14867E571E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json in Resources */, + 14867E3F1E7AF4D2001D228A /* 265.json in Resources */, + 14867E181E7AF4D2001D228A /* 151-many-to-many-tags.json in Resources */, + 14867DE21E7AF4D2001D228A /* users-with-null.json in Resources */, + 14867E781E7AF4D2001D228A /* camelcase.json in Resources */, + 14867E5D1E7AF4D2001D228A /* bug-125.json in Resources */, + 14867E121E7AF4D2001D228A /* 151-many-to-many-notes-update.json in Resources */, + 14867EA21E7AF4D2001D228A /* organizations-tree.json in Resources */, + 14867E541E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json in Resources */, + 14867E3C1E7AF4D2001D228A /* 237.json in Resources */, + 14867E271E7AF4D2001D228A /* 157-locations-update.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1778,74 +1778,74 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14975C641DBC373A0024901A /* 151-many-to-many-notes-update.json in Resources */, - 14975C651DBC373A0024901A /* 151-many-to-many-notes.json in Resources */, - 14975C661DBC373A0024901A /* 151-many-to-many-tags.json in Resources */, - 140944AC1DF0B9840037F85A /* 265.json in Resources */, - 14975C671DBC373A0024901A /* 151-to-many-notes.json in Resources */, - 14975C681DBC373A0024901A /* 151-to-many-users-update.json in Resources */, - 14975C691DBC373A0024901A /* 151-to-many-users.json in Resources */, - 4E28B5A41DEE446D007FED27 /* 3ca82a0.json in Resources */, - 14975C6A1DBC373A0024901A /* 157-cities.json in Resources */, - 14975C6B1DBC373A0024901A /* 157-locations-update.json in Resources */, - 14975C6C1DBC373A0024901A /* 157-locations.json in Resources */, - 14975C6D1DBC373A0024901A /* 225-a-empty.json in Resources */, - 14975C6E1DBC373A0024901A /* 225-a-null.json in Resources */, - 14975C6F1DBC373A0024901A /* 225-a-replaced.json in Resources */, - 14975C701DBC373A0024901A /* 225-a.json in Resources */, - 14975C711DBC373A0024901A /* 280.json in Resources */, - 14975C721DBC373A0024901A /* 283.json in Resources */, - 14975C731DBC373A0024901A /* bug-113-comments-no-id.json in Resources */, - 14975C741DBC373A0024901A /* bug-113-custom_relationship_key_to_one.json in Resources */, - 14975C751DBC373A0024901A /* bug-113-stories-comments-no-ids.json in Resources */, - 14975C761DBC373A0024901A /* bug-125-light.json in Resources */, - 14975C771DBC373A0024901A /* bug-125.json in Resources */, - 14975C781DBC373A0024901A /* bug-179-places.json in Resources */, - 14975C791DBC373A0024901A /* bug-179-routes.json in Resources */, - 14975C7A1DBC373A0024901A /* bug-202-a.json in Resources */, - 14975C7B1DBC373A0024901A /* bug-202-b.json in Resources */, - 14975C7C1DBC373A0024901A /* bug-239.json in Resources */, - 14975C7D1DBC373A0024901A /* bug-254.json in Resources */, - 14975C7E1DBC373A0024901A /* bug-257.json in Resources */, - 14975C7F1DBC373A0024901A /* bug-number-84.json in Resources */, - 14975C801DBC373A0024901A /* camelcase.json in Resources */, - 14975C811DBC373A0024901A /* comments-no-id.json in Resources */, - 14975C821DBC373A0024901A /* custom_relationship_key_to_many.json in Resources */, - 14975C831DBC373A0024901A /* custom_relationship_key_to_one.json in Resources */, - 14975C841DBC373A0024901A /* id.json in Resources */, - 14975C851DBC373A0024901A /* images.json in Resources */, - 14975C861DBC373A0024901A /* markets_items.json in Resources */, - 14975C871DBC373A0024901A /* notes_for_user_a.json in Resources */, - 14975C881DBC373A0024901A /* notes_with_user_id.json in Resources */, - 14975C891DBC373A0024901A /* notes_with_user_id_custom.json in Resources */, - 14975C8A1DBC373A0024901A /* numbers.json in Resources */, - 14975C8B1DBC373A0024901A /* numbers_in_collection.json in Resources */, - 14975C8C1DBC373A0024901A /* operation-types-users-a.json in Resources */, - 4E2F71F51DD60116003F0108 /* 233.json in Resources */, - 14975C8D1DBC373A0024901A /* operation-types-users-b.json in Resources */, - 14975C8E1DBC373A0024901A /* organizations-tree.json in Resources */, - 14975C8F1DBC373A0024901A /* patients.json in Resources */, - 14975C901DBC373A0024901A /* stories-comments-no-ids.json in Resources */, - 14975C911DBC373A0024901A /* story-summarize.json in Resources */, - 14975C921DBC373A0024901A /* tagged_notes.json in Resources */, - 14975C931DBC373A0024901A /* to-one-camelcase.json in Resources */, - 14975C941DBC373A0024901A /* to-one-snakecase.json in Resources */, - 140D43291DFF4DBC00E3B159 /* 277.json in Resources */, - 14975C951DBC373A0024901A /* unique.json in Resources */, - 14975C961DBC373A0024901A /* users_a.json in Resources */, - 14975C971DBC373A0024901A /* users_b.json in Resources */, - 14975C981DBC373A0024901A /* users_c.json in Resources */, - 14975C991DBC373A0024901A /* users_company.json in Resources */, - 14975C9A1DBC373A0024901A /* users_notes.json in Resources */, - 14975C9B1DBC373A0024901A /* note.json in Resources */, - 14975C9C1DBC373A0024901A /* simple.json in Resources */, - 14E9C1411DEA2EE100A21B9E /* 320.json in Resources */, - 14975C9D1DBC373A0024901A /* users-with-nil.json in Resources */, - 14975C9E1DBC373A0024901A /* users-with-null.json in Resources */, - 14975C9F1DBC373A0024901A /* users.json in Resources */, - 14975CA01DBC373A0024901A /* users2.json in Resources */, - 14975CA11DBC373A0024901A /* users3.json in Resources */, - 44CA3F6B1DEB349100F242D0 /* 237.json in Resources */, + 14867E971E7AF4D2001D228A /* numbers.json in Resources */, + 14867E611E7AF4D2001D228A /* bug-179-places.json in Resources */, + 14867E6A1E7AF4D2001D228A /* bug-202-b.json in Resources */, + 14867EA91E7AF4D2001D228A /* stories-comments-no-ids.json in Resources */, + 14867EC11E7AF4D2001D228A /* users_c.json in Resources */, + 14867E761E7AF4D2001D228A /* bug-number-84.json in Resources */, + 14867E431E7AF4D2001D228A /* 277.json in Resources */, + 14867E311E7AF4D2001D228A /* 225-a-null.json in Resources */, + 14867E5B1E7AF4D2001D228A /* bug-125-light.json in Resources */, + 14867E2B1E7AF4D2001D228A /* 157-locations.json in Resources */, + 14867E251E7AF4D2001D228A /* 157-cities.json in Resources */, + 14867E461E7AF4D2001D228A /* 280.json in Resources */, + 14867E3A1E7AF4D2001D228A /* 233.json in Resources */, + 14867E4F1E7AF4D2001D228A /* 3ca82a0.json in Resources */, + 14867E1C1E7AF4D2001D228A /* 151-to-many-notes.json in Resources */, + 14867EB51E7AF4D2001D228A /* to-one-snakecase.json in Resources */, + 14867E521E7AF4D2001D228A /* bug-113-comments-no-id.json in Resources */, + 14867E941E7AF4D2001D228A /* notes_with_user_id_custom.json in Resources */, + 14867DE61E7AF4D2001D228A /* users.json in Resources */, + 14867EB21E7AF4D2001D228A /* to-one-camelcase.json in Resources */, + 14867E851E7AF4D2001D228A /* id.json in Resources */, + 14867EBE1E7AF4D2001D228A /* users_b.json in Resources */, + 14867E221E7AF4D2001D228A /* 151-to-many-users.json in Resources */, + 14867E7C1E7AF4D2001D228A /* comments-no-id.json in Resources */, + 14867DEC1E7AF4D2001D228A /* users3.json in Resources */, + 14867EB81E7AF4D2001D228A /* unique.json in Resources */, + 14867E341E7AF4D2001D228A /* 225-a-replaced.json in Resources */, + 14867E491E7AF4D2001D228A /* 283.json in Resources */, + 14867E881E7AF4D2001D228A /* images.json in Resources */, + 14867E161E7AF4D2001D228A /* 151-many-to-many-notes.json in Resources */, + 14867E8E1E7AF4D2001D228A /* notes_for_user_a.json in Resources */, + 14867EA01E7AF4D2001D228A /* operation-types-users-b.json in Resources */, + 14867E371E7AF4D2001D228A /* 225-a.json in Resources */, + 14867E701E7AF4D2001D228A /* bug-254.json in Resources */, + 14867EC71E7AF4D2001D228A /* users_notes.json in Resources */, + 14867EAF1E7AF4D2001D228A /* tagged_notes.json in Resources */, + 14867E911E7AF4D2001D228A /* notes_with_user_id.json in Resources */, + 14867E7F1E7AF4D2001D228A /* custom_relationship_key_to_many.json in Resources */, + 14867EA61E7AF4D2001D228A /* patients.json in Resources */, + 14867E9A1E7AF4D2001D228A /* numbers_in_collection.json in Resources */, + 14867DE91E7AF4D2001D228A /* users2.json in Resources */, + 14867EBB1E7AF4D2001D228A /* users_a.json in Resources */, + 14867EAC1E7AF4D2001D228A /* story-summarize.json in Resources */, + 14867E821E7AF4D2001D228A /* custom_relationship_key_to_one.json in Resources */, + 14867E9D1E7AF4D2001D228A /* operation-types-users-a.json in Resources */, + 14867E731E7AF4D2001D228A /* bug-257.json in Resources */, + 14867E671E7AF4D2001D228A /* bug-202-a.json in Resources */, + 14867E6D1E7AF4D2001D228A /* bug-239.json in Resources */, + 14867E1F1E7AF4D2001D228A /* 151-to-many-users-update.json in Resources */, + 14867EC41E7AF4D2001D228A /* users_company.json in Resources */, + 14867DDA1E7AF4D2001D228A /* note.json in Resources */, + 14867DE01E7AF4D2001D228A /* users-with-nil.json in Resources */, + 14867E4C1E7AF4D2001D228A /* 320.json in Resources */, + 14867E8B1E7AF4D2001D228A /* markets_items.json in Resources */, + 14867E641E7AF4D2001D228A /* bug-179-routes.json in Resources */, + 14867DDD1E7AF4D2001D228A /* simple.json in Resources */, + 14867E2E1E7AF4D2001D228A /* 225-a-empty.json in Resources */, + 14867E581E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json in Resources */, + 14867E401E7AF4D2001D228A /* 265.json in Resources */, + 14867E191E7AF4D2001D228A /* 151-many-to-many-tags.json in Resources */, + 14867DE31E7AF4D2001D228A /* users-with-null.json in Resources */, + 14867E791E7AF4D2001D228A /* camelcase.json in Resources */, + 14867E5E1E7AF4D2001D228A /* bug-125.json in Resources */, + 14867E131E7AF4D2001D228A /* 151-many-to-many-notes-update.json in Resources */, + 14867EA31E7AF4D2001D228A /* organizations-tree.json in Resources */, + 14867E551E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json in Resources */, + 14867E3D1E7AF4D2001D228A /* 237.json in Resources */, + 14867E281E7AF4D2001D228A /* 157-locations-update.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1853,74 +1853,74 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14975CA21DBC374C0024901A /* 151-many-to-many-notes-update.json in Resources */, - 14975CA31DBC374C0024901A /* 151-many-to-many-notes.json in Resources */, - 14975CA41DBC374C0024901A /* 151-many-to-many-tags.json in Resources */, - 140944AD1DF0B9840037F85A /* 265.json in Resources */, - 14975CA51DBC374C0024901A /* 151-to-many-notes.json in Resources */, - 14975CA61DBC374C0024901A /* 151-to-many-users-update.json in Resources */, - 14975CA71DBC374C0024901A /* 151-to-many-users.json in Resources */, - 4E28B5A31DEE446D007FED27 /* 3ca82a0.json in Resources */, - 14975CA81DBC374C0024901A /* 157-cities.json in Resources */, - 14975CA91DBC374C0024901A /* 157-locations-update.json in Resources */, - 14975CAA1DBC374C0024901A /* 157-locations.json in Resources */, - 14975CAB1DBC374C0024901A /* 225-a-empty.json in Resources */, - 14975CAC1DBC374C0024901A /* 225-a-null.json in Resources */, - 14975CAD1DBC374C0024901A /* 225-a-replaced.json in Resources */, - 14975CAE1DBC374C0024901A /* 225-a.json in Resources */, - 14975CAF1DBC374C0024901A /* 280.json in Resources */, - 14975CB01DBC374C0024901A /* 283.json in Resources */, - 14975CB11DBC374C0024901A /* bug-113-comments-no-id.json in Resources */, - 14975CB21DBC374C0024901A /* bug-113-custom_relationship_key_to_one.json in Resources */, - 14975CB31DBC374C0024901A /* bug-113-stories-comments-no-ids.json in Resources */, - 14975CB41DBC374C0024901A /* bug-125-light.json in Resources */, - 14975CB51DBC374C0024901A /* bug-125.json in Resources */, - 14975CB61DBC374C0024901A /* bug-179-places.json in Resources */, - 14975CB71DBC374C0024901A /* bug-179-routes.json in Resources */, - 14975CB81DBC374C0024901A /* bug-202-a.json in Resources */, - 14975CB91DBC374C0024901A /* bug-202-b.json in Resources */, - 14975CBA1DBC374C0024901A /* bug-239.json in Resources */, - 14975CBB1DBC374C0024901A /* bug-254.json in Resources */, - 14975CBC1DBC374C0024901A /* bug-257.json in Resources */, - 14975CBD1DBC374C0024901A /* bug-number-84.json in Resources */, - 14975CBE1DBC374C0024901A /* camelcase.json in Resources */, - 14975CBF1DBC374C0024901A /* comments-no-id.json in Resources */, - 14975CC01DBC374C0024901A /* custom_relationship_key_to_many.json in Resources */, - 14975CC11DBC374C0024901A /* custom_relationship_key_to_one.json in Resources */, - 14975CC21DBC374C0024901A /* id.json in Resources */, - 14975CC31DBC374C0024901A /* images.json in Resources */, - 14975CC41DBC374C0024901A /* markets_items.json in Resources */, - 14975CC51DBC374C0024901A /* notes_for_user_a.json in Resources */, - 14975CC61DBC374C0024901A /* notes_with_user_id.json in Resources */, - 14975CC71DBC374C0024901A /* notes_with_user_id_custom.json in Resources */, - 14975CC81DBC374C0024901A /* numbers.json in Resources */, - 14975CC91DBC374C0024901A /* numbers_in_collection.json in Resources */, - 14975CCA1DBC374C0024901A /* operation-types-users-a.json in Resources */, - 4E2F71F61DD60116003F0108 /* 233.json in Resources */, - 14975CCB1DBC374C0024901A /* operation-types-users-b.json in Resources */, - 14975CCC1DBC374C0024901A /* organizations-tree.json in Resources */, - 14975CCD1DBC374C0024901A /* patients.json in Resources */, - 14975CCE1DBC374C0024901A /* stories-comments-no-ids.json in Resources */, - 14975CCF1DBC374C0024901A /* story-summarize.json in Resources */, - 14975CD01DBC374C0024901A /* tagged_notes.json in Resources */, - 14975CD11DBC374C0024901A /* to-one-camelcase.json in Resources */, - 14975CD21DBC374C0024901A /* to-one-snakecase.json in Resources */, - 140D432A1DFF4DBC00E3B159 /* 277.json in Resources */, - 14975CD31DBC374C0024901A /* unique.json in Resources */, - 14975CD41DBC374C0024901A /* users_a.json in Resources */, - 14975CD51DBC374C0024901A /* users_b.json in Resources */, - 14975CD61DBC374C0024901A /* users_c.json in Resources */, - 14975CD71DBC374C0024901A /* users_company.json in Resources */, - 14975CD81DBC374C0024901A /* users_notes.json in Resources */, - 14975CD91DBC374C0024901A /* note.json in Resources */, - 14975CDA1DBC374C0024901A /* simple.json in Resources */, - 14E9C1421DEA2EE100A21B9E /* 320.json in Resources */, - 14975CDB1DBC374C0024901A /* users-with-nil.json in Resources */, - 14975CDC1DBC374C0024901A /* users-with-null.json in Resources */, - 14975CDD1DBC374C0024901A /* users.json in Resources */, - 14975CDE1DBC374C0024901A /* users2.json in Resources */, - 14975CDF1DBC374C0024901A /* users3.json in Resources */, - 44CA3F6C1DEB349100F242D0 /* 237.json in Resources */, + 14867E981E7AF4D2001D228A /* numbers.json in Resources */, + 14867E621E7AF4D2001D228A /* bug-179-places.json in Resources */, + 14867E6B1E7AF4D2001D228A /* bug-202-b.json in Resources */, + 14867EAA1E7AF4D2001D228A /* stories-comments-no-ids.json in Resources */, + 14867EC21E7AF4D2001D228A /* users_c.json in Resources */, + 14867E771E7AF4D2001D228A /* bug-number-84.json in Resources */, + 14867E441E7AF4D2001D228A /* 277.json in Resources */, + 14867E321E7AF4D2001D228A /* 225-a-null.json in Resources */, + 14867E5C1E7AF4D2001D228A /* bug-125-light.json in Resources */, + 14867E2C1E7AF4D2001D228A /* 157-locations.json in Resources */, + 14867E261E7AF4D2001D228A /* 157-cities.json in Resources */, + 14867E471E7AF4D2001D228A /* 280.json in Resources */, + 14867E3B1E7AF4D2001D228A /* 233.json in Resources */, + 14867E501E7AF4D2001D228A /* 3ca82a0.json in Resources */, + 14867E1D1E7AF4D2001D228A /* 151-to-many-notes.json in Resources */, + 14867EB61E7AF4D2001D228A /* to-one-snakecase.json in Resources */, + 14867E531E7AF4D2001D228A /* bug-113-comments-no-id.json in Resources */, + 14867E951E7AF4D2001D228A /* notes_with_user_id_custom.json in Resources */, + 14867DE71E7AF4D2001D228A /* users.json in Resources */, + 14867EB31E7AF4D2001D228A /* to-one-camelcase.json in Resources */, + 14867E861E7AF4D2001D228A /* id.json in Resources */, + 14867EBF1E7AF4D2001D228A /* users_b.json in Resources */, + 14867E231E7AF4D2001D228A /* 151-to-many-users.json in Resources */, + 14867E7D1E7AF4D2001D228A /* comments-no-id.json in Resources */, + 14867DED1E7AF4D2001D228A /* users3.json in Resources */, + 14867EB91E7AF4D2001D228A /* unique.json in Resources */, + 14867E351E7AF4D2001D228A /* 225-a-replaced.json in Resources */, + 14867E4A1E7AF4D2001D228A /* 283.json in Resources */, + 14867E891E7AF4D2001D228A /* images.json in Resources */, + 14867E171E7AF4D2001D228A /* 151-many-to-many-notes.json in Resources */, + 14867E8F1E7AF4D2001D228A /* notes_for_user_a.json in Resources */, + 14867EA11E7AF4D2001D228A /* operation-types-users-b.json in Resources */, + 14867E381E7AF4D2001D228A /* 225-a.json in Resources */, + 14867E711E7AF4D2001D228A /* bug-254.json in Resources */, + 14867EC81E7AF4D2001D228A /* users_notes.json in Resources */, + 14867EB01E7AF4D2001D228A /* tagged_notes.json in Resources */, + 14867E921E7AF4D2001D228A /* notes_with_user_id.json in Resources */, + 14867E801E7AF4D2001D228A /* custom_relationship_key_to_many.json in Resources */, + 14867EA71E7AF4D2001D228A /* patients.json in Resources */, + 14867E9B1E7AF4D2001D228A /* numbers_in_collection.json in Resources */, + 14867DEA1E7AF4D2001D228A /* users2.json in Resources */, + 14867EBC1E7AF4D2001D228A /* users_a.json in Resources */, + 14867EAD1E7AF4D2001D228A /* story-summarize.json in Resources */, + 14867E831E7AF4D2001D228A /* custom_relationship_key_to_one.json in Resources */, + 14867E9E1E7AF4D2001D228A /* operation-types-users-a.json in Resources */, + 14867E741E7AF4D2001D228A /* bug-257.json in Resources */, + 14867E681E7AF4D2001D228A /* bug-202-a.json in Resources */, + 14867E6E1E7AF4D2001D228A /* bug-239.json in Resources */, + 14867E201E7AF4D2001D228A /* 151-to-many-users-update.json in Resources */, + 14867EC51E7AF4D2001D228A /* users_company.json in Resources */, + 14867DDB1E7AF4D2001D228A /* note.json in Resources */, + 14867DE11E7AF4D2001D228A /* users-with-nil.json in Resources */, + 14867E4D1E7AF4D2001D228A /* 320.json in Resources */, + 14867E8C1E7AF4D2001D228A /* markets_items.json in Resources */, + 14867E651E7AF4D2001D228A /* bug-179-routes.json in Resources */, + 14867DDE1E7AF4D2001D228A /* simple.json in Resources */, + 14867E2F1E7AF4D2001D228A /* 225-a-empty.json in Resources */, + 14867E591E7AF4D2001D228A /* bug-113-stories-comments-no-ids.json in Resources */, + 14867E411E7AF4D2001D228A /* 265.json in Resources */, + 14867E1A1E7AF4D2001D228A /* 151-many-to-many-tags.json in Resources */, + 14867DE41E7AF4D2001D228A /* users-with-null.json in Resources */, + 14867E7A1E7AF4D2001D228A /* camelcase.json in Resources */, + 14867E5F1E7AF4D2001D228A /* bug-125.json in Resources */, + 14867E141E7AF4D2001D228A /* 151-many-to-many-notes-update.json in Resources */, + 14867EA41E7AF4D2001D228A /* organizations-tree.json in Resources */, + 14867E561E7AF4D2001D228A /* bug-113-custom_relationship_key_to_one.json in Resources */, + 14867E3E1E7AF4D2001D228A /* 237.json in Resources */, + 14867E291E7AF4D2001D228A /* 157-locations-update.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2033,84 +2033,84 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14D93C5D1E4E68BA00DED595 /* 3ca82a0.xcdatamodeld in Sources */, - 14D93C5E1E4E68BA00DED595 /* 84.xcdatamodeld in Sources */, - 14D93C5F1E4E68BA00DED595 /* 113.xcdatamodeld in Sources */, - 14E269031E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */, - 14D93C601E4E68BA00DED595 /* 125.xcdatamodeld in Sources */, - 1467389C1E7ADC1900913C8E /* SimpleModel.xcdatamodel in Sources */, - 14D93C611E4E68BA00DED595 /* 151-many-to-many.xcdatamodeld in Sources */, - 14A84EF61E4E748000701B8A /* 142.xcdatamodeld in Sources */, - 14A84EED1E4E748000701B8A /* 129.xcdatamodeld in Sources */, - 14D93C621E4E68BA00DED595 /* 151-ordered-many-to-many.xcdatamodeld in Sources */, - 146738961E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel in Sources */, - 14D93C631E4E68BA00DED595 /* 151-ordered-to-many.xcdatamodeld in Sources */, - 14D93C641E4E68BA00DED595 /* 151-to-many.xcdatamodeld in Sources */, - 14D93C651E4E68BA00DED595 /* 157.xcdatamodeld in Sources */, - 14D93C661E4E68BA00DED595 /* 179.xcdatamodeld in Sources */, - 14A84EEA1E4E748000701B8A /* 123.xcdatamodeld in Sources */, - 14A84EFF1E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */, - 14D93C671E4E68BA00DED595 /* 202.xcdatamodeld in Sources */, - 14D93C681E4E68BA00DED595 /* 225.xcdatamodeld in Sources */, - 14D93C691E4E68BA00DED595 /* 233.xcdatamodeld in Sources */, - 14D93C6A1E4E68BA00DED595 /* 239.xcdatamodeld in Sources */, - 14A84EFC1E4E748000701B8A /* Ordered.xcdatamodeld in Sources */, - 14D93C6B1E4E68BA00DED595 /* 254.xcdatamodeld in Sources */, - 14A84ED21E4E748000701B8A /* DictionaryTests.swift in Sources */, - 14A84EDB1E4E748000701B8A /* HelperTests.m in Sources */, - 14A84EF31E4E748000701B8A /* 140.xcdatamodeld in Sources */, - 14D93C6C1E4E68BA00DED595 /* 257.xcdatamodeld in Sources */, - 14D93C6D1E4E68BA00DED595 /* 265.xcdatamodeld in Sources */, - 14D93C6E1E4E68BA00DED595 /* 277.xcdatamodeld in Sources */, - 14D93C6F1E4E68BA00DED595 /* 280.xcdatamodeld in Sources */, - 14D93C701E4E68BA00DED595 /* 283.xcdatamodeld in Sources */, - 14A84ECC1E4E748000701B8A /* PrimaryKeyTests.m in Sources */, - 14D93C711E4E68BA00DED595 /* 320.xcdatamodeld in Sources */, - 14D93C721E4E68BA00DED595 /* Camelcase.xcdatamodeld in Sources */, - 14A84F051E4E748000701B8A /* SyncTestValueTransformer.m in Sources */, - 14A84EF01E4E748000701B8A /* 137.xcdatamodeld in Sources */, - 14D93C731E4E68BA00DED595 /* Contacts.xcdatamodeld in Sources */, - 1467389F1E7ADC1900913C8E /* Tests.swift in Sources */, - 14D93C741E4E68BA00DED595 /* CustomRelationshipKey.xcdatamodeld in Sources */, - 14D93C751E4E68BA00DED595 /* id.xcdatamodeld in Sources */, - 14D93C761E4E68BA00DED595 /* InsertObjectsInParent.xcdatamodeld in Sources */, - 14D93C771E4E68BA00DED595 /* Markets.xcdatamodeld in Sources */, - 14D93C781E4E68BA00DED595 /* Notes.xcdatamodeld in Sources */, - 14D93C791E4E68BA00DED595 /* NotesB.xcdatamodeld in Sources */, - 14A84ECF1E4E748000701B8A /* NSString_SyncInflectionsTests.m in Sources */, - 14D93C7A1E4E68BA00DED595 /* OrderedSocial.xcdatamodeld in Sources */, - 14D93C7B1E4E68BA00DED595 /* Organizations.xcdatamodeld in Sources */, - 14D93C7C1E4E68BA00DED595 /* Patients.xcdatamodeld in Sources */, - 14D93C7D1E4E68BA00DED595 /* Recursive.xcdatamodeld in Sources */, - 14A84ED51E4E748000701B8A /* FillWithDictionaryTests.swift in Sources */, - 14A84EE11E4E748000701B8A /* SyncFillWithDictionaryTests.m in Sources */, - 14D93C7E1E4E68BA00DED595 /* Social.xcdatamodeld in Sources */, - 14D93C7F1E4E68BA00DED595 /* Tests.xcdatamodeld in Sources */, - 14D93C801E4E68BA00DED595 /* ToOne.xcdatamodeld in Sources */, - 14D93C811E4E68BA00DED595 /* Unique.xcdatamodeld in Sources */, - 14A84E931E4E6B4A00701B8A /* DataFilter.xcdatamodeld in Sources */, - 14D93C831E4E68FA00DED595 /* Helper.swift in Sources */, - 14D93C841E4E690A00DED595 /* JSON.swift in Sources */, - 14D93C501E4E689F00DED595 /* NSArray+SyncTests.swift in Sources */, - 14D93C511E4E689F00DED595 /* NSEntityDescription+SyncTests.swift in Sources */, - 14D93C521E4E689F00DED595 /* NSManagedObject+SyncTests.swift in Sources */, - 14D93C531E4E689F00DED595 /* NSManagedObjectContext+SyncTests.swift in Sources */, - 14D93C541E4E689F00DED595 /* SyncTests.swift in Sources */, - 14D93C551E4E689F00DED595 /* SyncDelegateTests.swift in Sources */, - 14D93C561E4E689F00DED595 /* NSPersistentContainerTests.swift in Sources */, - 14A84F021E4E748000701B8A /* DateStringTransformer.m in Sources */, - 14D93C571E4E689F00DED595 /* InsertOrUpdateTests.swift in Sources */, - 14D93C581E4E689F00DED595 /* UpdateTests.swift in Sources */, - 14A84EC61E4E748000701B8A /* DateTests.swift in Sources */, - 14D93C591E4E689F00DED595 /* DeleteTests.swift in Sources */, - 14A84EF91E4E748000701B8A /* Model.xcdatamodeld in Sources */, - 14D93C5A1E4E689F00DED595 /* FetchTests.swift in Sources */, - 14A84EE41E4E748000701B8A /* 112.xcdatamodeld in Sources */, - 14D93C5B1E4E68A400DED595 /* DataFilterTests.swift in Sources */, - 14D93C5C1E4E68AF00DED595 /* TestCheckTests.swift in Sources */, - 146738991E7ADC1900913C8E /* ModelGroup.xcdatamodeld in Sources */, - 14A84EE71E4E748000701B8A /* 121.xcdatamodeld in Sources */, - 14A84EDE1E4E748000701B8A /* SyncDictionaryTests.m in Sources */, + 14867ECC1E7AF4D2001D228A /* 125.xcdatamodeld in Sources */, + 14867F831E7AF4D2001D228A /* TestCheckTests.swift in Sources */, + 14867F291E7AF4D2001D228A /* Recursive.xcdatamodeld in Sources */, + 14867F801E7AF4D2001D228A /* SyncTestValueTransformer.m in Sources */, + 14867F051E7AF4D2001D228A /* 84.xcdatamodeld in Sources */, + 14867EE41E7AF4D2001D228A /* 225.xcdatamodeld in Sources */, + 14867DF41E7AF4D2001D228A /* SimpleModel.xcdatamodel in Sources */, + 14867F6B1E7AF4D2001D228A /* 142.xcdatamodeld in Sources */, + 14867F741E7AF4D2001D228A /* SyncDictionaryTests.m in Sources */, + 14867F651E7AF4D2001D228A /* 137.xcdatamodeld in Sources */, + 14867F501E7AF4D2001D228A /* DictionaryTests.swift in Sources */, + 14867F771E7AF4D2001D228A /* SyncFillWithDictionaryTests.m in Sources */, + 14867F621E7AF4D2001D228A /* 129.xcdatamodeld in Sources */, + 14867F321E7AF4D2001D228A /* ToOne.xcdatamodeld in Sources */, + 14867F081E7AF4D2001D228A /* Camelcase.xcdatamodeld in Sources */, + 14867F2C1E7AF4D2001D228A /* Social.xcdatamodeld in Sources */, + 14867F3E1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift in Sources */, + 14867ED21E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld in Sources */, + 14867F4A1E7AF4D2001D228A /* SyncTests.swift in Sources */, + 14867EF31E7AF4D2001D228A /* 265.xcdatamodeld in Sources */, + 14867EFC1E7AF4D2001D228A /* 283.xcdatamodeld in Sources */, + 14867F6E1E7AF4D2001D228A /* Model.xcdatamodeld in Sources */, + 14867EED1E7AF4D2001D228A /* 254.xcdatamodeld in Sources */, + 14867F171E7AF4D2001D228A /* Markets.xcdatamodeld in Sources */, + 14867E031E7AF4D2001D228A /* NSString_SyncInflectionsTests.m in Sources */, + 14867E061E7AF4D2001D228A /* DeleteTests.swift in Sources */, + 14867F2F1E7AF4D2001D228A /* Tests.xcdatamodeld in Sources */, + 14867F861E7AF4D2001D228A /* JSON.swift in Sources */, + 14867DF71E7AF4D2001D228A /* Tests.swift in Sources */, + 14867EFF1E7AF4D2001D228A /* 320.xcdatamodeld in Sources */, + 14867F5F1E7AF4D2001D228A /* 123.xcdatamodeld in Sources */, + 14867E0F1E7AF4D2001D228A /* InsertOrUpdateTests.swift in Sources */, + 14867E091E7AF4D2001D228A /* FetchTests.swift in Sources */, + 14867DD31E7AF4D2001D228A /* DataFilter.xcdatamodeld in Sources */, + 14867F021E7AF4D2001D228A /* 3ca82a0.xcdatamodeld in Sources */, + 14867E001E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld in Sources */, + 14867F681E7AF4D2001D228A /* 140.xcdatamodeld in Sources */, + 14867F7A1E7AF4D2001D228A /* BadAPIValueTransformer.swift in Sources */, + 14867EF91E7AF4D2001D228A /* 280.xcdatamodeld in Sources */, + 14867F111E7AF4D2001D228A /* id.xcdatamodeld in Sources */, + 14867F411E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift in Sources */, + 14867F531E7AF4D2001D228A /* FillWithDictionaryTests.swift in Sources */, + 14867DFA1E7AF4D2001D228A /* DateTests.swift in Sources */, + 14867F591E7AF4D2001D228A /* 112.xcdatamodeld in Sources */, + 14867DFD1E7AF4D2001D228A /* PrimaryKeyTests.m in Sources */, + 14867EF01E7AF4D2001D228A /* 257.xcdatamodeld in Sources */, + 14867F561E7AF4D2001D228A /* HelperTests.m in Sources */, + 14867DF11E7AF4D2001D228A /* ModelGroup.xcdatamodeld in Sources */, + 14867F381E7AF4D2001D228A /* NSArray+SyncTests.swift in Sources */, + 14867EEA1E7AF4D2001D228A /* 239.xcdatamodeld in Sources */, + 14867EF61E7AF4D2001D228A /* 277.xcdatamodeld in Sources */, + 14867ECF1E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld in Sources */, + 14867EC91E7AF4D2001D228A /* 113.xcdatamodeld in Sources */, + 14867E0C1E7AF4D2001D228A /* Helper.swift in Sources */, + 14867F0E1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld in Sources */, + 14867F471E7AF4D2001D228A /* SyncDelegateTests.swift in Sources */, + 14867F1A1E7AF4D2001D228A /* Notes.xcdatamodeld in Sources */, + 14867EE71E7AF4D2001D228A /* 233.xcdatamodeld in Sources */, + 14867F0B1E7AF4D2001D228A /* Contacts.xcdatamodeld in Sources */, + 14867F3B1E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift in Sources */, + 14867DD61E7AF4D2001D228A /* DataFilterTests.swift in Sources */, + 14867F351E7AF4D2001D228A /* Unique.xcdatamodeld in Sources */, + 14867ED81E7AF4D2001D228A /* 151-to-many.xcdatamodeld in Sources */, + 14867F141E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld in Sources */, + 14867F711E7AF4D2001D228A /* Ordered.xcdatamodeld in Sources */, + 14867F441E7AF4D2001D228A /* NSPersistentContainerTests.swift in Sources */, + 14867EDB1E7AF4D2001D228A /* 157.xcdatamodeld in Sources */, + 14867F201E7AF4D2001D228A /* OrderedSocial.xcdatamodeld in Sources */, + 14867EDE1E7AF4D2001D228A /* 179.xcdatamodeld in Sources */, + 14867EE11E7AF4D2001D228A /* 202.xcdatamodeld in Sources */, + 14867F261E7AF4D2001D228A /* Patients.xcdatamodeld in Sources */, + 14867DEE1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel in Sources */, + 14867F1D1E7AF4D2001D228A /* NotesB.xcdatamodeld in Sources */, + 14867F5C1E7AF4D2001D228A /* 121.xcdatamodeld in Sources */, + 14867F7D1E7AF4D2001D228A /* DateStringTransformer.m in Sources */, + 14867F4D1E7AF4D2001D228A /* UpdateTests.swift in Sources */, + 14867F231E7AF4D2001D228A /* Organizations.xcdatamodeld in Sources */, + 14867ED51E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2118,84 +2118,84 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14A84E5E1E4E6B2200701B8A /* JSON.swift in Sources */, - 14A84E5F1E4E6B2300701B8A /* Helper.swift in Sources */, - 14A84E601E4E6B2800701B8A /* NSArray+SyncTests.swift in Sources */, - 14E269041E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */, - 14A84E611E4E6B2800701B8A /* NSEntityDescription+SyncTests.swift in Sources */, - 1467389D1E7ADC1900913C8E /* SimpleModel.xcdatamodel in Sources */, - 14A84E621E4E6B2800701B8A /* NSManagedObject+SyncTests.swift in Sources */, - 14A84EF71E4E748000701B8A /* 142.xcdatamodeld in Sources */, - 14A84EEE1E4E748000701B8A /* 129.xcdatamodeld in Sources */, - 14A84E631E4E6B2800701B8A /* NSManagedObjectContext+SyncTests.swift in Sources */, - 146738971E7ADC1900913C8E /* LightweightMigrationModel.xcdatamodel in Sources */, - 14A84E641E4E6B2800701B8A /* SyncTests.swift in Sources */, - 14A84E651E4E6B2800701B8A /* SyncDelegateTests.swift in Sources */, - 14A84E661E4E6B2800701B8A /* NSPersistentContainerTests.swift in Sources */, - 14A84E671E4E6B2800701B8A /* InsertOrUpdateTests.swift in Sources */, - 14A84EEB1E4E748000701B8A /* 123.xcdatamodeld in Sources */, - 14A84F001E4E748000701B8A /* BadAPIValueTransformer.swift in Sources */, - 14A84E681E4E6B2800701B8A /* UpdateTests.swift in Sources */, - 14A84E691E4E6B2800701B8A /* DeleteTests.swift in Sources */, - 14A84E6A1E4E6B2800701B8A /* FetchTests.swift in Sources */, - 14A84E6B1E4E6B2F00701B8A /* DataFilterTests.swift in Sources */, - 14A84EFD1E4E748000701B8A /* Ordered.xcdatamodeld in Sources */, - 14A84E6C1E4E6B2F00701B8A /* TestCheckTests.swift in Sources */, - 14A84ED31E4E748000701B8A /* DictionaryTests.swift in Sources */, - 14A84EDC1E4E748000701B8A /* HelperTests.m in Sources */, - 14A84EF41E4E748000701B8A /* 140.xcdatamodeld in Sources */, - 14A84E6D1E4E6B3400701B8A /* DataFilter.xcdatamodeld in Sources */, - 14A84E6E1E4E6B4100701B8A /* 3ca82a0.xcdatamodeld in Sources */, - 14A84E6F1E4E6B4100701B8A /* 84.xcdatamodeld in Sources */, - 14A84E701E4E6B4100701B8A /* 113.xcdatamodeld in Sources */, - 14A84E711E4E6B4100701B8A /* 125.xcdatamodeld in Sources */, - 14A84ECD1E4E748000701B8A /* PrimaryKeyTests.m in Sources */, - 14A84E721E4E6B4100701B8A /* 151-many-to-many.xcdatamodeld in Sources */, - 14A84E731E4E6B4100701B8A /* 151-ordered-many-to-many.xcdatamodeld in Sources */, - 14A84F061E4E748000701B8A /* SyncTestValueTransformer.m in Sources */, - 14A84EF11E4E748000701B8A /* 137.xcdatamodeld in Sources */, - 14A84E741E4E6B4100701B8A /* 151-ordered-to-many.xcdatamodeld in Sources */, - 146738A01E7ADC1900913C8E /* Tests.swift in Sources */, - 14A84E751E4E6B4100701B8A /* 151-to-many.xcdatamodeld in Sources */, - 14A84E761E4E6B4100701B8A /* 157.xcdatamodeld in Sources */, - 14A84E771E4E6B4100701B8A /* 179.xcdatamodeld in Sources */, - 14A84E781E4E6B4100701B8A /* 202.xcdatamodeld in Sources */, - 14A84E791E4E6B4100701B8A /* 225.xcdatamodeld in Sources */, - 14A84E7A1E4E6B4100701B8A /* 233.xcdatamodeld in Sources */, - 14A84ED01E4E748000701B8A /* NSString_SyncInflectionsTests.m in Sources */, - 14A84E7B1E4E6B4100701B8A /* 239.xcdatamodeld in Sources */, - 14A84E7C1E4E6B4100701B8A /* 254.xcdatamodeld in Sources */, - 14A84E7D1E4E6B4100701B8A /* 257.xcdatamodeld in Sources */, - 14A84E7E1E4E6B4100701B8A /* 265.xcdatamodeld in Sources */, - 14A84ED61E4E748000701B8A /* FillWithDictionaryTests.swift in Sources */, - 14A84EE21E4E748000701B8A /* SyncFillWithDictionaryTests.m in Sources */, - 14A84E7F1E4E6B4100701B8A /* 277.xcdatamodeld in Sources */, - 14A84E801E4E6B4100701B8A /* 280.xcdatamodeld in Sources */, - 14A84E811E4E6B4100701B8A /* 283.xcdatamodeld in Sources */, - 14A84E821E4E6B4100701B8A /* 320.xcdatamodeld in Sources */, - 14A84E831E4E6B4100701B8A /* Camelcase.xcdatamodeld in Sources */, - 14A84E841E4E6B4100701B8A /* Contacts.xcdatamodeld in Sources */, - 14A84E851E4E6B4100701B8A /* CustomRelationshipKey.xcdatamodeld in Sources */, - 14A84E861E4E6B4100701B8A /* id.xcdatamodeld in Sources */, - 14A84E871E4E6B4100701B8A /* InsertObjectsInParent.xcdatamodeld in Sources */, - 14A84E881E4E6B4100701B8A /* Markets.xcdatamodeld in Sources */, - 14A84E891E4E6B4100701B8A /* Notes.xcdatamodeld in Sources */, - 14A84E8A1E4E6B4100701B8A /* NotesB.xcdatamodeld in Sources */, - 14A84E8B1E4E6B4100701B8A /* OrderedSocial.xcdatamodeld in Sources */, - 14A84E8C1E4E6B4100701B8A /* Organizations.xcdatamodeld in Sources */, - 14A84F031E4E748000701B8A /* DateStringTransformer.m in Sources */, - 14A84E8D1E4E6B4100701B8A /* Patients.xcdatamodeld in Sources */, - 14A84E8E1E4E6B4100701B8A /* Recursive.xcdatamodeld in Sources */, - 14A84EC71E4E748000701B8A /* DateTests.swift in Sources */, - 14A84E8F1E4E6B4100701B8A /* Social.xcdatamodeld in Sources */, - 14A84EFA1E4E748000701B8A /* Model.xcdatamodeld in Sources */, - 14A84E901E4E6B4100701B8A /* Tests.xcdatamodeld in Sources */, - 14A84EE51E4E748000701B8A /* 112.xcdatamodeld in Sources */, - 14A84E911E4E6B4100701B8A /* ToOne.xcdatamodeld in Sources */, - 14A84E921E4E6B4100701B8A /* Unique.xcdatamodeld in Sources */, - 1467389A1E7ADC1900913C8E /* ModelGroup.xcdatamodeld in Sources */, - 14A84EE81E4E748000701B8A /* 121.xcdatamodeld in Sources */, - 14A84EDF1E4E748000701B8A /* SyncDictionaryTests.m in Sources */, + 14867ECD1E7AF4D2001D228A /* 125.xcdatamodeld in Sources */, + 14867F841E7AF4D2001D228A /* TestCheckTests.swift in Sources */, + 14867F2A1E7AF4D2001D228A /* Recursive.xcdatamodeld in Sources */, + 14867F811E7AF4D2001D228A /* SyncTestValueTransformer.m in Sources */, + 14867F061E7AF4D2001D228A /* 84.xcdatamodeld in Sources */, + 14867EE51E7AF4D2001D228A /* 225.xcdatamodeld in Sources */, + 14867DF51E7AF4D2001D228A /* SimpleModel.xcdatamodel in Sources */, + 14867F6C1E7AF4D2001D228A /* 142.xcdatamodeld in Sources */, + 14867F751E7AF4D2001D228A /* SyncDictionaryTests.m in Sources */, + 14867F661E7AF4D2001D228A /* 137.xcdatamodeld in Sources */, + 14867F511E7AF4D2001D228A /* DictionaryTests.swift in Sources */, + 14867F781E7AF4D2001D228A /* SyncFillWithDictionaryTests.m in Sources */, + 14867F631E7AF4D2001D228A /* 129.xcdatamodeld in Sources */, + 14867F331E7AF4D2001D228A /* ToOne.xcdatamodeld in Sources */, + 14867F091E7AF4D2001D228A /* Camelcase.xcdatamodeld in Sources */, + 14867F2D1E7AF4D2001D228A /* Social.xcdatamodeld in Sources */, + 14867F3F1E7AF4D2001D228A /* NSManagedObject+SyncTests.swift in Sources */, + 14867ED31E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld in Sources */, + 14867F4B1E7AF4D2001D228A /* SyncTests.swift in Sources */, + 14867EF41E7AF4D2001D228A /* 265.xcdatamodeld in Sources */, + 14867EFD1E7AF4D2001D228A /* 283.xcdatamodeld in Sources */, + 14867F6F1E7AF4D2001D228A /* Model.xcdatamodeld in Sources */, + 14867EEE1E7AF4D2001D228A /* 254.xcdatamodeld in Sources */, + 14867F181E7AF4D2001D228A /* Markets.xcdatamodeld in Sources */, + 14867E041E7AF4D2001D228A /* NSString_SyncInflectionsTests.m in Sources */, + 14867E071E7AF4D2001D228A /* DeleteTests.swift in Sources */, + 14867F301E7AF4D2001D228A /* Tests.xcdatamodeld in Sources */, + 14867F871E7AF4D2001D228A /* JSON.swift in Sources */, + 14867DF81E7AF4D2001D228A /* Tests.swift in Sources */, + 14867F001E7AF4D2001D228A /* 320.xcdatamodeld in Sources */, + 14867F601E7AF4D2001D228A /* 123.xcdatamodeld in Sources */, + 14867E101E7AF4D2001D228A /* InsertOrUpdateTests.swift in Sources */, + 14867E0A1E7AF4D2001D228A /* FetchTests.swift in Sources */, + 14867DD41E7AF4D2001D228A /* DataFilter.xcdatamodeld in Sources */, + 14867F031E7AF4D2001D228A /* 3ca82a0.xcdatamodeld in Sources */, + 14867E011E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld in Sources */, + 14867F691E7AF4D2001D228A /* 140.xcdatamodeld in Sources */, + 14867F7B1E7AF4D2001D228A /* BadAPIValueTransformer.swift in Sources */, + 14867EFA1E7AF4D2001D228A /* 280.xcdatamodeld in Sources */, + 14867F121E7AF4D2001D228A /* id.xcdatamodeld in Sources */, + 14867F421E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift in Sources */, + 14867F541E7AF4D2001D228A /* FillWithDictionaryTests.swift in Sources */, + 14867DFB1E7AF4D2001D228A /* DateTests.swift in Sources */, + 14867F5A1E7AF4D2001D228A /* 112.xcdatamodeld in Sources */, + 14867DFE1E7AF4D2001D228A /* PrimaryKeyTests.m in Sources */, + 14867EF11E7AF4D2001D228A /* 257.xcdatamodeld in Sources */, + 14867F571E7AF4D2001D228A /* HelperTests.m in Sources */, + 14867DF21E7AF4D2001D228A /* ModelGroup.xcdatamodeld in Sources */, + 14867F391E7AF4D2001D228A /* NSArray+SyncTests.swift in Sources */, + 14867EEB1E7AF4D2001D228A /* 239.xcdatamodeld in Sources */, + 14867EF71E7AF4D2001D228A /* 277.xcdatamodeld in Sources */, + 14867ED01E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld in Sources */, + 14867ECA1E7AF4D2001D228A /* 113.xcdatamodeld in Sources */, + 14867E0D1E7AF4D2001D228A /* Helper.swift in Sources */, + 14867F0F1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld in Sources */, + 14867F481E7AF4D2001D228A /* SyncDelegateTests.swift in Sources */, + 14867F1B1E7AF4D2001D228A /* Notes.xcdatamodeld in Sources */, + 14867EE81E7AF4D2001D228A /* 233.xcdatamodeld in Sources */, + 14867F0C1E7AF4D2001D228A /* Contacts.xcdatamodeld in Sources */, + 14867F3C1E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift in Sources */, + 14867DD71E7AF4D2001D228A /* DataFilterTests.swift in Sources */, + 14867F361E7AF4D2001D228A /* Unique.xcdatamodeld in Sources */, + 14867ED91E7AF4D2001D228A /* 151-to-many.xcdatamodeld in Sources */, + 14867F151E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld in Sources */, + 14867F721E7AF4D2001D228A /* Ordered.xcdatamodeld in Sources */, + 14867F451E7AF4D2001D228A /* NSPersistentContainerTests.swift in Sources */, + 14867EDC1E7AF4D2001D228A /* 157.xcdatamodeld in Sources */, + 14867F211E7AF4D2001D228A /* OrderedSocial.xcdatamodeld in Sources */, + 14867EDF1E7AF4D2001D228A /* 179.xcdatamodeld in Sources */, + 14867EE21E7AF4D2001D228A /* 202.xcdatamodeld in Sources */, + 14867F271E7AF4D2001D228A /* Patients.xcdatamodeld in Sources */, + 14867DEF1E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel in Sources */, + 14867F1E1E7AF4D2001D228A /* NotesB.xcdatamodeld in Sources */, + 14867F5D1E7AF4D2001D228A /* 121.xcdatamodeld in Sources */, + 14867F7E1E7AF4D2001D228A /* DateStringTransformer.m in Sources */, + 14867F4E1E7AF4D2001D228A /* UpdateTests.swift in Sources */, + 14867F241E7AF4D2001D228A /* Organizations.xcdatamodeld in Sources */, + 14867ED61E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2203,84 +2203,84 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14E2F0AA1E7ADFC600DF1776 /* NSString_SyncInflectionsTests.m in Sources */, - 14E2F0A31E7ADFB500DF1776 /* LightweightMigrationModel.xcdatamodel in Sources */, - 14E2F0A41E7ADFB500DF1776 /* ModelGroup.xcdatamodeld in Sources */, - 14E269051E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld in Sources */, - 14E2F0A51E7ADFB500DF1776 /* SimpleModel.xcdatamodel in Sources */, - 14E2F0A61E7ADFB500DF1776 /* Tests.swift in Sources */, - 14E2F0EF1E7AE01600DF1776 /* Helper.swift in Sources */, - 14E2F0A71E7ADFBA00DF1776 /* DateTests.swift in Sources */, - 14E2F0A91E7ADFC100DF1776 /* PrimaryKeyTests.m in Sources */, - 14E2F0AB1E7ADFD200DF1776 /* DictionaryTests.swift in Sources */, - 14E2F0AC1E7ADFD200DF1776 /* FillWithDictionaryTests.swift in Sources */, - 14E2F0AD1E7ADFD200DF1776 /* HelperTests.m in Sources */, - 14E2F0AE1E7ADFD200DF1776 /* SyncDictionaryTests.m in Sources */, - 14E2F0AF1E7ADFD200DF1776 /* SyncFillWithDictionaryTests.m in Sources */, - 14E2F0B01E7ADFE000DF1776 /* 112.xcdatamodeld in Sources */, - 14E2F0B11E7ADFE000DF1776 /* 121.xcdatamodeld in Sources */, - 14E2F0B21E7ADFE000DF1776 /* 123.xcdatamodeld in Sources */, - 14E2F0B31E7ADFE000DF1776 /* 129.xcdatamodeld in Sources */, - 14E2F0B41E7ADFE000DF1776 /* 137.xcdatamodeld in Sources */, - 14E2F0B51E7ADFE000DF1776 /* 140.xcdatamodeld in Sources */, - 14E2F0B61E7ADFE000DF1776 /* 142.xcdatamodeld in Sources */, - 14E2F0B71E7ADFE000DF1776 /* Model.xcdatamodeld in Sources */, - 14E2F0B81E7ADFE000DF1776 /* Ordered.xcdatamodeld in Sources */, - 14E2F0B91E7ADFE700DF1776 /* BadAPIValueTransformer.swift in Sources */, - 14E2F0BB1E7ADFE700DF1776 /* DateStringTransformer.m in Sources */, - 14E2F0BD1E7ADFE700DF1776 /* SyncTestValueTransformer.m in Sources */, - 14E2F0BE1E7ADFEC00DF1776 /* JSON.swift in Sources */, - 14E2F0BF1E7ADFF900DF1776 /* NSArray+SyncTests.swift in Sources */, - 14E2F0C01E7ADFF900DF1776 /* NSEntityDescription+SyncTests.swift in Sources */, - 14E2F0C11E7ADFF900DF1776 /* NSManagedObject+SyncTests.swift in Sources */, - 14E2F0C21E7ADFF900DF1776 /* NSManagedObjectContext+SyncTests.swift in Sources */, - 14E2F0C31E7ADFF900DF1776 /* SyncTests.swift in Sources */, - 14E2F0C41E7ADFF900DF1776 /* SyncDelegateTests.swift in Sources */, - 14E2F0C51E7ADFF900DF1776 /* NSPersistentContainerTests.swift in Sources */, - 14E2F0C61E7ADFF900DF1776 /* InsertOrUpdateTests.swift in Sources */, - 14E2F0C71E7ADFF900DF1776 /* UpdateTests.swift in Sources */, - 14E2F0C81E7ADFF900DF1776 /* DeleteTests.swift in Sources */, - 14E2F0C91E7ADFF900DF1776 /* FetchTests.swift in Sources */, - 14E2F0CA1E7AE00200DF1776 /* 3ca82a0.xcdatamodeld in Sources */, - 14E2F0CB1E7AE00200DF1776 /* 84.xcdatamodeld in Sources */, - 14E2F0CC1E7AE00200DF1776 /* 113.xcdatamodeld in Sources */, - 14E2F0CD1E7AE00200DF1776 /* 125.xcdatamodeld in Sources */, - 14E2F0CE1E7AE00200DF1776 /* 151-many-to-many.xcdatamodeld in Sources */, - 14E2F0CF1E7AE00200DF1776 /* 151-ordered-many-to-many.xcdatamodeld in Sources */, - 14E2F0D01E7AE00200DF1776 /* 151-ordered-to-many.xcdatamodeld in Sources */, - 14E2F0D11E7AE00200DF1776 /* 151-to-many.xcdatamodeld in Sources */, - 14E2F0D21E7AE00200DF1776 /* 157.xcdatamodeld in Sources */, - 14E2F0D31E7AE00200DF1776 /* 179.xcdatamodeld in Sources */, - 14E2F0D41E7AE00200DF1776 /* 202.xcdatamodeld in Sources */, - 14E2F0D51E7AE00200DF1776 /* 225.xcdatamodeld in Sources */, - 14E2F0D61E7AE00200DF1776 /* 233.xcdatamodeld in Sources */, - 14E2F0D71E7AE00200DF1776 /* 239.xcdatamodeld in Sources */, - 14E2F0D81E7AE00200DF1776 /* 254.xcdatamodeld in Sources */, - 14E2F0D91E7AE00200DF1776 /* 257.xcdatamodeld in Sources */, - 14E2F0DA1E7AE00200DF1776 /* 265.xcdatamodeld in Sources */, - 14E2F0DB1E7AE00200DF1776 /* 277.xcdatamodeld in Sources */, - 14E2F0DC1E7AE00200DF1776 /* 280.xcdatamodeld in Sources */, - 14E2F0DD1E7AE00200DF1776 /* 283.xcdatamodeld in Sources */, - 14E2F0DE1E7AE00200DF1776 /* 320.xcdatamodeld in Sources */, - 14E2F0DF1E7AE00200DF1776 /* Camelcase.xcdatamodeld in Sources */, - 14E2F0E01E7AE00200DF1776 /* Contacts.xcdatamodeld in Sources */, - 14E2F0E11E7AE00200DF1776 /* CustomRelationshipKey.xcdatamodeld in Sources */, - 14E2F0E21E7AE00200DF1776 /* id.xcdatamodeld in Sources */, - 14E2F0E31E7AE00200DF1776 /* InsertObjectsInParent.xcdatamodeld in Sources */, - 14E2F0E41E7AE00200DF1776 /* Markets.xcdatamodeld in Sources */, - 14E2F0E51E7AE00200DF1776 /* Notes.xcdatamodeld in Sources */, - 14E2F0E61E7AE00200DF1776 /* NotesB.xcdatamodeld in Sources */, - 14E2F0E71E7AE00200DF1776 /* OrderedSocial.xcdatamodeld in Sources */, - 14E2F0E81E7AE00200DF1776 /* Organizations.xcdatamodeld in Sources */, - 14E2F0E91E7AE00200DF1776 /* Patients.xcdatamodeld in Sources */, - 14E2F0EA1E7AE00200DF1776 /* Recursive.xcdatamodeld in Sources */, - 14E2F0EB1E7AE00200DF1776 /* Social.xcdatamodeld in Sources */, - 14E2F0EC1E7AE00200DF1776 /* Tests.xcdatamodeld in Sources */, - 14E2F0ED1E7AE00200DF1776 /* ToOne.xcdatamodeld in Sources */, - 14E2F0EE1E7AE00200DF1776 /* Unique.xcdatamodeld in Sources */, - 14E2F0F01E7AE02F00DF1776 /* DataFilterTests.swift in Sources */, - 14E2F0F11E7AE02F00DF1776 /* DataFilter.xcdatamodeld in Sources */, - 14E2F0F21E7AE03400DF1776 /* TestCheckTests.swift in Sources */, + 14867ECE1E7AF4D2001D228A /* 125.xcdatamodeld in Sources */, + 14867F851E7AF4D2001D228A /* TestCheckTests.swift in Sources */, + 14867F2B1E7AF4D2001D228A /* Recursive.xcdatamodeld in Sources */, + 14867F821E7AF4D2001D228A /* SyncTestValueTransformer.m in Sources */, + 14867F071E7AF4D2001D228A /* 84.xcdatamodeld in Sources */, + 14867EE61E7AF4D2001D228A /* 225.xcdatamodeld in Sources */, + 14867DF61E7AF4D2001D228A /* SimpleModel.xcdatamodel in Sources */, + 14867F6D1E7AF4D2001D228A /* 142.xcdatamodeld in Sources */, + 14867F761E7AF4D2001D228A /* SyncDictionaryTests.m in Sources */, + 14867F671E7AF4D2001D228A /* 137.xcdatamodeld in Sources */, + 14867F521E7AF4D2001D228A /* DictionaryTests.swift in Sources */, + 14867F791E7AF4D2001D228A /* SyncFillWithDictionaryTests.m in Sources */, + 14867F641E7AF4D2001D228A /* 129.xcdatamodeld in Sources */, + 14867F341E7AF4D2001D228A /* ToOne.xcdatamodeld in Sources */, + 14867F0A1E7AF4D2001D228A /* Camelcase.xcdatamodeld in Sources */, + 14867F2E1E7AF4D2001D228A /* Social.xcdatamodeld in Sources */, + 14867F401E7AF4D2001D228A /* NSManagedObject+SyncTests.swift in Sources */, + 14867ED41E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld in Sources */, + 14867F4C1E7AF4D2001D228A /* SyncTests.swift in Sources */, + 14867EF51E7AF4D2001D228A /* 265.xcdatamodeld in Sources */, + 14867EFE1E7AF4D2001D228A /* 283.xcdatamodeld in Sources */, + 14867F701E7AF4D2001D228A /* Model.xcdatamodeld in Sources */, + 14867EEF1E7AF4D2001D228A /* 254.xcdatamodeld in Sources */, + 14867F191E7AF4D2001D228A /* Markets.xcdatamodeld in Sources */, + 14867E051E7AF4D2001D228A /* NSString_SyncInflectionsTests.m in Sources */, + 14867E081E7AF4D2001D228A /* DeleteTests.swift in Sources */, + 14867F311E7AF4D2001D228A /* Tests.xcdatamodeld in Sources */, + 14867F881E7AF4D2001D228A /* JSON.swift in Sources */, + 14867DF91E7AF4D2001D228A /* Tests.swift in Sources */, + 14867F011E7AF4D2001D228A /* 320.xcdatamodeld in Sources */, + 14867F611E7AF4D2001D228A /* 123.xcdatamodeld in Sources */, + 14867E111E7AF4D2001D228A /* InsertOrUpdateTests.swift in Sources */, + 14867E0B1E7AF4D2001D228A /* FetchTests.swift in Sources */, + 14867DD51E7AF4D2001D228A /* DataFilter.xcdatamodeld in Sources */, + 14867F041E7AF4D2001D228A /* 3ca82a0.xcdatamodeld in Sources */, + 14867E021E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld in Sources */, + 14867F6A1E7AF4D2001D228A /* 140.xcdatamodeld in Sources */, + 14867F7C1E7AF4D2001D228A /* BadAPIValueTransformer.swift in Sources */, + 14867EFB1E7AF4D2001D228A /* 280.xcdatamodeld in Sources */, + 14867F131E7AF4D2001D228A /* id.xcdatamodeld in Sources */, + 14867F431E7AF4D2001D228A /* NSManagedObjectContext+SyncTests.swift in Sources */, + 14867F551E7AF4D2001D228A /* FillWithDictionaryTests.swift in Sources */, + 14867DFC1E7AF4D2001D228A /* DateTests.swift in Sources */, + 14867F5B1E7AF4D2001D228A /* 112.xcdatamodeld in Sources */, + 14867DFF1E7AF4D2001D228A /* PrimaryKeyTests.m in Sources */, + 14867EF21E7AF4D2001D228A /* 257.xcdatamodeld in Sources */, + 14867F581E7AF4D2001D228A /* HelperTests.m in Sources */, + 14867DF31E7AF4D2001D228A /* ModelGroup.xcdatamodeld in Sources */, + 14867F3A1E7AF4D2001D228A /* NSArray+SyncTests.swift in Sources */, + 14867EEC1E7AF4D2001D228A /* 239.xcdatamodeld in Sources */, + 14867EF81E7AF4D2001D228A /* 277.xcdatamodeld in Sources */, + 14867ED11E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld in Sources */, + 14867ECB1E7AF4D2001D228A /* 113.xcdatamodeld in Sources */, + 14867E0E1E7AF4D2001D228A /* Helper.swift in Sources */, + 14867F101E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld in Sources */, + 14867F491E7AF4D2001D228A /* SyncDelegateTests.swift in Sources */, + 14867F1C1E7AF4D2001D228A /* Notes.xcdatamodeld in Sources */, + 14867EE91E7AF4D2001D228A /* 233.xcdatamodeld in Sources */, + 14867F0D1E7AF4D2001D228A /* Contacts.xcdatamodeld in Sources */, + 14867F3D1E7AF4D2001D228A /* NSEntityDescription+SyncTests.swift in Sources */, + 14867DD81E7AF4D2001D228A /* DataFilterTests.swift in Sources */, + 14867F371E7AF4D2001D228A /* Unique.xcdatamodeld in Sources */, + 14867EDA1E7AF4D2001D228A /* 151-to-many.xcdatamodeld in Sources */, + 14867F161E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld in Sources */, + 14867F731E7AF4D2001D228A /* Ordered.xcdatamodeld in Sources */, + 14867F461E7AF4D2001D228A /* NSPersistentContainerTests.swift in Sources */, + 14867EDD1E7AF4D2001D228A /* 157.xcdatamodeld in Sources */, + 14867F221E7AF4D2001D228A /* OrderedSocial.xcdatamodeld in Sources */, + 14867EE01E7AF4D2001D228A /* 179.xcdatamodeld in Sources */, + 14867EE31E7AF4D2001D228A /* 202.xcdatamodeld in Sources */, + 14867F281E7AF4D2001D228A /* Patients.xcdatamodeld in Sources */, + 14867DF01E7AF4D2001D228A /* LightweightMigrationModel.xcdatamodel in Sources */, + 14867F1F1E7AF4D2001D228A /* NotesB.xcdatamodeld in Sources */, + 14867F5E1E7AF4D2001D228A /* 121.xcdatamodeld in Sources */, + 14867F7F1E7AF4D2001D228A /* DateStringTransformer.m in Sources */, + 14867F4F1E7AF4D2001D228A /* UpdateTests.swift in Sources */, + 14867F251E7AF4D2001D228A /* Organizations.xcdatamodeld in Sources */, + 14867ED71E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2884,503 +2884,503 @@ /* End XCConfigurationList section */ /* Begin XCVersionGroup section */ - 140944AE1DF0BC280037F85A /* 265.xcdatamodeld */ = { + 14867D011E7AF4D1001D228A /* DataFilter.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 140944AF1DF0BC280037F85A /* 265.xcdatamodel */, + 14867D021E7AF4D1001D228A /* DataFilter.xcdatamodel */, ); - currentVersion = 140944AF1DF0BC280037F85A /* 265.xcdatamodel */; - path = 265.xcdatamodeld; + currentVersion = 14867D021E7AF4D1001D228A /* DataFilter.xcdatamodel */; + path = DataFilter.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 140D43221DFF4D3A00E3B159 /* 277.xcdatamodeld */ = { + 14867D0D1E7AF4D2001D228A /* ModelGroup.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 140D43231DFF4D3A00E3B159 /* 239.xcdatamodel */, + 14867D0E1E7AF4D2001D228A /* ModelGroup.xcdatamodel */, ); - currentVersion = 140D43231DFF4D3A00E3B159 /* 239.xcdatamodel */; - path = 277.xcdatamodeld; + currentVersion = 14867D0E1E7AF4D2001D228A /* ModelGroup.xcdatamodel */; + path = ModelGroup.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 1421405B1DBCDD52000FF107 /* Tests.xcdatamodeld */ = { + 14867D151E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 1421405C1DBCDD52000FF107 /* Tests.xcdatamodel */, + 14867D161E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodel */, ); - currentVersion = 1421405C1DBCDD52000FF107 /* Tests.xcdatamodel */; - path = Tests.xcdatamodeld; + currentVersion = 14867D161E7AF4D2001D228A /* SyncPrimaryKey.xcdatamodel */; + path = SyncPrimaryKey.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 146738921E7ADC1900913C8E /* ModelGroup.xcdatamodeld */ = { + 14867D5E1E7AF4D2001D228A /* 113.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 146738931E7ADC1900913C8E /* ModelGroup.xcdatamodel */, + 14867D5F1E7AF4D2001D228A /* 113.xcdatamodel */, ); - currentVersion = 146738931E7ADC1900913C8E /* ModelGroup.xcdatamodel */; - path = ModelGroup.xcdatamodeld; + currentVersion = 14867D5F1E7AF4D2001D228A /* 113.xcdatamodel */; + path = 113.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EAE1E4E748000701B8A /* 112.xcdatamodeld */ = { + 14867D601E7AF4D2001D228A /* 125.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EAF1E4E748000701B8A /* hypbug.xcdatamodel */, + 14867D611E7AF4D2001D228A /* 125.xcdatamodel */, ); - currentVersion = 14A84EAF1E4E748000701B8A /* hypbug.xcdatamodel */; - path = 112.xcdatamodeld; + currentVersion = 14867D611E7AF4D2001D228A /* 125.xcdatamodel */; + path = 125.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EB01E4E748000701B8A /* 121.xcdatamodeld */ = { + 14867D621E7AF4D2001D228A /* 151-many-to-many.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EB11E4E748000701B8A /* Model.xcdatamodel */, + 14867D631E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */, ); - currentVersion = 14A84EB11E4E748000701B8A /* Model.xcdatamodel */; - path = 121.xcdatamodeld; + currentVersion = 14867D631E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */; + path = "151-many-to-many.xcdatamodeld"; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EB21E4E748000701B8A /* 123.xcdatamodeld */ = { + 14867D641E7AF4D2001D228A /* 151-ordered-many-to-many.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EB31E4E748000701B8A /* Model.xcdatamodel */, + 14867D651E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */, ); - currentVersion = 14A84EB31E4E748000701B8A /* Model.xcdatamodel */; - path = 123.xcdatamodeld; + currentVersion = 14867D651E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */; + path = "151-ordered-many-to-many.xcdatamodeld"; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EB41E4E748000701B8A /* 129.xcdatamodeld */ = { + 14867D661E7AF4D2001D228A /* 151-ordered-to-many.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EB51E4E748000701B8A /* hypbug.xcdatamodel */, + 14867D671E7AF4D2001D228A /* 151-to-many.xcdatamodel */, ); - currentVersion = 14A84EB51E4E748000701B8A /* hypbug.xcdatamodel */; - path = 129.xcdatamodeld; + currentVersion = 14867D671E7AF4D2001D228A /* 151-to-many.xcdatamodel */; + path = "151-ordered-to-many.xcdatamodeld"; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EB61E4E748000701B8A /* 137.xcdatamodeld */ = { + 14867D681E7AF4D2001D228A /* 151-to-many.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EB71E4E748000701B8A /* hypbug.xcdatamodel */, + 14867D691E7AF4D2001D228A /* 151-to-many.xcdatamodel */, ); - currentVersion = 14A84EB71E4E748000701B8A /* hypbug.xcdatamodel */; - path = 137.xcdatamodeld; + currentVersion = 14867D691E7AF4D2001D228A /* 151-to-many.xcdatamodel */; + path = "151-to-many.xcdatamodeld"; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EB81E4E748000701B8A /* 140.xcdatamodeld */ = { + 14867D6A1E7AF4D2001D228A /* 157.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EB91E4E748000701B8A /* smartworkout.xcdatamodel */, + 14867D6B1E7AF4D2001D228A /* 157.xcdatamodel */, ); - currentVersion = 14A84EB91E4E748000701B8A /* smartworkout.xcdatamodel */; - path = 140.xcdatamodeld; + currentVersion = 14867D6B1E7AF4D2001D228A /* 157.xcdatamodel */; + path = 157.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EBA1E4E748000701B8A /* 142.xcdatamodeld */ = { + 14867D6C1E7AF4D2001D228A /* 179.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EBB1E4E748000701B8A /* hypbug.xcdatamodel */, + 14867D6D1E7AF4D2001D228A /* 179.xcdatamodel */, ); - currentVersion = 14A84EBB1E4E748000701B8A /* hypbug.xcdatamodel */; - path = 142.xcdatamodeld; + currentVersion = 14867D6D1E7AF4D2001D228A /* 179.xcdatamodel */; + path = 179.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EBC1E4E748000701B8A /* Model.xcdatamodeld */ = { + 14867D6E1E7AF4D2001D228A /* 202.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EBD1E4E748000701B8A /* Model.xcdatamodel */, + 14867D6F1E7AF4D2001D228A /* 202.xcdatamodel */, ); - currentVersion = 14A84EBD1E4E748000701B8A /* Model.xcdatamodel */; - path = Model.xcdatamodeld; + currentVersion = 14867D6F1E7AF4D2001D228A /* 202.xcdatamodel */; + path = 202.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14A84EBE1E4E748000701B8A /* Ordered.xcdatamodeld */ = { + 14867D701E7AF4D2001D228A /* 225.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14A84EBF1E4E748000701B8A /* Ordered.xcdatamodel */, + 14867D711E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */, ); - currentVersion = 14A84EBF1E4E748000701B8A /* Ordered.xcdatamodel */; - path = Ordered.xcdatamodeld; + currentVersion = 14867D711E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */; + path = 225.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14E269011E7AF345007658C0 /* SyncPrimaryKey.xcdatamodeld */ = { + 14867D721E7AF4D2001D228A /* 233.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14E269021E7AF345007658C0 /* SyncPrimaryKey.xcdatamodel */, + 14867D731E7AF4D2001D228A /* 233.xcdatamodel */, ); - currentVersion = 14E269021E7AF345007658C0 /* SyncPrimaryKey.xcdatamodel */; - path = SyncPrimaryKey.xcdatamodeld; + currentVersion = 14867D731E7AF4D2001D228A /* 233.xcdatamodel */; + path = 233.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 14E9C1391DEA2ECD00A21B9E /* 320.xcdatamodeld */ = { + 14867D741E7AF4D2001D228A /* 239.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 14E9C13A1DEA2ECD00A21B9E /* 320.xcdatamodel */, + 14867D751E7AF4D2001D228A /* 239.xcdatamodel */, ); - currentVersion = 14E9C13A1DEA2ECD00A21B9E /* 320.xcdatamodel */; - path = 320.xcdatamodeld; + currentVersion = 14867D751E7AF4D2001D228A /* 239.xcdatamodel */; + path = 239.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC171D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodeld */ = { + 14867D761E7AF4D2001D228A /* 254.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC181D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */, + 14867D771E7AF4D2001D228A /* 254.xcdatamodel */, ); - currentVersion = 4403DC181D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */; - path = "151-many-to-many.xcdatamodeld"; + currentVersion = 14867D771E7AF4D2001D228A /* 254.xcdatamodel */; + path = 254.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC191D9F90B5001C8DA6 /* 151-ordered-many-to-many.xcdatamodeld */ = { + 14867D781E7AF4D2001D228A /* 257.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC1A1D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */, + 14867D791E7AF4D2001D228A /* 257.xcdatamodel */, ); - currentVersion = 4403DC1A1D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */; - path = "151-ordered-many-to-many.xcdatamodeld"; + currentVersion = 14867D791E7AF4D2001D228A /* 257.xcdatamodel */; + path = 257.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC1B1D9F90B5001C8DA6 /* 151-ordered-to-many.xcdatamodeld */ = { + 14867D7A1E7AF4D2001D228A /* 265.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC1C1D9F90B5001C8DA6 /* 151-to-many.xcdatamodel */, + 14867D7B1E7AF4D2001D228A /* 265.xcdatamodel */, ); - currentVersion = 4403DC1C1D9F90B5001C8DA6 /* 151-to-many.xcdatamodel */; - path = "151-ordered-to-many.xcdatamodeld"; + currentVersion = 14867D7B1E7AF4D2001D228A /* 265.xcdatamodel */; + path = 265.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC1D1D9F90B5001C8DA6 /* 151-to-many.xcdatamodeld */ = { + 14867D7C1E7AF4D2001D228A /* 277.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC1E1D9F90B5001C8DA6 /* 151-to-many.xcdatamodel */, + 14867D7D1E7AF4D2001D228A /* 239.xcdatamodel */, ); - currentVersion = 4403DC1E1D9F90B5001C8DA6 /* 151-to-many.xcdatamodel */; - path = "151-to-many.xcdatamodeld"; + currentVersion = 14867D7D1E7AF4D2001D228A /* 239.xcdatamodel */; + path = 277.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC1F1D9F90B5001C8DA6 /* 225.xcdatamodeld */ = { + 14867D7E1E7AF4D2001D228A /* 280.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC201D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */, + 14867D7F1E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */, ); - currentVersion = 4403DC201D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */; - path = 225.xcdatamodeld; + currentVersion = 14867D7F1E7AF4D2001D228A /* 151-many-to-many.xcdatamodel */; + path = 280.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC211D9F90B5001C8DA6 /* 280.xcdatamodeld */ = { + 14867D801E7AF4D2001D228A /* 283.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC221D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */, + 14867D811E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC221D9F90B5001C8DA6 /* 151-many-to-many.xcdatamodel */; - path = 280.xcdatamodeld; + currentVersion = 14867D811E7AF4D2001D228A /* Demo.xcdatamodel */; + path = 283.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC231D9F90B5001C8DA6 /* 283.xcdatamodeld */ = { + 14867D821E7AF4D2001D228A /* 320.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC241D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867D831E7AF4D2001D228A /* 320.xcdatamodel */, ); - currentVersion = 4403DC241D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = 283.xcdatamodeld; + currentVersion = 14867D831E7AF4D2001D228A /* 320.xcdatamodel */; + path = 320.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC251D9F90B5001C8DA6 /* 113.xcdatamodeld */ = { + 14867D841E7AF4D2001D228A /* 3ca82a0.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC261D9F90B5001C8DA6 /* 113.xcdatamodel */, + 14867D851E7AF4D2001D228A /* 3ca82a0.xcdatamodel */, ); - currentVersion = 4403DC261D9F90B5001C8DA6 /* 113.xcdatamodel */; - path = 113.xcdatamodeld; + currentVersion = 14867D851E7AF4D2001D228A /* 3ca82a0.xcdatamodel */; + path = 3ca82a0.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC271D9F90B5001C8DA6 /* 125.xcdatamodeld */ = { + 14867D861E7AF4D2001D228A /* 84.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC281D9F90B5001C8DA6 /* 125.xcdatamodel */, + 14867D871E7AF4D2001D228A /* 84.xcdatamodel */, ); - currentVersion = 4403DC281D9F90B5001C8DA6 /* 125.xcdatamodel */; - path = 125.xcdatamodeld; + currentVersion = 14867D871E7AF4D2001D228A /* 84.xcdatamodel */; + path = 84.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC291D9F90B5001C8DA6 /* 157.xcdatamodeld */ = { + 14867D881E7AF4D2001D228A /* Camelcase.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC2A1D9F90B5001C8DA6 /* 157.xcdatamodel */, + 14867D891E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC2A1D9F90B5001C8DA6 /* 157.xcdatamodel */; - path = 157.xcdatamodeld; + currentVersion = 14867D891E7AF4D2001D228A /* Demo.xcdatamodel */; + path = Camelcase.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC2B1D9F90B5001C8DA6 /* 179.xcdatamodeld */ = { + 14867D8A1E7AF4D2001D228A /* Contacts.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC2C1D9F90B5001C8DA6 /* 179.xcdatamodel */, + 14867D8B1E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC2C1D9F90B5001C8DA6 /* 179.xcdatamodel */; - path = 179.xcdatamodeld; + currentVersion = 14867D8B1E7AF4D2001D228A /* Demo.xcdatamodel */; + path = Contacts.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC2D1D9F90B5001C8DA6 /* 202.xcdatamodeld */ = { + 14867D8C1E7AF4D2001D228A /* CustomRelationshipKey.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC2E1D9F90B5001C8DA6 /* 202.xcdatamodel */, + 14867D8D1E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC2E1D9F90B5001C8DA6 /* 202.xcdatamodel */; - path = 202.xcdatamodeld; + currentVersion = 14867D8D1E7AF4D2001D228A /* Demo.xcdatamodel */; + path = CustomRelationshipKey.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC2F1D9F90B5001C8DA6 /* 239.xcdatamodeld */ = { + 14867D8E1E7AF4D2001D228A /* id.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC301D9F90B5001C8DA6 /* 239.xcdatamodel */, + 14867D8F1E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC301D9F90B5001C8DA6 /* 239.xcdatamodel */; - path = 239.xcdatamodeld; + currentVersion = 14867D8F1E7AF4D2001D228A /* Demo.xcdatamodel */; + path = id.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC311D9F90B5001C8DA6 /* 254.xcdatamodeld */ = { + 14867D901E7AF4D2001D228A /* InsertObjectsInParent.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC321D9F90B5001C8DA6 /* 254.xcdatamodel */, + 14867D911E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC321D9F90B5001C8DA6 /* 254.xcdatamodel */; - path = 254.xcdatamodeld; + currentVersion = 14867D911E7AF4D2001D228A /* Demo.xcdatamodel */; + path = InsertObjectsInParent.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC331D9F90B5001C8DA6 /* 257.xcdatamodeld */ = { + 14867D921E7AF4D2001D228A /* Markets.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC341D9F90B5001C8DA6 /* 257.xcdatamodel */, + 14867D931E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC341D9F90B5001C8DA6 /* 257.xcdatamodel */; - path = 257.xcdatamodeld; + currentVersion = 14867D931E7AF4D2001D228A /* Demo.xcdatamodel */; + path = Markets.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC351D9F90B5001C8DA6 /* 84.xcdatamodeld */ = { + 14867D941E7AF4D2001D228A /* Notes.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC361D9F90B5001C8DA6 /* 84.xcdatamodel */, + 14867D951E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC361D9F90B5001C8DA6 /* 84.xcdatamodel */; - path = 84.xcdatamodeld; + currentVersion = 14867D951E7AF4D2001D228A /* Demo.xcdatamodel */; + path = Notes.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC371D9F90B5001C8DA6 /* Camelcase.xcdatamodeld */ = { + 14867D961E7AF4D2001D228A /* NotesB.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC381D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867D971E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC381D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = Camelcase.xcdatamodeld; + currentVersion = 14867D971E7AF4D2001D228A /* Demo.xcdatamodel */; + path = NotesB.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC391D9F90B5001C8DA6 /* Contacts.xcdatamodeld */ = { + 14867D981E7AF4D2001D228A /* OrderedSocial.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC3A1D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867D991E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC3A1D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = Contacts.xcdatamodeld; + currentVersion = 14867D991E7AF4D2001D228A /* Demo.xcdatamodel */; + path = OrderedSocial.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC3B1D9F90B5001C8DA6 /* CustomRelationshipKey.xcdatamodeld */ = { + 14867D9A1E7AF4D2001D228A /* Organizations.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC3C1D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867D9B1E7AF4D2001D228A /* Organizations.xcdatamodel */, ); - currentVersion = 4403DC3C1D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = CustomRelationshipKey.xcdatamodeld; + currentVersion = 14867D9B1E7AF4D2001D228A /* Organizations.xcdatamodel */; + path = Organizations.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC3D1D9F90B5001C8DA6 /* id.xcdatamodeld */ = { + 14867D9C1E7AF4D2001D228A /* Patients.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC3E1D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867D9D1E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC3E1D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = id.xcdatamodeld; + currentVersion = 14867D9D1E7AF4D2001D228A /* Demo.xcdatamodel */; + path = Patients.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC3F1D9F90B5001C8DA6 /* InsertObjectsInParent.xcdatamodeld */ = { + 14867D9E1E7AF4D2001D228A /* Recursive.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC401D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867D9F1E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC401D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = InsertObjectsInParent.xcdatamodeld; + currentVersion = 14867D9F1E7AF4D2001D228A /* Demo.xcdatamodel */; + path = Recursive.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC411D9F90B5001C8DA6 /* Markets.xcdatamodeld */ = { + 14867DA01E7AF4D2001D228A /* Social.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC421D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867DA11E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC421D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = Markets.xcdatamodeld; + currentVersion = 14867DA11E7AF4D2001D228A /* Demo.xcdatamodel */; + path = Social.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC431D9F90B5001C8DA6 /* Notes.xcdatamodeld */ = { + 14867DA21E7AF4D2001D228A /* Tests.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC441D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867DA31E7AF4D2001D228A /* Tests.xcdatamodel */, ); - currentVersion = 4403DC441D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = Notes.xcdatamodeld; + currentVersion = 14867DA31E7AF4D2001D228A /* Tests.xcdatamodel */; + path = Tests.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC451D9F90B5001C8DA6 /* NotesB.xcdatamodeld */ = { + 14867DA41E7AF4D2001D228A /* ToOne.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC461D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867DA51E7AF4D2001D228A /* Demo.xcdatamodel */, ); - currentVersion = 4403DC461D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = NotesB.xcdatamodeld; + currentVersion = 14867DA51E7AF4D2001D228A /* Demo.xcdatamodel */; + path = ToOne.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC471D9F90B5001C8DA6 /* OrderedSocial.xcdatamodeld */ = { + 14867DA61E7AF4D2001D228A /* Unique.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC481D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867DA71E7AF4D2001D228A /* Unique.xcdatamodel */, ); - currentVersion = 4403DC481D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = OrderedSocial.xcdatamodeld; + currentVersion = 14867DA71E7AF4D2001D228A /* Unique.xcdatamodel */; + path = Unique.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC491D9F90B5001C8DA6 /* Organizations.xcdatamodeld */ = { + 14867DB51E7AF4D2001D228A /* 112.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC4A1D9F90B5001C8DA6 /* Organizations.xcdatamodel */, + 14867DB61E7AF4D2001D228A /* hypbug.xcdatamodel */, ); - currentVersion = 4403DC4A1D9F90B5001C8DA6 /* Organizations.xcdatamodel */; - path = Organizations.xcdatamodeld; + currentVersion = 14867DB61E7AF4D2001D228A /* hypbug.xcdatamodel */; + path = 112.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC4B1D9F90B5001C8DA6 /* Patients.xcdatamodeld */ = { + 14867DB71E7AF4D2001D228A /* 121.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC4C1D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867DB81E7AF4D2001D228A /* Model.xcdatamodel */, ); - currentVersion = 4403DC4C1D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = Patients.xcdatamodeld; + currentVersion = 14867DB81E7AF4D2001D228A /* Model.xcdatamodel */; + path = 121.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC4D1D9F90B5001C8DA6 /* Recursive.xcdatamodeld */ = { + 14867DB91E7AF4D2001D228A /* 123.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC4E1D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867DBA1E7AF4D2001D228A /* Model.xcdatamodel */, ); - currentVersion = 4403DC4E1D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = Recursive.xcdatamodeld; + currentVersion = 14867DBA1E7AF4D2001D228A /* Model.xcdatamodel */; + path = 123.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC4F1D9F90B5001C8DA6 /* Social.xcdatamodeld */ = { + 14867DBB1E7AF4D2001D228A /* 129.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC501D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867DBC1E7AF4D2001D228A /* hypbug.xcdatamodel */, ); - currentVersion = 4403DC501D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = Social.xcdatamodeld; + currentVersion = 14867DBC1E7AF4D2001D228A /* hypbug.xcdatamodel */; + path = 129.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC511D9F90B5001C8DA6 /* ToOne.xcdatamodeld */ = { + 14867DBD1E7AF4D2001D228A /* 137.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC521D9F90B5001C8DA6 /* Demo.xcdatamodel */, + 14867DBE1E7AF4D2001D228A /* hypbug.xcdatamodel */, ); - currentVersion = 4403DC521D9F90B5001C8DA6 /* Demo.xcdatamodel */; - path = ToOne.xcdatamodeld; + currentVersion = 14867DBE1E7AF4D2001D228A /* hypbug.xcdatamodel */; + path = 137.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4403DC531D9F90B5001C8DA6 /* Unique.xcdatamodeld */ = { + 14867DBF1E7AF4D2001D228A /* 140.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4403DC541D9F90B5001C8DA6 /* Unique.xcdatamodel */, + 14867DC01E7AF4D2001D228A /* smartworkout.xcdatamodel */, ); - currentVersion = 4403DC541D9F90B5001C8DA6 /* Unique.xcdatamodel */; - path = Unique.xcdatamodeld; + currentVersion = 14867DC01E7AF4D2001D228A /* smartworkout.xcdatamodel */; + path = 140.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 445D3BBC1D9F9373007F9E26 /* DataFilter.xcdatamodeld */ = { + 14867DC11E7AF4D2001D228A /* 142.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 445D3BBD1D9F9373007F9E26 /* DataFilter.xcdatamodel */, + 14867DC21E7AF4D2001D228A /* hypbug.xcdatamodel */, ); - currentVersion = 445D3BBD1D9F9373007F9E26 /* DataFilter.xcdatamodel */; - path = DataFilter.xcdatamodeld; + currentVersion = 14867DC21E7AF4D2001D228A /* hypbug.xcdatamodel */; + path = 142.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 44B5481C1DCF3E18009215FA /* iOSDemo.xcdatamodeld */ = { + 14867DC31E7AF4D2001D228A /* Model.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 44B5481D1DCF3E18009215FA /* iOSDemo.xcdatamodel */, + 14867DC41E7AF4D2001D228A /* Model.xcdatamodel */, ); - currentVersion = 44B5481D1DCF3E18009215FA /* iOSDemo.xcdatamodel */; - path = iOSDemo.xcdatamodeld; + currentVersion = 14867DC41E7AF4D2001D228A /* Model.xcdatamodel */; + path = Model.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4E28B59E1DEE43F8007FED27 /* 3ca82a0.xcdatamodeld */ = { + 14867DC51E7AF4D2001D228A /* Ordered.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4E28B59F1DEE43F8007FED27 /* 3ca82a0.xcdatamodel */, + 14867DC61E7AF4D2001D228A /* Ordered.xcdatamodel */, ); - currentVersion = 4E28B59F1DEE43F8007FED27 /* 3ca82a0.xcdatamodel */; - path = 3ca82a0.xcdatamodeld; + currentVersion = 14867DC61E7AF4D2001D228A /* Ordered.xcdatamodel */; + path = Ordered.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; - 4E2F71E71DD3DD56003F0108 /* 233.xcdatamodeld */ = { + 44B5481C1DCF3E18009215FA /* iOSDemo.xcdatamodeld */ = { isa = XCVersionGroup; children = ( - 4E2F71E81DD3DD56003F0108 /* 233.xcdatamodel */, + 44B5481D1DCF3E18009215FA /* iOSDemo.xcdatamodel */, ); - currentVersion = 4E2F71E81DD3DD56003F0108 /* 233.xcdatamodel */; - path = 233.xcdatamodeld; + currentVersion = 44B5481D1DCF3E18009215FA /* iOSDemo.xcdatamodel */; + path = iOSDemo.xcdatamodeld; sourceTree = "<group>"; versionGroupType = wrapper.xcdatamodel; }; From f23cf941defcfba0db224e500b52c898a7b58f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Nu=C3=B1ez?= <elvisnunez@me.com> Date: Thu, 16 Mar 2017 17:39:40 +0100 Subject: [PATCH 5/8] Comment tests --- .../NSString_SyncInflectionsTests.m | 308 +++++++++--------- 1 file changed, 154 insertions(+), 154 deletions(-) diff --git a/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m b/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m index 975ad329..d83eb64b 100755 --- a/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m +++ b/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m @@ -1,156 +1,156 @@ -@import XCTest; - -#import "NSString+SyncInflections.h" - -@interface NSString (PrivateInflections) - -- (BOOL)hyp_containsWord:(NSString *)word; -- (NSString *)hyp_lowerCaseFirstLetter; -- (NSString *)hyp_replaceIdentifierWithString:(NSString *)replacementString; - -@end - -@interface NSString_SyncInflectionsTests : XCTestCase - -@end - -@implementation NSString_SyncInflectionsTests - -#pragma mark - Inflections - -- (void)testReplacementIdentifier { - NSString *testString = @"first_name"; - - XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"FirstName"); - - testString = @"id"; - - XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"ID"); - - testString = @"user_id"; - - XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"UserID"); -} - -- (void)testLowerCaseFirstLetter { - NSString *testString = @"FirstName"; - - XCTAssertEqualObjects([testString hyp_lowerCaseFirstLetter], @"firstName"); -} - -- (void)testSnakeCase { - NSString *camelCase = @"age"; - NSString *snakeCase = @"age"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"id"; - snakeCase = @"id"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"pdf"; - snakeCase = @"pdf"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"driverIdentifier"; - snakeCase = @"driver_identifier"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"integer16"; - snakeCase = @"integer16"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"userID"; - snakeCase = @"user_id"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"createdAt"; - snakeCase = @"created_at"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"userIDFirst"; - snakeCase = @"user_id_first"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"OrderedUser"; - snakeCase = @"ordered_user"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -} - -- (void)testCamelCase { - NSString *snakeCase = @"age"; - NSString *camelCase = @"age"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"id"; - camelCase = @"id"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"pdf"; - camelCase = @"pdf"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"driver_identifier"; - camelCase = @"driverIdentifier"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"integer16"; - camelCase = @"integer16"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_camelCase]); - - snakeCase = @"user_id"; - camelCase = @"userID"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"updated_at"; - camelCase = @"updatedAt"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - -// snakeCase = @"f2f_url"; -// camelCase = @"f2fURL"; +//@import XCTest; +// +//#import "NSString+SyncInflections.h" +// +//@interface NSString (PrivateInflections) +// +//- (BOOL)hyp_containsWord:(NSString *)word; +//- (NSString *)hyp_lowerCaseFirstLetter; +//- (NSString *)hyp_replaceIdentifierWithString:(NSString *)replacementString; +// +//@end +// +//@interface NSString_SyncInflectionsTests : XCTestCase +// +//@end +// +//@implementation NSString_SyncInflectionsTests +// +//#pragma mark - Inflections +// +//- (void)testReplacementIdentifier { +// NSString *testString = @"first_name"; +// +// XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"FirstName"); +// +// testString = @"id"; +// +// XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"ID"); +// +// testString = @"user_id"; +// +// XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"UserID"); +//} +// +//- (void)testLowerCaseFirstLetter { +// NSString *testString = @"FirstName"; +// +// XCTAssertEqualObjects([testString hyp_lowerCaseFirstLetter], @"firstName"); +//} +// +//- (void)testSnakeCase { +// NSString *camelCase = @"age"; +// NSString *snakeCase = @"age"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +// +// camelCase = @"id"; +// snakeCase = @"id"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +// +// camelCase = @"pdf"; +// snakeCase = @"pdf"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +// +// camelCase = @"driverIdentifier"; +// snakeCase = @"driver_identifier"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +// +// camelCase = @"integer16"; +// snakeCase = @"integer16"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +// +// camelCase = @"userID"; +// snakeCase = @"user_id"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +// +// camelCase = @"createdAt"; +// snakeCase = @"created_at"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +// +// camelCase = @"userIDFirst"; +// snakeCase = @"user_id_first"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +// +// camelCase = @"OrderedUser"; +// snakeCase = @"ordered_user"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +//} +// +//- (void)testCamelCase { +// NSString *snakeCase = @"age"; +// NSString *camelCase = @"age"; +// +// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); +// +// snakeCase = @"id"; +// camelCase = @"id"; +// +// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); +// +// snakeCase = @"pdf"; +// camelCase = @"pdf"; +// +// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); +// +// snakeCase = @"driver_identifier"; +// camelCase = @"driverIdentifier"; // // XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"test_!_key"; - - XCTAssertNil([snakeCase hyp_camelCase]); -} - -- (void)testCamelCaseCapitalizedString { - NSString *capitalizedString = @"GreenWallet"; - NSString *camelCase = @"greenWallet"; - - XCTAssertEqualObjects(camelCase, [capitalizedString hyp_camelCase]); -} - -- (void)testStorageForSameWordButDifferentInflections { - XCTAssertEqualObjects(@"greenWallet", [@"GreenWallet" hyp_camelCase]); - XCTAssertEqualObjects(@"green_wallet", [@"GreenWallet" hyp_snakeCase]); -} - -- (void)testConcurrentAccess { - dispatch_queue_t concurrentQueue = dispatch_queue_create("com.syncdb.test", DISPATCH_QUEUE_CONCURRENT); - - dispatch_apply(6000, concurrentQueue, ^(const size_t i){ - [self testSnakeCase]; - [self testCamelCase]; - }); - -} - -@end +// +// snakeCase = @"integer16"; +// camelCase = @"integer16"; +// +// XCTAssertEqualObjects(snakeCase, [camelCase hyp_camelCase]); +// +// snakeCase = @"user_id"; +// camelCase = @"userID"; +// +// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); +// +// snakeCase = @"updated_at"; +// camelCase = @"updatedAt"; +// +// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); +// +//// snakeCase = @"f2f_url"; +//// camelCase = @"f2fURL"; +//// +//// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); +// +// snakeCase = @"test_!_key"; +// +// XCTAssertNil([snakeCase hyp_camelCase]); +//} +// +//- (void)testCamelCaseCapitalizedString { +// NSString *capitalizedString = @"GreenWallet"; +// NSString *camelCase = @"greenWallet"; +// +// XCTAssertEqualObjects(camelCase, [capitalizedString hyp_camelCase]); +//} +// +//- (void)testStorageForSameWordButDifferentInflections { +// XCTAssertEqualObjects(@"greenWallet", [@"GreenWallet" hyp_camelCase]); +// XCTAssertEqualObjects(@"green_wallet", [@"GreenWallet" hyp_snakeCase]); +//} +// +//- (void)testConcurrentAccess { +// dispatch_queue_t concurrentQueue = dispatch_queue_create("com.syncdb.test", DISPATCH_QUEUE_CONCURRENT); +// +// dispatch_apply(6000, concurrentQueue, ^(const size_t i){ +// [self testSnakeCase]; +// [self testCamelCase]; +// }); +// +//} +// +//@end From 521b5c2511f03fc1b452108167273b60712df2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Nu=C3=B1ez?= <elvisnunez@me.com> Date: Thu, 16 Mar 2017 17:41:16 +0100 Subject: [PATCH 6/8] Uncomment --- .../NSString_SyncInflectionsTests.m | 308 +++++++++--------- 1 file changed, 154 insertions(+), 154 deletions(-) diff --git a/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m b/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m index d83eb64b..975ad329 100755 --- a/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m +++ b/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m @@ -1,156 +1,156 @@ -//@import XCTest; -// -//#import "NSString+SyncInflections.h" -// -//@interface NSString (PrivateInflections) -// -//- (BOOL)hyp_containsWord:(NSString *)word; -//- (NSString *)hyp_lowerCaseFirstLetter; -//- (NSString *)hyp_replaceIdentifierWithString:(NSString *)replacementString; -// -//@end -// -//@interface NSString_SyncInflectionsTests : XCTestCase -// -//@end -// -//@implementation NSString_SyncInflectionsTests -// -//#pragma mark - Inflections -// -//- (void)testReplacementIdentifier { -// NSString *testString = @"first_name"; -// -// XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"FirstName"); -// -// testString = @"id"; -// -// XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"ID"); -// -// testString = @"user_id"; -// -// XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"UserID"); -//} -// -//- (void)testLowerCaseFirstLetter { -// NSString *testString = @"FirstName"; -// -// XCTAssertEqualObjects([testString hyp_lowerCaseFirstLetter], @"firstName"); -//} -// -//- (void)testSnakeCase { -// NSString *camelCase = @"age"; -// NSString *snakeCase = @"age"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -// -// camelCase = @"id"; -// snakeCase = @"id"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -// -// camelCase = @"pdf"; -// snakeCase = @"pdf"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -// -// camelCase = @"driverIdentifier"; -// snakeCase = @"driver_identifier"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -// -// camelCase = @"integer16"; -// snakeCase = @"integer16"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -// -// camelCase = @"userID"; -// snakeCase = @"user_id"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -// -// camelCase = @"createdAt"; -// snakeCase = @"created_at"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -// -// camelCase = @"userIDFirst"; -// snakeCase = @"user_id_first"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -// -// camelCase = @"OrderedUser"; -// snakeCase = @"ordered_user"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -//} -// -//- (void)testCamelCase { -// NSString *snakeCase = @"age"; -// NSString *camelCase = @"age"; -// -// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); -// -// snakeCase = @"id"; -// camelCase = @"id"; -// -// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); -// -// snakeCase = @"pdf"; -// camelCase = @"pdf"; -// -// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); -// -// snakeCase = @"driver_identifier"; -// camelCase = @"driverIdentifier"; +@import XCTest; + +#import "NSString+SyncInflections.h" + +@interface NSString (PrivateInflections) + +- (BOOL)hyp_containsWord:(NSString *)word; +- (NSString *)hyp_lowerCaseFirstLetter; +- (NSString *)hyp_replaceIdentifierWithString:(NSString *)replacementString; + +@end + +@interface NSString_SyncInflectionsTests : XCTestCase + +@end + +@implementation NSString_SyncInflectionsTests + +#pragma mark - Inflections + +- (void)testReplacementIdentifier { + NSString *testString = @"first_name"; + + XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"FirstName"); + + testString = @"id"; + + XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"ID"); + + testString = @"user_id"; + + XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"UserID"); +} + +- (void)testLowerCaseFirstLetter { + NSString *testString = @"FirstName"; + + XCTAssertEqualObjects([testString hyp_lowerCaseFirstLetter], @"firstName"); +} + +- (void)testSnakeCase { + NSString *camelCase = @"age"; + NSString *snakeCase = @"age"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"id"; + snakeCase = @"id"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"pdf"; + snakeCase = @"pdf"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"driverIdentifier"; + snakeCase = @"driver_identifier"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"integer16"; + snakeCase = @"integer16"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"userID"; + snakeCase = @"user_id"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"createdAt"; + snakeCase = @"created_at"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"userIDFirst"; + snakeCase = @"user_id_first"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"OrderedUser"; + snakeCase = @"ordered_user"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +} + +- (void)testCamelCase { + NSString *snakeCase = @"age"; + NSString *camelCase = @"age"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"id"; + camelCase = @"id"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"pdf"; + camelCase = @"pdf"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"driver_identifier"; + camelCase = @"driverIdentifier"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"integer16"; + camelCase = @"integer16"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_camelCase]); + + snakeCase = @"user_id"; + camelCase = @"userID"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"updated_at"; + camelCase = @"updatedAt"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + +// snakeCase = @"f2f_url"; +// camelCase = @"f2fURL"; // // XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); -// -// snakeCase = @"integer16"; -// camelCase = @"integer16"; -// -// XCTAssertEqualObjects(snakeCase, [camelCase hyp_camelCase]); -// -// snakeCase = @"user_id"; -// camelCase = @"userID"; -// -// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); -// -// snakeCase = @"updated_at"; -// camelCase = @"updatedAt"; -// -// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); -// -//// snakeCase = @"f2f_url"; -//// camelCase = @"f2fURL"; -//// -//// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); -// -// snakeCase = @"test_!_key"; -// -// XCTAssertNil([snakeCase hyp_camelCase]); -//} -// -//- (void)testCamelCaseCapitalizedString { -// NSString *capitalizedString = @"GreenWallet"; -// NSString *camelCase = @"greenWallet"; -// -// XCTAssertEqualObjects(camelCase, [capitalizedString hyp_camelCase]); -//} -// -//- (void)testStorageForSameWordButDifferentInflections { -// XCTAssertEqualObjects(@"greenWallet", [@"GreenWallet" hyp_camelCase]); -// XCTAssertEqualObjects(@"green_wallet", [@"GreenWallet" hyp_snakeCase]); -//} -// -//- (void)testConcurrentAccess { -// dispatch_queue_t concurrentQueue = dispatch_queue_create("com.syncdb.test", DISPATCH_QUEUE_CONCURRENT); -// -// dispatch_apply(6000, concurrentQueue, ^(const size_t i){ -// [self testSnakeCase]; -// [self testCamelCase]; -// }); -// -//} -// -//@end + + snakeCase = @"test_!_key"; + + XCTAssertNil([snakeCase hyp_camelCase]); +} + +- (void)testCamelCaseCapitalizedString { + NSString *capitalizedString = @"GreenWallet"; + NSString *camelCase = @"greenWallet"; + + XCTAssertEqualObjects(camelCase, [capitalizedString hyp_camelCase]); +} + +- (void)testStorageForSameWordButDifferentInflections { + XCTAssertEqualObjects(@"greenWallet", [@"GreenWallet" hyp_camelCase]); + XCTAssertEqualObjects(@"green_wallet", [@"GreenWallet" hyp_snakeCase]); +} + +- (void)testConcurrentAccess { + dispatch_queue_t concurrentQueue = dispatch_queue_create("com.syncdb.test", DISPATCH_QUEUE_CONCURRENT); + + dispatch_apply(6000, concurrentQueue, ^(const size_t i){ + [self testSnakeCase]; + [self testCamelCase]; + }); + +} + +@end From 3433017397efb1302e8623e0ec2d1dec2383ca85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Nu=C3=B1ez?= <elvisnunez@me.com> Date: Thu, 16 Mar 2017 17:44:59 +0100 Subject: [PATCH 7/8] Remove tests --- .../DATAFilter.xcdatamodel/contents | 17 - Tests/DATAFilter/DataFilterTests.swift | 345 ---- Tests/DATAFilter/note.json | 6 - Tests/DATAFilter/simple.json | 14 - Tests/DATAFilter/users-with-nil.json | 34 - Tests/DATAFilter/users-with-null.json | 41 - Tests/DATAFilter/users.json | 38 - Tests/DATAFilter/users2.json | 32 - Tests/DATAFilter/users3.json | 2 - .../contents | 12 - .../ModelGroup.xcdatamodel/contents | 11 - .../SimpleModel.xcdatamodel/contents | 11 - Tests/DATAStack/Tests.swift | 176 -- Tests/DateParser/DateTests.swift | 171 -- Tests/Info.plist | 24 - .../PrimaryKeyTests.m | 99 -- .../.xccurrentversion | 8 - .../SYNCPrimaryKey.xcdatamodel/contents | 46 - .../NSString_SyncInflectionsTests.m | 156 -- .../SYNCPropertyMapper/DictionaryTests.swift | 300 ---- .../FillWithDictionaryTests.swift | 88 - Tests/SYNCPropertyMapper/HelperTests.m | 141 -- .../hypbug.xcdatamodel/contents | 31 - .../Model.xcdatamodel/contents | 10 - .../Model.xcdatamodel/contents | 14 - .../hypbug.xcdatamodel/contents | 13 - .../hypbug.xcdatamodel/contents | 35 - .../Models/140.xcdatamodeld/.xccurrentversion | 8 - .../smartworkout.xcdatamodel/contents | 62 - .../hypbug.xcdatamodel/contents | 9 - .../Model.xcdatamodel/contents | 137 -- .../Ordered.xcdatamodel/contents | 46 - .../SYNCPropertyMapper/SyncDictionaryTests.m | 398 ----- .../SyncFillWithDictionaryTests.m | 461 ------ .../Transformers/BadAPIValueTransformer.swift | 27 - .../Transformers/DateStringTransformer.h | 8 - .../Transformers/DateStringTransformer.m | 26 - .../Transformers/SyncTestValueTransformer.h | 5 - .../Transformers/SyncTestValueTransformer.m | 43 - Tests/Sync/DeleteTests.swift | 32 - Tests/Sync/FetchTests.swift | 27 - Tests/Sync/Helpers/Helper.swift | 74 - Tests/Sync/InsertOrUpdateTests.swift | 54 - .../JSONs/151-many-to-many-notes-update.json | 22 - Tests/Sync/JSONs/151-many-to-many-notes.json | 22 - Tests/Sync/JSONs/151-many-to-many-tags.json | 10 - Tests/Sync/JSONs/151-to-many-notes.json | 14 - .../Sync/JSONs/151-to-many-users-update.json | 17 - Tests/Sync/JSONs/151-to-many-users.json | 17 - Tests/Sync/JSONs/157-cities.json | 14 - Tests/Sync/JSONs/157-locations-update.json | 17 - Tests/Sync/JSONs/157-locations.json | 17 - Tests/Sync/JSONs/225-a-empty.json | 6 - Tests/Sync/JSONs/225-a-null.json | 6 - Tests/Sync/JSONs/225-a-replaced.json | 10 - Tests/Sync/JSONs/225-a.json | 10 - Tests/Sync/JSONs/233.json | 6 - Tests/Sync/JSONs/237.json | 13 - Tests/Sync/JSONs/265.json | 13 - Tests/Sync/JSONs/277.json | 18 - Tests/Sync/JSONs/280.json | 15 - Tests/Sync/JSONs/283.json | 8 - Tests/Sync/JSONs/320.json | 6 - Tests/Sync/JSONs/3ca82a0.json | 18 - Tests/Sync/JSONs/bug-113-comments-no-id.json | 30 - ...ug-113-custom_relationship_key_to_one.json | 9 - .../bug-113-stories-comments-no-ids.json | 47 - Tests/Sync/JSONs/bug-125-light.json | 38 - Tests/Sync/JSONs/bug-125.json | 167 -- Tests/Sync/JSONs/bug-179-places.json | 8 - Tests/Sync/JSONs/bug-179-routes.json | 5 - Tests/Sync/JSONs/bug-202-a.json | 12 - Tests/Sync/JSONs/bug-202-b.json | 7 - Tests/Sync/JSONs/bug-239.json | 16 - Tests/Sync/JSONs/bug-254.json | 8 - Tests/Sync/JSONs/bug-257.json | 21 - Tests/Sync/JSONs/bug-number-84.json | 16 - Tests/Sync/JSONs/camelcase.json | 9 - Tests/Sync/JSONs/comments-no-id.json | 30 - .../custom_relationship_key_to_many.json | 20 - .../JSONs/custom_relationship_key_to_one.json | 9 - Tests/Sync/JSONs/id.json | 10 - Tests/Sync/JSONs/images.json | 14 - Tests/Sync/JSONs/markets_items.json | 22 - Tests/Sync/JSONs/notes_for_user_a.json | 8 - Tests/Sync/JSONs/notes_with_user_id.json | 27 - .../Sync/JSONs/notes_with_user_id_custom.json | 27 - Tests/Sync/JSONs/numbers.json | 28 - Tests/Sync/JSONs/numbers_in_collection.json | 10 - Tests/Sync/JSONs/operation-types-users-a.json | 12 - Tests/Sync/JSONs/operation-types-users-b.json | 12 - Tests/Sync/JSONs/organizations-tree.json | 39 - Tests/Sync/JSONs/patients.json | 42 - Tests/Sync/JSONs/stories-comments-no-ids.json | 47 - Tests/Sync/JSONs/story-summarize.json | 11 - Tests/Sync/JSONs/tagged_notes.json | 30 - Tests/Sync/JSONs/to-one-camelcase.json | 6 - Tests/Sync/JSONs/to-one-snakecase.json | 6 - Tests/Sync/JSONs/unique.json | 13 - Tests/Sync/JSONs/users_a.json | 58 - Tests/Sync/JSONs/users_b.json | 32 - Tests/Sync/JSONs/users_c.json | 63 - Tests/Sync/JSONs/users_company.json | 57 - Tests/Sync/JSONs/users_notes.json | 72 - .../Models/113.xcdatamodeld/.xccurrentversion | 8 - .../113.xcdatamodeld/113.xcdatamodel/contents | 32 - .../Models/125.xcdatamodeld/.xccurrentversion | 8 - .../125.xcdatamodeld/125.xcdatamodel/contents | 61 - .../.xccurrentversion | 8 - .../151-many-to-many.xcdatamodel/contents | 27 - .../.xccurrentversion | 8 - .../151-many-to-many.xcdatamodel/contents | 17 - .../.xccurrentversion | 8 - .../151-to-many.xcdatamodel/contents | 17 - .../.xccurrentversion | 8 - .../151-to-many.xcdatamodel/contents | 27 - .../Models/157.xcdatamodeld/.xccurrentversion | 8 - .../157.xcdatamodeld/157.xcdatamodel/contents | 27 - .../179.xcdatamodeld/179.xcdatamodel/contents | 33 - .../Models/202.xcdatamodeld/.xccurrentversion | 8 - .../202.xcdatamodeld/202.xcdatamodel/contents | 15 - .../Models/225.xcdatamodeld/.xccurrentversion | 8 - .../151-many-to-many.xcdatamodel/contents | 15 - .../233.xcdatamodeld/233.xcdatamodel/contents | 15 - .../239.xcdatamodeld/239.xcdatamodel/contents | 30 - .../254.xcdatamodeld/254.xcdatamodel/contents | 17 - .../257.xcdatamodeld/257.xcdatamodel/contents | 28 - .../Models/265.xcdatamodeld/.xccurrentversion | 8 - .../265.xcdatamodeld/265.xcdatamodel/contents | 15 - .../277.xcdatamodeld/239.xcdatamodel/contents | 28 - .../Models/280.xcdatamodeld/.xccurrentversion | 8 - .../151-many-to-many.xcdatamodel/contents | 34 - .../Models/283.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 17 - .../320.xcdatamodeld/320.xcdatamodel/contents | 15 - .../3ca82a0.xcdatamodel/contents | 15 - .../Models/84.xcdatamodeld/.xccurrentversion | 8 - .../84.xcdatamodeld/84.xcdatamodel/contents | 25 - .../Camelcase.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 17 - .../Contacts.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 40 - .../.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 19 - .../.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 19 - .../Markets.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 27 - .../Notes.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 31 - .../NotesB.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 28 - .../.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 14 - .../Organizations.xcdatamodel/contents | 12 - .../Patients.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 49 - .../Recursive.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 19 - .../Social.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 32 - .../Tests.xcdatamodel/contents | 11 - .../ToOne.xcdatamodeld/.xccurrentversion | 8 - .../Demo.xcdatamodel/contents | 15 - .../Unique.xcdatamodel/contents | 21 - .../Models/id.xcdatamodeld/.xccurrentversion | 8 - .../id.xcdatamodeld/Demo.xcdatamodel/contents | 10 - Tests/Sync/NSArray+SyncTests.swift | 14 - .../Sync/NSEntityDescription+SyncTests.swift | 9 - Tests/Sync/NSManagedObject+SyncTests.swift | 25 - .../NSManagedObjectContext+SyncTests.swift | 48 - Tests/Sync/NSPersistentContainerTests.swift | 129 -- Tests/Sync/SyncDelegateTests.swift | 34 - Tests/Sync/SyncTests.swift | 1413 ----------------- Tests/Sync/UpdateTests.swift | 52 - Tests/TestCheck/TestCheckTests.swift | 8 - Tests/Vendor/JSON.swift | 43 - 177 files changed, 7526 deletions(-) delete mode 100755 Tests/DATAFilter/DATAFilter.xcdatamodeld/DATAFilter.xcdatamodel/contents delete mode 100755 Tests/DATAFilter/DataFilterTests.swift delete mode 100755 Tests/DATAFilter/note.json delete mode 100755 Tests/DATAFilter/simple.json delete mode 100755 Tests/DATAFilter/users-with-nil.json delete mode 100755 Tests/DATAFilter/users-with-null.json delete mode 100755 Tests/DATAFilter/users.json delete mode 100755 Tests/DATAFilter/users2.json delete mode 100755 Tests/DATAFilter/users3.json delete mode 100755 Tests/DATAStack/LightweightMigrationModel.xcdatamodel/contents delete mode 100755 Tests/DATAStack/ModelGroup.xcdatamodeld/ModelGroup.xcdatamodel/contents delete mode 100755 Tests/DATAStack/SimpleModel.xcdatamodel/contents delete mode 100755 Tests/DATAStack/Tests.swift delete mode 100755 Tests/DateParser/DateTests.swift delete mode 100644 Tests/Info.plist delete mode 100755 Tests/NSEntityDescription-SYNCPrimaryKey/PrimaryKeyTests.m delete mode 100755 Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/.xccurrentversion delete mode 100755 Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/SYNCPrimaryKey.xcdatamodel/contents delete mode 100755 Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m delete mode 100755 Tests/SYNCPropertyMapper/DictionaryTests.swift delete mode 100755 Tests/SYNCPropertyMapper/FillWithDictionaryTests.swift delete mode 100755 Tests/SYNCPropertyMapper/HelperTests.m delete mode 100644 Tests/SYNCPropertyMapper/Models/112.xcdatamodeld/hypbug.xcdatamodel/contents delete mode 100644 Tests/SYNCPropertyMapper/Models/121.xcdatamodeld/Model.xcdatamodel/contents delete mode 100755 Tests/SYNCPropertyMapper/Models/123.xcdatamodeld/Model.xcdatamodel/contents delete mode 100755 Tests/SYNCPropertyMapper/Models/129.xcdatamodeld/hypbug.xcdatamodel/contents delete mode 100755 Tests/SYNCPropertyMapper/Models/137.xcdatamodeld/hypbug.xcdatamodel/contents delete mode 100755 Tests/SYNCPropertyMapper/Models/140.xcdatamodeld/.xccurrentversion delete mode 100755 Tests/SYNCPropertyMapper/Models/140.xcdatamodeld/smartworkout.xcdatamodel/contents delete mode 100755 Tests/SYNCPropertyMapper/Models/142.xcdatamodeld/hypbug.xcdatamodel/contents delete mode 100644 Tests/SYNCPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents delete mode 100644 Tests/SYNCPropertyMapper/Models/Ordered.xcdatamodeld/Ordered.xcdatamodel/contents delete mode 100755 Tests/SYNCPropertyMapper/SyncDictionaryTests.m delete mode 100755 Tests/SYNCPropertyMapper/SyncFillWithDictionaryTests.m delete mode 100755 Tests/SYNCPropertyMapper/Transformers/BadAPIValueTransformer.swift delete mode 100755 Tests/SYNCPropertyMapper/Transformers/DateStringTransformer.h delete mode 100755 Tests/SYNCPropertyMapper/Transformers/DateStringTransformer.m delete mode 100755 Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.h delete mode 100755 Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.m delete mode 100644 Tests/Sync/DeleteTests.swift delete mode 100644 Tests/Sync/FetchTests.swift delete mode 100644 Tests/Sync/Helpers/Helper.swift delete mode 100644 Tests/Sync/InsertOrUpdateTests.swift delete mode 100644 Tests/Sync/JSONs/151-many-to-many-notes-update.json delete mode 100644 Tests/Sync/JSONs/151-many-to-many-notes.json delete mode 100644 Tests/Sync/JSONs/151-many-to-many-tags.json delete mode 100644 Tests/Sync/JSONs/151-to-many-notes.json delete mode 100644 Tests/Sync/JSONs/151-to-many-users-update.json delete mode 100644 Tests/Sync/JSONs/151-to-many-users.json delete mode 100644 Tests/Sync/JSONs/157-cities.json delete mode 100644 Tests/Sync/JSONs/157-locations-update.json delete mode 100644 Tests/Sync/JSONs/157-locations.json delete mode 100755 Tests/Sync/JSONs/225-a-empty.json delete mode 100755 Tests/Sync/JSONs/225-a-null.json delete mode 100755 Tests/Sync/JSONs/225-a-replaced.json delete mode 100755 Tests/Sync/JSONs/225-a.json delete mode 100644 Tests/Sync/JSONs/233.json delete mode 100644 Tests/Sync/JSONs/237.json delete mode 100644 Tests/Sync/JSONs/265.json delete mode 100755 Tests/Sync/JSONs/277.json delete mode 100644 Tests/Sync/JSONs/280.json delete mode 100644 Tests/Sync/JSONs/283.json delete mode 100644 Tests/Sync/JSONs/320.json delete mode 100644 Tests/Sync/JSONs/3ca82a0.json delete mode 100644 Tests/Sync/JSONs/bug-113-comments-no-id.json delete mode 100755 Tests/Sync/JSONs/bug-113-custom_relationship_key_to_one.json delete mode 100644 Tests/Sync/JSONs/bug-113-stories-comments-no-ids.json delete mode 100644 Tests/Sync/JSONs/bug-125-light.json delete mode 100644 Tests/Sync/JSONs/bug-125.json delete mode 100644 Tests/Sync/JSONs/bug-179-places.json delete mode 100644 Tests/Sync/JSONs/bug-179-routes.json delete mode 100644 Tests/Sync/JSONs/bug-202-a.json delete mode 100644 Tests/Sync/JSONs/bug-202-b.json delete mode 100755 Tests/Sync/JSONs/bug-239.json delete mode 100644 Tests/Sync/JSONs/bug-254.json delete mode 100644 Tests/Sync/JSONs/bug-257.json delete mode 100644 Tests/Sync/JSONs/bug-number-84.json delete mode 100644 Tests/Sync/JSONs/camelcase.json delete mode 100644 Tests/Sync/JSONs/comments-no-id.json delete mode 100755 Tests/Sync/JSONs/custom_relationship_key_to_many.json delete mode 100755 Tests/Sync/JSONs/custom_relationship_key_to_one.json delete mode 100755 Tests/Sync/JSONs/id.json delete mode 100644 Tests/Sync/JSONs/images.json delete mode 100644 Tests/Sync/JSONs/markets_items.json delete mode 100644 Tests/Sync/JSONs/notes_for_user_a.json delete mode 100644 Tests/Sync/JSONs/notes_with_user_id.json delete mode 100644 Tests/Sync/JSONs/notes_with_user_id_custom.json delete mode 100644 Tests/Sync/JSONs/numbers.json delete mode 100644 Tests/Sync/JSONs/numbers_in_collection.json delete mode 100644 Tests/Sync/JSONs/operation-types-users-a.json delete mode 100644 Tests/Sync/JSONs/operation-types-users-b.json delete mode 100644 Tests/Sync/JSONs/organizations-tree.json delete mode 100644 Tests/Sync/JSONs/patients.json delete mode 100644 Tests/Sync/JSONs/stories-comments-no-ids.json delete mode 100644 Tests/Sync/JSONs/story-summarize.json delete mode 100644 Tests/Sync/JSONs/tagged_notes.json delete mode 100644 Tests/Sync/JSONs/to-one-camelcase.json delete mode 100644 Tests/Sync/JSONs/to-one-snakecase.json delete mode 100644 Tests/Sync/JSONs/unique.json delete mode 100644 Tests/Sync/JSONs/users_a.json delete mode 100644 Tests/Sync/JSONs/users_b.json delete mode 100644 Tests/Sync/JSONs/users_c.json delete mode 100644 Tests/Sync/JSONs/users_company.json delete mode 100644 Tests/Sync/JSONs/users_notes.json delete mode 100644 Tests/Sync/Models/113.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/113.xcdatamodeld/113.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/125.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/125.xcdatamodeld/125.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/151-many-to-many.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/151-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/151-to-many.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/151-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/157.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/157.xcdatamodeld/157.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/179.xcdatamodeld/179.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/202.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/202.xcdatamodeld/202.xcdatamodel/contents delete mode 100755 Tests/Sync/Models/225.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/225.xcdatamodeld/151-many-to-many.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/233.xcdatamodeld/233.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/239.xcdatamodeld/239.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/254.xcdatamodeld/254.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/257.xcdatamodeld/257.xcdatamodel/contents delete mode 100755 Tests/Sync/Models/265.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/265.xcdatamodeld/265.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/277.xcdatamodeld/239.xcdatamodel/contents delete mode 100755 Tests/Sync/Models/280.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/280.xcdatamodeld/151-many-to-many.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/283.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/283.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/320.xcdatamodeld/320.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/3ca82a0.xcdatamodeld/3ca82a0.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/84.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/84.xcdatamodeld/84.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Camelcase.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/Camelcase.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Contacts.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/Contacts.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Markets.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/Markets.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Notes.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/Notes.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/NotesB.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/NotesB.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/OrderedSocial.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/OrderedSocial.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Organizations.xcdatamodeld/Organizations.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Patients.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/Patients.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Recursive.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/Recursive.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Social.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/Social.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Tests.xcdatamodeld/Tests.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/ToOne.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/ToOne.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/Unique.xcdatamodeld/Unique.xcdatamodel/contents delete mode 100644 Tests/Sync/Models/id.xcdatamodeld/.xccurrentversion delete mode 100644 Tests/Sync/Models/id.xcdatamodeld/Demo.xcdatamodel/contents delete mode 100644 Tests/Sync/NSArray+SyncTests.swift delete mode 100644 Tests/Sync/NSEntityDescription+SyncTests.swift delete mode 100644 Tests/Sync/NSManagedObject+SyncTests.swift delete mode 100644 Tests/Sync/NSManagedObjectContext+SyncTests.swift delete mode 100644 Tests/Sync/NSPersistentContainerTests.swift delete mode 100644 Tests/Sync/SyncDelegateTests.swift delete mode 100644 Tests/Sync/SyncTests.swift delete mode 100644 Tests/Sync/UpdateTests.swift delete mode 100755 Tests/TestCheck/TestCheckTests.swift delete mode 100755 Tests/Vendor/JSON.swift diff --git a/Tests/DATAFilter/DATAFilter.xcdatamodeld/DATAFilter.xcdatamodel/contents b/Tests/DATAFilter/DATAFilter.xcdatamodeld/DATAFilter.xcdatamodel/contents deleted file mode 100755 index 9c08bfa9..00000000 --- a/Tests/DATAFilter/DATAFilter.xcdatamodeld/DATAFilter.xcdatamodel/contents +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15F34" minimumToolsVersion="Xcode 4.3"> - <entity name="Note" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - </entity> - <entity name="User" syncable="YES"> - <attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="lastName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - </entity> - <elements> - <element name="Note" positionX="-63" positionY="9" width="128" height="75"/> - <element name="User" positionX="-63" positionY="-18" width="128" height="105"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/DATAFilter/DataFilterTests.swift b/Tests/DATAFilter/DataFilterTests.swift deleted file mode 100755 index fc6b63b6..00000000 --- a/Tests/DATAFilter/DataFilterTests.swift +++ /dev/null @@ -1,345 +0,0 @@ -import XCTest -import CoreData -import Sync - -class DataFilterTests: XCTestCase { - @discardableResult func user(remoteID: Int, firstName: String, lastName: String, age: Int, context: NSManagedObjectContext) -> NSManagedObject { - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: context) - user.setValue(remoteID, forKey: "remoteID") - user.setValue(firstName, forKey: "firstName") - user.setValue(lastName, forKey: "lastName") - user.setValue(age, forKey: "age") - - try! context.save() - - return user - } - - @discardableResult func note(remoteID: String, text: String, context: NSManagedObjectContext) -> NSManagedObject { - let note = NSEntityDescription.insertNewObject(forEntityName: "Note", into: context) - note.setValue(remoteID, forKey: "remoteID") - note.setValue(text, forKey: "text") - - try! context.save() - - return note - } - - func createUsers(context: NSManagedObjectContext) { - self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: context) - self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: context) - self.user(remoteID: 2, firstName: "Ricky", lastName: "Underwood", age: 19, context: context) - self.user(remoteID: 3, firstName: "Grace", lastName: "Bowman", age: 20, context: context) - self.user(remoteID: 4, firstName: "Adrian", lastName: "Lee", age: 20, context: context) - } - - func testUsersCount() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - self.createUsers(context: dataStack.mainContext) - - let request = NSFetchRequest<NSFetchRequestResult>(entityName: "User") - let count = try! dataStack.mainContext.count(for: request) - XCTAssertEqual(count, 5) - } - - /* - /* - 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 - In users.json: - - Inserted: 6 and 7 - - Updated: 0, 1, 2 and 3 - - Deleted: 4 - */ - func testMapChangesA() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.createUsers(context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 2) - XCTAssertEqual(updated, 4) - XCTAssertEqual(deleted, 1) - } - } - - /* - 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 - In users.json: - - Inserted: 6 and 7 - - Updated: 0, 1, 2 and 3 - - Deleted: 4 - */ - func testMapChangesAWitNull() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.createUsers(context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users-with-null.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 2) - XCTAssertEqual(updated, 4) - XCTAssertEqual(deleted, 1) - } - } - - /* - 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 - In users.json: - - Inserted: 6 and 7 - - Updated: 0, 1, 2 and 3 - - Deleted: 4 - */ - func testMapChangesAWithNil() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.createUsers(context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users-with-nil.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 2) - XCTAssertEqual(updated, 3) - XCTAssertEqual(deleted, 2) - } - } - - /* - 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 - In users.json: - - Inserted: None - - Updated: 0, 1, 2, 3 and 4 - - Deleted: None - */ - func testMapChangesB() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.createUsers(context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users2.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 0) - XCTAssertEqual(updated, 5) - XCTAssertEqual(deleted, 0) - } - } - - /* - 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 - In users.json: - - Inserted: None - - Updated: None - - Deleted: None - */ - func testMapChangesC() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.createUsers(context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users3.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 0) - XCTAssertEqual(updated, 0) - XCTAssertEqual(deleted, 5) - } - } - - /* - 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 - After the pre-defined ones, we try to insert the user 0 many times. - In users.json: - - Inserted: 6 and 7 - - Updated: 0, 1, 2 and 3 - - Deleted: 4 - */ - func testUniquing() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.createUsers(context: backgroundContext) - - self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) - self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) - self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) - try! backgroundContext.save() - - let request = NSFetchRequest<NSFetchRequestResult>(entityName: "User") - let numberOfUsers = try! backgroundContext.count(for: request) - XCTAssertEqual(numberOfUsers, 8) - - let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - }, updated: { objectJSON, updatedObject in - }) - - let deletedNumberOfUsers = try! backgroundContext.count(for: request) - XCTAssertEqual(deletedNumberOfUsers, 4) - } - } - - /* - 1 pre-defined none is inserted with id "123" - In notes.json: - - Inserted: 0 - - Updated: "123" - - Deleted: 0 - */ - func testStringID() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.note(remoteID: "123", text: "text", context: backgroundContext) - try! backgroundContext.save() - - let request = NSFetchRequest<NSFetchRequestResult>(entityName: "Note") - let count = try! backgroundContext.count(for: request) - XCTAssertEqual(count, 1) - - let JSONObjects = try! JSON.from("note.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - DataFilter.changes(JSONObjects, inEntityNamed: "Note", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - XCTAssertFalse(true) - }, updated: { objectJSON, updatedObject in - XCTAssertEqual(objectJSON["id"] as? String, "123") - }) - } - } - - func testInsertOnly() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) - self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Insert], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 1) - XCTAssertEqual(updated, 0) - XCTAssertEqual(deleted, 2) - } - } - - func testUpdateOnly() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) - self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Update], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 0) - XCTAssertEqual(updated, 1) - XCTAssertEqual(deleted, 1) - } - } - - func testDeleteOnly() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) - self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Delete], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 0) - XCTAssertEqual(updated, 0) - XCTAssertEqual(deleted, 2) - } - } - - /* - 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 - The predicate "remoteID == 1" means that we will only compare the users.json with - the set existing ID: 1, meaning that if an item with ID: 2 appears, then this item will be inserted. - */ - func testPredicate() { - let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) - dataStack.performInNewBackgroundContext { backgroundContext in - self.createUsers(context: backgroundContext) - - let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) - let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] - var inserted = 0 - var updated = 0 - var deleted = before.count - DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: NSPredicate(format: "remoteID == \(0)"), operations: [.All], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in - inserted += 1 - }, updated: { objectJSON, updatedObject in - updated += 1 - deleted -= 1 - }) - XCTAssertEqual(inserted, 5) - XCTAssertEqual(updated, 1) - XCTAssertEqual(deleted, 4) - } - } - */ -} diff --git a/Tests/DATAFilter/note.json b/Tests/DATAFilter/note.json deleted file mode 100755 index 6f781673..00000000 --- a/Tests/DATAFilter/note.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "id": "123", - "text": "text" - } -] diff --git a/Tests/DATAFilter/simple.json b/Tests/DATAFilter/simple.json deleted file mode 100755 index 1d5705b2..00000000 --- a/Tests/DATAFilter/simple.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": 0, - "first_name": "Amy", - "last_name": "Juergens", - "age": 21 - }, - { - "id": 7, - "first_name": "Lauren", - "last_name": "Treacy", - "age": 28 - }, -] diff --git a/Tests/DATAFilter/users-with-nil.json b/Tests/DATAFilter/users-with-nil.json deleted file mode 100755 index c6769d0d..00000000 --- a/Tests/DATAFilter/users-with-nil.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - { - "id": 0, - "first_name": "Amy", - "last_name": "Juergens", - "age": 21 - }, - { - "id": 1, - "first_name": "Ben", - "last_name": "Boykewich", - "age": 23 - }, - { - "id": 2, - "first_name": "Ricky", - "last_name": "Underwood", - "age": 19 - }, - { - }, - { - "id": 6, - "first_name": "Ashley", - "last_name": "Juergens", - "age": 18 - }, - { - "id": 7, - "first_name": "Lauren", - "last_name": "Treacy", - "age": 28 - }, -] diff --git a/Tests/DATAFilter/users-with-null.json b/Tests/DATAFilter/users-with-null.json deleted file mode 100755 index aec78409..00000000 --- a/Tests/DATAFilter/users-with-null.json +++ /dev/null @@ -1,41 +0,0 @@ -[ - { - "id": null - }, - { - "id": 0, - "first_name": "Amy", - "last_name": "Juergens", - "age": 21 - }, - { - "id": 1, - "first_name": "Ben", - "last_name": "Boykewich", - "age": 23 - }, - { - "id": 2, - "first_name": "Ricky", - "last_name": "Underwood", - "age": 19 - }, - { - "id": 3, - "first_name": "Grace", - "last_name": "Bowman", - "age": 20 - }, - { - "id": 6, - "first_name": "Ashley", - "last_name": "Juergens", - "age": 18 - }, - { - "id": 7, - "first_name": "Lauren", - "last_name": "Treacy", - "age": 28 - }, -] diff --git a/Tests/DATAFilter/users.json b/Tests/DATAFilter/users.json deleted file mode 100755 index c626de66..00000000 --- a/Tests/DATAFilter/users.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "id": 0, - "first_name": "Amy", - "last_name": "Juergens", - "age": 21 - }, - { - "id": 1, - "first_name": "Ben", - "last_name": "Boykewich", - "age": 23 - }, - { - "id": 2, - "first_name": "Ricky", - "last_name": "Underwood", - "age": 19 - }, - { - "id": 3, - "first_name": "Grace", - "last_name": "Bowman", - "age": 20 - }, - { - "id": 6, - "first_name": "Ashley", - "last_name": "Juergens", - "age": 18 - }, - { - "id": 7, - "first_name": "Lauren", - "last_name": "Treacy", - "age": 28 - }, -] diff --git a/Tests/DATAFilter/users2.json b/Tests/DATAFilter/users2.json deleted file mode 100755 index 12b96319..00000000 --- a/Tests/DATAFilter/users2.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "id": 0, - "first_name": "Amy", - "last_name": "Juergens", - "age": 21 - }, - { - "id": 1, - "first_name": "Ben", - "last_name": "Boykewich", - "age": 23 - }, - { - "id": 2, - "first_name": "Ricky", - "last_name": "Underwood", - "age": 19 - }, - { - "id": 3, - "first_name": "Grace", - "last_name": "Bowman", - "age": 20 - }, - { - "id": 4, - "first_name": "Name", - "last_name": "Last", - "age": 20 - } -] diff --git a/Tests/DATAFilter/users3.json b/Tests/DATAFilter/users3.json deleted file mode 100755 index 0d4f101c..00000000 --- a/Tests/DATAFilter/users3.json +++ /dev/null @@ -1,2 +0,0 @@ -[ -] diff --git a/Tests/DATAStack/LightweightMigrationModel.xcdatamodel/contents b/Tests/DATAStack/LightweightMigrationModel.xcdatamodel/contents deleted file mode 100755 index e63b23e9..00000000 --- a/Tests/DATAStack/LightweightMigrationModel.xcdatamodel/contents +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="User" syncable="YES"> - <attribute name="createdDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="updatedDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - </entity> - <elements> - <element name="User" positionX="-63" positionY="-18" width="128" height="105"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/DATAStack/ModelGroup.xcdatamodeld/ModelGroup.xcdatamodel/contents b/Tests/DATAStack/ModelGroup.xcdatamodeld/ModelGroup.xcdatamodel/contents deleted file mode 100755 index 01cb57e5..00000000 --- a/Tests/DATAStack/ModelGroup.xcdatamodeld/ModelGroup.xcdatamodel/contents +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="8195" systemVersion="15B38b" minimumToolsVersion="Xcode 4.3"> - <entity name="User" representedClassName="" syncable="YES"> - <attribute name="createdDate" optional="YES" attributeType="Date" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - </entity> - <elements> - <element name="User" positionX="-54" positionY="-9" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/DATAStack/SimpleModel.xcdatamodel/contents b/Tests/DATAStack/SimpleModel.xcdatamodel/contents deleted file mode 100755 index 8a2f689d..00000000 --- a/Tests/DATAStack/SimpleModel.xcdatamodel/contents +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10171" systemVersion="15E65" minimumToolsVersion="Xcode 7.0"> - <entity name="User" syncable="YES"> - <attribute name="createdDate" optional="YES" attributeType="Date" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - </entity> - <elements> - <element name="User" positionX="-63" positionY="-18" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/DATAStack/Tests.swift b/Tests/DATAStack/Tests.swift deleted file mode 100755 index 29269561..00000000 --- a/Tests/DATAStack/Tests.swift +++ /dev/null @@ -1,176 +0,0 @@ -import XCTest -import CoreData -@testable import Sync - -extension XCTestCase { - func createDataStack(_ storeType: DataStackStoreType = .inMemory) -> DataStack { - let dataStack = DataStack(modelName: "ModelGroup", bundle: Bundle(for: Tests.self), storeType: storeType) - - return dataStack - } - - @discardableResult - func insertUser(in context: NSManagedObjectContext) -> NSManagedObject { - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: context) - user.setValue(NSNumber(value: 1), forKey: "remoteID") - user.setValue("Joshua Ivanof", forKey: "name") - try! context.save() - - return user - } - - func fetch(in context: NSManagedObjectContext) -> [NSManagedObject] { - let request = NSFetchRequest<NSManagedObject>(entityName: "User") - let objects = try! context.fetch(request) - - return objects - } -} - -class InitializerTests: XCTestCase { - func testInitializeUsingXCDataModel() { - let dataStack = DataStack(modelName: "SimpleModel", bundle: Bundle(for: Tests.self), storeType: .inMemory) - - self.insertUser(in: dataStack.mainContext) - let objects = self.fetch(in: dataStack.mainContext) - XCTAssertEqual(objects.count, 1) - } - - // xcdatamodeld is a container for .xcdatamodel files. It's used for versioning and migration. - // When moving from v1 of the model to v2, you add a new xcdatamodel to it that has v2 along with the mapping model. - func testInitializeUsingXCDataModeld() { - let dataStack = self.createDataStack() - - self.insertUser(in: dataStack.mainContext) - let objects = self.fetch(in: dataStack.mainContext) - XCTAssertEqual(objects.count, 1) - } - - func testInitializingUsingNSManagedObjectModel() { - let model = NSManagedObjectModel(bundle: Bundle(for: Tests.self), name: "ModelGroup") - let dataStack = DataStack(model: model, storeType: .inMemory) - - self.insertUser(in: dataStack.mainContext) - let objects = self.fetch(in: dataStack.mainContext) - XCTAssertEqual(objects.count, 1) - } -} - -class Tests: XCTestCase { - func testSynchronousBackgroundContext() { - let dataStack = self.createDataStack() - - var synchronous = false - dataStack.performInNewBackgroundContext { _ in - synchronous = true - } - - XCTAssertTrue(synchronous) - } - - func testBackgroundContextSave() { - let dataStack = self.createDataStack() - - dataStack.performInNewBackgroundContext { backgroundContext in - self.insertUser(in: backgroundContext) - - let objects = self.fetch(in: backgroundContext) - XCTAssertEqual(objects.count, 1) - } - - let objects = self.fetch(in: dataStack.mainContext) - XCTAssertEqual(objects.count, 1) - } - - func testNewBackgroundContextSave() { - var synchronous = false - let dataStack = self.createDataStack() - let backgroundContext = dataStack.newBackgroundContext() - backgroundContext.performAndWait { - synchronous = true - self.insertUser(in: backgroundContext) - let objects = self.fetch(in: backgroundContext) - XCTAssertEqual(objects.count, 1) - } - - let objects = self.fetch(in: dataStack.mainContext) - XCTAssertEqual(objects.count, 1) - - XCTAssertTrue(synchronous) - } - - func testRequestWithDictionaryResultType() { - let dataStack = self.createDataStack() - self.insertUser(in: dataStack.mainContext) - - let request = NSFetchRequest<NSManagedObject>(entityName: "User") - let objects = try! dataStack.mainContext.fetch(request) - XCTAssertEqual(objects.count, 1) - - let expression = NSExpressionDescription() - expression.name = "objectID" - expression.expression = NSExpression.expressionForEvaluatedObject() - expression.expressionResultType = .objectIDAttributeType - - let dictionaryRequest = NSFetchRequest<NSDictionary>(entityName: "User") - dictionaryRequest.resultType = .dictionaryResultType - dictionaryRequest.propertiesToFetch = [expression, "remoteID"] - - let dictionaryObjects = try! dataStack.mainContext.fetch(dictionaryRequest) - XCTAssertEqual(dictionaryObjects.count, 1) - } - - func testDisposableContextSave() { - let dataStack = self.createDataStack() - - let disposableContext = dataStack.newDisposableMainContext() - self.insertUser(in: disposableContext) - let objects = self.fetch(in: disposableContext) - XCTAssertEqual(objects.count, 0) - } - - func testDrop() { - let dataStack = self.createDataStack(.sqLite) - - dataStack.performInNewBackgroundContext { backgroundContext in - self.insertUser(in: backgroundContext) - } - - let objectsA = self.fetch(in: dataStack.mainContext) - XCTAssertEqual(objectsA.count, 1) - - dataStack.drop() - - let objects = self.fetch(in: dataStack.mainContext) - XCTAssertEqual(objects.count, 0) - - dataStack.performInNewBackgroundContext { backgroundContext in - self.insertUser(in: backgroundContext) - } - - let objectsB = self.fetch(in: dataStack.mainContext) - XCTAssertEqual(objectsB.count, 1) - - dataStack.drop() - } - - func testAutomaticMigration() { - let firstDataStack = DataStack(modelName: "SimpleModel", bundle: Bundle(for: Tests.self), storeType: .sqLite, storeName: "Shared") - self.insertUser(in: firstDataStack.mainContext) - let objects = self.fetch(in: firstDataStack.mainContext) - XCTAssertEqual(objects.count, 1) - - // LightweightMigrationModel is a copy of DataModel with the main difference that adds the updatedDate attribute. - let secondDataStack = DataStack(modelName: "LightweightMigrationModel", bundle: Bundle(for: Tests.self), storeType: .sqLite, storeName: "Shared") - let fetchRequest = NSFetchRequest<NSManagedObject>(entityName: "User") - fetchRequest.predicate = NSPredicate(format: "remoteID = %@", NSNumber(value: 1)) - let user = try! secondDataStack.mainContext.fetch(fetchRequest).first - XCTAssertNotNil(user) - XCTAssertEqual(user?.value(forKey: "name") as? String, "Joshua Ivanof") - user?.setValue(Date().addingTimeInterval(16000), forKey: "updatedDate") - try! secondDataStack.mainContext.save() - - firstDataStack.drop() - secondDataStack.drop() - } -} diff --git a/Tests/DateParser/DateTests.swift b/Tests/DateParser/DateTests.swift deleted file mode 100755 index 751e1dd6..00000000 --- a/Tests/DateParser/DateTests.swift +++ /dev/null @@ -1,171 +0,0 @@ -import XCTest -import Sync - -class DateTests: XCTestCase { - - func testDateA() { - let date = Date.dateWithHourAndTimeZoneString(dateString: "2015-06-23T12:40:08.000") - let resultDate = NSDate(fromDateString: "2015-06-23T14:40:08.000+02:00") as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date.timeIntervalSince1970, resultDate.timeIntervalSince1970) - } - - func testDateB() { - let date = Date.dateWithDayString(dateString: "2014-01-01") - let resultDate = NSDate(fromDateString: "2014-01-01T00:00:00+00:00") as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateC() { - let date = Date.dateWithDayString(dateString: "2014-01-02") - let resultDate = NSDate(fromDateString: "2014-01-02") as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateD() { - let date = Date.dateWithDayString(dateString: "2014-01-02") - let resultDate = NSDate(fromDateString: "2014-01-02T00:00:00.000000+00:00") as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateE() { - let date = Date.dateWithDayString(dateString: "2015-09-10") - let resultDate = NSDate(fromDateString: "2015-09-10T00:00:00.116+0000") as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateF() { - let date = Date.dateWithDayString(dateString: "2015-09-10") - let resultDate = NSDate(fromDateString: "2015-09-10T00:00:00.184968Z") as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateG() { - let date = Date.dateWithHourAndTimeZoneString(dateString: "2015-06-23T19:04:19.911Z") - let resultDate = NSDate(fromDateString: "2015-06-23T19:04:19.911Z") as! Date - print(date.timeIntervalSince1970) - print(resultDate.timeIntervalSince1970) - date.prettyPrint() - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateH() { - let date = Date.dateWithHourAndTimeZoneString(dateString: "2014-03-30T09:13:00.000Z") - let resultDate = NSDate(fromDateString: "2014-03-30T09:13:00Z") as! Date - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateI() { - let resultDate = NSDate(fromDateString: "2014-01-02T00:monsterofthelakeI'mhere00:00.007450+00:00") - XCTAssertNil(resultDate) - } - - func testDateJ() { - let date = Date.dateWithDayString(dateString: "2016-01-09") - let resultDate = NSDate(fromDateString: "2016-01-09T00:00:00.00") as! Date - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateK() { - let date = Date.dateWithDayString(dateString: "2016-01-09") - let resultDate = NSDate(fromDateString: "2016-01-09T00:00:00") as! Date - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testDateL() { - let date = Date.dateWithDayString(dateString: "2009-10-09") - let resultDate = NSDate(fromDateString: "2009-10-09 00:00:00") as! Date - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } -} - -class TimestampDateTests: XCTestCase { - - func testTimestampA() { - let date = Date.dateWithDayString(dateString: "2015-09-10") - let resultDate = NSDate(fromDateString: "1441843200") as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testTimestampB() { - let date = Date.dateWithDayString(dateString: "2015-09-10") - let resultDate = NSDate(fromDateString: "1441843200000000") as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testTimestampC() { - let date = Date.dateWithDayString(dateString: "2015-09-10") - let resultDate = NSDate(fromUnixTimestampNumber: 1441843200) as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } - - func testTimestampD() { - let date = Date.dateWithDayString(dateString: "2015-09-10") - let resultDate = NSDate(fromUnixTimestampNumber: NSNumber(value: 1441843200000000.0)) as! Date - - XCTAssertNotNil(resultDate) - XCTAssertEqual(date, resultDate) - } -} - -class OtherDateTests: XCTestCase { - - func testDateType() { - let isoDateType = "2014-01-02T00:00:00.007450+00:00".dateType() - XCTAssertEqual(isoDateType, DateType.iso8601) - - let timestampDateType = "1441843200000000".dateType() - XCTAssertEqual(timestampDateType, DateType.unixTimestamp) - } -} - -extension Date { - - static func dateWithDayString(dateString: String) -> Date { - let formatter = DateFormatter() - formatter.dateFormat = "yyyy-MM-dd" - formatter.timeZone = TimeZone(identifier: "UTC") - let date = formatter.date(from: dateString)! - - return date - } - - static func dateWithHourAndTimeZoneString(dateString: String) -> Date { - let formatter = DateFormatter() - formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" - formatter.timeZone = TimeZone(identifier: "UTC") - let date = formatter.date(from: dateString)! - - return date - } - - func prettyPrint() { - let formatter = DateFormatter() - formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" - let string = formatter.string(from: self) - print(string) - } -} diff --git a/Tests/Info.plist b/Tests/Info.plist deleted file mode 100644 index ba72822e..00000000 --- a/Tests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>en</string> - <key>CFBundleExecutable</key> - <string>$(EXECUTABLE_NAME)</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>$(PRODUCT_NAME)</string> - <key>CFBundlePackageType</key> - <string>BNDL</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1</string> -</dict> -</plist> diff --git a/Tests/NSEntityDescription-SYNCPrimaryKey/PrimaryKeyTests.m b/Tests/NSEntityDescription-SYNCPrimaryKey/PrimaryKeyTests.m deleted file mode 100755 index d3be57d9..00000000 --- a/Tests/NSEntityDescription-SYNCPrimaryKey/PrimaryKeyTests.m +++ /dev/null @@ -1,99 +0,0 @@ -@import CoreData; -@import XCTest; -@import Sync; - -#import "NSEntityDescription+SyncPrimaryKey.h" - -@interface PrimaryKeyTests : XCTestCase - -@end - -@implementation PrimaryKeyTests - -- (NSEntityDescription *)entityForName:(NSString *)name { - DataStack *dataStack = [[DataStack alloc] initWithModelName:@"SyncPrimaryKey" - bundle:[NSBundle bundleForClass:[self class]] - storeType:DataStackStoreTypeInMemory]; - - return [NSEntityDescription entityForName:name - inManagedObjectContext:dataStack.mainContext]; - -} - -- (void)testPrimaryKeyAttribute { - NSEntityDescription *entity = [self entityForName:@"User"]; - - NSAttributeDescription *attribute = [entity sync_primaryKeyAttribute]; - XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSNumber"); - XCTAssertEqual(attribute.attributeType, NSInteger32AttributeType); - - entity = [self entityForName:@"SimpleID"]; - attribute = [entity sync_primaryKeyAttribute]; - XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSString"); - XCTAssertEqual(attribute.attributeType, NSStringAttributeType); - XCTAssertEqualObjects(attribute.name, @"id"); - - entity = [self entityForName:@"Note"]; - attribute = [entity sync_primaryKeyAttribute]; - XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSNumber"); - XCTAssertEqual(attribute.attributeType, NSInteger16AttributeType); - XCTAssertEqualObjects(attribute.name, @"uniqueID"); - - entity = [self entityForName:@"Tag"]; - attribute = [entity sync_primaryKeyAttribute]; - XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSString"); - XCTAssertEqual(attribute.attributeType, NSStringAttributeType); - XCTAssertEqualObjects(attribute.name, @"randomId"); - - entity = [self entityForName:@"NoID"]; - attribute = [entity sync_primaryKeyAttribute]; - XCTAssertNil(attribute); - - entity = [self entityForName:@"AlternativeID"]; - attribute = [entity sync_primaryKeyAttribute]; - XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSString"); - XCTAssertEqual(attribute.attributeType, NSStringAttributeType); - XCTAssertEqualObjects(attribute.name, @"alternativeID"); -} - -- (void)testLocalKey { - NSEntityDescription *entity = [self entityForName:@"User"]; - XCTAssertEqualObjects([entity sync_localPrimaryKey], @"remoteID"); - - entity = [self entityForName:@"SimpleID"]; - XCTAssertEqualObjects([entity sync_localPrimaryKey], @"id"); - - entity = [self entityForName:@"Note"]; - XCTAssertEqualObjects([entity sync_localPrimaryKey], @"uniqueID"); - - entity = [self entityForName:@"Tag"]; - XCTAssertEqualObjects([entity sync_localPrimaryKey], @"randomId"); - - entity = [self entityForName:@"NoID"]; - XCTAssertNil([entity sync_localPrimaryKey]); - - entity = [self entityForName:@"AlternativeID"]; - XCTAssertEqualObjects([entity sync_localPrimaryKey], @"alternativeID"); -} - -- (void)testRemoteKey { - NSEntityDescription *entity = [self entityForName:@"User"]; - XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"id"); - - entity = [self entityForName:@"SimpleID"]; - XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"id"); - - entity = [self entityForName:@"Note"]; - XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"unique_id"); - - entity = [self entityForName:@"Tag"]; - XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"id"); - - entity = [self entityForName:@"NoID"]; - XCTAssertNil([entity sync_remotePrimaryKey]); - - entity = [self entityForName:@"AlternativeID"]; - XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"alternative_id"); -} - -@end diff --git a/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/.xccurrentversion b/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/.xccurrentversion deleted file mode 100755 index 62cddee8..00000000 --- a/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>SyncPrimaryKey.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/SYNCPrimaryKey.xcdatamodel/contents b/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/SYNCPrimaryKey.xcdatamodel/contents deleted file mode 100755 index c6c3ccbd..00000000 --- a/Tests/NSEntityDescription-SYNCPrimaryKey/SYNCPrimaryKey.xcdatamodeld/SYNCPrimaryKey.xcdatamodel/contents +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="AlternativeID" syncable="YES"> - <attribute name="alternativeID" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - </userInfo> - </attribute> - </entity> - <entity name="NoID" syncable="YES"> - <attribute name="attribute" optional="YES" attributeType="String" syncable="YES"/> - </entity> - <entity name="Note" syncable="YES"> - <attribute name="attribute" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="uniqueID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - </entity> - <entity name="SimpleID" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - </entity> - <entity name="Tag" syncable="YES"> - <attribute name="attribute" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="randomId" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - </entity> - <entity name="User" representedClassName="" syncable="YES"> - <attribute name="attribute" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - </entity> - <elements> - <element name="NoID" positionX="-27" positionY="18" width="128" height="60"/> - <element name="Note" positionX="-20" positionY="18" width="128" height="75"/> - <element name="SimpleID" positionX="-27" positionY="18" width="128" height="75"/> - <element name="Tag" positionX="160" positionY="0" width="128" height="75"/> - <element name="User" positionX="-207" positionY="-15" width="128" height="73"/> - <element name="AlternativeID" positionX="-27" positionY="18" width="128" height="60"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m b/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m deleted file mode 100755 index 975ad329..00000000 --- a/Tests/NSString-SYNCInflections/NSString_SyncInflectionsTests.m +++ /dev/null @@ -1,156 +0,0 @@ -@import XCTest; - -#import "NSString+SyncInflections.h" - -@interface NSString (PrivateInflections) - -- (BOOL)hyp_containsWord:(NSString *)word; -- (NSString *)hyp_lowerCaseFirstLetter; -- (NSString *)hyp_replaceIdentifierWithString:(NSString *)replacementString; - -@end - -@interface NSString_SyncInflectionsTests : XCTestCase - -@end - -@implementation NSString_SyncInflectionsTests - -#pragma mark - Inflections - -- (void)testReplacementIdentifier { - NSString *testString = @"first_name"; - - XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"FirstName"); - - testString = @"id"; - - XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"ID"); - - testString = @"user_id"; - - XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"UserID"); -} - -- (void)testLowerCaseFirstLetter { - NSString *testString = @"FirstName"; - - XCTAssertEqualObjects([testString hyp_lowerCaseFirstLetter], @"firstName"); -} - -- (void)testSnakeCase { - NSString *camelCase = @"age"; - NSString *snakeCase = @"age"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"id"; - snakeCase = @"id"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"pdf"; - snakeCase = @"pdf"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"driverIdentifier"; - snakeCase = @"driver_identifier"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"integer16"; - snakeCase = @"integer16"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"userID"; - snakeCase = @"user_id"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"createdAt"; - snakeCase = @"created_at"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"userIDFirst"; - snakeCase = @"user_id_first"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); - - camelCase = @"OrderedUser"; - snakeCase = @"ordered_user"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); -} - -- (void)testCamelCase { - NSString *snakeCase = @"age"; - NSString *camelCase = @"age"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"id"; - camelCase = @"id"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"pdf"; - camelCase = @"pdf"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"driver_identifier"; - camelCase = @"driverIdentifier"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"integer16"; - camelCase = @"integer16"; - - XCTAssertEqualObjects(snakeCase, [camelCase hyp_camelCase]); - - snakeCase = @"user_id"; - camelCase = @"userID"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"updated_at"; - camelCase = @"updatedAt"; - - XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - -// snakeCase = @"f2f_url"; -// camelCase = @"f2fURL"; -// -// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); - - snakeCase = @"test_!_key"; - - XCTAssertNil([snakeCase hyp_camelCase]); -} - -- (void)testCamelCaseCapitalizedString { - NSString *capitalizedString = @"GreenWallet"; - NSString *camelCase = @"greenWallet"; - - XCTAssertEqualObjects(camelCase, [capitalizedString hyp_camelCase]); -} - -- (void)testStorageForSameWordButDifferentInflections { - XCTAssertEqualObjects(@"greenWallet", [@"GreenWallet" hyp_camelCase]); - XCTAssertEqualObjects(@"green_wallet", [@"GreenWallet" hyp_snakeCase]); -} - -- (void)testConcurrentAccess { - dispatch_queue_t concurrentQueue = dispatch_queue_create("com.syncdb.test", DISPATCH_QUEUE_CONCURRENT); - - dispatch_apply(6000, concurrentQueue, ^(const size_t i){ - [self testSnakeCase]; - [self testCamelCase]; - }); - -} - -@end diff --git a/Tests/SYNCPropertyMapper/DictionaryTests.swift b/Tests/SYNCPropertyMapper/DictionaryTests.swift deleted file mode 100755 index dd167475..00000000 --- a/Tests/SYNCPropertyMapper/DictionaryTests.swift +++ /dev/null @@ -1,300 +0,0 @@ -import CoreData -import XCTest -import Sync - -class DictionaryTests: XCTestCase { - let sampleSnakeCaseJSON = [ - "description": "reserved", - "inflection_binary_data": ["one", "two"], - "inflection_date": "1970-01-01", - "custom_remote_key": "randomRemoteKey", - "inflection_id": 1, - "inflection_string": "string", - "inflection_integer": 1, - "ignored_parameter": "ignored", - "ignore_transformable": "string", - ] as [String : Any] - - func testExportDictionaryWithSnakeCase() { - // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. - let dataStack = Helper.dataStackWithModelName("137") - let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) - user.hyp_fill(with: self.sampleSnakeCaseJSON) - try! dataStack.mainContext.save() - - let compared = [ - "description": "reserved", - "inflection_binary_data": NSKeyedArchiver.archivedData(withRootObject: ["one", "two"]) as NSData, - "inflection_date": "1970-01-01", - "randomRemoteKey": "randomRemoteKey", - "inflection_id": 1, - "inflection_string": "string", - "inflection_integer": 1 - ] as [String : Any] - - let formatter = DateFormatter() - formatter.dateFormat = "yyyy-MM-dd" - formatter.timeZone = TimeZone(identifier: "GMT") - - let result = user.hyp_dictionary(with: formatter, using: .snakeCase) - - for (key, value) in compared { - if let comparedValue = result[key] { - XCTAssertEqual(value as? NSObject, comparedValue as? NSObject) - } - } - - dataStack.drop() - } - - func testExportDictionaryWithCamelCase() { - // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. - let dataStack = Helper.dataStackWithModelName("137") - let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) - user.hyp_fill(with: self.sampleSnakeCaseJSON) - try! dataStack.mainContext.save() - - let compared = [ - "description": "reserved", - "inflectionBinaryData": NSKeyedArchiver.archivedData(withRootObject: ["one", "two"]) as NSData, - "inflectionDate": "1970-01-01", - "randomRemoteKey": "randomRemoteKey", - "inflectionID": 1, - "inflectionString": "string", - "inflectionInteger": 1 - ] as [String : Any] - - let formatter = DateFormatter() - formatter.dateFormat = "yyyy-MM-dd" - formatter.timeZone = TimeZone(identifier: "GMT") - - let result = user.hyp_dictionary(with: formatter, using: .camelCase) - print(result) - XCTAssertEqual(compared as NSDictionary, result as NSDictionary) - - dataStack.drop() - } - - let sampleSnakeCaseJSONWithRelationship = ["inflection_id": 1] as [String : Any] - - func testExportDictionaryWithSnakeCaseRelationshipArray() { - // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. - let dataStack = Helper.dataStackWithModelName("137") - let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) - user.hyp_fill(with: self.sampleSnakeCaseJSONWithRelationship) - - let company = NSEntityDescription.insertNewObject(forEntityName: "InflectionCompany", into: dataStack.mainContext) - company.setValue(NSNumber(value: 1), forKey: "inflectionID") - user.setValue(company, forKey: "camelCaseCompany") - - try! dataStack.mainContext.save() - - let compared = [ - "inflection_binary_data": NSNull(), - "inflection_date": NSNull(), - "inflection_id": 1, - "inflection_integer": NSNull(), - "inflection_string": NSNull(), - "randomRemoteKey": NSNull(), - "description": NSNull(), - "camel_case_company": [ - "inflection_id": 1 - ] - ] as [String : Any] - - let result = user.hyp_dictionary(using: .snakeCase, andRelationshipType: .array) - print(result) - XCTAssertEqual(compared as NSDictionary, result as NSDictionary) - - dataStack.drop() - } - - func testExportDictionaryWithCamelCaseRelationshipArray() { - // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. - let dataStack = Helper.dataStackWithModelName("137") - let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) - user.hyp_fill(with: self.sampleSnakeCaseJSONWithRelationship) - - let company = NSEntityDescription.insertNewObject(forEntityName: "InflectionCompany", into: dataStack.mainContext) - company.setValue(NSNumber(value: 1), forKey: "inflectionID") - user.setValue(company, forKey: "camelCaseCompany") - - try! dataStack.mainContext.save() - - let compared = [ - "inflectionBinaryData": NSNull(), - "inflectionDate": NSNull(), - "inflectionID": 1, - "inflectionInteger": NSNull(), - "inflectionString": NSNull(), - "randomRemoteKey": NSNull(), - "description": NSNull(), - "camelCaseCompany": [ - "inflectionID": 1 - ] - ] as [String : Any] - - let result = user.hyp_dictionary(using: .camelCase, andRelationshipType: .array) - print(result) - XCTAssertEqual(compared as NSDictionary, result as NSDictionary) - - dataStack.drop() - } - - func testExportDictionaryWithSnakeCaseRelationshipNested() { - // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. - let dataStack = Helper.dataStackWithModelName("137") - let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) - user.hyp_fill(with: self.sampleSnakeCaseJSONWithRelationship) - - let company = NSEntityDescription.insertNewObject(forEntityName: "InflectionCompany", into: dataStack.mainContext) - company.setValue(NSNumber(value: 1), forKey: "inflectionID") - user.setValue(company, forKey: "camelCaseCompany") - - try! dataStack.mainContext.save() - - let compared = [ - "inflection_binary_data": NSNull(), - "inflection_date": NSNull(), - "inflection_id": 1, - "inflection_integer": NSNull(), - "inflection_string": NSNull(), - "randomRemoteKey": NSNull(), - "description": NSNull(), - "camel_case_company_attributes": [ - "inflection_id": 1 - ] - ] as [String : Any] - - let result = user.hyp_dictionary(using: .snakeCase, andRelationshipType: .nested) - print(result) - XCTAssertEqual(compared as NSDictionary, result as NSDictionary) - - dataStack.drop() - } - - func testExportDictionaryWithCamelCaseRelationshipNested() { - // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. - let dataStack = Helper.dataStackWithModelName("137") - let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) - user.hyp_fill(with: self.sampleSnakeCaseJSONWithRelationship) - - let company = NSEntityDescription.insertNewObject(forEntityName: "InflectionCompany", into: dataStack.mainContext) - company.setValue(NSNumber(value: 1), forKey: "inflectionID") - user.setValue(company, forKey: "camelCaseCompany") - - try! dataStack.mainContext.save() - - let compared = [ - "inflectionBinaryData": NSNull(), - "inflectionDate": NSNull(), - "inflectionID": 1, - "inflectionInteger": NSNull(), - "inflectionString": NSNull(), - "randomRemoteKey": NSNull(), - "description": NSNull(), - "camelCaseCompanyAttributes": [ - "inflectionID": 1 - ] - ] as [String : Any] - - let result = user.hyp_dictionary(using: .camelCase, andRelationshipType: .nested) - print(result) - XCTAssertEqual(compared as NSDictionary, result as NSDictionary) - - dataStack.drop() - } - - func testReservedAttributeNotExportingWell() { - let dataStack = Helper.dataStackWithModelName("142") - let user = NSEntityDescription.insertNewObject(forEntityName: "TwoLetterEntity", into: dataStack.mainContext) - user.hyp_fill(with: ["description": "test"]) - try! dataStack.mainContext.save() - - let compared = ["description": "test"] as [String : Any] - - let result = user.hyp_dictionary(using: .camelCase) - print(result) - XCTAssertEqual(compared as NSDictionary, result as NSDictionary) - - dataStack.drop() - } - - func setUpWorkout(dataStack: DataStack) -> NSManagedObject { - let workout = NSEntityDescription.insertNewObject(forEntityName: "Workout", into: dataStack.mainContext) - workout.setValue(UUID().uuidString, forKey: "id") - workout.setValue(UUID().uuidString, forKey: "workoutDesc") - workout.setValue(UUID().uuidString, forKey: "workoutName") - - let calendar = NSEntityDescription.insertNewObject(forEntityName: "Calendar", into: dataStack.mainContext) - calendar.setValue(UUID().uuidString, forKey: "eventSourceType") - calendar.setValue(UUID().uuidString, forKey: "id") - calendar.setValue(NSNumber(value: true), forKey: "isCompleted") - calendar.setValue(Date(timeIntervalSince1970: 0), forKey: "start") - - let plannedToIDs = NSMutableSet() - plannedToIDs.add(calendar) - workout.setValue(plannedToIDs, forKey: "plannedToIDs") - - let exercise = NSEntityDescription.insertNewObject(forEntityName: "Exercise", into: dataStack.mainContext) - exercise.setValue(UUID().uuidString, forKey: "exerciseDesc") - exercise.setValue(UUID().uuidString, forKey: "exerciseName") - exercise.setValue(UUID().uuidString, forKey: "id") - exercise.setValue(UUID().uuidString, forKey: "mainMuscle") - - let exerciseSet = NSEntityDescription.insertNewObject(forEntityName: "ExerciseSet", into: dataStack.mainContext) - exerciseSet.setValue(UUID().uuidString, forKey: "id") - exerciseSet.setValue(NSNumber(value: true), forKey: "isCompleted") - exerciseSet.setValue(NSNumber(value: 0), forKey: "setNumber") - exerciseSet.setValue(NSNumber(value: 0), forKey: "setReps") - exerciseSet.setValue(NSNumber(value: 0), forKey: "setWeight") - - let exerciseSets = NSMutableSet() - exerciseSets.add(exerciseSet) - exercise.setValue(exerciseSets, forKey: "exerciseSets") - - let workoutExercises = NSMutableSet() - workoutExercises.add(exercise) - workout.setValue(workoutExercises, forKey: "workoutExercises") - - try! dataStack.mainContext.save() - - return workout - } - - func testBug140CamelCase() { - let dataStack = Helper.dataStackWithModelName("140") - - let workout = self.setUpWorkout(dataStack: dataStack) - - let result = workout.hyp_dictionary(using: .camelCase, andRelationshipType: .array) - - let rootKeys = Array(result.keys) - XCTAssertEqual(rootKeys.count, 5) - XCTAssertEqual(rootKeys[0], "plannedToIDs") - XCTAssertEqual(rootKeys[1], "workoutName") - XCTAssertEqual(rootKeys[2], "_id") - XCTAssertEqual(rootKeys[3], "workoutExercises") - XCTAssertEqual(rootKeys[4], "workoutDesc") - - dataStack.drop() - } - - func testBug140SnakeCase() { - let dataStack = Helper.dataStackWithModelName("140") - - let workout = self.setUpWorkout(dataStack: dataStack) - - let result = workout.hyp_dictionary(using: .snakeCase, andRelationshipType: .array) - - let rootKeys = Array(result.keys) - XCTAssertEqual(rootKeys.count, 5) - XCTAssertEqual(rootKeys[0], "planned_to_ids") - XCTAssertEqual(rootKeys[1], "_id") - XCTAssertEqual(rootKeys[2], "workout_desc") - XCTAssertEqual(rootKeys[3], "workout_name") - XCTAssertEqual(rootKeys[4], "workout_exercises") - - dataStack.drop() - } -} diff --git a/Tests/SYNCPropertyMapper/FillWithDictionaryTests.swift b/Tests/SYNCPropertyMapper/FillWithDictionaryTests.swift deleted file mode 100755 index 0105d2b0..00000000 --- a/Tests/SYNCPropertyMapper/FillWithDictionaryTests.swift +++ /dev/null @@ -1,88 +0,0 @@ -import CoreData -import XCTest - - -class FillWithDictionaryTests: XCTestCase { - - func testBug112() { - let dataStack = Helper.dataStackWithModelName("112") - - let owner = Helper.insertEntity("Owner", dataStack: dataStack) - owner.setValue(1, forKey: "id") - - let taskList = Helper.insertEntity("TaskList", dataStack: dataStack) - taskList.setValue(1, forKey: "id") - taskList.setValue(owner, forKey: "owner") - - let task = Helper.insertEntity("Task", dataStack: dataStack) - task.setValue(1, forKey: "id") - task.setValue(taskList, forKey: "taskList") - task.setValue(owner, forKey: "owner") - - try! dataStack.mainContext.save() - - let ownerBody = [ - "id": 1, - ] as [String: Any] - let taskBoby = [ - "id": 1, - "owner": ownerBody, - ] as [String: Any] - let expected = [ - "id": 1, - "owner": ownerBody, - "tasks": [taskBoby], - ] as [String: Any] - - XCTAssertEqual(expected as NSDictionary, taskList.hyp_dictionary(using: .array) as NSDictionary) - - dataStack.drop() - } - - func testBug121() { - let dataStack = Helper.dataStackWithModelName("121") - - let album = Helper.insertEntity("Album", dataStack: dataStack) - let json = [ - "id": "a", - "coverPhoto": ["id": "b"], - ] as [String: Any] - album.hyp_fill(with: json) - - XCTAssertNotNil(album.value(forKey: "coverPhoto")) - - dataStack.drop() - } - - func testBug123() { - let dataStack = Helper.dataStackWithModelName("123") - let user = Helper.insertEntity("User", dataStack: dataStack) - user.setValue(1, forKey: "id") - user.setValue("Ignore me", forKey: "name") - - try! dataStack.mainContext.save() - let expected = [ - "id": 1, - ] as [String: Any] - - XCTAssertEqual(expected as NSDictionary, user.hyp_dictionary(using: .none) as NSDictionary) - - dataStack.drop() - } - - func testBug129() { - ValueTransformer.setValueTransformer(BadAPIValueTransformer(), forName: NSValueTransformerName(rawValue: "BadAPIValueTransformer")) - - let dataStack = Helper.dataStackWithModelName("129") - - let user = Helper.insertEntity("User", dataStack: dataStack) - let json = [ - "name": ["bad-backend-dev"], - ] as [String: Any] - user.hyp_fill(with: json) - - XCTAssertEqual(user.value(forKey: "name") as? String, "bad-backend-dev") - - dataStack.drop() - } -} diff --git a/Tests/SYNCPropertyMapper/HelperTests.m b/Tests/SYNCPropertyMapper/HelperTests.m deleted file mode 100755 index 89c5b630..00000000 --- a/Tests/SYNCPropertyMapper/HelperTests.m +++ /dev/null @@ -1,141 +0,0 @@ -@import CoreData; -@import XCTest; -@import Sync; - -#import "NSManagedObject+SyncPropertyMapperHelpers.h" - -@interface PrivateTests : XCTestCase - -@end - -@implementation PrivateTests - -- (id)entityNamed:(NSString *)entityName { - return [NSEntityDescription insertNewObjectForEntityForName:entityName - inManagedObjectContext:self.managedObjectContext]; -} - -- (NSManagedObjectContext *)managedObjectContext { - DataStack *dataStack = [[DataStack alloc] initWithModelName:@"Model" - bundle:[NSBundle bundleForClass:[self class]] - storeType:DataStackStoreTypeInMemory]; - return dataStack.mainContext; -} - -- (void)testAttributeDescriptionForKeyA { - NSManagedObject *company = [self entityNamed:@"Company"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = [company attributeDescriptionForRemoteKey:@"name"]; - XCTAssertEqualObjects(attributeDescription.name, @"name"); - - attributeDescription = [company attributeDescriptionForRemoteKey:@"id"]; - XCTAssertEqualObjects(attributeDescription.name, @"remoteID"); -} - -- (void)testAttributeDescriptionForKeyB { - NSManagedObject *market = [self entityNamed:@"Market"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = [market attributeDescriptionForRemoteKey:@"id"]; - XCTAssertEqualObjects(attributeDescription.name, @"uniqueId"); - - attributeDescription = [market attributeDescriptionForRemoteKey:@"other_attribute"]; - XCTAssertEqualObjects(attributeDescription.name, @"otherAttribute"); -} - -- (void)testAttributeDescriptionForKeyC { - NSManagedObject *user = [self entityNamed:@"User"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = [user attributeDescriptionForRemoteKey:@"age_of_person"]; - XCTAssertEqualObjects(attributeDescription.name, @"age"); - - attributeDescription = [user attributeDescriptionForRemoteKey:@"driver_identifier_str"]; - XCTAssertEqualObjects(attributeDescription.name, @"driverIdentifier"); - - attributeDescription = [user attributeDescriptionForRemoteKey:@"not_found_key"]; - XCTAssertNil(attributeDescription); -} - -- (void)testAttributeDescriptionForKeyD { - NSManagedObject *keyPath = [self entityNamed:@"KeyPath"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = [keyPath attributeDescriptionForRemoteKey:@"snake_parent.value_one"]; - XCTAssertEqualObjects(attributeDescription.name, @"snakeCaseDepthOne"); - - attributeDescription = [keyPath attributeDescriptionForRemoteKey:@"snake_parent.depth_one.depth_two"]; - XCTAssertEqualObjects(attributeDescription.name, @"snakeCaseDepthTwo"); - - attributeDescription = [keyPath attributeDescriptionForRemoteKey:@"camelParent.valueOne"]; - XCTAssertEqualObjects(attributeDescription.name, @"camelCaseDepthOne"); - - attributeDescription = [keyPath attributeDescriptionForRemoteKey:@"camelParent.depthOne.depthTwo"]; - XCTAssertEqualObjects(attributeDescription.name, @"camelCaseDepthTwo"); -} - -- (void)testRemoteKeyForAttributeDescriptionA { - NSManagedObject *company = [self entityNamed:@"Company"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = company.entity.propertiesByName[@"name"]; - XCTAssertEqualObjects([company remoteKeyForAttributeDescription:attributeDescription], @"name"); - - attributeDescription = company.entity.propertiesByName[@"remoteID"]; - XCTAssertEqualObjects([company remoteKeyForAttributeDescription:attributeDescription], @"id"); -} - -- (void)testRemoteKeyForAttributeDescriptionB { - NSManagedObject *market = [self entityNamed:@"Market"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = market.entity.propertiesByName[@"uniqueId"]; - XCTAssertEqualObjects([market remoteKeyForAttributeDescription:attributeDescription], @"id"); - - attributeDescription = market.entity.propertiesByName[@"otherAttribute"]; - XCTAssertEqualObjects([market remoteKeyForAttributeDescription:attributeDescription], @"other_attribute"); -} - -- (void)testRemoteKeyForAttributeDescriptionC { - NSManagedObject *user = [self entityNamed:@"User"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = user.entity.propertiesByName[@"age"]; ; - XCTAssertEqualObjects([user remoteKeyForAttributeDescription:attributeDescription], @"age_of_person"); - - attributeDescription = user.entity.propertiesByName[@"driverIdentifier"]; - XCTAssertEqualObjects([user remoteKeyForAttributeDescription:attributeDescription], @"driver_identifier_str"); - - XCTAssertNil([user remoteKeyForAttributeDescription:nil]); -} - -- (void)testRemoteKeyForAttributeDescriptionD { - NSManagedObject *keyPath = [self entityNamed:@"KeyPath"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = keyPath.entity.propertiesByName[@"snakeCaseDepthOne"]; - XCTAssertEqualObjects([keyPath remoteKeyForAttributeDescription:attributeDescription], @"snake_parent.value_one"); - - attributeDescription = keyPath.entity.propertiesByName[@"snakeCaseDepthTwo"]; - XCTAssertEqualObjects([keyPath remoteKeyForAttributeDescription:attributeDescription], @"snake_parent.depth_one.depth_two"); - - attributeDescription = keyPath.entity.propertiesByName[@"camelCaseDepthOne"]; - XCTAssertEqualObjects([keyPath remoteKeyForAttributeDescription:attributeDescription], @"camelParent.valueOne"); - - attributeDescription = keyPath.entity.propertiesByName[@"camelCaseDepthTwo"]; - XCTAssertEqualObjects([keyPath remoteKeyForAttributeDescription:attributeDescription], @"camelParent.depthOne.depthTwo"); -} - -- (void)testDestroyKey { - NSManagedObject *note = [self entityNamed:@"Note"]; - NSAttributeDescription *attributeDescription; - - attributeDescription = note.entity.propertiesByName[@"destroy"]; ; - XCTAssertEqualObjects([note remoteKeyForAttributeDescription:attributeDescription], @"_destroy"); - - attributeDescription = note.entity.propertiesByName[@"destroy"]; - XCTAssertEqualObjects([note remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:SyncPropertyMapperRelationshipTypeArray], @"destroy"); -} - -@end diff --git a/Tests/SYNCPropertyMapper/Models/112.xcdatamodeld/hypbug.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/112.xcdatamodeld/hypbug.xcdatamodel/contents deleted file mode 100644 index a0bb9ea1..00000000 --- a/Tests/SYNCPropertyMapper/Models/112.xcdatamodeld/hypbug.xcdatamodel/contents +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="Owner" representedClassName="Owner" syncable="YES"> - <attribute name="id" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="task" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Task" inverseName="owner" inverseEntity="Task" syncable="YES"> - <userInfo> - <entry key="hyper.nonExportable" value="true"/> - </userInfo> - </relationship> - <relationship name="taskList" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TaskList" inverseName="owner" inverseEntity="TaskList" syncable="YES"> - <userInfo> - <entry key="hyper.nonExportable" value="true"/> - </userInfo> - </relationship> - </entity> - <entity name="Task" representedClassName="Task" syncable="YES"> - <attribute name="id" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="owner" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Owner" inverseName="task" inverseEntity="Owner" syncable="YES"/> - <relationship name="taskList" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TaskList" inverseName="tasks" inverseEntity="TaskList" syncable="YES"/> - </entity> - <entity name="TaskList" representedClassName="TaskList" syncable="YES"> - <attribute name="id" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="owner" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Owner" inverseName="taskList" inverseEntity="Owner" syncable="YES"/> - <relationship name="tasks" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Task" inverseName="taskList" inverseEntity="Task" syncable="YES"/> - </entity> - <elements> - <element name="Owner" positionX="-54" positionY="-54" width="128" height="90"/> - <element name="Task" positionX="169" positionY="84" width="128" height="90"/> - <element name="TaskList" positionX="-245" positionY="99" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/Models/121.xcdatamodeld/Model.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/121.xcdatamodeld/Model.xcdatamodel/contents deleted file mode 100644 index bce56a99..00000000 --- a/Tests/SYNCPropertyMapper/Models/121.xcdatamodeld/Model.xcdatamodel/contents +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> - <entity name="Album" representedClassName="Album" syncable="YES"> - <attribute name="coverPhoto" optional="YES" attributeType="Binary" syncable="YES"/> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> - </entity> - <elements> - <element name="Album" positionX="9" positionY="54" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/Models/123.xcdatamodeld/Model.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/123.xcdatamodeld/Model.xcdatamodel/contents deleted file mode 100755 index 5bd4ec7f..00000000 --- a/Tests/SYNCPropertyMapper/Models/123.xcdatamodeld/Model.xcdatamodel/contents +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="15G1004" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> - <entity name="User" representedClassName="" syncable="YES"> - <attribute name="id" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.nonExportable" value="true"/> - </userInfo> - </attribute> - </entity> - <elements> - <element name="User" positionX="9" positionY="72" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/Models/129.xcdatamodeld/hypbug.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/129.xcdatamodeld/hypbug.xcdatamodel/contents deleted file mode 100755 index ad7fe137..00000000 --- a/Tests/SYNCPropertyMapper/Models/129.xcdatamodeld/hypbug.xcdatamodel/contents +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="User" representedClassName="" syncable="YES"> - <attribute name="name" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.valueTransformer" value="BadAPIValueTransformer"/> - </userInfo> - </attribute> - </entity> - <elements> - <element name="User" positionX="-54" positionY="-54" width="128" height="60"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/Models/137.xcdatamodeld/hypbug.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/137.xcdatamodeld/hypbug.xcdatamodel/contents deleted file mode 100755 index 2e7a2c99..00000000 --- a/Tests/SYNCPropertyMapper/Models/137.xcdatamodeld/hypbug.xcdatamodel/contents +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C32f" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="InflectionCompany" representedClassName="" syncable="YES"> - <attribute name="inflectionID" optional="YES" attributeType="Integer 32" usesScalarValueType="NO" syncable="YES"/> - <relationship name="camelCaseUser" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="InflectionUser" inverseName="camelCaseCompany" inverseEntity="InflectionUser" syncable="YES"> - <userInfo> - <entry key="hyper.nonExportable" value="value"/> - </userInfo> - </relationship> - </entity> - <entity name="InflectionUser" representedClassName="" syncable="YES"> - <attribute name="customRemoteKey" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="randomRemoteKey"/> - </userInfo> - </attribute> - <attribute name="ignoredParameter" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.nonExportable" value="true"/> - </userInfo> - </attribute> - <attribute name="ignoreTransformable" optional="YES" attributeType="Transformable" syncable="YES"/> - <attribute name="inflectionBinaryData" optional="YES" attributeType="Binary" syncable="YES"/> - <attribute name="inflectionDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <attribute name="inflectionID" optional="YES" attributeType="Integer 32" usesScalarValueType="NO" syncable="YES"/> - <attribute name="inflectionInteger" optional="YES" attributeType="Integer 16" usesScalarValueType="NO" syncable="YES"/> - <attribute name="inflectionString" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="inflectionUserDescription" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="camelCaseCompany" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="InflectionCompany" inverseName="camelCaseUser" inverseEntity="InflectionCompany" syncable="YES"/> - </entity> - <elements> - <element name="InflectionCompany" positionX="-54" positionY="126" width="128" height="73"/> - <element name="InflectionUser" positionX="-263" positionY="36" width="128" height="195"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/Models/140.xcdatamodeld/.xccurrentversion b/Tests/SYNCPropertyMapper/Models/140.xcdatamodeld/.xccurrentversion deleted file mode 100755 index 9b33435d..00000000 --- a/Tests/SYNCPropertyMapper/Models/140.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>smartworkout.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/SYNCPropertyMapper/Models/140.xcdatamodeld/smartworkout.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/140.xcdatamodeld/smartworkout.xcdatamodel/contents deleted file mode 100755 index 3d8de2dd..00000000 --- a/Tests/SYNCPropertyMapper/Models/140.xcdatamodeld/smartworkout.xcdatamodel/contents +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> - <entity name="Calendar" representedClassName="" syncable="YES"> - <attribute name="eventSourceType" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="_id"/> - </userInfo> - </attribute> - <attribute name="isCompleted" optional="YES" attributeType="Boolean" usesScalarValueType="YES" syncable="YES"/> - <attribute name="start" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <relationship name="eventSourceID" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Workout" inverseName="plannedToIDs" inverseEntity="Workout" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="eventSourceId"/> - </userInfo> - </relationship> - </entity> - <entity name="Exercise" representedClassName="" syncable="YES"> - <attribute name="exerciseDesc" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="exerciseName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - <entry key="hyper.remoteKey" value="_id"/> - </userInfo> - </attribute> - <attribute name="mainMuscle" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="exerciseSets" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="ExerciseSet" inverseName="exercise" inverseEntity="ExerciseSet" syncable="YES"/> - <relationship name="workout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Workout" inverseName="workoutExercises" inverseEntity="Workout" syncable="YES"/> - </entity> - <entity name="ExerciseSet" representedClassName="" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - <entry key="hyper.remoteKey" value="_id"/> - </userInfo> - </attribute> - <attribute name="isCompleted" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> - <attribute name="setNumber" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/> - <attribute name="setReps" optional="YES" attributeType="Double" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/> - <attribute name="setWeight" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/> - <relationship name="exercise" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Exercise" inverseName="exerciseSets" inverseEntity="Exercise" syncable="YES"/> - </entity> - <entity name="Workout" representedClassName="" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - <entry key="hyper.remoteKey" value="_id"/> - </userInfo> - </attribute> - <attribute name="workoutDesc" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="workoutName" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="plannedToIDs" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Calendar" inverseName="eventSourceID" inverseEntity="Calendar" syncable="YES"/> - <relationship name="workoutExercises" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Exercise" inverseName="workout" inverseEntity="Exercise" syncable="YES"/> - </entity> - <elements> - <element name="Calendar" positionX="-288" positionY="-378" width="128" height="118"/> - <element name="Exercise" positionX="-281" positionY="-216" width="128" height="133"/> - <element name="ExerciseSet" positionX="-99" positionY="-342" width="128" height="133"/> - <element name="Workout" positionX="-479" positionY="-312" width="128" height="118"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/Models/142.xcdatamodeld/hypbug.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/142.xcdatamodeld/hypbug.xcdatamodel/contents deleted file mode 100755 index e835928a..00000000 --- a/Tests/SYNCPropertyMapper/Models/142.xcdatamodeld/hypbug.xcdatamodel/contents +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C32f" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="TwoLetterEntity" representedClassName="" syncable="YES"> - <attribute name="twoLetterEntityDescription" attributeType="String" syncable="YES"/> - </entity> - <elements> - <element name="TwoLetterEntity" positionX="-54" positionY="-54" width="128" height="60"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents deleted file mode 100644 index 49e034ca..00000000 --- a/Tests/SYNCPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents +++ /dev/null @@ -1,137 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="Apartment" representedClassName="Apartment" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="building" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Building" inverseName="apartments" inverseEntity="Building" syncable="YES"/> - <relationship name="rooms" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Room" inverseName="apartment" inverseEntity="Room" syncable="YES"/> - </entity> - <entity name="Attribute" representedClassName="Attribute" syncable="YES"> - <attribute name="attributeType" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="binaryData" optional="YES" attributeType="Binary" syncable="YES"/> - <attribute name="boolean" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/> - <attribute name="customTransformerString" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.valueTransformer" value="SyncTestValueTransformer"/> - </userInfo> - </attribute> - <attribute name="decimal" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES"/> - <attribute name="decimalString" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES"/> - <attribute name="doubleValue" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="doubleValueString" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="floatValue" optional="YES" attributeType="Float" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="floatValueString" optional="YES" attributeType="Float" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="integer16" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="integer32" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="integer64" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="integerString" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="string" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="transformable" optional="YES" attributeType="Transformable" syncable="YES"/> - </entity> - <entity name="Building" representedClassName="Building" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="apartments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Apartment" inverseName="building" inverseEntity="Apartment" syncable="YES"/> - <relationship name="parks" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Park" inverseName="building" inverseEntity="Park" syncable="YES"/> - </entity> - <entity name="Company" representedClassName="Company" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="company" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="KeyPath" representedClassName="KeyPath" syncable="YES"> - <attribute name="camelCaseDepthOne" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="camelParent.valueOne"/> - </userInfo> - </attribute> - <attribute name="camelCaseDepthTwo" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="camelParent.depthOne.depthTwo"/> - </userInfo> - </attribute> - <attribute name="snakeCaseDepthOne" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="snake_parent.value_one"/> - </userInfo> - </attribute> - <attribute name="snakeCaseDepthTwo" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="snake_parent.depth_one.depth_two"/> - </userInfo> - </attribute> - </entity> - <entity name="Market" representedClassName="Market" syncable="YES"> - <attribute name="otherAttribute" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="uniqueId" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - </entity> - <entity name="Note" representedClassName="Note" syncable="YES"> - <attribute name="destroy" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" usesScalarValueType="NO" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="notes" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="Park" representedClassName="Park" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="building" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Building" inverseName="parks" inverseEntity="Building" syncable="YES"/> - </entity> - <entity name="Recursive" representedClassName="Recursive" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="recursive" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Recursive" inverseName="recursives" inverseEntity="Recursive" syncable="YES"/> - <relationship name="recursives" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Recursive" inverseName="recursive" inverseEntity="Recursive" syncable="YES"/> - </entity> - <entity name="Room" representedClassName="Room" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="apartment" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Apartment" inverseName="rooms" inverseEntity="Apartment" syncable="YES"/> - </entity> - <entity name="User" representedClassName="User" syncable="YES"> - <attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="age_of_person"/> - </userInfo> - </attribute> - <attribute name="birthDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <attribute name="contractID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <attribute name="driverIdentifier" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="driver_identifier_str"/> - </userInfo> - </attribute> - <attribute name="expenses" optional="YES" attributeType="Binary" syncable="YES"/> - <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="hobbies" optional="YES" attributeType="Binary" syncable="YES"/> - <attribute name="ignoredParameter" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="ignoreTransformable" optional="YES" attributeType="Transformable" syncable="YES"/> - <attribute name="lastName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="numberOfAttendes" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="rawSigned" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="signed"/> - </userInfo> - </attribute> - <attribute name="registeredTransformable" optional="YES" attributeType="Transformable" valueTransformerName="DateStringTransformer" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="updatedAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <attribute name="userDescription" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="userType" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="company" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Company" inverseName="user" inverseEntity="Company" syncable="YES"/> - <relationship name="notes" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Note" inverseName="user" inverseEntity="Note" syncable="YES"/> - </entity> - <elements> - <element name="Apartment" positionX="-18" positionY="27" width="128" height="90"/> - <element name="Attribute" positionX="45" positionY="189" width="128" height="285"/> - <element name="Building" positionX="0" positionY="45" width="128" height="90"/> - <element name="Company" positionX="18" positionY="63" width="128" height="90"/> - <element name="KeyPath" positionX="9" positionY="153" width="128" height="105"/> - <element name="Market" positionX="-45" positionY="0" width="128" height="75"/> - <element name="Note" positionX="9" positionY="54" width="128" height="105"/> - <element name="Park" positionX="27" positionY="72" width="128" height="75"/> - <element name="Recursive" positionX="45" positionY="90" width="128" height="90"/> - <element name="Room" positionX="27" positionY="72" width="128" height="75"/> - <element name="User" positionX="9" positionY="54" width="128" height="345"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/Models/Ordered.xcdatamodeld/Ordered.xcdatamodel/contents b/Tests/SYNCPropertyMapper/Models/Ordered.xcdatamodeld/Ordered.xcdatamodel/contents deleted file mode 100644 index 41134017..00000000 --- a/Tests/SYNCPropertyMapper/Models/Ordered.xcdatamodeld/Ordered.xcdatamodel/contents +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="OrderedNote" representedClassName="OrderedNote" syncable="YES"> - <attribute name="destroy" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" usesScalarValueType="NO" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OrderedUser" inverseName="notes" inverseEntity="OrderedUser" syncable="YES"/> - </entity> - <entity name="OrderedUser" representedClassName="OrderedUser" syncable="YES"> - <attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="age_of_person"/> - </userInfo> - </attribute> - <attribute name="birthDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <attribute name="contractID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <attribute name="driverIdentifier" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="driver_identifier_str"/> - </userInfo> - </attribute> - <attribute name="expenses" optional="YES" attributeType="Binary" syncable="YES"/> - <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="hobbies" optional="YES" attributeType="Binary" syncable="YES"/> - <attribute name="ignoredParameter" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="ignoreTransformable" optional="YES" attributeType="Transformable" syncable="YES"/> - <attribute name="lastName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="numberOfAttendes" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="orderedUserDescription" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="orderedUserType" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="rawSigned" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="signed"/> - </userInfo> - </attribute> - <attribute name="registeredTransformable" optional="YES" attributeType="Transformable" valueTransformerName="DateStringTransformer" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="updatedAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <relationship name="notes" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="OrderedNote" inverseName="user" inverseEntity="OrderedNote" syncable="YES"/> - </entity> - <elements> - <element name="OrderedNote" positionX="-63" positionY="-18" width="128" height="105"/> - <element name="OrderedUser" positionX="-54" positionY="-9" width="128" height="330"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/SYNCPropertyMapper/SyncDictionaryTests.m b/Tests/SYNCPropertyMapper/SyncDictionaryTests.m deleted file mode 100755 index d5ad5fd8..00000000 --- a/Tests/SYNCPropertyMapper/SyncDictionaryTests.m +++ /dev/null @@ -1,398 +0,0 @@ -@import CoreData; -@import XCTest; -@import Sync; - -#import "SyncPropertyMapper.h" -#import "SyncTestValueTransformer.h" - - -@interface SyncDictionaryTests : XCTestCase - -@property (nonatomic) NSDate *testDate; - -@end - -@implementation SyncDictionaryTests - -- (NSDate *)testDate { - if (!_testDate) { - _testDate = [NSDate date]; - } - - return _testDate; -} - -#pragma mark - Set up - -- (DataStack *)dataStack { - return [[DataStack alloc] initWithModelName:@"Model" - bundle:[NSBundle bundleForClass:[self class]] - storeType:DataStackStoreTypeInMemory]; -} - -- (id)entityNamed:(NSString *)entityName inContext:(NSManagedObjectContext *)context { - return [NSEntityDescription insertNewObjectForEntityForName:entityName - inManagedObjectContext:context]; -} - -- (NSManagedObject *)userUsingDataStack:(DataStack *)dataStack { - NSManagedObject *user = [self entityNamed:@"User" inContext:dataStack.mainContext]; - [user setValue:@25 forKey:@"age"]; - [user setValue:self.testDate forKey:@"birthDate"]; - [user setValue:@235 forKey:@"contractID"]; - [user setValue:@"ABC8283" forKey:@"driverIdentifier"]; - [user setValue:@"John" forKey:@"firstName"]; - [user setValue:@"Hyperseed" forKey:@"lastName"]; - [user setValue:@"John Description" forKey:@"userDescription"]; - [user setValue:@111 forKey:@"remoteID"]; - [user setValue:@"Manager" forKey:@"userType"]; - [user setValue:self.testDate forKey:@"createdAt"]; - [user setValue:self.testDate forKey:@"updatedAt"]; - [user setValue:@30 forKey:@"numberOfAttendes"]; - [user setValue:@"raw" forKey:@"rawSigned"]; - - NSData *hobbies = [NSKeyedArchiver archivedDataWithRootObject:@[@"Football", - @"Soccer", - @"Code", - @"More code"]]; - [user setValue:hobbies forKey:@"hobbies"]; - - NSData *expenses = [NSKeyedArchiver archivedDataWithRootObject:@{@"cake" : @12.50, - @"juice" : @0.50}]; - [user setValue:expenses forKey:@"expenses"]; - - NSManagedObject *note = [self noteWithID:@1 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - - note = [self noteWithID:@14 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - [note setValue:@YES forKey:@"destroy"]; - - note = [self noteWithID:@7 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - - NSManagedObject *company = [self companyWithID:@1 andName:@"Facebook" inContext:dataStack.mainContext]; - [company setValue:user forKey:@"user"]; - - return user; -} - -- (NSManagedObject *)noteWithID:(NSNumber *)remoteID - inContext:(NSManagedObjectContext *)context { - NSManagedObject *note = [self entityNamed:@"Note" inContext:context]; - [note setValue:remoteID forKey:@"remoteID"]; - [note setValue:[NSString stringWithFormat:@"This is the text for the note %@", remoteID] forKey:@"text"]; - - return note; -} - -- (NSManagedObject *)orderedNoteWithID:(NSNumber *)remoteID - inContext:(NSManagedObjectContext *)context { - NSManagedObject *note = [self entityNamed:@"OrderedNote" inContext:context]; - [note setValue:remoteID forKey:@"remoteID"]; - [note setValue:[NSString stringWithFormat:@"This is the text for the note %@", remoteID] forKey:@"text"]; - - return note; -} - -- (NSManagedObject *)companyWithID:(NSNumber *)remoteID - andName:(NSString *)name - inContext:(NSManagedObjectContext *)context { - NSManagedObject *company = [self entityNamed:@"Company" inContext:context]; - [company setValue:remoteID forKey:@"remoteID"]; - [company setValue:name forKey:@"name"]; - - return company; -} - -#pragma mark - hyp_dictionary - -- (NSDictionary *)userDictionaryWithNoRelationships { - NSDateFormatter *formatter = [NSDateFormatter new]; - formatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]; - formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ssZZZZZ"; - NSString *resultDateString = [formatter stringFromDate:self.testDate]; - - NSMutableDictionary *comparedDictionary = [NSMutableDictionary new]; - comparedDictionary[@"age_of_person"] = @25; - comparedDictionary[@"birth_date"] = resultDateString; - comparedDictionary[@"contract_id"] = @235; - comparedDictionary[@"created_at"] = resultDateString; - comparedDictionary[@"description"] = @"John Description"; - comparedDictionary[@"driver_identifier_str"] = @"ABC8283"; - comparedDictionary[@"expenses"] = [NSKeyedArchiver archivedDataWithRootObject:@{@"cake" : @12.50, - @"juice" : @0.50}]; - comparedDictionary[@"first_name"] = @"John"; - comparedDictionary[@"hobbies"] = [NSKeyedArchiver archivedDataWithRootObject:@[@"Football", - @"Soccer", - @"Code", - @"More code"]]; - comparedDictionary[@"id"] = @111; - comparedDictionary[@"ignored_parameter"] = [NSNull null]; - comparedDictionary[@"last_name"] = @"Hyperseed"; - comparedDictionary[@"number_of_attendes"] = @30; - comparedDictionary[@"type"] = @"Manager"; - comparedDictionary[@"updated_at"] = resultDateString; - comparedDictionary[@"signed"] = @"raw"; - - return [comparedDictionary copy]; -} - -- (void)testDictionaryNoRelationships { - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeNone]; - NSDictionary *comparedDictionary = [self userDictionaryWithNoRelationships]; - XCTAssertEqualObjects(dictionary, [comparedDictionary copy]); -} - -- (void)testDictionaryArrayRelationships { - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; - NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; - comparedDictionary[@"company"] = @{@"id" : @1, - @"name" : @"Facebook"}; - - NSArray *notes = dictionary[@"notes"]; - NSSortDescriptor *nameDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"id" ascending:YES]; - NSArray *sortedNotes = [notes sortedArrayUsingDescriptors:[NSArray arrayWithObject:nameDescriptor]]; - NSMutableDictionary *mutableDictionary = [dictionary mutableCopy]; - mutableDictionary[@"notes"] = sortedNotes; - dictionary = [mutableDictionary copy]; - - NSDictionary *note1 = @{@"destroy" : [NSNull null], - @"id" : @1, - @"text" : @"This is the text for the note 1"}; - NSDictionary *note2 = @{@"destroy" : [NSNull null], - @"id" : @7, - @"text" : @"This is the text for the note 7"}; - NSDictionary *note3 = @{@"destroy" : @1, - @"id" : @14, - @"text" : @"This is the text for the note 14"}; - comparedDictionary[@"notes"] = @[note1, note2, note3]; - - XCTAssertEqualObjects(dictionary, [comparedDictionary copy]); -} - -- (void)testDictionaryArrayRelationshipsOrdered { - DataStack *dataStack = [[DataStack alloc] initWithModelName:@"Ordered" - bundle:[NSBundle bundleForClass:[self class]] - storeType:DataStackStoreTypeInMemory]; - - NSManagedObject *user = [self entityNamed:@"OrderedUser" inContext:dataStack.mainContext]; - [user setValue:@"raw" forKey:@"rawSigned"]; - - [user setValue:@"raw" forKey:@"rawSigned"]; - [user setValue:@25 forKey:@"age"]; - [user setValue:self.testDate forKey:@"birthDate"]; - [user setValue:@235 forKey:@"contractID"]; - [user setValue:@"ABC8283" forKey:@"driverIdentifier"]; - [user setValue:@"John" forKey:@"firstName"]; - [user setValue:@"Hyperseed" forKey:@"lastName"]; - [user setValue:@"John Description" forKey:@"orderedUserDescription"]; - [user setValue:@111 forKey:@"remoteID"]; - [user setValue:@"Manager" forKey:@"orderedUserType"]; - [user setValue:self.testDate forKey:@"createdAt"]; - [user setValue:self.testDate forKey:@"updatedAt"]; - [user setValue:@30 forKey:@"numberOfAttendes"]; - - NSData *hobbies = [NSKeyedArchiver archivedDataWithRootObject:@[@"Football", - @"Soccer", - @"Code", - @"More code"]]; - [user setValue:hobbies forKey:@"hobbies"]; - - NSData *expenses = [NSKeyedArchiver archivedDataWithRootObject:@{@"cake" : @12.50, - @"juice" : @0.50}]; - [user setValue:expenses forKey:@"expenses"]; - - NSManagedObject *note = [self orderedNoteWithID:@1 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - - note = [self orderedNoteWithID:@14 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - [note setValue:@YES forKey:@"destroy"]; - - note = [self orderedNoteWithID:@7 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - - NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; - NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; - - NSArray *notes = dictionary[@"notes"]; - NSSortDescriptor *nameDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"id" ascending:YES]; - NSArray *sortedNotes = [notes sortedArrayUsingDescriptors:[NSArray arrayWithObject:nameDescriptor]]; - NSMutableDictionary *mutableDictionary = [dictionary mutableCopy]; - mutableDictionary[@"notes"] = sortedNotes; - dictionary = [mutableDictionary copy]; - - NSDictionary *note1 = @{@"destroy" : [NSNull null], - @"id" : @1, - @"text" : @"This is the text for the note 1"}; - NSDictionary *note2 = @{@"destroy" : [NSNull null], - @"id" : @7, - @"text" : @"This is the text for the note 7"}; - NSDictionary *note3 = @{@"destroy" : @1, - @"id" : @14, - @"text" : @"This is the text for the note 14"}; - comparedDictionary[@"notes"] = @[note1, note2, note3]; - - XCTAssertEqualObjects(dictionary, [comparedDictionary copy]); - - NSString *description = (NSString *)dictionary[@"description"]; - XCTAssertEqualObjects(description, @"John Description"); - - NSString *type = (NSString *)dictionary[@"type"]; - XCTAssertEqualObjects(type, @"Manager"); -} - -- (void)testDictionaryNestedRelationships { - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - NSDictionary *dictionary = [user hyp_dictionary]; - NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; - comparedDictionary[@"company_attributes"] = @{@"id" : @1, - @"name" : @"Facebook"}; - - NSDictionary *notesDictionary = dictionary[@"notes_attributes"]; - NSArray *notes = notesDictionary.allValues; - NSSortDescriptor *nameDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"id" ascending:YES]; - NSArray *sortedNotes = [notes sortedArrayUsingDescriptors:[NSArray arrayWithObject:nameDescriptor]]; - NSMutableDictionary *mutableDictionary = [dictionary mutableCopy]; - mutableDictionary[@"notes_attributes"] = sortedNotes; - dictionary = [mutableDictionary copy]; - - NSDictionary *note1 = @{@"_destroy" : [NSNull null], - @"id" : @1, - @"text" : @"This is the text for the note 1"}; - NSDictionary *note2 = @{@"_destroy" : [NSNull null], - @"id" : @7, - @"text" : @"This is the text for the note 7"}; - NSDictionary *note3 = @{@"_destroy" : @1, - @"id" : @14, - @"text" : @"This is the text for the note 14"}; - comparedDictionary[@"notes_attributes"] = @[note1, note2, note3]; - - XCTAssertEqualObjects(dictionary, comparedDictionary); -} - -- (void)testDictionaryDeepRelationships { - DataStack *dataStack = [self dataStack]; - - NSManagedObject *building = [self entityNamed:@"Building" inContext:dataStack.mainContext]; - [building setValue:@1 forKey:@"remoteID"]; - - NSManagedObject *park = [self entityNamed:@"Park" inContext:dataStack.mainContext]; - [park setValue:@1 forKey:@"remoteID"]; - - NSMutableSet *parks = [building valueForKey:@"parks"]; - [parks addObject:park]; - [building setValue:parks forKey:@"parks"]; - - NSManagedObject *apartment = [self entityNamed:@"Apartment" inContext:dataStack.mainContext]; - [apartment setValue:@1 forKey:@"remoteID"]; - - NSManagedObject *room = [self entityNamed:@"Room" inContext:dataStack.mainContext]; - [room setValue:@1 forKey:@"remoteID"]; - - NSMutableSet *rooms = [apartment valueForKey:@"rooms"]; - [rooms addObject:room]; - [apartment setValue:rooms forKey:@"rooms"]; - - NSMutableSet *apartments = [building valueForKey:@"apartments"]; - [apartments addObject:apartment]; - [building setValue:apartments forKey:@"apartments"]; - - NSDictionary *buildingDictionary = [building hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; - NSMutableDictionary *compared = [NSMutableDictionary new]; - NSArray *roomsArray = @[@{@"id" : @1}]; - NSArray *apartmentsArray = @[@{@"id" : @1, - @"rooms" : roomsArray}]; - NSArray *parksArray = @[@{@"id" : @1}]; - compared[@"id"] = @1; - compared[@"apartments"] = apartmentsArray; - compared[@"parks"] = parksArray; - - XCTAssertEqualObjects(buildingDictionary, compared); -} - -- (void)testDictionaryValuesKindOfClass { - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - NSDictionary *dictionary = [user hyp_dictionary]; - - XCTAssertTrue([dictionary[@"age_of_person"] isKindOfClass:[NSNumber class]]); - - XCTAssertTrue([dictionary[@"birth_date"] isKindOfClass:[NSString class]]); - - XCTAssertTrue([dictionary[@"contract_id"] isKindOfClass:[NSNumber class]]); - - XCTAssertTrue([dictionary[@"created_at"] isKindOfClass:[NSString class]]); - - XCTAssertTrue([dictionary[@"description"] isKindOfClass:[NSString class]]); - - XCTAssertTrue([dictionary[@"driver_identifier_str"] isKindOfClass:[NSString class]]); - - XCTAssertTrue([dictionary[@"expenses"] isKindOfClass:[NSData class]]); - - XCTAssertTrue([dictionary[@"first_name"] isKindOfClass:[NSString class]]); - - XCTAssertTrue([dictionary[@"hobbies"] isKindOfClass:[NSData class]]); - - XCTAssertTrue([dictionary[@"id"] isKindOfClass:[NSNumber class]]); - - XCTAssertNil(dictionary[@"ignore_transformable"]); - - XCTAssertTrue([dictionary[@"ignored_parameter"] isKindOfClass:[NSNull class]]); - - XCTAssertTrue([dictionary[@"last_name"] isKindOfClass:[NSString class]]); - - XCTAssertTrue([dictionary[@"notes_attributes"] isKindOfClass:[NSDictionary class]]); - - XCTAssertTrue([dictionary[@"number_of_attendes"] isKindOfClass:[NSNumber class]]); - - XCTAssertTrue([dictionary[@"type"] isKindOfClass:[NSString class]]); - - XCTAssertTrue([dictionary[@"updated_at"] isKindOfClass:[NSString class]]); -} - -- (void)testRecursive { - DataStack *dataStack = [self dataStack]; - - NSManagedObject *megachild = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; - [megachild setValue:@"megachild" forKey:@"remoteID"]; - - NSManagedObject *grandchild = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; - [grandchild setValue:@"grandchild" forKey:@"remoteID"]; - - NSMutableSet *recursives = [grandchild valueForKey:@"recursives"]; - [recursives addObject:megachild]; - [grandchild setValue:recursives forKey:@"recursives"]; - [megachild setValue:grandchild forKey:@"recursive"]; - - NSManagedObject *child = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; - [child setValue:@"child" forKey:@"remoteID"]; - - recursives = [child valueForKey:@"recursives"]; - [recursives addObject:grandchild]; - [child setValue:recursives forKey:@"recursives"]; - [grandchild setValue:child forKey:@"recursive"]; - - NSManagedObject *parent = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; - [parent setValue:@"Parent" forKey:@"remoteID"]; - - recursives = [parent valueForKey:@"recursives"]; - [recursives addObject:child]; - [parent setValue:recursives forKey:@"recursives"]; - [child setValue:parent forKey:@"recursive"]; - - NSDictionary *dictionary = [parent hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; - NSArray *megachildArray = @[@{@"id" : @"megachild", @"recursives": @[]}]; - NSArray *grandchildArray = @[@{@"id" : @"grandchild", @"recursives": megachildArray}]; - NSArray *childArray = @[@{@"id" : @"child", @"recursives": grandchildArray}]; - NSDictionary *parentDictionary = @{@"id" : @"Parent", @"recursives" : childArray}; - XCTAssertEqualObjects(dictionary, parentDictionary); -} - -@end diff --git a/Tests/SYNCPropertyMapper/SyncFillWithDictionaryTests.m b/Tests/SYNCPropertyMapper/SyncFillWithDictionaryTests.m deleted file mode 100755 index 77f830f9..00000000 --- a/Tests/SYNCPropertyMapper/SyncFillWithDictionaryTests.m +++ /dev/null @@ -1,461 +0,0 @@ -@import CoreData; -@import XCTest; -@import Sync; - -#import "SyncPropertyMapper.h" -#import "SyncTestValueTransformer.h" - -@interface SyncFillWithDictionaryTests : XCTestCase - -@property (nonatomic) NSDate *testDate; - -@end - -@implementation SyncFillWithDictionaryTests - -- (NSDate *)testDate { - if (!_testDate) { - _testDate = [NSDate date]; - } - - return _testDate; -} - -#pragma mark - Set up - -- (DataStack *)dataStack { - return [[DataStack alloc] initWithModelName:@"Model" - bundle:[NSBundle bundleForClass:[self class]] - storeType:DataStackStoreTypeInMemory]; -} - -- (id)entityNamed:(NSString *)entityName inContext:(NSManagedObjectContext *)context { - return [NSEntityDescription insertNewObjectForEntityForName:entityName - inManagedObjectContext:context]; -} - -- (NSManagedObject *)userUsingDataStack:(DataStack *)dataStack { - NSManagedObject *user = [self entityNamed:@"User" inContext:dataStack.mainContext]; - [user setValue:@25 forKey:@"age"]; - [user setValue:self.testDate forKey:@"birthDate"]; - [user setValue:@235 forKey:@"contractID"]; - [user setValue:@"ABC8283" forKey:@"driverIdentifier"]; - [user setValue:@"John" forKey:@"firstName"]; - [user setValue:@"Hyperseed" forKey:@"lastName"]; - [user setValue:@"John Description" forKey:@"userDescription"]; - [user setValue:@111 forKey:@"remoteID"]; - [user setValue:@"Manager" forKey:@"userType"]; - [user setValue:self.testDate forKey:@"createdAt"]; - [user setValue:self.testDate forKey:@"updatedAt"]; - [user setValue:@30 forKey:@"numberOfAttendes"]; - [user setValue:@"raw" forKey:@"rawSigned"]; - - NSData *hobbies = [NSKeyedArchiver archivedDataWithRootObject:@[@"Football", - @"Soccer", - @"Code", - @"More code"]]; - [user setValue:hobbies forKey:@"hobbies"]; - - NSData *expenses = [NSKeyedArchiver archivedDataWithRootObject:@{@"cake" : @12.50, - @"juice" : @0.50}]; - [user setValue:expenses forKey:@"expenses"]; - - NSManagedObject *note = [self noteWithID:@1 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - - note = [self noteWithID:@14 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - [note setValue:@YES forKey:@"destroy"]; - - note = [self noteWithID:@7 inContext:dataStack.mainContext]; - [note setValue:user forKey:@"user"]; - - NSManagedObject *company = [self companyWithID:@1 andName:@"Facebook" inContext:dataStack.mainContext]; - [company setValue:user forKey:@"user"]; - - return user; -} - -- (NSManagedObject *)noteWithID:(NSNumber *)remoteID - inContext:(NSManagedObjectContext *)context { - NSManagedObject *note = [self entityNamed:@"Note" inContext:context]; - [note setValue:remoteID forKey:@"remoteID"]; - [note setValue:[NSString stringWithFormat:@"This is the text for the note %@", remoteID] forKey:@"text"]; - - return note; -} - -- (NSManagedObject *)companyWithID:(NSNumber *)remoteID - andName:(NSString *)name - inContext:(NSManagedObjectContext *)context { - NSManagedObject *company = [self entityNamed:@"Company" inContext:context]; - [company setValue:remoteID forKey:@"remoteID"]; - [company setValue:name forKey:@"name"]; - - return company; -} - -#pragma mark - hyp_fillWithDictionary - -- (void)testAllAttributes { - NSDictionary *values = @{@"integer_string" : @"16", - @"integer16" : @16, - @"integer32" : @32, - @"integer64" : @64, - @"decimal_string" : @"12.2", - @"decimal" : @12.2, - @"double_value_string": @"12.2", - @"double_value": @12.2, - @"float_value_string" : @"12.2", - @"float_value" : @12.2, - @"string" : @"string", - @"boolean" : @YES, - @"binary_data" : @"Data", - @"transformable" : @"Ignore me, too", - @"custom_transformer_string" : @"Foo & bar"}; - - [NSValueTransformer setValueTransformer:[[SyncTestValueTransformer alloc] init] forName:@"SyncTestValueTransformer"]; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *attributes = [self entityNamed:@"Attribute" inContext:dataStack.mainContext]; - [attributes hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([attributes valueForKey:@"integerString"], @16); - XCTAssertEqualObjects([attributes valueForKey:@"integer16"], @16); - XCTAssertEqualObjects([attributes valueForKey:@"integer32"], @32); - XCTAssertEqualObjects([attributes valueForKey:@"integer64"], @64); - - XCTAssertEqualObjects([attributes valueForKey:@"decimalString"], [NSDecimalNumber decimalNumberWithString:@"12.2"]); - XCTAssertEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimalString"] class]), NSStringFromClass([NSDecimalNumber class])); - XCTAssertNotEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimalString"] class]), NSStringFromClass([NSNumber class])); - - XCTAssertEqualObjects([attributes valueForKey:@"decimal"], [NSDecimalNumber decimalNumberWithString:@"12.2"]); - XCTAssertEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimal"] class]), NSStringFromClass([NSDecimalNumber class])); - XCTAssertNotEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimal"] class]), NSStringFromClass([NSNumber class])); - - XCTAssertEqualObjects([attributes valueForKey:@"doubleValueString"], @12.2); - XCTAssertEqualObjects([attributes valueForKey:@"doubleValue"], @12.2); - XCTAssertEqualWithAccuracy([[attributes valueForKey:@"floatValueString"] longValue], [@12 longValue], 1.0); - XCTAssertEqualWithAccuracy([[attributes valueForKey:@"floatValue"] longValue], [@12 longValue], 1.0); - XCTAssertEqualObjects([attributes valueForKey:@"string"], @"string"); - XCTAssertEqualObjects([attributes valueForKey:@"boolean"], @YES); - XCTAssertEqualObjects([attributes valueForKey:@"binaryData"], [NSKeyedArchiver archivedDataWithRootObject:@"Data"]); - XCTAssertNil([attributes valueForKey:@"transformable"]); - XCTAssertEqualObjects([attributes valueForKey:@"customTransformerString"], @"Foo & bar"); -} - -- (void)testAllAttributesInCamelCase { - NSDictionary *values = @{@"integerString" : @"16", - @"integer16" : @16, - @"integer32" : @32, - @"integer64" : @64, - @"decimalString" : @"12.2", - @"decimal" : @12.2, - @"doubleValueString": @"12.2", - @"doubleValue": @12.2, - @"floatValueString" : @"12.2", - @"floatValue" : @12.2, - @"string" : @"string", - @"boolean" : @YES, - @"binaryData" : @"Data", - @"transformable" : @"Ignore me, too", - @"customTransformerString" : @"Foo & bar"}; - - [NSValueTransformer setValueTransformer:[[SyncTestValueTransformer alloc] init] forName:@"SyncTestValueTransformer"]; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *attributes = [self entityNamed:@"Attribute" inContext:dataStack.mainContext]; - [attributes hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([attributes valueForKey:@"integerString"], @16); - XCTAssertEqualObjects([attributes valueForKey:@"integer16"], @16); - XCTAssertEqualObjects([attributes valueForKey:@"integer32"], @32); - XCTAssertEqualObjects([attributes valueForKey:@"integer64"], @64); - - XCTAssertEqualObjects([attributes valueForKey:@"decimalString"], [NSDecimalNumber decimalNumberWithString:@"12.2"]); - XCTAssertEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimalString"] class]), NSStringFromClass([NSDecimalNumber class])); - XCTAssertNotEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimalString"] class]), NSStringFromClass([NSNumber class])); - - XCTAssertEqualObjects([attributes valueForKey:@"decimal"], [NSDecimalNumber decimalNumberWithString:@"12.2"]); - XCTAssertEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimal"] class]), NSStringFromClass([NSDecimalNumber class])); - XCTAssertNotEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimal"] class]), NSStringFromClass([NSNumber class])); - - XCTAssertEqualObjects([attributes valueForKey:@"doubleValueString"], @12.2); - XCTAssertEqualObjects([attributes valueForKey:@"doubleValue"], @12.2); - XCTAssertEqualWithAccuracy([[attributes valueForKey:@"floatValueString"] longValue], [@12 longValue], 1.0); - XCTAssertEqualWithAccuracy([[attributes valueForKey:@"floatValue"] longValue], [@12 longValue], 1.0); - XCTAssertEqualObjects([attributes valueForKey:@"string"], @"string"); - XCTAssertEqualObjects([attributes valueForKey:@"boolean"], @YES); - XCTAssertEqualObjects([attributes valueForKey:@"binaryData"], [NSKeyedArchiver archivedDataWithRootObject:@"Data"]); - XCTAssertNil([attributes valueForKey:@"transformable"]); - XCTAssertEqualObjects([attributes valueForKey:@"customTransformerString"], @"Foo & bar"); -} - -- (void)testFillManagedObjectWithDictionary { - NSDictionary *values = @{@"first_name" : @"Jane", - @"last_name" : @"Hyperseed"}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([user valueForKey:@"firstName"], values[@"first_name"]); -} - -- (void)testUpdatingExistingValueWithNull { - NSDictionary *values = @{@"first_name" : @"Jane", - @"last_name" : @"Hyperseed"}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - NSDictionary *updatedValues = @{@"first_name" : [NSNull new], - @"last_name" : @"Hyperseed"}; - - [user hyp_fillWithDictionary:updatedValues]; - - XCTAssertNil([user valueForKey:@"firstName"]); -} - -- (void)testAgeNumber { - NSDictionary *values = @{@"age" : @24}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([user valueForKey:@"age"], values[@"age"]); -} - -- (void)testAgeString { - NSDictionary *values = @{@"age" : @"24"}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - NSNumberFormatter *formatter = [NSNumberFormatter new]; - NSNumber *age = [formatter numberFromString:values[@"age"]]; - - XCTAssertEqualObjects([user valueForKey:@"age"], age); -} - -- (void)testBornDate { - NSDictionary *values = @{@"birth_date" : @"1989-02-14T00:00:00+00:00"}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; - dateFormat.dateFormat = @"yyyy-MM-dd"; - dateFormat.timeZone = [NSTimeZone timeZoneWithName:@"GMT"]; - NSDate *date = [dateFormat dateFromString:@"1989-02-14"]; - - XCTAssertEqualObjects([user valueForKey:@"birthDate"], date); -} - -- (void)testUpdate { - NSDictionary *values = @{@"first_name" : @"Jane", - @"last_name" : @"Hyperseed", - @"age" : @30}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - NSDictionary *updatedValues = @{@"first_name" : @"Jeanet"}; - - [user hyp_fillWithDictionary:updatedValues]; - - XCTAssertEqualObjects([user valueForKey:@"firstName"], updatedValues[@"first_name"]); - - XCTAssertEqualObjects([user valueForKey:@"lastName"], values[@"last_name"]); -} - -- (void)testUpdateIgnoringEqualValues { - NSDictionary *values = @{@"first_name" : @"Jane", - @"last_name" : @"Hyperseed", - @"age" : @30}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - [user.managedObjectContext save:nil]; - - NSDictionary *updatedValues = @{@"first_name" : @"Jane", - @"last_name" : @"Hyperseed", - @"age" : @30}; - - [user hyp_fillWithDictionary:updatedValues]; - - XCTAssertFalse(user.hasChanges); -} - -- (void)testAcronyms { - NSDictionary *values = @{@"contract_id" : @100}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([user valueForKey:@"contractID"], @100); -} - -- (void)testArrayStorage { - NSDictionary *values = @{@"hobbies" : @[@"football", - @"soccer", - @"code"]}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"hobbies"]][0], @"football"); - - XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"hobbies"]][1], @"soccer"); - - XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"hobbies"]][2], @"code"); -} - -- (void)testDictionaryStorage { - NSDictionary *values = @{@"expenses" : @{@"cake" : @12.50, - @"juice" : @0.50}}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"expenses"]][@"cake"], @12.50); - - XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"expenses"]][@"juice"], @0.50); -} - -- (void)testReservedWords { - NSDictionary *values = @{@"id": @100, - @"description": @"This is the description?", - @"type": @"user type"}; - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([user valueForKey:@"remoteID"], @100); - XCTAssertEqualObjects([user valueForKey:@"userDescription"], @"This is the description?"); - XCTAssertEqualObjects([user valueForKey:@"userType"], @"user type"); -} - -- (void)testCreatedAt { - NSDictionary *values = @{@"created_at" : @"2014-01-01T00:00:00+00:00", - @"updated_at" : @"2014-01-02", - @"number_of_attendes": @20}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; - dateFormat.dateFormat = @"yyyy-MM-dd"; - dateFormat.timeZone = [NSTimeZone timeZoneWithName:@"GMT"]; - NSDate *createdAt = [dateFormat dateFromString:@"2014-01-01"]; - NSDate *updatedAt = [dateFormat dateFromString:@"2014-01-02"]; - - XCTAssertEqualObjects([user valueForKey:@"createdAt"], createdAt); - - XCTAssertEqualObjects([user valueForKey:@"updatedAt"], updatedAt); - - XCTAssertEqualObjects([user valueForKey:@"numberOfAttendes"], @20); -} - -- (void)testCustomRemoteKeys { - NSDictionary *values = @{@"age_of_person" : @20, - @"driver_identifier_str" : @"123", - @"signed" : @"salesman"}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([user valueForKey:@"age"], @20); - XCTAssertEqualObjects([user valueForKey:@"driverIdentifier"], @"123"); - XCTAssertEqualObjects([user valueForKey:@"rawSigned"], @"salesman"); -} - -- (void)testIgnoredTransformables { - NSDictionary *values = @{@"ignoreTransformable" : @"I'm going to be ignored"}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - XCTAssertNil([user valueForKey:@"ignoreTransformable"]); -} - -- (void)testRegisteredTransformables { - NSDictionary *values = @{@"registeredTransformable" : @"/Date(1451606400000)/"}; - - DataStack *dataStack = [self dataStack]; - NSManagedObject *user = [self userUsingDataStack:dataStack]; - [user hyp_fillWithDictionary:values]; - - NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; - dateFormat.dateFormat = @"yyyy-MM-dd"; - dateFormat.timeZone = [NSTimeZone timeZoneWithName:@"GMT"]; - NSDate *date = [dateFormat dateFromString:@"2016-01-01"]; - XCTAssertNotNil([user valueForKey:@"registeredTransformable"]); - XCTAssertEqualObjects([user valueForKey:@"registeredTransformable"], date); - XCTAssertTrue([[user valueForKey:@"registeredTransformable"] isKindOfClass:[NSDate class]]); -} - -- (void)testCustomKey { - DataStack *dataStack = [self dataStack]; - - NSDictionary *values = @{@"id": @"1", - @"other_attribute": @"Market 1"}; - - NSManagedObject *market = [self entityNamed:@"Market" inContext:dataStack.mainContext]; - - [market hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([market valueForKey:@"uniqueId"], @"1"); - XCTAssertEqualObjects([market valueForKey:@"otherAttribute"], @"Market 1"); -} - -- (void)testCustomKeyPathSnakeCase { - DataStack *dataStack = [self dataStack]; - - NSDictionary *values = @{@"snake_parent": @{ - @"value_one": @"Value 1", - @"depth_one": @{ - @"depth_two": @"Value 2" } - } - }; - - NSManagedObject *keyPaths = [self entityNamed:@"KeyPath" inContext:dataStack.mainContext]; - - [keyPaths hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([keyPaths valueForKey:@"snakeCaseDepthOne"], @"Value 1"); - XCTAssertEqualObjects([keyPaths valueForKey:@"snakeCaseDepthTwo"], @"Value 2"); -} - -- (void)testCustomKeyPathCamelCase { - DataStack *dataStack = [self dataStack]; - - NSDictionary *values = @{@"camelParent": @{ - @"valueOne": @"Value 1", - @"depthOne": @{ - @"depthTwo": @"Value 2" } - } - }; - - NSManagedObject *keyPaths = [self entityNamed:@"KeyPath" inContext:dataStack.mainContext]; - - [keyPaths hyp_fillWithDictionary:values]; - - XCTAssertEqualObjects([keyPaths valueForKey:@"camelCaseDepthOne"], @"Value 1"); - XCTAssertEqualObjects([keyPaths valueForKey:@"camelCaseDepthTwo"], @"Value 2"); -} - -@end diff --git a/Tests/SYNCPropertyMapper/Transformers/BadAPIValueTransformer.swift b/Tests/SYNCPropertyMapper/Transformers/BadAPIValueTransformer.swift deleted file mode 100755 index ceaaa1b9..00000000 --- a/Tests/SYNCPropertyMapper/Transformers/BadAPIValueTransformer.swift +++ /dev/null @@ -1,27 +0,0 @@ -import Foundation - -class BadAPIValueTransformer : ValueTransformer { - override class func transformedValueClass() -> AnyClass { - return String.self as! AnyClass - } - - override class func allowsReverseTransformation() -> Bool { - return true - } - - // Used to transform before inserting into Core Data using `hyp_fill(with:) - override func transformedValue(_ value: Any?) -> Any? { - guard let valueToTransform = value as? Array<String> else { - return value - } - - return valueToTransform.first! - } - - // Used to transform before exporting into JSON using `hyp_dictionary` - override func reverseTransformedValue(_ value: Any?) -> Any? { - guard let stringValue = value as? String else { return value } - - return [stringValue] - } -} diff --git a/Tests/SYNCPropertyMapper/Transformers/DateStringTransformer.h b/Tests/SYNCPropertyMapper/Transformers/DateStringTransformer.h deleted file mode 100755 index 7fd1227e..00000000 --- a/Tests/SYNCPropertyMapper/Transformers/DateStringTransformer.h +++ /dev/null @@ -1,8 +0,0 @@ -@import Foundation; - -/** - This class is transforming "/Date(1460537233000)/" string into an NSDate object that can be stored in Core Data - */ -@interface DateStringTransformer : NSValueTransformer - -@end diff --git a/Tests/SYNCPropertyMapper/Transformers/DateStringTransformer.m b/Tests/SYNCPropertyMapper/Transformers/DateStringTransformer.m deleted file mode 100755 index 40242457..00000000 --- a/Tests/SYNCPropertyMapper/Transformers/DateStringTransformer.m +++ /dev/null @@ -1,26 +0,0 @@ -#import "DateStringTransformer.h" - -@implementation DateStringTransformer - -+ (Class) transformedValueClass { - return [NSDate class]; -} - -+ (BOOL)allowsReverseTransformation { - return NO; -} - -- (nullable id)transformedValue:(nullable id)value { - if ([value isKindOfClass:[NSString class]]) { - // in this example string should be of "/Date(1460537233000)/" format - NSString *intStr = [[(NSString*)value stringByReplacingOccurrencesOfString:@"/Date(" withString:@""] stringByReplacingOccurrencesOfString:@")/" withString:@""]; - NSInteger timestampMS = [intStr integerValue]; - float timestamp = timestampMS / 1000.0; - NSDate *date = [[NSDate alloc] initWithTimeIntervalSince1970:timestamp]; - return date; - } else { - return value; - } -} - -@end diff --git a/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.h b/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.h deleted file mode 100755 index 9ae32ca4..00000000 --- a/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.h +++ /dev/null @@ -1,5 +0,0 @@ -@import Foundation; - -@interface SyncTestValueTransformer : NSValueTransformer - -@end diff --git a/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.m b/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.m deleted file mode 100755 index 8c331fc4..00000000 --- a/Tests/SYNCPropertyMapper/Transformers/SyncTestValueTransformer.m +++ /dev/null @@ -1,43 +0,0 @@ -#import "SyncTestValueTransformer.h" - -@implementation SyncTestValueTransformer - -+ (Class)transformedValueClass { - return [NSString class]; -} - -+ (BOOL)allowsReverseTransformation { - return YES; -} - -- (id)transformedValue:(id)value { - if (value == nil) return nil; - - NSString *stringValue = nil; - - if ([value isKindOfClass:[NSString class]]) { - stringValue = (NSString *)value; - } else { - [NSException raise:NSInternalInconsistencyException - format:@"Value (%@) is not of type NSString.", [value class]]; - } - - return [stringValue stringByReplacingOccurrencesOfString:@"&" withString:@"&"]; -} - -- (id)reverseTransformedValue:(id)value { - if (value == nil) return nil; - - NSString *stringValue = nil; - - if ([value isKindOfClass:[NSString class]]) { - stringValue = (NSString *)value; - } else { - [NSException raise:NSInternalInconsistencyException - format:@"Value (%@) is not of type NSString.", [value class]]; - } - - return [stringValue stringByReplacingOccurrencesOfString:@"&" withString:@"&"]; -} - -@end diff --git a/Tests/Sync/DeleteTests.swift b/Tests/Sync/DeleteTests.swift deleted file mode 100644 index 0de92435..00000000 --- a/Tests/Sync/DeleteTests.swift +++ /dev/null @@ -1,32 +0,0 @@ -import XCTest - -import CoreData -import Sync - -class DeleteTests: XCTestCase { - func testDeleteWithStringID() { - let dataStack = Helper.dataStackWithModelName("id") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) - user.setValue("id", forKey: "id") - try! dataStack.mainContext.save() - - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - try! Sync.delete("id", inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(0, Helper.countForEntity("User", inContext: dataStack.mainContext)) - - dataStack.drop() - } - - func testDeleteWithNumberID() { - let dataStack = Helper.dataStackWithModelName("Tests") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) - user.setValue(1, forKey: "remoteID") - try! dataStack.mainContext.save() - - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - try! Sync.delete(1, inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(0, Helper.countForEntity("User", inContext: dataStack.mainContext)) - - dataStack.drop() - } -} diff --git a/Tests/Sync/FetchTests.swift b/Tests/Sync/FetchTests.swift deleted file mode 100644 index 95ee33c3..00000000 --- a/Tests/Sync/FetchTests.swift +++ /dev/null @@ -1,27 +0,0 @@ -import XCTest - -import CoreData -import Sync - -class FetchTests: XCTestCase { - func testFetch() { - let dataStack = Helper.dataStackWithModelName("id") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) - user.setValue("id", forKey: "id") - user.setValue("dada", forKey: "name") - try! dataStack.mainContext.save() - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - - let fetched = try! Sync.fetch("id", inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(fetched?.value(forKey: "id") as? String, "id") - XCTAssertEqual(fetched?.value(forKey: "name") as? String, "dada") - - try! Sync.delete("id", inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(0, Helper.countForEntity("User", inContext: dataStack.mainContext)) - - let newFetched = try! Sync.fetch("id", inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertNil(newFetched) - - dataStack.drop() - } -} diff --git a/Tests/Sync/Helpers/Helper.swift b/Tests/Sync/Helpers/Helper.swift deleted file mode 100644 index 77525ed0..00000000 --- a/Tests/Sync/Helpers/Helper.swift +++ /dev/null @@ -1,74 +0,0 @@ -import XCTest -import CoreData -import Sync - -@objc class Helper: NSObject { - class func objectsFromJSON(_ fileName: String) -> Any { - let bundle = Bundle(for: Helper.self) - let objects = try! JSON.from(fileName, bundle: bundle)! - - return objects - } - - class func dataStackWithModelName(_ modelName: String) -> DataStack { - let bundle = Bundle(for: Helper.self) - let dataStack = DataStack(modelName: modelName, bundle: bundle, storeType: .sqLite) - - return dataStack - } - - @available(iOS 10, watchOS 3, tvOS 10, OSX 10.12, *) - class func persistentStoreWithModelName(_ modelName: String) -> NSPersistentContainer { - let momdModelURL = Bundle(for: NSPersistentContainerTests.self).url(forResource: modelName, withExtension: "momd")! - let model = NSManagedObjectModel(contentsOf: momdModelURL)! - let persistentContainer = NSPersistentContainer(name: modelName, managedObjectModel: model) - try! persistentContainer.persistentStoreCoordinator.addPersistentStore(ofType: NSInMemoryStoreType, configurationName: nil, at: nil, options: nil) - - return persistentContainer - } - - class func countForEntity(_ entityName: String, inContext context: NSManagedObjectContext) -> Int { - return self.countForEntity(entityName, predicate: nil, inContext: context) - } - - class func countForEntity(_ entityName: String, predicate: NSPredicate?, inContext context: NSManagedObjectContext) -> Int { - let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: entityName) - fetchRequest.predicate = predicate - let count = try! context.count(for: fetchRequest) - - return count - } - - class func fetchEntity(_ entityName: String, inContext context: NSManagedObjectContext) -> [NSManagedObject] { - return self.fetchEntity(entityName, predicate: nil, sortDescriptors: nil, inContext: context) - } - - class func fetchEntity(_ entityName: String, predicate: NSPredicate?, inContext context: NSManagedObjectContext) -> [NSManagedObject] { - return self.fetchEntity(entityName, predicate: predicate, sortDescriptors: nil, inContext: context) - } - - class func fetchEntity(_ entityName: String, sortDescriptors: [NSSortDescriptor]?, inContext context: NSManagedObjectContext) -> [NSManagedObject] { - return self.fetchEntity(entityName, predicate: nil, sortDescriptors: sortDescriptors, inContext: context) - } - - class func fetchEntity(_ entityName: String, predicate: NSPredicate?, sortDescriptors: [NSSortDescriptor]?, inContext context: NSManagedObjectContext) -> [NSManagedObject] { - let request = NSFetchRequest<NSFetchRequestResult>(entityName: entityName) - request.predicate = predicate - request.sortDescriptors = sortDescriptors - let objects = try! context.fetch(request) as? [NSManagedObject] ?? [NSManagedObject]() - - return objects - } - - class func dataStackWithModelName(_ modelName: String, storeType: DataStackStoreType = .sqLite) -> DataStack { - let bundle = Bundle(for: Helper.self) - let dataStack = DataStack(modelName: modelName, bundle: bundle, storeType: storeType) - return dataStack - } - - class func insertEntity(_ name: String, dataStack: DataStack) -> NSManagedObject { - let entity = NSEntityDescription.entity(forEntityName: name, in: dataStack.mainContext)! - return NSManagedObject(entity: entity, insertInto: dataStack.mainContext) - } - -} diff --git a/Tests/Sync/InsertOrUpdateTests.swift b/Tests/Sync/InsertOrUpdateTests.swift deleted file mode 100644 index 6606619f..00000000 --- a/Tests/Sync/InsertOrUpdateTests.swift +++ /dev/null @@ -1,54 +0,0 @@ -import XCTest - -import CoreData -import Sync - -class InsertOrUpdateTests: XCTestCase { - func testInsertOrUpdateWithStringID() { - let dataStack = Helper.dataStackWithModelName("id") - let json = ["id": "id", "name": "name"] - let insertedObject = try! Sync.insertOrUpdate(json, inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - - XCTAssertEqual(insertedObject.value(forKey: "id") as? String, "id") - XCTAssertEqual(insertedObject.value(forKey: "name") as? String, "name") - - if let object = Helper.fetchEntity("User", inContext: dataStack.mainContext).first { - XCTAssertEqual(object.value(forKey: "id") as? String, "id") - XCTAssertEqual(object.value(forKey: "name") as? String, "name") - } else { - XCTFail() - } - dataStack.drop() - } - - func testInsertOrUpdateWithNumberID() { - let dataStack = Helper.dataStackWithModelName("Tests") - let json = ["id": 1] - try! Sync.insertOrUpdate(json, inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - dataStack.drop() - } - - func testInsertOrUpdateUpdate() { - let dataStack = Helper.dataStackWithModelName("id") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) - user.setValue("id", forKey: "id") - user.setValue("old", forKey: "name") - try! dataStack.mainContext.save() - - let json = ["id": "id", "name": "new"] - let updatedObject = try! Sync.insertOrUpdate(json, inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(updatedObject.value(forKey: "id") as? String, "id") - XCTAssertEqual(updatedObject.value(forKey: "name") as? String, "new") - - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - if let object = Helper.fetchEntity("User", inContext: dataStack.mainContext).first { - XCTAssertEqual(object.value(forKey: "id") as? String, "id") - XCTAssertEqual(object.value(forKey: "name") as? String, "new") - } else { - XCTFail() - } - dataStack.drop() - } -} diff --git a/Tests/Sync/JSONs/151-many-to-many-notes-update.json b/Tests/Sync/JSONs/151-many-to-many-notes-update.json deleted file mode 100644 index eb3e2c90..00000000 --- a/Tests/Sync/JSONs/151-many-to-many-notes-update.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "id": 0, - "name": "Note 0", - "tags_ids": ["0"] - }, - { - "id": 1, - "name": "Note 1", - "tags_ids": [] - }, - { - "id": 2, - "name": "Note 2", - "tags_ids": ["0", "1"] - }, - { - "id": 3, - "name": "Note 3", - "tags_ids": null - } -] diff --git a/Tests/Sync/JSONs/151-many-to-many-notes.json b/Tests/Sync/JSONs/151-many-to-many-notes.json deleted file mode 100644 index f6146450..00000000 --- a/Tests/Sync/JSONs/151-many-to-many-notes.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "id": 0, - "name": "Note 0", - "tags_ids": ["0", "1"] - }, - { - "id": 1, - "name": "Note 1", - "tags_ids": ["0"] - }, - { - "id": 2, - "name": "Note 2", - "tags_ids": [] - }, - { - "id": 3, - "name": "Note 3", - "tags_ids": ["1"] - } -] diff --git a/Tests/Sync/JSONs/151-many-to-many-tags.json b/Tests/Sync/JSONs/151-many-to-many-tags.json deleted file mode 100644 index dafd7c65..00000000 --- a/Tests/Sync/JSONs/151-many-to-many-tags.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": "0", - "name": "#yolo" - }, - { - "id": "1", - "name": "#nofilter" - } -] diff --git a/Tests/Sync/JSONs/151-to-many-notes.json b/Tests/Sync/JSONs/151-to-many-notes.json deleted file mode 100644 index 18ad8b7b..00000000 --- a/Tests/Sync/JSONs/151-to-many-notes.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": 0, - "name": "Note 0" - }, - { - "id": 1, - "name": "Note 1" - }, - { - "id": 2, - "name": "Note 2" - } -] diff --git a/Tests/Sync/JSONs/151-to-many-users-update.json b/Tests/Sync/JSONs/151-to-many-users-update.json deleted file mode 100644 index 8d560f79..00000000 --- a/Tests/Sync/JSONs/151-to-many-users-update.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "id": 10, - "name": "User 10", - "notes_ids": [] - }, - { - "id": 11, - "name": "User 11", - "notes_ids": [2] - }, - { - "id": 12, - "name": "User 12", - "notes_ids": [0, 1] - } -] diff --git a/Tests/Sync/JSONs/151-to-many-users.json b/Tests/Sync/JSONs/151-to-many-users.json deleted file mode 100644 index 36431754..00000000 --- a/Tests/Sync/JSONs/151-to-many-users.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "id": 10, - "name": "User 10", - "notes_ids": [0, 1] - }, - { - "id": 11, - "name": "User 11", - "notes_ids": [2] - }, - { - "id": 12, - "name": "User 12", - "notes_ids": [] - } -] diff --git a/Tests/Sync/JSONs/157-cities.json b/Tests/Sync/JSONs/157-cities.json deleted file mode 100644 index 30bf476b..00000000 --- a/Tests/Sync/JSONs/157-cities.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": 0, - "name": "Oslo" - }, - { - "id": 1, - "name": "Paris" - }, - { - "id": 2, - "name": "Berlin" - } -] diff --git a/Tests/Sync/JSONs/157-locations-update.json b/Tests/Sync/JSONs/157-locations-update.json deleted file mode 100644 index 4d6a6805..00000000 --- a/Tests/Sync/JSONs/157-locations-update.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "id": 0, - "name": "Mesh", - "city_id": null - }, - { - "id": 1, - "name": "Makerspace", - "city_id": 0 - }, - { - "id": 2, - "name": "WorldHack", - "city_id": 1 - } -] diff --git a/Tests/Sync/JSONs/157-locations.json b/Tests/Sync/JSONs/157-locations.json deleted file mode 100644 index a412192c..00000000 --- a/Tests/Sync/JSONs/157-locations.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "id": 0, - "name": "Mesh", - "city_id": 0 - }, - { - "id": 1, - "name": "Makerspace", - "city_id": 1 - }, - { - "id": 2, - "name": "WorldHack", - "city_id": null - } -] diff --git a/Tests/Sync/JSONs/225-a-empty.json b/Tests/Sync/JSONs/225-a-empty.json deleted file mode 100755 index e59f15ad..00000000 --- a/Tests/Sync/JSONs/225-a-empty.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "id": 1, - "tags": [] - } -] diff --git a/Tests/Sync/JSONs/225-a-null.json b/Tests/Sync/JSONs/225-a-null.json deleted file mode 100755 index 130b63a5..00000000 --- a/Tests/Sync/JSONs/225-a-null.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "id": 1, - "tags": null - } -] diff --git a/Tests/Sync/JSONs/225-a-replaced.json b/Tests/Sync/JSONs/225-a-replaced.json deleted file mode 100755 index 5a675570..00000000 --- a/Tests/Sync/JSONs/225-a-replaced.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": 1, - "tags": [ - { - "id": 20 - } - ] - } -] diff --git a/Tests/Sync/JSONs/225-a.json b/Tests/Sync/JSONs/225-a.json deleted file mode 100755 index 0b5fae8d..00000000 --- a/Tests/Sync/JSONs/225-a.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": 1, - "tags": [ - { - "id": 10 - } - ] - } -] diff --git a/Tests/Sync/JSONs/233.json b/Tests/Sync/JSONs/233.json deleted file mode 100644 index 8c003be1..00000000 --- a/Tests/Sync/JSONs/233.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "id": 1, - "slides_ids": [ 2, 1 ] - } -] diff --git a/Tests/Sync/JSONs/237.json b/Tests/Sync/JSONs/237.json deleted file mode 100644 index aeefe0b4..00000000 --- a/Tests/Sync/JSONs/237.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "id": 1, - "slides": [ - { - "id": 2 - }, - { - "id": 1 - } - ] - } -] diff --git a/Tests/Sync/JSONs/265.json b/Tests/Sync/JSONs/265.json deleted file mode 100644 index 671ac805..00000000 --- a/Tests/Sync/JSONs/265.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "id": 1, - "player_group": { - "id": 1, - "players": [ - { - "id": 1 - } - ] - } - } -] diff --git a/Tests/Sync/JSONs/277.json b/Tests/Sync/JSONs/277.json deleted file mode 100755 index 6ffde54d..00000000 --- a/Tests/Sync/JSONs/277.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "id": 31, - "passengers": [ - { - "id": 22 - } - ] - }, - { - "id": 32, - "passengers": [ - { - "id": 22 - } - ] - } -] diff --git a/Tests/Sync/JSONs/280.json b/Tests/Sync/JSONs/280.json deleted file mode 100644 index 4ce2540b..00000000 --- a/Tests/Sync/JSONs/280.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "busID": "0", - "stops": [ - { - "index": "0", - } - ], - "polyline": [ - { - "index": "0", - } - ] - } -] diff --git a/Tests/Sync/JSONs/283.json b/Tests/Sync/JSONs/283.json deleted file mode 100644 index ee15816f..00000000 --- a/Tests/Sync/JSONs/283.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "id": "0", - "owner": { - "id": "a" - } - } -] diff --git a/Tests/Sync/JSONs/320.json b/Tests/Sync/JSONs/320.json deleted file mode 100644 index 71f99820..00000000 --- a/Tests/Sync/JSONs/320.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "id": 1, - "tag": null - } -] diff --git a/Tests/Sync/JSONs/3ca82a0.json b/Tests/Sync/JSONs/3ca82a0.json deleted file mode 100644 index 9ddca929..00000000 --- a/Tests/Sync/JSONs/3ca82a0.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "id": 1, - "tags": [ - { - "id": 6 - }, - ] - }, - { - "id": 2, - "tags": [ - { - "id": 6 - }, - ] - } -] diff --git a/Tests/Sync/JSONs/bug-113-comments-no-id.json b/Tests/Sync/JSONs/bug-113-comments-no-id.json deleted file mode 100644 index 371de465..00000000 --- a/Tests/Sync/JSONs/bug-113-comments-no-id.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "body":"comment 1", - "awesome_comments":[ - { - "body":"sub-comment 1" - }, - { - "body":"sub-comment 2" - }, - { - "body":"sub-comment 3" - } - ] - }, - { - "body":"comment 2", - "awesome_comments":[ - { - "body":"sub-comment 4" - }, - { - "body":"sub-comment 5" - }, - { - "body":"sub-comment 6" - } - ] - } -] diff --git a/Tests/Sync/JSONs/bug-113-custom_relationship_key_to_one.json b/Tests/Sync/JSONs/bug-113-custom_relationship_key_to_one.json deleted file mode 100755 index ff2beca4..00000000 --- a/Tests/Sync/JSONs/bug-113-custom_relationship_key_to_one.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "id":50, - "title":"Fairy tale", - "summarize_text":{ - "body":"Body of tale" - } - } -] diff --git a/Tests/Sync/JSONs/bug-113-stories-comments-no-ids.json b/Tests/Sync/JSONs/bug-113-stories-comments-no-ids.json deleted file mode 100644 index 3c2c974b..00000000 --- a/Tests/Sync/JSONs/bug-113-stories-comments-no-ids.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "id":0, - "title":"story 1", - "awesome_comments":[ - { - "body":"comment 1" - }, - { - "body":"comment 2" - }, - { - "body":"comment 3" - } - ] - }, - { - "id":1, - "title":"story 2", - "awesome_comments":[ - { - "body":"comment 1" - }, - { - "body":"comment 2" - }, - { - "body":"comment 3" - } - ] - }, - { - "id":2, - "title":"story 3", - "awesome_comments":[ - { - "body":"comment 1" - }, - { - "body":"comment 2" - }, - { - "body":"comment 3" - } - ] - } -] diff --git a/Tests/Sync/JSONs/bug-125-light.json b/Tests/Sync/JSONs/bug-125-light.json deleted file mode 100644 index 2f7e3bd0..00000000 --- a/Tests/Sync/JSONs/bug-125-light.json +++ /dev/null @@ -1,38 +0,0 @@ - -{ - "element":{ - "elements":[ - { - "elements":[ - { - "elements":[], - "items":[ - { - "value":"option1" - } - ], - "label":"Any Single Select" - } - ], - "items":[], - "label":"Any Group" - } - ], - "items":[], - "label":"Any Form" - }, - "model":{ - "uri":"http://tempuri.org/any/path/mymodel/1.0/", - "properties":[ - { - "id":"anyString", - "restrictions":[ - { - "restriction":"enumeration" - } - ] - } - ] - }, - "uri":"http://tempuri.org/any/path/mydescriptor/1.2?language=en-US" -} diff --git a/Tests/Sync/JSONs/bug-125.json b/Tests/Sync/JSONs/bug-125.json deleted file mode 100644 index 8711ae2c..00000000 --- a/Tests/Sync/JSONs/bug-125.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "uri":"http://tempuri.org/any/path/mydescriptor/1.2?language=en-US", - "type":"http://tempuri.org/any/path/mydescriptor/", - "version":"1.2", - "language":"en-US", - "element":{ - "type":"group", - "label":"Any Form", - "elements":[ - { - "type":"input", - "label":"Any Input", - "reference":"anyInteger", - "inputConfiguration":{ - "justAHint":[ - "a", - "b", - "c" - ] - } - }, - { - "type":"group", - "label":"Any Group", - "elements":[ - { - "type":"selectSingle", - "label":"Any Single Select", - "reference":"anyString", - "selection":"closed", - "items":[ - { - "value":"option1", - "label":"Option One" - }, - { - "value":"option2", - "label":"Option Two" - } - ] - }, - { - "type":"selectMultiple", - "label":"Any Multiple Select", - "reference":"anyString", - "selection":"open", - "items":[ - { - "value":"option3", - "label":"Option Three", - "aliasLabels":[ - { - "label":"Option Three A" - }, - { - "label":"Option Three B" - } - ] - }, - { - "value":"option4", - "label":"Option Four" - } - ] - } - ] - }, - { - "type":"textArea", - "label":"Any Text Area", - "reference":"anyString", - "comment":"This is a Comment for Any Text Area" - }, - { - "type":"image", - "label":"Any Image", - "reference":"anyMultimedia", - "maximumFileSize":12000 - }, - { - "type":"location", - "label":"Any Address Location", - "reference":"anyString", - "locationRepresentation":"address" - }, - { - "type":"custom", - "label":"Any Custom", - "reference":"anyString", - "customType":"http://tempuri.org/path/to/custom/element" - }, - { - "type":"input", - "label":"Any Input With Keyboard", - "reference":"anyString" - }, - { - "type":"form", - "label":"Any Form Link", - "formURI":"http://tempuri.org/path/to/another/form" - } - ] - }, - "model":{ - "uri":"http://tempuri.org/any/path/mymodel/1.0/", - "type":"http://tempuri.org/any/path/mymodel/", - "version":"1.0", - "properties":[ - { - "id":"anyString", - "type":"string", - "restrictions":[ - { - "restriction":"enumeration", - "items":[ - "option1", - "option2", - "option3" - ] - } - ] - }, - { - "id":"anyBoolean", - "type":"boolean", - "restrictions":[ - { - "restriction":"minLength", - "value":2 - }, - { - "restriction":"maxLength", - "value":50 - } - ] - }, - { - "id":"anyDecimal", - "type":"decimal" - }, - { - "id":"anyInteger", - "type":"integer" - }, - { - "id":"anyDateTime", - "type":"dateTime" - }, - { - "id":"anyDate", - "type":"date" - }, - { - "id":"anyDuration", - "type":"duration" - }, - { - "id":"anyMultimedia", - "type":"multimedia" - }, - { - "id":"anyLocation", - "type":"location" - } - ] - } -} diff --git a/Tests/Sync/JSONs/bug-179-places.json b/Tests/Sync/JSONs/bug-179-places.json deleted file mode 100644 index 20334741..00000000 --- a/Tests/Sync/JSONs/bug-179-places.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "name" : "Here", - }, - { - "name" : "There" - } - ] \ No newline at end of file diff --git a/Tests/Sync/JSONs/bug-179-routes.json b/Tests/Sync/JSONs/bug-179-routes.json deleted file mode 100644 index b0240b9b..00000000 --- a/Tests/Sync/JSONs/bug-179-routes.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "ident" : "1", - "start" : "Here", - "end" : "There" -} \ No newline at end of file diff --git a/Tests/Sync/JSONs/bug-202-a.json b/Tests/Sync/JSONs/bug-202-a.json deleted file mode 100644 index 0fea280e..00000000 --- a/Tests/Sync/JSONs/bug-202-a.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "id": "1", - "name": "First", - "favorite_tags": [ - { - "id": "1", - "hashtag": "#first" - } - ] - } -] diff --git a/Tests/Sync/JSONs/bug-202-b.json b/Tests/Sync/JSONs/bug-202-b.json deleted file mode 100644 index f9c3cc6b..00000000 --- a/Tests/Sync/JSONs/bug-202-b.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "id": "1", - "name": "First", - "favorite_tags": [] - } -] diff --git a/Tests/Sync/JSONs/bug-239.json b/Tests/Sync/JSONs/bug-239.json deleted file mode 100755 index 3e92ed3e..00000000 --- a/Tests/Sync/JSONs/bug-239.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "id": 31, - "max_speed": 370, - "passengers": [ - { - "id": 22, - "name": "Jenson Button" - }, - { - "id": 7, - "name": "Kimi Raikkonen" - } - ] - } -] diff --git a/Tests/Sync/JSONs/bug-254.json b/Tests/Sync/JSONs/bug-254.json deleted file mode 100644 index 6242a81a..00000000 --- a/Tests/Sync/JSONs/bug-254.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": 0, - "residents": [ - { - "id": 0 - } - ] -} diff --git a/Tests/Sync/JSONs/bug-257.json b/Tests/Sync/JSONs/bug-257.json deleted file mode 100644 index e7c5aaa6..00000000 --- a/Tests/Sync/JSONs/bug-257.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "_id" : "4yCb6LwmqwM2gnyWA", - "workoutName" : "Test new training program", - "workoutDesc" : "<p>Description</p>", - "workoutExercises" : [ - { - "_id" : "6JDa8DFBe8K6Kkguw", - "exerciseName" : "Exercise 1", - "exerciseDesc" : "Description exercise 1", - "mainMuscle" : "Biceps", - "mechanicsType" : "Pull" - }, - { - "_id" : "Lx5mZNG5iGRagmtS4", - "exerciseName" : "Exercise 2", - "exerciseDesc" : "Description exercise 2", - "mainMuscle" : "Abs", - "mechanicsType" : "crunch" - } - ] -} diff --git a/Tests/Sync/JSONs/bug-number-84.json b/Tests/Sync/JSONs/bug-number-84.json deleted file mode 100644 index a9ebf1e9..00000000 --- a/Tests/Sync/JSONs/bug-number-84.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "xid": "mstaff_F58dVBTsXznvMpCPmpQgyV", - "image": "a.jpg", - "fulfillers": [ - { - "xid": "ffr_AkAHQegYkrobp5xc2ySc5D", - "name": "New York" - }, - { - "xid": "ffr_n5eGjfHQRqKr4tAfL7RNi9", - "name": "Chicago" - } - ] - } -] diff --git a/Tests/Sync/JSONs/camelcase.json b/Tests/Sync/JSONs/camelcase.json deleted file mode 100644 index 093688ce..00000000 --- a/Tests/Sync/JSONs/camelcase.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "id": "1", - "numberOfChildren": 1, - "fullName": "Elvis Nuñez", - "first_name": "Elvis", - "last_name": "Nuñez" - } -] diff --git a/Tests/Sync/JSONs/comments-no-id.json b/Tests/Sync/JSONs/comments-no-id.json deleted file mode 100644 index fe3fc540..00000000 --- a/Tests/Sync/JSONs/comments-no-id.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "body":"comment 1", - "comments":[ - { - "body":"sub-comment 1" - }, - { - "body":"sub-comment 2" - }, - { - "body":"sub-comment 3" - } - ] - }, - { - "body":"comment 2", - "comments":[ - { - "body":"sub-comment 4" - }, - { - "body":"sub-comment 5" - }, - { - "body":"sub-comment 6" - } - ] - } -] diff --git a/Tests/Sync/JSONs/custom_relationship_key_to_many.json b/Tests/Sync/JSONs/custom_relationship_key_to_many.json deleted file mode 100755 index f1d50565..00000000 --- a/Tests/Sync/JSONs/custom_relationship_key_to_many.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "id":10, - "name":"Legen Dary", - "email":"awesome@ness.com", - "created_at":"2014-02-14T00:00:00+00:00", - "updated_at":"2014-02-17T00:00:00+00:00", - "annotations":[ - { - "id":30 - }, - { - "id":50 - }, - { - "id":70 - } - ] - } -] diff --git a/Tests/Sync/JSONs/custom_relationship_key_to_one.json b/Tests/Sync/JSONs/custom_relationship_key_to_one.json deleted file mode 100755 index ff2beca4..00000000 --- a/Tests/Sync/JSONs/custom_relationship_key_to_one.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "id":50, - "title":"Fairy tale", - "summarize_text":{ - "body":"Body of tale" - } - } -] diff --git a/Tests/Sync/JSONs/id.json b/Tests/Sync/JSONs/id.json deleted file mode 100755 index 5cd7db89..00000000 --- a/Tests/Sync/JSONs/id.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": "a", - "name": "Legen Dary" - }, - { - "id": "b", - "name": "Wait Forit" - } -] diff --git a/Tests/Sync/JSONs/images.json b/Tests/Sync/JSONs/images.json deleted file mode 100644 index ffd6c697..00000000 --- a/Tests/Sync/JSONs/images.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "ImageId": 0, - "url": "http://sample.com/sample0.png" - }, - { - "ImageId": 1, - "url": "http://sample.com/sample1.png" - }, - { - "ImageId": 2, - "url": "http://sample.com/sample2.png" - } -] diff --git a/Tests/Sync/JSONs/markets_items.json b/Tests/Sync/JSONs/markets_items.json deleted file mode 100644 index 4f0f3e3f..00000000 --- a/Tests/Sync/JSONs/markets_items.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "id": "1", - "other_attribute": "Market 1", - "items": [ - { - "id": "1", - "other_attribute": "Item 1" - } - ] - }, - { - "id": "2", - "other_attribute": "Market 2", - "items": [ - { - "id": "1", - "other_attribute": "Item 1" - } - ] - } -] diff --git a/Tests/Sync/JSONs/notes_for_user_a.json b/Tests/Sync/JSONs/notes_for_user_a.json deleted file mode 100644 index d751b578..00000000 --- a/Tests/Sync/JSONs/notes_for_user_a.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "id": 0, - }, - { - "id": 1, - } -] diff --git a/Tests/Sync/JSONs/notes_with_user_id.json b/Tests/Sync/JSONs/notes_with_user_id.json deleted file mode 100644 index 643174e7..00000000 --- a/Tests/Sync/JSONs/notes_with_user_id.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "id": 0, - "text": "Melisa White's diary, episode 0", - "super_user_id": 0 - }, - { - "id": 1, - "text": "Melisa White's diary, episode 1", - "super_user_id": 0 - }, - { - "id": 2, - "text": "Melisa White's diary, episode 2", - "super_user_id": 0 - }, - { - "id": 3, - "text": "Glass Oconnor's diary, episode 0", - "super_user_id": 1 - }, - { - "id": 4, - "text": "Glass Oconnor's diary, episode 1", - "super_user_id": 1 - } -] diff --git a/Tests/Sync/JSONs/notes_with_user_id_custom.json b/Tests/Sync/JSONs/notes_with_user_id_custom.json deleted file mode 100644 index e52c13f5..00000000 --- a/Tests/Sync/JSONs/notes_with_user_id_custom.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "id": 0, - "text": "Melisa White's diary, episode 0", - "super_user": 0 - }, - { - "id": 1, - "text": "Melisa White's diary, episode 1", - "super_user": 0 - }, - { - "id": 2, - "text": "Melisa White's diary, episode 2", - "super_user": 0 - }, - { - "id": 3, - "text": "Glass Oconnor's diary, episode 0", - "super_user": 1 - }, - { - "id": 4, - "text": "Glass Oconnor's diary, episode 1", - "super_user": 1 - } -] diff --git a/Tests/Sync/JSONs/numbers.json b/Tests/Sync/JSONs/numbers.json deleted file mode 100644 index fa7e6a38..00000000 --- a/Tests/Sync/JSONs/numbers.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "id": 0, - "values": 10, - "numbers": [ - { - "id": 1, - "values": 11, - }, - { - "id": 2, - "values": 12, - }] - }, - { - "id": 10, - "values": 20, - "numbers": [ - { - "id": 11, - "values": 21, - }, - { - "id": 12, - "values": 22, - }] - }, -] diff --git a/Tests/Sync/JSONs/numbers_in_collection.json b/Tests/Sync/JSONs/numbers_in_collection.json deleted file mode 100644 index a651d481..00000000 --- a/Tests/Sync/JSONs/numbers_in_collection.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": 0, - "values": 10, - "parent" : - { - "name": "Collection 1" - } - } -] diff --git a/Tests/Sync/JSONs/operation-types-users-a.json b/Tests/Sync/JSONs/operation-types-users-a.json deleted file mode 100644 index 95783f6e..00000000 --- a/Tests/Sync/JSONs/operation-types-users-a.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "id": 0, - "name": "Melisa White", - "email": "melisawhite@ovium.com" - }, - { - "id": 1, - "name": "Glass Oconnor", - "email": "glassoconnor@ovium.com" - } -] diff --git a/Tests/Sync/JSONs/operation-types-users-b.json b/Tests/Sync/JSONs/operation-types-users-b.json deleted file mode 100644 index 841f04a0..00000000 --- a/Tests/Sync/JSONs/operation-types-users-b.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "id": 0, - "name": "Melisa White", - "email": "updated@ovium.com" - }, - { - "id": 6, - "name": "Shawn Merrill", - "email": "shawnmerrill@ovium.com" - } -] diff --git a/Tests/Sync/JSONs/organizations-tree.json b/Tests/Sync/JSONs/organizations-tree.json deleted file mode 100644 index ec29bb28..00000000 --- a/Tests/Sync/JSONs/organizations-tree.json +++ /dev/null @@ -1,39 +0,0 @@ -[ - { - "id" : 1, - "name" : "Org 1", - "children" : [ - { - "id" : 11, - "name" : "Org 11", - "children" : [ - { - "id" : 111, - "name" : "Org 111", - "children" : [ - { - "id" : 1106, - "name" : "Org 1106" - }, - { - "id" : 1131, - "name" : "Org 1131" - } - ] - }, - { - "id" : 112, - "name" : "Org 1213", - "children" : [ - { - "id" : 1114, - "name" : "Org 12132" - } - ] - } - ] - } - ] - } -] - \ No newline at end of file diff --git a/Tests/Sync/JSONs/patients.json b/Tests/Sync/JSONs/patients.json deleted file mode 100644 index 6604c7d3..00000000 --- a/Tests/Sync/JSONs/patients.json +++ /dev/null @@ -1,42 +0,0 @@ -[ - { - "id": 0, - "text": "Melisa White", - "baselines": [ - { - "id": 0, - "text": "Baseline 1" - } - ], - "alcohols": [ - { - "id": 0, - "text": "Alcohol 1", - "measure": { - "id": 0, - "text": "Alcohol Measure 1" - } - } - ], - "fitnesses": [ - { - "id": 0, - "text": "Fitness 1", - "measure": { - "id": 0, - "text": "Fitness Measure 1" - } - } - ], - "weights": [ - { - "id": 0, - "text": "Weight 1", - "measure": { - "id": 0, - "text": "Weight Measure 1" - } - } - ] - } -] diff --git a/Tests/Sync/JSONs/stories-comments-no-ids.json b/Tests/Sync/JSONs/stories-comments-no-ids.json deleted file mode 100644 index cdc7eea8..00000000 --- a/Tests/Sync/JSONs/stories-comments-no-ids.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "id":0, - "title":"story 1", - "comments":[ - { - "body":"comment 1" - }, - { - "body":"comment 2" - }, - { - "body":"comment 3" - } - ] - }, - { - "id":1, - "title":"story 2", - "comments":[ - { - "body":"comment 1" - }, - { - "body":"comment 2" - }, - { - "body":"comment 3" - } - ] - }, - { - "id":2, - "title":"story 3", - "comments":[ - { - "body":"comment 1" - }, - { - "body":"comment 2" - }, - { - "body":"comment 3" - } - ] - } -] diff --git a/Tests/Sync/JSONs/story-summarize.json b/Tests/Sync/JSONs/story-summarize.json deleted file mode 100644 index a97d2779..00000000 --- a/Tests/Sync/JSONs/story-summarize.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id":1, - "summarize_text":{ - "id":1 - }, - "comments":[ - { - "body":"Hi" - } - ] -} diff --git a/Tests/Sync/JSONs/tagged_notes.json b/Tests/Sync/JSONs/tagged_notes.json deleted file mode 100644 index 61d5468f..00000000 --- a/Tests/Sync/JSONs/tagged_notes.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "id": 0, - "text": "Shawn Merril's diary, episode 0", - "super_tags": [ - { - "id": 1, - "name": "diary" - }, - { - "id": 2, - "name": "neverforget" - } - ] - }, - { - "id": 1, - "text": "Shawn Merril's diary, episode 1", - "super_tags": [ - { - "id": 1, - "name": "diary" - } - ] - }, - { - "id": 2, - "text": "Shawn Merril's diary, episode 4" - } -] diff --git a/Tests/Sync/JSONs/to-one-camelcase.json b/Tests/Sync/JSONs/to-one-camelcase.json deleted file mode 100644 index eb24fb8f..00000000 --- a/Tests/Sync/JSONs/to-one-camelcase.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": 0, - "legalTenant": { - "id": 0 - } -} diff --git a/Tests/Sync/JSONs/to-one-snakecase.json b/Tests/Sync/JSONs/to-one-snakecase.json deleted file mode 100644 index 2501f470..00000000 --- a/Tests/Sync/JSONs/to-one-snakecase.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": 0, - "legal_tenant": { - "id": 0 - } -} diff --git a/Tests/Sync/JSONs/unique.json b/Tests/Sync/JSONs/unique.json deleted file mode 100644 index 5ed81b8d..00000000 --- a/Tests/Sync/JSONs/unique.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "id" : 1, - "b" : [ - { - "id" : 2 - }, - { - "id" : 3 - } - ] - } -] \ No newline at end of file diff --git a/Tests/Sync/JSONs/users_a.json b/Tests/Sync/JSONs/users_a.json deleted file mode 100644 index 9452f1c0..00000000 --- a/Tests/Sync/JSONs/users_a.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - { - "id": 0, - "name": "Melisa White", - "email": "melisawhite@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-17T00:00:00+00:00" - }, - { - "id": 1, - "name": "Glass Oconnor", - "email": "glassoconnor@ovium.com", - "created_at": "2014-02-15T00:00:00+00:00", - "updated_at": "2014-02-18T00:00:00+00:00" - }, - { - "id": 2, - "name": "Maritza Boyer", - "email": "maritzaboyer@ovium.com", - "created_at": "2014-02-18T00:00:00+00:00", - "updated_at": "2014-02-19T00:00:00+00:00" - }, - { - "id": 3, - "name": "Margo Nixon", - "email": "margonixon@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-14T00:00:00+00:00" - }, - { - "id": 4, - "name": "Valencia Foley", - "email": "valenciafoley@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-14T00:00:00+00:00" - }, - { - "id": 5, - "name": "Hayden Livingston", - "email": "haydenlivingston@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-14T00:00:00+00:00" - }, - { - "id": 6, - "name": "Shawn Merrill", - "email": "shawnmerrill@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-14T00:00:00+00:00" - }, - { - "id": 7, - "name": "Bradford Duke", - "email": "bradfordduke@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-17T00:00:00+00:00" - } -] diff --git a/Tests/Sync/JSONs/users_b.json b/Tests/Sync/JSONs/users_b.json deleted file mode 100644 index cd8f1fdb..00000000 --- a/Tests/Sync/JSONs/users_b.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "id": 6, - "name": "Shawn Merrill", - "email": "firstupdate@ovium.com" - }, - { - "id": 7, - "name": "Bradford Duke", - "email": "secondupdated@ovium.com" - }, - { - "id": 8, - "name": "Dodson Vaughan", - "email": "dodsonvaughan@ovium.com" - }, - { - "id": 9, - "name": "Alexis Richmond", - "email": "alexisrichmond@ovium.com" - }, - { - "id": 10, - "name": "Flores Daniel", - "email": "floresdaniel@ovium.com" - }, - { - "id": 11, - "name": "Odessa Turner", - "email": "odessaturner@ovium.com" - } -] diff --git a/Tests/Sync/JSONs/users_c.json b/Tests/Sync/JSONs/users_c.json deleted file mode 100644 index db9f16b1..00000000 --- a/Tests/Sync/JSONs/users_c.json +++ /dev/null @@ -1,63 +0,0 @@ -[ - { - "id": 6, - "name": "Shawn Merrill", - "email": "firstupdate@ovium.com", - "location": { - "city": "New York", - "street": "Broadway", - "zip_code": 10012 - }, - "profile_pictures": [ - { - "ImageId": 0, - "url": "http://sample.com/sample0.png" - }, - { - "ImageId": 1, - "url": "http://sample.com/sample1.png" - }, - { - "ImageId": 2, - "url": "http://sample.com/sample2.png" - } - ], - }, - { - "id": 7, - "name": "Bradford Duke", - "email": "secondupdated@ovium.com", - "location": { - "city": "London" - }, - "profile_pictures": [ - { - "ImageId": 0, - "url": "http://sample.com/sample0.png" - }, - { - "ImageId": 1, - "url": "http://sample.com/sample1.png" - } - ], - }, - { - "id": 8, - "name": "Dodson Vaughan", - "email": "dodsonvaughan@ovium.com", - "profile_pictures": [ - { - "ImageId": 0, - "url": "http://sample.com/sample0.png" - } - ], - }, - { - "id": 9, - "name": "Alexis Richmond", - "email": "alexisrichmond@ovium.com", - "location": { - "city": "Lille" - }, - } -] diff --git a/Tests/Sync/JSONs/users_company.json b/Tests/Sync/JSONs/users_company.json deleted file mode 100644 index 3ebfa844..00000000 --- a/Tests/Sync/JSONs/users_company.json +++ /dev/null @@ -1,57 +0,0 @@ -[ - { - "id": 0, - "name": "Melisa White", - "email": "melisawhite@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-17T00:00:00+00:00", - "company":{ - "id": 0, - "name": "Apple" - } - }, - { - "id": 1, - "name": "Glass Oconnor", - "email": "glassoconnor@ovium.com", - "created_at": "2014-02-15T00:00:00+00:00", - "updated_at": "2014-02-18T00:00:00+00:00", - "company":{ - "id": 0, - "name": "Apple" - } - }, - { - "id": 2, - "name": "Maritza Boyer", - "email": "maritzaboyer@ovium.com", - "created_at": "2014-02-18T00:00:00+00:00", - "updated_at": "2014-02-19T00:00:00+00:00", - "company":{ - "id": 0, - "name": "Apple" - } - }, - { - "id": 3, - "name": "Margo Nixon", - "email": "margonixon@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-14T00:00:00+00:00", - "company":{ - "id": 1, - "name": "Facebook" - } - }, - { - "id": 4, - "name": "Valencia Foley", - "email": "valenciafoley@ovium.com", - "created_at": "2014-02-14T00:00:00+00:00", - "updated_at": "2014-02-14T00:00:00+00:00", - "company":{ - "id": 1, - "name": "Facebook" - } - } -] diff --git a/Tests/Sync/JSONs/users_notes.json b/Tests/Sync/JSONs/users_notes.json deleted file mode 100644 index 389e729a..00000000 --- a/Tests/Sync/JSONs/users_notes.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "id": 6, - "name": "Shawn Merrill", - "email": "firstupdate@ovium.com", - "annotations": [ - { - "id": 0, - "text": "Shawn Merril's diary, episode 1" - }, - { - "id": 6, - "text": "Shawn Merril's diary, episode 2" - }, - { - "id": 7, - "text": "Shawn Merril's diary, episode 3" - }, - { - "id": 8, - "text": "Shawn Merril's diary, episode 4" - }, - { - "id": 9, - "text": "Shawn Merril's diary, episode 5" - } - ] - }, - { - "id": 7, - "name": "Bradford Duke", - "email": "secondupdated@ovium.com", - "annotations": [ - { - "id": 1, - "text": "Bradford Duke's diary, episode 1" - }, - { - "id": 2, - "text": "Bradford Duke's diary, episode 2" - }, - { - "id": 3, - "text": "Bradford Duke's diary, episode 3" - }, - { - "id": 4, - "text": "Bradford Duke's diary, episode 4" - }, - { - "id": 5, - "text": "Bradford Duke's diary, episode 5" - } - ] - }, - { - "id": 8, - "name": "Dodson Vaughan", - "email": "dodsonvaughan@ovium.com", - "annotations": [ - { - "id": 10, - "text": "Bradford Duke's diary, episode 1" - } - ] - }, - { - "id": 9, - "name": "Alexis Richmond", - "email": "alexisrichmond@ovium.com" - } -] diff --git a/Tests/Sync/Models/113.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/113.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 17d74ca8..00000000 --- a/Tests/Sync/Models/113.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>113.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/113.xcdatamodeld/113.xcdatamodel/contents b/Tests/Sync/Models/113.xcdatamodeld/113.xcdatamodel/contents deleted file mode 100644 index fceec10e..00000000 --- a/Tests/Sync/Models/113.xcdatamodeld/113.xcdatamodel/contents +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="AwesomeComment" syncable="YES"> - <attribute name="body" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="awesomeComments" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="AwesomeComment" inverseName="awesomeComments" inverseEntity="AwesomeComment" syncable="YES"/> - <relationship name="awesomeStory" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="AwesomeStory" inverseName="awesomeComments" inverseEntity="AwesomeStory" syncable="YES"/> - </entity> - <entity name="AwesomeStory" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="title" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="awesomeComments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="AwesomeComment" inverseName="awesomeStory" inverseEntity="AwesomeComment" syncable="YES"/> - <relationship name="awesomeSummarize" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="AwesomeSummarize" inverseName="awesomeStory" inverseEntity="AwesomeSummarize" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="summarize_text"/> - </userInfo> - </relationship> - </entity> - <entity name="AwesomeSummarize" syncable="YES"> - <attribute name="body" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="awesomeStory" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="AwesomeStory" inverseName="awesomeSummarize" inverseEntity="AwesomeStory" syncable="YES"/> - </entity> - <elements> - <element name="AwesomeComment" positionX="234" positionY="164" width="128" height="88"/> - <element name="AwesomeStory" positionX="25" positionY="176" width="128" height="103"/> - <element name="AwesomeSummarize" positionX="52" positionY="45" width="128" height="88"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/125.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/125.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 258167bc..00000000 --- a/Tests/Sync/Models/125.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>125.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/125.xcdatamodeld/125.xcdatamodel/contents b/Tests/Sync/Models/125.xcdatamodeld/125.xcdatamodel/contents deleted file mode 100644 index e4e32374..00000000 --- a/Tests/Sync/Models/125.xcdatamodeld/125.xcdatamodel/contents +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="8195" systemVersion="15B30a" minimumToolsVersion="Automatic"> - <entity name="Element" syncable="YES"> - <attribute name="label" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="element" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Element" inverseName="elements" inverseEntity="Element" syncable="YES"/> - <relationship name="elements" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Element" inverseName="element" inverseEntity="Element" syncable="YES"/> - <relationship name="form" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Form" inverseName="element" inverseEntity="Form" syncable="YES"/> - <relationship name="items" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="SelectionItem" inverseName="element" inverseEntity="SelectionItem" syncable="YES"/> - </entity> - <entity name="Form" syncable="YES"> - <attribute name="uri" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="element" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Element" inverseName="form" inverseEntity="Element" syncable="YES"/> - <relationship name="model" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Model" inverseName="form" inverseEntity="Model" syncable="YES"/> - </entity> - <entity name="Model" syncable="YES"> - <attribute name="uri" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="form" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Form" inverseName="model" inverseEntity="Form" syncable="YES"/> - <relationship name="properties" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="ModelProperty" inverseName="model" inverseEntity="ModelProperty" syncable="YES"/> - </entity> - <entity name="ModelProperty" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="model" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Model" inverseName="properties" inverseEntity="Model" syncable="YES"/> - <relationship name="restrictions" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Restriction" inverseName="property" inverseEntity="Restriction" syncable="YES"/> - </entity> - <entity name="Restriction" syncable="YES"> - <attribute name="restriction" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="property" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="ModelProperty" inverseName="restrictions" inverseEntity="ModelProperty" syncable="YES"/> - </entity> - <entity name="SelectionItem" syncable="YES"> - <attribute name="value" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="element" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Element" inverseName="items" inverseEntity="Element" syncable="YES"/> - </entity> - <elements> - <element name="Element" positionX="151" positionY="-279" width="128" height="118"/> - <element name="Form" positionX="-56" positionY="-243" width="128" height="88"/> - <element name="Model" positionX="-81" positionY="-28" width="128" height="88"/> - <element name="ModelProperty" positionX="-72" positionY="189" width="128" height="88"/> - <element name="Restriction" positionX="-297" positionY="188" width="128" height="73"/> - <element name="SelectionItem" positionX="151" positionY="176" width="128" height="73"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/151-many-to-many.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/151-many-to-many.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 2477a35b..00000000 --- a/Tests/Sync/Models/151-many-to-many.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>151-many-to-many.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/151-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents b/Tests/Sync/Models/151-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents deleted file mode 100644 index fee9c750..00000000 --- a/Tests/Sync/Models/151-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="Note" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="noteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Tag" inverseName="notes" inverseEntity="Tag" syncable="YES"/> - </entity> - <entity name="Tag" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="tagID" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - <relationship name="notes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Note" inverseName="tags" inverseEntity="Note" syncable="YES"/> - </entity> - <elements> - <element name="Note" positionX="124" positionY="-27" width="128" height="90"/> - <element name="Tag" positionX="36" positionY="18" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 2477a35b..00000000 --- a/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>151-many-to-many.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents b/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents deleted file mode 100644 index 5380e015..00000000 --- a/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="Note" syncable="YES"> - <attribute name="id" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Tag" inverseName="notes" inverseEntity="Tag" syncable="YES"/> - </entity> - <entity name="Tag" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="notes" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Note" inverseName="tags" inverseEntity="Note" syncable="YES"/> - </entity> - <elements> - <element name="Note" positionX="124" positionY="-27" width="128" height="90"/> - <element name="Tag" positionX="36" positionY="18" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 2300ed4f..00000000 --- a/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>151-to-many.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents b/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents deleted file mode 100644 index 885d7da4..00000000 --- a/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="Note" syncable="YES"> - <attribute name="id" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="notes" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="User" syncable="YES"> - <attribute name="id" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="notes" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="Note" inverseName="user" inverseEntity="Note" syncable="YES"/> - </entity> - <elements> - <element name="Note" positionX="405" positionY="-27" width="128" height="88"/> - <element name="User" positionX="223" positionY="-27" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/151-to-many.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/151-to-many.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 2300ed4f..00000000 --- a/Tests/Sync/Models/151-to-many.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>151-to-many.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/151-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents b/Tests/Sync/Models/151-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents deleted file mode 100644 index 9f79c576..00000000 --- a/Tests/Sync/Models/151-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="Note" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="noteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="notes" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="User" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="userID" attributeType="Integer 32" defaultValueString="0" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - <relationship name="notes" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Note" inverseName="user" inverseEntity="Note" syncable="YES"/> - </entity> - <elements> - <element name="Note" positionX="405" positionY="-27" width="128" height="90"/> - <element name="User" positionX="223" positionY="-27" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/157.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/157.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 69a39526..00000000 --- a/Tests/Sync/Models/157.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>157.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/157.xcdatamodeld/157.xcdatamodel/contents b/Tests/Sync/Models/157.xcdatamodeld/157.xcdatamodel/contents deleted file mode 100644 index bcb8e09d..00000000 --- a/Tests/Sync/Models/157.xcdatamodeld/157.xcdatamodel/contents +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="City" syncable="YES"> - <attribute name="cityID" attributeType="Integer 16" defaultValueString="0" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="locations" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Location" inverseName="city" inverseEntity="Location" syncable="YES"/> - </entity> - <entity name="Location" syncable="YES"> - <attribute name="locationID" attributeType="Integer 16" defaultValueString="0" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="city" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="City" inverseName="locations" inverseEntity="City" syncable="YES"/> - </entity> - <elements> - <element name="City" positionX="-63" positionY="-18" width="128" height="90"/> - <element name="Location" positionX="-54" positionY="-9" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/179.xcdatamodeld/179.xcdatamodel/contents b/Tests/Sync/Models/179.xcdatamodeld/179.xcdatamodel/contents deleted file mode 100644 index efa2f7dd..00000000 --- a/Tests/Sync/Models/179.xcdatamodeld/179.xcdatamodel/contents +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Xcode 7.0"> - <entity name="Place" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="endRoutes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Route" inverseName="endPlace" inverseEntity="Route" syncable="YES"/> - <relationship name="startRoutes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Route" inverseName="startPlace" inverseEntity="Route" syncable="YES"/> - </entity> - <entity name="Route" syncable="YES"> - <attribute name="ident" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="endPlace" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" inverseName="endRoutes" inverseEntity="Place" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="end"/> - </userInfo> - </relationship> - <relationship name="startPlace" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" inverseName="startRoutes" inverseEntity="Place" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="start"/> - </userInfo> - </relationship> - </entity> - <elements> - <element name="Route" positionX="-63" positionY="-18" width="128" height="88"/> - <element name="Place" positionX="151" positionY="-18" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/202.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/202.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 207e4146..00000000 --- a/Tests/Sync/Models/202.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>202.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/202.xcdatamodeld/202.xcdatamodel/contents b/Tests/Sync/Models/202.xcdatamodeld/202.xcdatamodel/contents deleted file mode 100644 index b86cd757..00000000 --- a/Tests/Sync/Models/202.xcdatamodeld/202.xcdatamodel/contents +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10171" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="Tag" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="users" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="User" inverseName="favoriteTags" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="User" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="favoriteTags" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Tag" inverseName="users" inverseEntity="Tag" syncable="YES"/> - </entity> - <elements> - <element name="Tag" positionX="-63" positionY="-18" width="128" height="75"/> - <element name="User" positionX="-54" positionY="-9" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/225.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/225.xcdatamodeld/.xccurrentversion deleted file mode 100755 index 2477a35b..00000000 --- a/Tests/Sync/Models/225.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>151-many-to-many.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/225.xcdatamodeld/151-many-to-many.xcdatamodel/contents b/Tests/Sync/Models/225.xcdatamodeld/151-many-to-many.xcdatamodel/contents deleted file mode 100644 index 9f497085..00000000 --- a/Tests/Sync/Models/225.xcdatamodeld/151-many-to-many.xcdatamodel/contents +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15G31" minimumToolsVersion="Automatic"> - <entity name="Tag" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <relationship name="users" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="User" inverseName="tags" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="User" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Tag" inverseName="users" inverseEntity="Tag" syncable="YES"/> - </entity> - <elements> - <element name="Tag" positionX="-63" positionY="-18" width="128" height="75"/> - <element name="User" positionX="124" positionY="-27" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/233.xcdatamodeld/233.xcdatamodel/contents b/Tests/Sync/Models/233.xcdatamodeld/233.xcdatamodel/contents deleted file mode 100644 index f036ac0c..00000000 --- a/Tests/Sync/Models/233.xcdatamodeld/233.xcdatamodel/contents +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C53a" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> - <entity name="Presentation" representedClassName="" syncable="YES"> - <attribute name="id" attributeType="Integer 16" usesScalarValueType="YES" syncable="YES"/> - <relationship name="slides" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Slide" inverseName="presentation" inverseEntity="Slide" syncable="YES"/> - </entity> - <entity name="Slide" representedClassName="" syncable="YES"> - <attribute name="id" optional="YES" attributeType="Integer 16" usesScalarValueType="YES" syncable="YES"/> - <relationship name="presentation" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Presentation" inverseName="slides" inverseEntity="Presentation" syncable="YES"/> - </entity> - <elements> - <element name="Presentation" positionX="-216" positionY="18" width="128" height="75"/> - <element name="Slide" positionX="-36" positionY="18" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/239.xcdatamodeld/239.xcdatamodel/contents b/Tests/Sync/Models/239.xcdatamodeld/239.xcdatamodel/contents deleted file mode 100644 index b7ab3937..00000000 --- a/Tests/Sync/Models/239.xcdatamodeld/239.xcdatamodel/contents +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="Car" syncable="YES"> - <relationship name="passengers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Passenger" inverseName="car" inverseEntity="Passenger" syncable="YES"/> - </entity> - <entity name="Passenger" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="car" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Car" inverseName="passengers" inverseEntity="Car" syncable="YES"/> - </entity> - <entity name="Racecar" parentEntity="Car" syncable="YES"> - <attribute name="maxSpeed" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - </entity> - <entity name="Sedan" parentEntity="Car" syncable="YES"/> - <elements> - <element name="Car" positionX="-72" positionY="-18" width="128" height="58"/> - <element name="Passenger" positionX="187" positionY="-52" width="128" height="88"/> - <element name="Racecar" positionX="-162" positionY="101" width="128" height="73"/> - <element name="Sedan" positionX="7" positionY="101" width="128" height="45"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/254.xcdatamodeld/254.xcdatamodel/contents b/Tests/Sync/Models/254.xcdatamodeld/254.xcdatamodel/contents deleted file mode 100644 index 95ce75ea..00000000 --- a/Tests/Sync/Models/254.xcdatamodeld/254.xcdatamodel/contents +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="16A294a" minimumToolsVersion="Xcode 7.0"> - <entity name="House" syncable="YES"> - <attribute name="id" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <relationship name="owners" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Human" inverseName="ownhouses" inverseEntity="Human" syncable="YES"/> - <relationship name="residents" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Human" inverseName="residenthouse" inverseEntity="Human" syncable="YES"/> - </entity> - <entity name="Human" syncable="YES"> - <attribute name="id" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <relationship name="ownhouses" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="House" inverseName="owners" inverseEntity="House" syncable="YES"/> - <relationship name="residenthouse" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="House" inverseName="residents" inverseEntity="House" syncable="YES"/> - </entity> - <elements> - <element name="House" positionX="-63" positionY="-18" width="128" height="88"/> - <element name="Human" positionX="162" positionY="-18" width="128" height="88"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/257.xcdatamodeld/257.xcdatamodel/contents b/Tests/Sync/Models/257.xcdatamodeld/257.xcdatamodel/contents deleted file mode 100644 index dff1b1dc..00000000 --- a/Tests/Sync/Models/257.xcdatamodeld/257.xcdatamodel/contents +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15G31" minimumToolsVersion="Xcode 7.0"> - <entity name="Exercise" syncable="YES"> - <attribute name="exerciseDesc" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="exerciseName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="_id"/> - </userInfo> - </attribute> - <attribute name="mainMuscle" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="workout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Workout" inverseName="workoutExercises" inverseEntity="Workout" syncable="YES"/> - </entity> - <entity name="Workout" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="_id"/> - </userInfo> - </attribute> - <attribute name="workoutDesc" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="workoutName" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="workoutExercises" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Exercise" inverseName="workout" inverseEntity="Exercise" syncable="YES"/> - </entity> - <elements> - <element name="Workout" positionX="-252" positionY="-18" width="128" height="103"/> - <element name="Exercise" positionX="-54" positionY="-9" width="128" height="118"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/265.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/265.xcdatamodeld/.xccurrentversion deleted file mode 100755 index 31a1c6cd..00000000 --- a/Tests/Sync/Models/265.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>265.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/265.xcdatamodeld/265.xcdatamodel/contents b/Tests/Sync/Models/265.xcdatamodeld/265.xcdatamodel/contents deleted file mode 100644 index 1c8c1042..00000000 --- a/Tests/Sync/Models/265.xcdatamodeld/265.xcdatamodel/contents +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="Player" syncable="YES"> - <attribute name="id" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="playerGroup" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PlayerGroup" inverseName="players" inverseEntity="PlayerGroup" syncable="YES"/> - </entity> - <entity name="PlayerGroup" syncable="YES"> - <attribute name="id" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="players" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Player" inverseName="playerGroup" inverseEntity="Player" syncable="YES"/> - </entity> - <elements> - <element name="Player" positionX="-27" positionY="18" width="128" height="73"/> - <element name="PlayerGroup" positionX="268" positionY="18" width="128" height="73"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/277.xcdatamodeld/239.xcdatamodel/contents b/Tests/Sync/Models/277.xcdatamodeld/239.xcdatamodel/contents deleted file mode 100644 index 947d82b7..00000000 --- a/Tests/Sync/Models/277.xcdatamodeld/239.xcdatamodel/contents +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="Car" syncable="YES"> - <relationship name="passengers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Passenger" inverseName="cars" inverseEntity="Passenger" syncable="YES"/> - </entity> - <entity name="Passenger" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="cars" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Car" inverseName="passengers" inverseEntity="Car" syncable="YES"/> - </entity> - <entity name="Racecar" parentEntity="Car" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - </entity> - <entity name="Sedan" parentEntity="Car" syncable="YES"/> - <elements> - <element name="Car" positionX="-72" positionY="-18" width="128" height="58"/> - <element name="Passenger" positionX="153" positionY="-52" width="128" height="73"/> - <element name="Racecar" positionX="-162" positionY="101" width="128" height="58"/> - <element name="Sedan" positionX="7" positionY="101" width="128" height="45"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/280.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/280.xcdatamodeld/.xccurrentversion deleted file mode 100755 index 2477a35b..00000000 --- a/Tests/Sync/Models/280.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>151-many-to-many.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/280.xcdatamodeld/151-many-to-many.xcdatamodel/contents b/Tests/Sync/Models/280.xcdatamodeld/151-many-to-many.xcdatamodel/contents deleted file mode 100644 index 93df3e47..00000000 --- a/Tests/Sync/Models/280.xcdatamodeld/151-many-to-many.xcdatamodel/contents +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="Route" syncable="YES"> - <attribute name="busID" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - <entry key="hyper.remoteKey" value="busID"/> - </userInfo> - </attribute> - <relationship name="polyline" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="RoutePolylineItem" inverseName="route" inverseEntity="RoutePolylineItem" syncable="YES"/> - <relationship name="stops" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="RouteStop" inverseName="route" inverseEntity="RouteStop" syncable="YES"/> - </entity> - <entity name="RoutePolylineItem" syncable="YES"> - <attribute name="index" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - </userInfo> - </attribute> - <relationship name="route" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" inverseName="polyline" inverseEntity="Route" syncable="YES"/> - </entity> - <entity name="RouteStop" syncable="YES"> - <attribute name="index" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="true"/> - </userInfo> - </attribute> - <relationship name="route" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" inverseName="stops" inverseEntity="Route" syncable="YES"/> - </entity> - <elements> - <element name="Route" positionX="-117" positionY="-270" width="128" height="88"/> - <element name="RoutePolylineItem" positionX="88" positionY="-300" width="128" height="75"/> - <element name="RouteStop" positionX="88" positionY="-183" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/283.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/283.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/283.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/283.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/283.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 4c122e62..00000000 --- a/Tests/Sync/Models/283.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="Owner" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="taskList" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TaskList" inverseName="owner" inverseEntity="TaskList" syncable="YES"/> - <relationship name="taskListParticipants" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TaskList" inverseName="participants" inverseEntity="TaskList" syncable="YES"/> - </entity> - <entity name="TaskList" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="owner" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Owner" inverseName="taskList" inverseEntity="Owner" syncable="YES"/> - <relationship name="participants" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Owner" inverseName="taskListParticipants" inverseEntity="Owner" syncable="YES"/> - </entity> - <elements> - <element name="TaskList" positionX="-63" positionY="-18" width="128" height="90"/> - <element name="Owner" positionX="-54" positionY="-9" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/320.xcdatamodeld/320.xcdatamodel/contents b/Tests/Sync/Models/320.xcdatamodeld/320.xcdatamodel/contents deleted file mode 100644 index 6a4257a0..00000000 --- a/Tests/Sync/Models/320.xcdatamodeld/320.xcdatamodel/contents +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C53a" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> - <entity name="Tag" representedClassName="" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/> - <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="tag" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="User" representedClassName="" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/> - <relationship name="tag" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Tag" inverseName="user" inverseEntity="Tag" syncable="YES"/> - </entity> - <elements> - <element name="Tag" positionX="-54" positionY="-9" width="128" height="75"/> - <element name="User" positionX="-63" positionY="-18" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/3ca82a0.xcdatamodeld/3ca82a0.xcdatamodel/contents b/Tests/Sync/Models/3ca82a0.xcdatamodeld/3ca82a0.xcdatamodel/contents deleted file mode 100644 index 7e4c8d74..00000000 --- a/Tests/Sync/Models/3ca82a0.xcdatamodeld/3ca82a0.xcdatamodel/contents +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C53a" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> - <entity name="Article" representedClassName="" syncable="YES"> - <attribute name="id" attributeType="Integer 16" usesScalarValueType="YES" syncable="YES"/> - <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="ArticleTag" inverseName="articles" inverseEntity="ArticleTag" syncable="YES"/> - </entity> - <entity name="ArticleTag" representedClassName="" syncable="YES"> - <attribute name="id" attributeType="Integer 16" usesScalarValueType="YES" syncable="YES"/> - <relationship name="articles" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Article" inverseName="tags" inverseEntity="Article" syncable="YES"/> - </entity> - <elements> - <element name="Article" positionX="-45" positionY="0" width="128" height="75"/> - <element name="ArticleTag" positionX="-18" positionY="27" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/84.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/84.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 9238c02b..00000000 --- a/Tests/Sync/Models/84.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>84.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/84.xcdatamodeld/84.xcdatamodel/contents b/Tests/Sync/Models/84.xcdatamodeld/84.xcdatamodel/contents deleted file mode 100644 index f451551d..00000000 --- a/Tests/Sync/Models/84.xcdatamodeld/84.xcdatamodel/contents +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E7f" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic"> - <entity name="MSFulfiller" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="xid" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="staff" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="MSStaff" inverseName="fulfillers" inverseEntity="MSStaff" syncable="YES"/> - </entity> - <entity name="MSStaff" syncable="YES"> - <attribute name="image" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="xid" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="fulfillers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="MSFulfiller" inverseName="staff" inverseEntity="MSFulfiller" syncable="YES"/> - </entity> - <elements> - <element name="MSFulfiller" positionX="117" positionY="-7" width="128" height="90"/> - <element name="MSStaff" positionX="-63" positionY="-18" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Camelcase.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Camelcase.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/Camelcase.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/Camelcase.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Camelcase.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 4291d66e..00000000 --- a/Tests/Sync/Models/Camelcase.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10171" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="NormalUser" syncable="YES"> - <attribute name="etternavn" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="last_name"/> - </userInfo> - </attribute> - <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="fullName" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="numberOfChildren" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> - </entity> - <elements> - <element name="NormalUser" positionX="234" positionY="164" width="128" height="120"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Contacts.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Contacts.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/Contacts.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/Contacts.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Contacts.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index eef25ba8..00000000 --- a/Tests/Sync/Models/Contacts.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E7f" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic"> - <entity name="Company" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <relationship name="users" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="User" inverseName="company" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="Image" syncable="YES"> - <attribute name="imageId" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="ImageId"/> - </userInfo> - </attribute> - <attribute name="url" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="profilePictures" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="Location" syncable="YES"> - <attribute name="city" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="street" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="zipCode" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <relationship name="user" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="User" inverseName="location" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="User" representedClassName="" syncable="YES"> - <attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/> - <attribute name="email" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/> - <relationship name="company" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Company" inverseName="users" inverseEntity="Company" syncable="YES"/> - <relationship name="location" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Location" inverseName="user" inverseEntity="Location" syncable="YES"/> - <relationship name="profilePictures" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Image" inverseName="user" inverseEntity="Image" syncable="YES"/> - </entity> - <elements> - <element name="Company" positionX="-380" positionY="18" width="128" height="88"/> - <element name="Image" positionX="-198" positionY="200" width="128" height="88"/> - <element name="Location" positionX="-27" positionY="-45" width="128" height="105"/> - <element name="User" positionX="-207" positionY="-15" width="128" height="165"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 19417a79..00000000 --- a/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A313a" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="Note" syncable="YES"> - <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="notes" inverseEntity="User" syncable="YES"/> - </entity> - <entity name="User" representedClassName="" syncable="YES"> - <attribute name="id" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="notes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Note" inverseName="user" inverseEntity="Note" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="annotations"/> - </userInfo> - </relationship> - </entity> - <elements> - <element name="Note" positionX="-20" positionY="18" width="128" height="75"/> - <element name="User" positionX="-207" positionY="-15" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 0c7e5e4b..00000000 --- a/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A313a" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="SuperNote" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="superUser" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="SuperUser" inverseName="superNotes" inverseEntity="SuperUser" syncable="YES"/> - </entity> - <entity name="SuperUser" representedClassName="" syncable="YES"> - <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="superNotes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperNote" inverseName="superUser" inverseEntity="SuperNote" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="annotations"/> - </userInfo> - </relationship> - </entity> - <elements> - <element name="SuperNote" positionX="-20" positionY="18" width="128" height="75"/> - <element name="SuperUser" positionX="-207" positionY="-15" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Markets.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Markets.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/Markets.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/Markets.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Markets.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 038a1ba2..00000000 --- a/Tests/Sync/Models/Markets.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E7f" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic"> - <entity name="Item" syncable="YES"> - <attribute name="otherAttribute" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="uniqueId" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - <relationship name="markets" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Market" inverseName="items" inverseEntity="Market" syncable="YES"/> - </entity> - <entity name="Market" syncable="YES"> - <attribute name="otherAttribute" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="uniqueId" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - <entry key="hyper.remoteKey" value="id"/> - </userInfo> - </attribute> - <relationship name="items" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Item" inverseName="markets" inverseEntity="Item" syncable="YES"/> - </entity> - <elements> - <element name="Item" positionX="-63" positionY="-18" width="128" height="88"/> - <element name="Market" positionX="196" positionY="-9" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Notes.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Notes.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/Notes.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/Notes.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Notes.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 207493dc..00000000 --- a/Tests/Sync/Models/Notes.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A313a" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="SuperNote" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="superTags" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperTag" inverseName="superNotes" inverseEntity="SuperTag" syncable="YES"/> - <relationship name="superUser" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="SuperUser" inverseName="superNotes" inverseEntity="SuperUser" syncable="YES"/> - </entity> - <entity name="SuperTag" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <relationship name="superNotes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperNote" inverseName="superTags" inverseEntity="SuperNote" syncable="YES"/> - </entity> - <entity name="SuperUser" representedClassName="" syncable="YES"> - <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <attribute name="email" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - <attribute name="updatedAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> - <relationship name="superNotes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperNote" inverseName="superUser" inverseEntity="SuperNote" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="annotations"/> - </userInfo> - </relationship> - </entity> - <elements> - <element name="SuperNote" positionX="-20" positionY="18" width="128" height="103"/> - <element name="SuperTag" positionX="160" positionY="0" width="128" height="90"/> - <element name="SuperUser" positionX="-207" positionY="-15" width="128" height="135"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/NotesB.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/NotesB.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/NotesB.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/NotesB.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/NotesB.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 65903b4a..00000000 --- a/Tests/Sync/Models/NotesB.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Automatic"> - <entity name="SuperNoteB" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="superUser" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="SuperUserB" inverseName="superNotes" inverseEntity="SuperUserB" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="super_user"/> - </userInfo> - </relationship> - </entity> - <entity name="SuperUserB" representedClassName="" syncable="YES"> - <attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/> - <attribute name="email" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/> - <relationship name="superNotes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperNoteB" inverseName="superUser" inverseEntity="SuperNoteB" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="annotations"/> - </userInfo> - </relationship> - </entity> - <elements> - <element name="SuperNoteB" positionX="-20" positionY="18" width="128" height="90"/> - <element name="SuperUserB" positionX="-207" positionY="-15" width="128" height="135"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/OrderedSocial.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/OrderedSocial.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/OrderedSocial.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/OrderedSocial.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/OrderedSocial.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index d9272a26..00000000 --- a/Tests/Sync/Models/OrderedSocial.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15C50" minimumToolsVersion="Automatic"> - <entity name="Comment" syncable="YES"> - <attribute name="body" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="comments" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Comment" inverseName="comments" inverseEntity="Comment" syncable="YES"/> - </entity> - <elements> - <element name="Comment" positionX="234" positionY="164" width="128" height="73"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Organizations.xcdatamodeld/Organizations.xcdatamodel/contents b/Tests/Sync/Models/Organizations.xcdatamodeld/Organizations.xcdatamodel/contents deleted file mode 100644 index e39762d1..00000000 --- a/Tests/Sync/Models/Organizations.xcdatamodeld/Organizations.xcdatamodel/contents +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E11f" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic"> - <entity name="OrganizationUnit" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 64" syncable="YES"/> - <relationship name="children" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="OrganizationUnit" inverseName="parentUnit" inverseEntity="OrganizationUnit" syncable="YES"/> - <relationship name="parentUnit" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OrganizationUnit" inverseName="children" inverseEntity="OrganizationUnit" syncable="YES"/> - </entity> - <elements> - <element name="OrganizationUnit" positionX="-900" positionY="-306" width="128" height="105"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Patients.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Patients.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/Patients.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/Patients.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Patients.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index cfd99816..00000000 --- a/Tests/Sync/Models/Patients.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="8195" systemVersion="14F27" minimumToolsVersion="Automatic"> - <entity name="Alcohol" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="measure" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="Measure" inverseName="alcohol" inverseEntity="Measure" syncable="YES"/> - <relationship name="patient" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Patient" inverseName="alcohols" inverseEntity="Patient" syncable="YES"/> - </entity> - <entity name="Baseline" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="patient" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Patient" inverseName="baselines" inverseEntity="Patient" syncable="YES"/> - </entity> - <entity name="Fitness" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="measure" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="Measure" inverseName="fitness" inverseEntity="Measure" syncable="YES"/> - <relationship name="patient" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Patient" inverseName="fitnesses" inverseEntity="Patient" syncable="YES"/> - </entity> - <entity name="Measure" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="alcohol" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Alcohol" inverseName="measure" inverseEntity="Alcohol" syncable="YES"/> - <relationship name="fitness" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Fitness" inverseName="measure" inverseEntity="Fitness" syncable="YES"/> - <relationship name="weight" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Weight" inverseName="measure" inverseEntity="Weight" syncable="YES"/> - </entity> - <entity name="Patient" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="alcohols" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Alcohol" inverseName="patient" inverseEntity="Alcohol" syncable="YES"/> - <relationship name="baselines" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Baseline" inverseName="patient" inverseEntity="Baseline" syncable="YES"/> - <relationship name="fitnesses" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Fitness" inverseName="patient" inverseEntity="Fitness" syncable="YES"/> - <relationship name="weights" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Weight" inverseName="patient" inverseEntity="Weight" syncable="YES"/> - </entity> - <entity name="Weight" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="measure" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="Measure" inverseName="weight" inverseEntity="Measure" syncable="YES"/> - <relationship name="patient" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Patient" inverseName="weights" inverseEntity="Patient" syncable="YES"/> - </entity> - <elements> - <element name="Baseline" positionX="-270" positionY="-63" width="128" height="88"/> - <element name="Patient" positionX="-9" positionY="-63" width="128" height="133"/> - <element name="Alcohol" positionX="259" positionY="-115" width="128" height="103"/> - <element name="Fitness" positionX="261" positionY="9" width="128" height="103"/> - <element name="Weight" positionX="232" positionY="146" width="128" height="103"/> - <element name="Measure" positionX="574" positionY="-9" width="128" height="118"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Recursive.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Recursive.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/Recursive.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/Recursive.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Recursive.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 7233fef4..00000000 --- a/Tests/Sync/Models/Recursive.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15C50" minimumToolsVersion="Automatic"> - <entity name="Collection" syncable="YES"> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <relationship name="numbers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Number" inverseName="parent" inverseEntity="Number" syncable="YES"/> - </entity> - <entity name="Number" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="value" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <relationship name="numbers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Number" inverseName="parentNumber" inverseEntity="Number" syncable="YES"/> - <relationship name="parent" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Collection" inverseName="numbers" inverseEntity="Collection" syncable="YES"/> - <relationship name="parentNumber" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Number" inverseName="numbers" inverseEntity="Number" syncable="YES"/> - </entity> - <elements> - <element name="Collection" positionX="-254" positionY="338" width="128" height="88"/> - <element name="Number" positionX="-72" positionY="360" width="128" height="118"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Social.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Social.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/Social.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/Social.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Social.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 0c0085a3..00000000 --- a/Tests/Sync/Models/Social.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Automatic"> - <entity name="SocialComment" syncable="YES"> - <attribute name="body" optional="YES" attributeType="String" syncable="YES"> - <userInfo> - <entry key="hyper.isPrimaryKey" value="YES"/> - </userInfo> - </attribute> - <relationship name="comments" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SocialComment" inverseName="comments" inverseEntity="SocialComment" syncable="YES"/> - <relationship name="story" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Story" inverseName="comments" inverseEntity="Story" syncable="YES"/> - </entity> - <entity name="Story" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <attribute name="title" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="comments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="SocialComment" inverseName="story" inverseEntity="SocialComment" syncable="YES"/> - <relationship name="summarize" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Summarize" inverseName="story" inverseEntity="Summarize" syncable="YES"> - <userInfo> - <entry key="hyper.remoteKey" value="summarize_text"/> - </userInfo> - </relationship> - </entity> - <entity name="Summarize" syncable="YES"> - <attribute name="body" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> - <relationship name="story" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Story" inverseName="summarize" inverseEntity="Story" syncable="YES"/> - </entity> - <elements> - <element name="SocialComment" positionX="234" positionY="164" width="128" height="90"/> - <element name="Story" positionX="25" positionY="176" width="128" height="105"/> - <element name="Summarize" positionX="52" positionY="45" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Tests.xcdatamodeld/Tests.xcdatamodel/contents b/Tests/Sync/Models/Tests.xcdatamodeld/Tests.xcdatamodel/contents deleted file mode 100644 index fbbc85b0..00000000 --- a/Tests/Sync/Models/Tests.xcdatamodeld/Tests.xcdatamodel/contents +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> - <entity name="User" representedClassName="" syncable="YES"> - <attribute name="localID" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> - </entity> - <elements> - <element name="User" positionX="-63" positionY="-18" width="128" height="90"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/ToOne.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/ToOne.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/ToOne.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/ToOne.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/ToOne.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index 25998b70..00000000 --- a/Tests/Sync/Models/ToOne.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15G31" minimumToolsVersion="Automatic"> - <entity name="LegalPerson" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="rentedResidence" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="RentedHome" inverseName="legalTenant" inverseEntity="RentedHome" syncable="YES"/> - </entity> - <entity name="RentedHome" syncable="YES"> - <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> - <relationship name="legalTenant" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="LegalPerson" inverseName="rentedResidence" inverseEntity="LegalPerson" syncable="YES"/> - </entity> - <elements> - <element name="LegalPerson" positionX="-54" positionY="-9" width="128" height="75"/> - <element name="RentedHome" positionX="-272" positionY="-9" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Unique.xcdatamodeld/Unique.xcdatamodel/contents b/Tests/Sync/Models/Unique.xcdatamodeld/Unique.xcdatamodel/contents deleted file mode 100644 index 2f1051fe..00000000 --- a/Tests/Sync/Models/Unique.xcdatamodeld/Unique.xcdatamodel/contents +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E11f" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic"> - <entity name="A" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <relationship name="b" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="B" inverseName="a" inverseEntity="B" syncable="YES"/> - </entity> - <entity name="B" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <relationship name="a" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="A" inverseName="b" inverseEntity="A" syncable="YES"/> - <relationship name="c" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="C" inverseName="b" inverseEntity="C" syncable="YES"/> - </entity> - <entity name="C" syncable="YES"> - <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> - <relationship name="b" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="B" inverseName="c" inverseEntity="B" syncable="YES"/> - </entity> - <elements> - <element name="A" positionX="-92" positionY="72" width="128" height="73"/> - <element name="B" positionX="79" positionY="101" width="128" height="88"/> - <element name="C" positionX="250" positionY="71" width="128" height="73"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/Models/id.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/id.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 00318b09..00000000 --- a/Tests/Sync/Models/id.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>_XCCurrentVersionName</key> - <string>Demo.xcdatamodel</string> -</dict> -</plist> diff --git a/Tests/Sync/Models/id.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/id.xcdatamodeld/Demo.xcdatamodel/contents deleted file mode 100644 index d6e5fe8c..00000000 --- a/Tests/Sync/Models/id.xcdatamodeld/Demo.xcdatamodel/contents +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> - <entity name="User" syncable="YES"> - <attribute name="id" attributeType="String" syncable="YES"/> - <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> - </entity> - <elements> - <element name="User" positionX="117" positionY="-7" width="128" height="75"/> - </elements> -</model> \ No newline at end of file diff --git a/Tests/Sync/NSArray+SyncTests.swift b/Tests/Sync/NSArray+SyncTests.swift deleted file mode 100644 index ab4eaa00..00000000 --- a/Tests/Sync/NSArray+SyncTests.swift +++ /dev/null @@ -1,14 +0,0 @@ -import XCTest - -class NSArray_SyncTests: XCTestCase { - // Bug 125 => https://github.com/SyncDB/Sync/issues/125 - - /*func testPreprocessForEntityNamed() { - let formDictionary = Helper.objectsFromJSON("bug-125-light.json") as! [String : NSObject] - let uri = formDictionary["uri"] as! String - let dataStack = Helper.dataStackWithModelName("Bug125") - - let preprocessed = ([formDictionary] as NSArray).preprocessForEntityNamed("Form", predicate: NSPredicate(format: "uri = %@", uri), parent: nil, dataStack: dataStack).first! as! [String : NSObject] - XCTAssertEqual(preprocessed, formDictionary) - }*/ -} \ No newline at end of file diff --git a/Tests/Sync/NSEntityDescription+SyncTests.swift b/Tests/Sync/NSEntityDescription+SyncTests.swift deleted file mode 100644 index 2d3847e5..00000000 --- a/Tests/Sync/NSEntityDescription+SyncTests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -class NSEntityDescription_SyncTests: XCTestCase { - func testRelationships() { - } - - func testParentEntity() { - } -} diff --git a/Tests/Sync/NSManagedObject+SyncTests.swift b/Tests/Sync/NSManagedObject+SyncTests.swift deleted file mode 100644 index cf1c80f3..00000000 --- a/Tests/Sync/NSManagedObject+SyncTests.swift +++ /dev/null @@ -1,25 +0,0 @@ -import XCTest -import CoreData - -class NSManagedObject_SyncTests: XCTestCase { - func testCopyInContext() { - // Create and fetch an item in a mainContext, then copy that item - // to a background context. Then do the check there. - } - - func testFillWithDictionary() { - // This method is mostly to categorize the type of filling that we should do. - // Maybe is better to just unit test a method that returns the type of relationship syncing. - } - - // I am afraid that we will end up duplicating many of the current existing tests in order to test the following - // methods. Maybe a better idea would be to split up those into methods that return things instead of just mutations. - func testToManyRelationship() { - } - - func testRelationshipUsingIDInsteadOfDictionary() { - } - - func testToOneRelationship() { - } -} diff --git a/Tests/Sync/NSManagedObjectContext+SyncTests.swift b/Tests/Sync/NSManagedObjectContext+SyncTests.swift deleted file mode 100644 index d11933a5..00000000 --- a/Tests/Sync/NSManagedObjectContext+SyncTests.swift +++ /dev/null @@ -1,48 +0,0 @@ -import XCTest - -import Sync - -class NSManagedObjectContext_SyncTests: XCTestCase { - func testSafeObjectInContext() { - } - - func configureUserWithRemoteID(remoteID: NSNumber?, localID: String?, name: String, block: @escaping (_ user: NSManagedObject, _ context: NSManagedObjectContext) -> Void) { - let stack = DataStack(modelName: "Tests", bundle: Bundle(for: NSManagedObjectContext_SyncTests.self), storeType: .inMemory) - stack.performInNewBackgroundContext { context in - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: context) - user.setValue(remoteID, forKey: "remoteID") - user.setValue(localID, forKey: "localID") - user.setValue(name, forKey: "name") - try! context.save() - block(user, context) - } - } - - func testDictionary() { - self.configureUserWithRemoteID(remoteID: 1, localID: nil, name: "Joshua") { user, context in - let dictionary = context.managedObjectIDs(in: "User", usingAsKey: "remoteID", predicate: nil) - XCTAssertNotNil(dictionary) - XCTAssertTrue(dictionary.count == 1) - XCTAssertEqual(dictionary[NSNumber(value: 1)], user.objectID) - - let objectID = dictionary[NSNumber(value: 1)]! - let retreivedUser = context.object(with: objectID) - XCTAssertEqual(retreivedUser.value(forKey: "remoteID") as? Int, 1) - XCTAssertEqual(retreivedUser.value(forKey: "name") as? String, "Joshua") - } - } - - func testDictionaryStringLocalKey() { - self.configureUserWithRemoteID(remoteID: nil, localID: "100", name: "Joshua") { user, context in - let dictionary = context.managedObjectIDs(in: "User", usingAsKey: "localID", predicate: nil) - XCTAssertNotNil(dictionary) - XCTAssertTrue(dictionary.count == 1) - XCTAssertEqual(dictionary["100"], user.objectID) - - let objectID = dictionary["100"]! - let retreivedUser = context.object(with: objectID) - XCTAssertEqual(retreivedUser.value(forKey: "localID") as? String, "100") - XCTAssertEqual(retreivedUser.value(forKey: "name") as? String, "Joshua") - } - } -} diff --git a/Tests/Sync/NSPersistentContainerTests.swift b/Tests/Sync/NSPersistentContainerTests.swift deleted file mode 100644 index 3de3a25f..00000000 --- a/Tests/Sync/NSPersistentContainerTests.swift +++ /dev/null @@ -1,129 +0,0 @@ -import XCTest - -import CoreData -import Sync - -class NSPersistentContainerTests: XCTestCase { - func testPersistentContainer() { - if #available(iOS 10, *) { - let expectation = self.expectation(description: "testSkipTestMode") - - let momdModelURL = Bundle(for: NSPersistentContainerTests.self).url(forResource: "Camelcase", withExtension: "momd")! - let model = NSManagedObjectModel(contentsOf: momdModelURL)! - let persistentContainer = NSPersistentContainer(name: "Camelcase", managedObjectModel: model) - try! persistentContainer.persistentStoreCoordinator.addPersistentStore(ofType: NSInMemoryStoreType, configurationName: nil, at: nil, options: nil) - let objects = Helper.objectsFromJSON("camelcase.json") as! [[String: Any]] - - Sync.changes(objects, inEntityNamed: "NormalUser", predicate: nil, persistentContainer: persistentContainer) { error in - let result = Helper.fetchEntity("NormalUser", inContext: persistentContainer.viewContext) - XCTAssertEqual(result.count, 1) - - if let first = result.first { - XCTAssertEqual(first.value(forKey: "etternavn") as? String, "Nuñez") - XCTAssertEqual(first.value(forKey: "firstName") as? String, "Elvis") - XCTAssertEqual(first.value(forKey: "fullName") as? String, "Elvis Nuñez") - XCTAssertEqual(first.value(forKey: "numberOfChildren") as? Int, 1) - XCTAssertEqual(first.value(forKey: "remoteID") as? String, "1") - } else { - XCTFail() - } - - expectation.fulfill() - } - - self.waitForExpectations(timeout: 150.0, handler: nil) - } - } - - func testPersistentContainerExtension() { - if #available(iOS 10, *) { - let expectation = self.expectation(description: "testSkipTestMode") - - let persistentContainer = Helper.persistentStoreWithModelName("Camelcase") - let objects = Helper.objectsFromJSON("camelcase.json") as! [[String: Any]] - - persistentContainer.sync(objects, inEntityNamed: "NormalUser") { error in - let result = Helper.fetchEntity("NormalUser", inContext: persistentContainer.viewContext) - XCTAssertEqual(result.count, 1) - - if let first = result.first { - XCTAssertEqual(first.value(forKey: "etternavn") as? String, "Nuñez") - XCTAssertEqual(first.value(forKey: "firstName") as? String, "Elvis") - XCTAssertEqual(first.value(forKey: "fullName") as? String, "Elvis Nuñez") - XCTAssertEqual(first.value(forKey: "numberOfChildren") as? Int, 1) - XCTAssertEqual(first.value(forKey: "remoteID") as? String, "1") - } else { - XCTFail() - } - - expectation.fulfill() - } - - self.waitForExpectations(timeout: 150.0, handler: nil) - } - } - - func testInsertOrUpdate() { - if #available(iOS 10, *) { - let expectation = self.expectation(description: "testSkipTestMode") - let persistentContainer = Helper.persistentStoreWithModelName("Tests") - let json = ["id": 1] - persistentContainer.insertOrUpdate(json, inEntityNamed: "User") { result in - switch result { - case .success: - XCTAssertEqual(1, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) - case .failure: - XCTFail() - } - - expectation.fulfill() - } - self.waitForExpectations(timeout: 150.0, handler: nil) - } - } - - func testUpdate() { - if #available(iOS 10, *) { - let expectation = self.expectation(description: "testSkipTestMode") - let persistentContainer = Helper.persistentStoreWithModelName("id") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: persistentContainer.viewContext) - user.setValue("id", forKey: "id") - try! persistentContainer.viewContext.save() - - XCTAssertEqual(1, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) - persistentContainer.update("id", with: ["name": "bossy"], inEntityNamed: "User") { result in - switch result { - case .success(let id): - XCTAssertEqual(id as? String, "id") - XCTAssertEqual(1, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) - - persistentContainer.viewContext.refresh(user, mergeChanges: false) - - XCTAssertEqual(user.value(forKey: "name") as? String, "bossy") - case .failure: - XCTFail() - } - - expectation.fulfill() - } - - self.waitForExpectations(timeout: 150.0, handler: nil) - } - } - - func testDelete() { - let expectation = self.expectation(description: "testSkipTestMode") - let persistentContainer = Helper.persistentStoreWithModelName("id") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: persistentContainer.viewContext) - user.setValue("id", forKey: "id") - try! persistentContainer.viewContext.save() - - XCTAssertEqual(1, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) - persistentContainer.delete("id", inEntityNamed: "User") { error in - XCTAssertEqual(0, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) - expectation.fulfill() - } - - self.waitForExpectations(timeout: 150.0, handler: nil) - } -} diff --git a/Tests/Sync/SyncDelegateTests.swift b/Tests/Sync/SyncDelegateTests.swift deleted file mode 100644 index 77a9e070..00000000 --- a/Tests/Sync/SyncDelegateTests.swift +++ /dev/null @@ -1,34 +0,0 @@ -import XCTest - -import CoreData -import Sync - -class SyncDelegateTests: XCTestCase { - func testWillInsertJSON() { - let dataStack = Helper.dataStackWithModelName("Tests") - - let json = [["id": 9, "completed": false]] - let syncOperation = Sync(changes: json, inEntityNamed: "User", dataStack: dataStack) - syncOperation.delegate = self - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 0) - syncOperation.start() - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - - if let task = Helper.fetchEntity("User", inContext: dataStack.mainContext).first { - XCTAssertEqual(task.value(forKey: "remoteID") as? Int, 9) - XCTAssertEqual(task.value(forKey: "localID") as? String, "local") - } else { - XCTFail() - } - dataStack.drop() - } -} - -extension SyncDelegateTests: SyncDelegate { - func sync(_ sync: Sync, willInsert json: [String: Any], in entityNamed: String, parent: NSManagedObject?) -> [String: Any] { - var newJSON = json - newJSON["localID"] = "local" - - return newJSON - } -} diff --git a/Tests/Sync/SyncTests.swift b/Tests/Sync/SyncTests.swift deleted file mode 100644 index cd1bb1de..00000000 --- a/Tests/Sync/SyncTests.swift +++ /dev/null @@ -1,1413 +0,0 @@ -import XCTest - -import CoreData -import Sync - -class SyncTests: XCTestCase { - func testSynchronous() { - let dataStack = Helper.dataStackWithModelName("Camelcase") - let objects = Helper.objectsFromJSON("camelcase.json") as! [[String: Any]] - var synchronous = false - Sync.changes(objects, inEntityNamed: "NormalUser", dataStack: dataStack) { _ in - synchronous = true - } - XCTAssertTrue(synchronous) - dataStack.drop() - } - - // MARK: - Camelcase - func testAutomaticCamelcaseMapping() { - let dataStack = Helper.dataStackWithModelName("Camelcase") - let objects = Helper.objectsFromJSON("camelcase.json") as! [[String: Any]] - Sync.changes(objects, inEntityNamed: "NormalUser", dataStack: dataStack, completion: nil) - - let result = Helper.fetchEntity("NormalUser", inContext: dataStack.mainContext) - XCTAssertEqual(result.count, 1) - - let first = result.first! - XCTAssertEqual(first.value(forKey: "etternavn") as? String, "Nuñez") - XCTAssertEqual(first.value(forKey: "firstName") as? String, "Elvis") - XCTAssertEqual(first.value(forKey: "fullName") as? String, "Elvis Nuñez") - XCTAssertEqual(first.value(forKey: "numberOfChildren") as? Int, 1) - XCTAssertEqual(first.value(forKey: "remoteID") as? String, "1") - - dataStack.drop() - } - - // MARK: - Contacts - - func testLoadAndUpdateUsers() { - let dataStack = Helper.dataStackWithModelName("Contacts") - - let objectsA = Helper.objectsFromJSON("users_a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 8) - - let objectsB = Helper.objectsFromJSON("users_b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 6) - - let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 7)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertEqual(result.value(forKey: "email") as? String, "secondupdated@ovium.com") - - let dateFormat = DateFormatter() - dateFormat.dateFormat = "yyyy-MM-dd" - dateFormat.timeZone = TimeZone(identifier: "GMT") - - let createdDate = dateFormat.date(from: "2014-02-14") - XCTAssertEqual(result.value(forKey: "createdAt") as? Date, createdDate) - - let updatedDate = dateFormat.date(from: "2014-02-17") - XCTAssertEqual(result.value(forKey: "updatedAt") as? Date, updatedDate) - - dataStack.drop() - } - - func testUsersAndCompanies() { - let dataStack = Helper.dataStackWithModelName("Contacts") - - let objects = Helper.objectsFromJSON("users_company.json") as! [[String: Any]] - Sync.changes(objects, inEntityNamed: "User", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 5) - let user = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertEqual((user.value(forKey: "company")! as? NSManagedObject)!.value(forKey: "name") as? String, "Apple") - - XCTAssertEqual(Helper.countForEntity("Company", inContext: dataStack.mainContext), 2) - let company = Helper.fetchEntity("Company", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 1)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertEqual(company.value(forKey: "name") as? String, "Facebook") - - dataStack.drop() - } - - func testCustomMappingAndCustomPrimaryKey() { - let dataStack = Helper.dataStackWithModelName("Contacts") - let objects = Helper.objectsFromJSON("images.json") as! [[String: Any]] - Sync.changes(objects, inEntityNamed: "Image", dataStack: dataStack, completion: nil) - - let array = Helper.fetchEntity("Image", sortDescriptors: [NSSortDescriptor(key: "url", ascending: true)], inContext: dataStack.mainContext) - XCTAssertEqual(array.count, 3) - let image = array.first - XCTAssertEqual(image!.value(forKey: "url") as? String, "http://sample.com/sample0.png") - - dataStack.drop() - } - - func testRelationshipsB() { - let dataStack = Helper.dataStackWithModelName("Contacts") - - let objects = Helper.objectsFromJSON("users_c.json") as! [[String: Any]] - Sync.changes(objects, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 4) - - let users = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 6)), inContext: dataStack.mainContext) - let user = users.first! - XCTAssertEqual(user.value(forKey: "name") as? String, "Shawn Merrill") - - let location = user.value(forKey: "location") as! NSManagedObject - XCTAssertEqual(location.value(forKey: "city") as? String, "New York") - XCTAssertEqual(location.value(forKey: "street") as? String, "Broadway") - XCTAssertEqual(location.value(forKey: "zipCode") as? NSNumber, NSNumber(value: 10012)) - - let profilePicturesCount = Helper.countForEntity("Image", predicate: NSPredicate(format: "user = %@", user), inContext: dataStack.mainContext) - XCTAssertEqual(profilePicturesCount, 3) - - dataStack.drop() - } - - // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated - // and one user deleted. In this test we try only inserting user, no update, no insert, so the second sync should leave us with - // 2 users with no changes and 1 inserted user. - func testSyncingWithOnlyInsertOperationType() { - let dataStack = Helper.dataStackWithModelName("Contacts") - - let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) - - let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - - let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertEqual(result.value(forKey: "email") as? String, "melisawhite@ovium.com") - - dataStack.drop() - } - - // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated - // and one user deleted. In this test we try only inserting user, no update, no insert, so the second sync should leave us with - // 2 users with no changes and 1 inserted user. After this is done, we'll try inserting again, this shouldn't make any changes. - func testSyncingWithMultipleInsertOperationTypes() { - let dataStack = Helper.dataStackWithModelName("Contacts") - - let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) - - let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - - let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertEqual(result.value(forKey: "email") as? String, "melisawhite@ovium.com") - - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - - dataStack.drop() - } - - // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated - // and one user deleted. In this test we try only updating users, no insert, no delete, so the second sync should leave us with - // one updated user and one inserted user, the third user will be discarded. - func testSyncingWithOnlyUpdateOperationType() { - let dataStack = Helper.dataStackWithModelName("Contacts") - - let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) - - let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.update], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) - - let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertEqual(result.value(forKey: "email") as? String, "updated@ovium.com") - - dataStack.drop() - } - - // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated - // and one user deleted. In this test we try only deleting users, no insert, no update, so the second sync should leave us with - // one inserted user, one deleted user and one discarded user. - func testSyncingWithOnlyDeleteOperationType() { - let dataStack = Helper.dataStackWithModelName("Contacts") - - let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) - - let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.delete], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - - let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertEqual(result.value(forKey: "email") as? String, "melisawhite@ovium.com") - - dataStack.drop() - } - - // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated - // and one user deleted. In this test we try inserting and updating users, no delete, so the second sync should leave us with - // one updated user, one inserted user, and one user with no changes. - func testSyncingWithInsertAndUpdateOperationType() { - let dataStack = Helper.dataStackWithModelName("Contacts") - - let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] - Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) - - let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] - Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert, .update], completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - - let user0 = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertEqual(user0.value(forKey: "email") as? String, "updated@ovium.com") - - let user1 = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 1)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! - XCTAssertNotNil(user1) - - dataStack.drop() - } - - // MARK: - Notes - - func testRelationshipsA() { - let objects = Helper.objectsFromJSON("users_notes.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Notes") - - Sync.changes(objects, inEntityNamed: "SuperUser", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("SuperUser", inContext: dataStack.mainContext), 4) - let users = Helper.fetchEntity("SuperUser", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 6)), inContext: dataStack.mainContext) - let user = users.first! - XCTAssertEqual(user.value(forKey: "name") as? String, "Shawn Merrill") - - let notesCount = Helper.countForEntity("SuperNote", predicate: NSPredicate(format: "superUser = %@", user), inContext: dataStack.mainContext) - XCTAssertEqual(notesCount, 5) - - dataStack.drop() - } - - func testObjectsForParent() { - let objects = Helper.objectsFromJSON("notes_for_user_a.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("InsertObjectsInParent") - dataStack.performInNewBackgroundContext { backgroundContext in - // First, we create a parent user, this user is the one that will own all the notes - let user = NSEntityDescription.insertNewObject(forEntityName: "SuperUser", into: backgroundContext) - user.setValue(NSNumber(value: 6), forKey: "remoteID") - - try! backgroundContext.save() - } - - // Then we fetch the user on the main context, because we don't want to break things between contexts - var users = Helper.fetchEntity("SuperUser", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 6)), inContext: dataStack.mainContext) - XCTAssertEqual(users.count, 1) - - // Finally we say "Sync all the notes, for this user" - Sync.changes(objects, inEntityNamed: "SuperNote", parent: users.first!, dataStack: dataStack, completion: nil) - - // Here we just make sure that the user has the notes that we just inserted - users = Helper.fetchEntity("SuperUser", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 6)), inContext: dataStack.mainContext) - let user = users.first! - XCTAssertEqual(user.value(forKey: "remoteID") as? NSNumber, NSNumber(value: 6)) - - let notesCount = Helper.countForEntity("SuperNote", predicate: NSPredicate(format: "superUser = %@", user), inContext: dataStack.mainContext) - XCTAssertEqual(notesCount, 2) - - dataStack.drop() - } - - func testTaggedNotesForUser() { - let objects = Helper.objectsFromJSON("tagged_notes.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Notes") - - Sync.changes(objects, inEntityNamed: "SuperNote", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("SuperNote", inContext: dataStack.mainContext), 3) - let notes = Helper.fetchEntity("SuperNote", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) - let note = notes.first! - XCTAssertEqual((note.value(forKey: "superTags") as? NSSet)!.allObjects.count, 2) - - XCTAssertEqual(Helper.countForEntity("SuperTag", inContext: dataStack.mainContext), 2) - let tags = Helper.fetchEntity("SuperTag", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 1)), inContext: dataStack.mainContext) - XCTAssertEqual(tags.count, 1) - - let tag = tags.first! - XCTAssertEqual((tag.value(forKey: "superNotes") as? NSSet)!.allObjects.count, 2) - dataStack.drop() - } - - func testCustomKeysInRelationshipsToMany() { - let objects = Helper.objectsFromJSON("custom_relationship_key_to_many.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("CustomRelationshipKey") - - Sync.changes(objects, inEntityNamed: "User", dataStack: dataStack, completion: nil) - - let array = Helper.fetchEntity("User", inContext: dataStack.mainContext) - let user = array.first! - XCTAssertEqual((user.value(forKey: "notes") as? NSSet)!.allObjects.count, 3) - - dataStack.drop() - } - - // MARK: - Recursive - - func testNumbersWithEmptyRelationship() { - let objects = Helper.objectsFromJSON("numbers.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Recursive") - - Sync.changes(objects, inEntityNamed: "Number", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Number", inContext: dataStack.mainContext), 6) - - dataStack.drop() - } - - func testRelationshipName() { - let objects = Helper.objectsFromJSON("numbers_in_collection.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Recursive") - - Sync.changes(objects, inEntityNamed: "Number", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Collection", inContext: dataStack.mainContext), 1) - - let numbers = Helper.fetchEntity("Number", inContext: dataStack.mainContext) - let number = numbers.first! - XCTAssertNotNil(number.value(forKey: "parent")) - XCTAssertEqual((number.value(forKey: "parent") as! NSManagedObject).value(forKey: "name") as? String, "Collection 1") - - dataStack.drop() - } - - // MARK: - Social - - func testCustomPrimaryKey() { - let objects = Helper.objectsFromJSON("comments-no-id.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Social") - - Sync.changes(objects, inEntityNamed: "SocialComment", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("SocialComment", inContext: dataStack.mainContext), 8) - let comments = Helper.fetchEntity("SocialComment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) - XCTAssertEqual(comments.count, 1) - XCTAssertEqual((comments.first!.value(forKey: "comments") as! NSSet).count, 3) - - let comment = comments.first! - XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") - - dataStack.drop() - } - - func testCustomPrimaryKeyInsideToManyRelationship() { - let objects = Helper.objectsFromJSON("stories-comments-no-ids.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Social") - - Sync.changes(objects, inEntityNamed: "Story", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Story", inContext: dataStack.mainContext), 3) - let stories = Helper.fetchEntity("Story", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) - let story = stories.first! - - XCTAssertEqual((story.value(forKey: "comments") as! NSSet).count, 3) - - XCTAssertEqual(Helper.countForEntity("SocialComment", inContext: dataStack.mainContext), 9) - var comments = Helper.fetchEntity("SocialComment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) - XCTAssertEqual(comments.count, 3) - - comments = Helper.fetchEntity("SocialComment", predicate: NSPredicate(format: "body = %@ AND story = %@", "comment 1", story), inContext: dataStack.mainContext) - XCTAssertEqual(comments.count, 1) - if let comment = comments.first { - XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") - XCTAssertEqual((comment.value(forKey: "story") as? NSManagedObject)!.value(forKey: "remoteID") as? NSNumber, NSNumber(value: 0)) - XCTAssertEqual((comment.value(forKey: "story") as? NSManagedObject)!.value(forKey: "title") as? String, "story 1") - } else { - XCTFail() - } - - dataStack.drop() - } - - func testCustomKeysInRelationshipsToOne() { - let objects = Helper.objectsFromJSON("custom_relationship_key_to_one.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Social") - - Sync.changes(objects, inEntityNamed: "Story", dataStack: dataStack, completion: nil) - - let array = Helper.fetchEntity("Story", inContext: dataStack.mainContext) - let story = array.first! - XCTAssertNotNil(story.value(forKey: "summarize")) - - dataStack.drop() - } - - // MARK: - Markets - - func testMarketsAndItems() { - let objects = Helper.objectsFromJSON("markets_items.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Markets") - - Sync.changes(objects, inEntityNamed: "Market", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Market", inContext: dataStack.mainContext), 2) - let markets = Helper.fetchEntity("Market", predicate: NSPredicate(format: "uniqueId = %@", "1"), inContext: dataStack.mainContext) - let market = markets.first! - XCTAssertEqual(market.value(forKey: "otherAttribute") as? String, "Market 1") - XCTAssertEqual((market.value(forKey: "items") as? NSSet)!.allObjects.count, 1) - - XCTAssertEqual(Helper.countForEntity("Item", inContext: dataStack.mainContext), 1) - let items = Helper.fetchEntity("Item", predicate: NSPredicate(format: "uniqueId = %@", "1"), inContext: dataStack.mainContext) - let item = items.first! - XCTAssertEqual(item.value(forKey: "otherAttribute") as? String, "Item 1") - XCTAssertEqual((item.value(forKey: "markets") as? NSSet)!.allObjects.count, 2) - - dataStack.drop() - } - - // MARK: - Organization - - func testOrganization() { - let json = Helper.objectsFromJSON("organizations-tree.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Organizations") - - Sync.changes(json, inEntityNamed: "OrganizationUnit", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("OrganizationUnit", inContext: dataStack.mainContext), 7) - - Sync.changes(json, inEntityNamed: "OrganizationUnit", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("OrganizationUnit", inContext: dataStack.mainContext), 7) - - dataStack.drop() - } - - // MARK: - Unique - - /** - * C and A share the same collection of B, so in the first block - * 2 entries of B get stored in A, in the second block this - * 2 entries of B get updated and one entry of C gets added. - */ - func testUniqueObject() { - let objects = Helper.objectsFromJSON("unique.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Unique") - - Sync.changes(objects, inEntityNamed: "A", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("A", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("B", inContext: dataStack.mainContext), 2) - XCTAssertEqual(Helper.countForEntity("C", inContext: dataStack.mainContext), 0) - - Sync.changes(objects, inEntityNamed: "C", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("A", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("B", inContext: dataStack.mainContext), 2) - XCTAssertEqual(Helper.countForEntity("C", inContext: dataStack.mainContext), 1) - - dataStack.drop() - } - - // MARK: - Patients => https://github.com/SyncDB/Sync/issues/121 - - func testPatients() { - let objects = Helper.objectsFromJSON("patients.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Patients") - - Sync.changes(objects, inEntityNamed: "Patient", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Patient", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Baseline", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Alcohol", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Fitness", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Weight", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Measure", inContext: dataStack.mainContext), 1) - - dataStack.drop() - } - - // MARK: - Bug 84 => https://github.com/SyncDB/Sync/issues/84 - - func testStaffAndfulfillers() { - let objects = Helper.objectsFromJSON("bug-number-84.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("84") - - Sync.changes(objects, inEntityNamed: "MSStaff", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("MSStaff", inContext: dataStack.mainContext), 1) - - let staff = Helper.fetchEntity("MSStaff", predicate: NSPredicate(format: "xid = %@", "mstaff_F58dVBTsXznvMpCPmpQgyV"), inContext: dataStack.mainContext) - let oneStaff = staff.first! - XCTAssertEqual(oneStaff.value(forKey: "image") as? String, "a.jpg") - XCTAssertEqual((oneStaff.value(forKey: "fulfillers") as? NSSet)!.allObjects.count, 2) - - let numberOffulfillers = Helper.countForEntity("MSFulfiller", inContext: dataStack.mainContext) - XCTAssertEqual(numberOffulfillers, 2) - - let fulfillers = Helper.fetchEntity("MSFulfiller", predicate: NSPredicate(format: "xid = %@", "ffr_AkAHQegYkrobp5xc2ySc5D"), inContext: dataStack.mainContext) - let fullfiller = fulfillers.first! - XCTAssertEqual(fullfiller.value(forKey: "name") as? String, "New York") - XCTAssertEqual((fullfiller.value(forKey: "staff") as? NSSet)!.allObjects.count, 1) - - dataStack.drop() - } - - // MARK: - Bug 113 => https://github.com/SyncDB/Sync/issues/113 - - func testCustomPrimaryKeyBug113() { - let objects = Helper.objectsFromJSON("bug-113-comments-no-id.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("113") - - Sync.changes(objects, inEntityNamed: "AwesomeComment", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("AwesomeComment", inContext: dataStack.mainContext), 8) - let comments = Helper.fetchEntity("AwesomeComment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) - XCTAssertEqual(comments.count, 1) - XCTAssertEqual((comments.first!.value(forKey: "awesomeComments") as! NSSet).count, 3) - - let comment = comments.first! - XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") - - dataStack.drop() - } - - func testCustomPrimaryKeyInsideToManyRelationshipBug113() { - let objects = Helper.objectsFromJSON("bug-113-stories-comments-no-ids.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("113") - - Sync.changes(objects, inEntityNamed: "AwesomeStory", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("AwesomeStory", inContext: dataStack.mainContext), 3) - let stories = Helper.fetchEntity("AwesomeStory", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) - let story = stories.first! - XCTAssertEqual((story.value(forKey: "awesomeComments") as! NSSet).count, 3) - - XCTAssertEqual(Helper.countForEntity("AwesomeComment", inContext: dataStack.mainContext), 9) - var comments = Helper.fetchEntity("AwesomeComment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) - XCTAssertEqual(comments.count, 3) - - comments = Helper.fetchEntity("AwesomeComment", predicate: NSPredicate(format: "body = %@ AND awesomeStory = %@", "comment 1", story), inContext: dataStack.mainContext) - XCTAssertEqual(comments.count, 1) - if let comment = comments.first { - XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") - let awesomeStory = comment.value(forKey: "awesomeStory") as! NSManagedObject - XCTAssertEqual(awesomeStory.value(forKey: "remoteID") as? NSNumber, NSNumber(value: 0)) - XCTAssertEqual(awesomeStory.value(forKey: "title") as? String, "story 1") - } else { - XCTFail() - } - - dataStack.drop() - } - - func testCustomKeysInRelationshipsToOneBug113() { - let objects = Helper.objectsFromJSON("bug-113-custom_relationship_key_to_one.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("113") - - Sync.changes(objects, inEntityNamed: "AwesomeStory", dataStack: dataStack, completion: nil) - - let array = Helper.fetchEntity("AwesomeStory", inContext: dataStack.mainContext) - let story = array.first! - XCTAssertNotNil(story.value(forKey: "awesomeSummarize")) - - dataStack.drop() - } - - // MARK: - Bug 125 => https://github.com/SyncDB/Sync/issues/125 - - func testNilRelationshipsAfterUpdating_Sync_1_0_10() { - let formDictionary = Helper.objectsFromJSON("bug-125.json") as! [String: Any] - let uri = formDictionary["uri"] as! String - let dataStack = Helper.dataStackWithModelName("125") - - Sync.changes([formDictionary], inEntityNamed: "Form", predicate: NSPredicate(format: "uri == %@", uri), dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Form", inContext: dataStack.mainContext), 1) - - XCTAssertEqual(Helper.countForEntity("Element", inContext: dataStack.mainContext), 11) - - XCTAssertEqual(Helper.countForEntity("SelectionItem", inContext: dataStack.mainContext), 4) - - XCTAssertEqual(Helper.countForEntity("Model", inContext: dataStack.mainContext), 1) - - XCTAssertEqual(Helper.countForEntity("ModelProperty", inContext: dataStack.mainContext), 9) - - XCTAssertEqual(Helper.countForEntity("Restriction", inContext: dataStack.mainContext), 3) - - let array = Helper.fetchEntity("Form", inContext: dataStack.mainContext) - let form = array.first! - let element = form.value(forKey: "element") as! NSManagedObject - let model = form.value(forKey: "model") as! NSManagedObject - XCTAssertNotNil(element) - XCTAssertNotNil(model) - - dataStack.drop() - } - - func testStoryToSummarize() { - let formDictionary = Helper.objectsFromJSON("story-summarize.json") as! [String: Any] - let dataStack = Helper.dataStackWithModelName("Social") - - Sync.changes([formDictionary], inEntityNamed: "Story", predicate: NSPredicate(format: "remoteID == %@", NSNumber(value: 1)), dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Story", inContext: dataStack.mainContext), 1) - let stories = Helper.fetchEntity("Story", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 1)), inContext: dataStack.mainContext) - let story = stories.first! - let summarize = story.value(forKey: "summarize") as! NSManagedObject - XCTAssertEqual(summarize.value(forKey: "remoteID") as? NSNumber, NSNumber(value: 1)) - XCTAssertEqual((story.value(forKey: "comments") as! NSSet).count, 1) - - XCTAssertEqual(Helper.countForEntity("SocialComment", inContext: dataStack.mainContext), 1) - let comments = Helper.fetchEntity("SocialComment", predicate: NSPredicate(format: "body = %@", "Hi"), inContext: dataStack.mainContext) - XCTAssertEqual(comments.count, 1) - - dataStack.drop() - } - - /** - * When having JSONs like this: - * { - * "id":12345, - * "name":"My Project", - * "category_id":12345 - * } - * It will should map category_id with the necesary category object using the ID 12345 - */ - func testIDRelationshipMapping() { - let usersDictionary = Helper.objectsFromJSON("users_a.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("Notes") - - Sync.changes(usersDictionary, inEntityNamed: "SuperUser", dataStack: dataStack, completion: nil) - - let usersCount = Helper.countForEntity("SuperUser", inContext: dataStack.mainContext) - XCTAssertEqual(usersCount, 8) - - let notesDictionary = Helper.objectsFromJSON("notes_with_user_id.json") as! [[String: Any]] - - Sync.changes(notesDictionary, inEntityNamed: "SuperNote", dataStack: dataStack, completion: nil) - - let notesCount = Helper.countForEntity("SuperNote", inContext: dataStack.mainContext) - XCTAssertEqual(notesCount, 5) - - let notes = Helper.fetchEntity("SuperNote", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) - let note = notes.first! - let user = note.value(forKey: "superUser")! - XCTAssertEqual((user as AnyObject).value(forKey: "name") as? String, "Melisa White") - - dataStack.drop() - } - - /** - * When having JSONs like this: - * { - * "id":12345, - * "name":"My Project", - * "category":12345 - * } - * It will should map category_id with the necesary category object using the ID 12345, but adding a custom remoteKey would make it map to category with ID 12345 - */ - func testIDRelationshipCustomMapping() { - let usersDictionary = Helper.objectsFromJSON("users_a.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("NotesB") - - Sync.changes(usersDictionary, inEntityNamed: "SuperUserB", dataStack: dataStack, completion: nil) - - let usersCount = Helper.countForEntity("SuperUserB", inContext: dataStack.mainContext) - XCTAssertEqual(usersCount, 8) - - let notesDictionary = Helper.objectsFromJSON("notes_with_user_id_custom.json") as! [[String: Any]] - - Sync.changes(notesDictionary, inEntityNamed: "SuperNoteB", dataStack: dataStack, completion: nil) - - let notesCount = Helper.countForEntity("SuperNoteB", inContext: dataStack.mainContext) - XCTAssertEqual(notesCount, 5) - - let notes = Helper.fetchEntity("SuperNoteB", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) - let note = notes.first! - let user = note.value(forKey: "superUser")! - XCTAssertEqual((user as AnyObject).value(forKey: "name") as? String, "Melisa White") - - dataStack.drop() - } - - // MARK: - Ordered Social - - func testCustomPrimaryKeyInOrderedRelationship() { - let objects = Helper.objectsFromJSON("comments-no-id.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("OrderedSocial") - - Sync.changes(objects, inEntityNamed: "Comment", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Comment", inContext: dataStack.mainContext), 8) - let comments = Helper.fetchEntity("Comment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) - XCTAssertEqual(comments.count, 1) - XCTAssertEqual((comments.first!.value(forKey: "comments") as! NSOrderedSet).count, 3) - - let comment = comments.first! - XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") - - dataStack.drop() - } - - // MARK: - Bug 179 => https://github.com/SyncDB/Sync/issues/179 - - func testConnectMultipleRelationships() { - let places = Helper.objectsFromJSON("bug-179-places.json") as! [[String: Any]] - let routes = Helper.objectsFromJSON("bug-179-routes.json") as! [String: Any] - let dataStack = Helper.dataStackWithModelName("179") - - Sync.changes(places, inEntityNamed: "Place", dataStack: dataStack, completion: nil) - Sync.changes([routes], inEntityNamed: "Route", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Route", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Place", inContext: dataStack.mainContext), 2) - let importedRoutes = Helper.fetchEntity("Route", predicate: nil, inContext: dataStack.mainContext) - XCTAssertEqual(importedRoutes.count, 1) - let importedRouter = importedRoutes.first! - XCTAssertEqual(importedRouter.value(forKey: "ident") as? String, "1") - - let startPlace = importedRoutes.first!.value(forKey: "startPlace") as! NSManagedObject - let endPlace = importedRoutes.first!.value(forKey: "endPlace") as! NSManagedObject - XCTAssertEqual(startPlace.value(forKey: "name") as? String, "Here") - XCTAssertEqual(endPlace.value(forKey: "name") as? String, "There") - - dataStack.drop() - } - - // MARK: - Bug 202 => https://github.com/SyncDB/Sync/issues/202 - - func testManyToManyKeyNotAllowedHere() { - let dataStack = Helper.dataStackWithModelName("202") - - let initialInsert = Helper.objectsFromJSON("bug-202-a.json") as! [[String: Any]] - Sync.changes(initialInsert, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) - - let removeAll = Helper.objectsFromJSON("bug-202-b.json") as! [[String: Any]] - Sync.changes(removeAll, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) - - dataStack.drop() - } - - // MARK: - Automatic use of id as remoteID - - func testIDAsRemoteID() { - let dataStack = Helper.dataStackWithModelName("id") - - let users = Helper.objectsFromJSON("id.json") as! [[String: Any]] - Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) - - dataStack.drop() - } - - // MARK: - Bug 157 => https://github.com/SyncDB/Sync/issues/157 - - func testBug157() { - let dataStack = Helper.dataStackWithModelName("157") - - // 3 locations get synced, their references get ignored since no cities are found - let locations = Helper.objectsFromJSON("157-locations.json") as! [[String: Any]] - Sync.changes(locations, inEntityNamed: "Location", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Location", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("City", inContext: dataStack.mainContext), 0) - - // 3 cities get synced - let cities = Helper.objectsFromJSON("157-cities.json") as! [[String: Any]] - Sync.changes(cities, inEntityNamed: "City", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Location", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("City", inContext: dataStack.mainContext), 3) - - // 3 locations get synced, but now since their references are available the relationships get made - Sync.changes(locations, inEntityNamed: "Location", dataStack: dataStack, completion: nil) - var location1 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 0"), inContext: dataStack.mainContext).first - var location1City = location1?.value(forKey: "city") as? NSManagedObject - XCTAssertEqual(location1City?.value(forKey: "name") as? String, "Oslo") - var location2 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 1"), inContext: dataStack.mainContext).first - var location2City = location2?.value(forKey: "city") as? NSManagedObject - XCTAssertEqual(location2City?.value(forKey: "name") as? String, "Paris") - var location3 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 2"), inContext: dataStack.mainContext).first - var location3City = location3?.value(forKey: "city") as? NSManagedObject - XCTAssertNil(location3City?.value(forKey: "name") as? String) - - // Finally we update the relationships to test changing relationships - let updatedLocations = Helper.objectsFromJSON("157-locations-update.json") as! [[String: Any]] - Sync.changes(updatedLocations, inEntityNamed: "Location", dataStack: dataStack, completion: nil) - location1 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 0"), inContext: dataStack.mainContext).first - location1City = location1?.value(forKey: "city") as? NSManagedObject - XCTAssertNil(location1City?.value(forKey: "name") as? String) - location2 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 1"), inContext: dataStack.mainContext).first - location2City = location2?.value(forKey: "city") as? NSManagedObject - XCTAssertEqual(location2City?.value(forKey: "name") as? String, "Oslo") - location3 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 2"), inContext: dataStack.mainContext).first - location3City = location3?.value(forKey: "city") as? NSManagedObject - XCTAssertEqual(location3City?.value(forKey: "name") as? String, "Paris") - - dataStack.drop() - } - - // MARK: - Add support for cancellable sync processes https://github.com/SyncDB/Sync/pull/216 - - func testOperation() { - let dataStack = Helper.dataStackWithModelName("id") - - let users = Helper.objectsFromJSON("id.json") as! [[String: Any]] - let operation = Sync(changes: users, inEntityNamed: "User", predicate: nil, dataStack: dataStack) - operation.start() - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) - - dataStack.drop() - } - - // MARK: - Support multiple ids to set a relationship (to-many) => https://github.com/SyncDB/Sync/issues/151 - // Notes have to be unique, two users can't have the same note. - - func testMultipleIDRelationshipToMany() { - let dataStack = Helper.dataStackWithModelName("151-to-many") - - // Inserts 3 users, it ignores the relationships since no notes are found - let users = Helper.objectsFromJSON("151-to-many-users.json") as! [[String: Any]] - Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 0) - - // Inserts 3 notes - let notes = Helper.objectsFromJSON("151-to-many-notes.json") as! [[String: Any]] - Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) - let savedUsers = Helper.fetchEntity("User", inContext: dataStack.mainContext) - var total = 0 - for user in savedUsers { - let notes = user.value(forKey: "notes") as? Set<NSManagedObject> ?? Set<NSManagedObject>() - total += notes.count - } - XCTAssertEqual(total, 0) - - // Updates the first 3 users, but now it makes the relationships with the notes - Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) - var user10 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 10"), inContext: dataStack.mainContext).first - var user10Notes = user10?.value(forKey: "notes") as? Set<NSManagedObject> - XCTAssertEqual(user10Notes?.count, 2) - var user11 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 11"), inContext: dataStack.mainContext).first - var user11Notes = user11?.value(forKey: "notes") as? Set<NSManagedObject> - XCTAssertEqual(user11Notes?.count, 1) - var user12 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 12"), inContext: dataStack.mainContext).first - var user12Notes = user12?.value(forKey: "notes") as? Set<NSManagedObject> - XCTAssertEqual(user12Notes?.count, 0) - var note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 0"), inContext: dataStack.mainContext).first - var note0User = note0?.value(forKey: "user") as? NSManagedObject - XCTAssertEqual(note0User?.value(forKey: "userID") as? Int, 10) - var note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 1"), inContext: dataStack.mainContext).first - var note1User = note1?.value(forKey: "user") as? NSManagedObject - XCTAssertEqual(note1User?.value(forKey: "userID") as? Int, 10) - var note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 2"), inContext: dataStack.mainContext).first - var note2User = note2?.value(forKey: "user") as? NSManagedObject - XCTAssertEqual(note2User?.value(forKey: "userID") as? Int, 11) - - // Updates the first 3 users again, but now it changes all the relationships - let updatedUsers = Helper.objectsFromJSON("151-to-many-users-update.json") as! [[String: Any]] - Sync.changes(updatedUsers, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) - user10 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 10"), inContext: dataStack.mainContext).first - user10Notes = user10?.value(forKey: "notes") as? Set<NSManagedObject> - XCTAssertEqual(user10Notes?.count, 0) - user11 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 11"), inContext: dataStack.mainContext).first - user11Notes = user11?.value(forKey: "notes") as? Set<NSManagedObject> - XCTAssertEqual(user11Notes?.count, 1) - user12 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 12"), inContext: dataStack.mainContext).first - user12Notes = user12?.value(forKey: "notes") as? Set<NSManagedObject> - XCTAssertEqual(user12Notes?.count, 2) - note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 0"), inContext: dataStack.mainContext).first - note0User = note0?.value(forKey: "user") as? NSManagedObject - XCTAssertEqual(note0User?.value(forKey: "userID") as? Int, 12) - note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 1"), inContext: dataStack.mainContext).first - note1User = note1?.value(forKey: "user") as? NSManagedObject - XCTAssertEqual(note1User?.value(forKey: "userID") as? Int, 12) - note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 2"), inContext: dataStack.mainContext).first - note2User = note2?.value(forKey: "user") as? NSManagedObject - XCTAssertEqual(note2User?.value(forKey: "userID") as? Int, 11) - - dataStack.drop() - } - - // MARK: - Support multiple ids to set a relationship (to-many) => https://github.com/SyncDB/Sync/issues/151 - // Notes have to be unique, two users can't have the same note. - - func testOrderedMultipleIDRelationshipToMany() { - let dataStack = Helper.dataStackWithModelName("151-ordered-to-many") - - // Inserts 3 users, it ignores the relationships since no notes are found - let users = Helper.objectsFromJSON("151-to-many-users.json") as! [[String: Any]] - Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 0) - - // Inserts 3 notes - let notes = Helper.objectsFromJSON("151-to-many-notes.json") as! [[String: Any]] - Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) - let savedUsers = Helper.fetchEntity("User", inContext: dataStack.mainContext) - var total = 0 - for user in savedUsers { - let notes = user.value(forKey: "notes") as? Set<NSManagedObject> ?? Set<NSManagedObject>() - total += notes.count - } - XCTAssertEqual(total, 0) - - // Updates the first 3 users, but now it makes the relationships with the notes - Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) - var user10 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 10"), inContext: dataStack.mainContext).first - var user10Notes = user10?.value(forKey: "notes") as? NSOrderedSet - XCTAssertEqual(user10Notes?.set.count, 2) - var user11 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 11"), inContext: dataStack.mainContext).first - var user11Notes = user11?.value(forKey: "notes") as? NSOrderedSet - XCTAssertEqual(user11Notes?.set.count, 1) - var user12 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 12"), inContext: dataStack.mainContext).first - var user12Notes = user12?.value(forKey: "notes") as? NSOrderedSet - XCTAssertEqual(user12Notes?.set.count, 0) - - // Updates the first 3 users again, but now it changes all the relationships - let updatedUsers = Helper.objectsFromJSON("151-to-many-users-update.json") as! [[String: Any]] - Sync.changes(updatedUsers, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) - user10 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 10"), inContext: dataStack.mainContext).first - user10Notes = user10?.value(forKey: "notes") as? NSOrderedSet - XCTAssertEqual(user10Notes?.set.count, 0) - user11 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 11"), inContext: dataStack.mainContext).first - user11Notes = user11?.value(forKey: "notes") as? NSOrderedSet - XCTAssertEqual(user11Notes?.set.count, 1) - user12 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 12"), inContext: dataStack.mainContext).first - user12Notes = user12?.value(forKey: "notes") as? NSOrderedSet - XCTAssertEqual(user12Notes?.set.count, 2) - - dataStack.drop() - } - - // MARK: - Support multiple ids to set a relationship (many-to-many) => https://github.com/SyncDB/Sync/issues/151 - - func testMultipleIDRelationshipManyToMany() { - let dataStack = Helper.dataStackWithModelName("151-many-to-many") - - // Inserts 4 notes - let notes = Helper.objectsFromJSON("151-many-to-many-notes.json") as! [[String: Any]] - Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) - - // Inserts 3 tags - let tags = Helper.objectsFromJSON("151-many-to-many-tags.json") as! [[String: Any]] - Sync.changes(tags, inEntityNamed: "Tag", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) - let savedNotes = Helper.fetchEntity("Note", inContext: dataStack.mainContext) - var total = 0 - for note in savedNotes { - let tags = note.value(forKey: "tags") as? Set<NSManagedObject> ?? Set<NSManagedObject>() - total += tags.count - } - XCTAssertEqual(total, 0) - - // Updates the first 4 notes, but now it makes the relationships with the tags - Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) - var note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 0"), inContext: dataStack.mainContext).first - var note0Tags = note0?.value(forKey: "tags") as? Set<NSManagedObject> - XCTAssertEqual(note0Tags?.count, 2) - var note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 1"), inContext: dataStack.mainContext).first - var note1Tags = note1?.value(forKey: "tags") as? Set<NSManagedObject> - XCTAssertEqual(note1Tags?.count, 1) - var note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 2"), inContext: dataStack.mainContext).first - var note2Tags = note2?.value(forKey: "tags") as? Set<NSManagedObject> - XCTAssertEqual(note2Tags?.count, 0) - var note3 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 3"), inContext: dataStack.mainContext).first - var note3Tags = note3?.value(forKey: "tags") as? Set<NSManagedObject> - XCTAssertEqual(note3Tags?.count, 1) - - // Updates the first 4 notes again, but now it changes all the relationships - let updatedNotes = Helper.objectsFromJSON("151-many-to-many-notes-update.json") as! [[String: Any]] - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) - Sync.changes(updatedNotes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) - note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 0"), inContext: dataStack.mainContext).first - note0Tags = note0?.value(forKey: "tags") as? Set<NSManagedObject> - XCTAssertEqual(note0Tags?.count, 1) - note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 1"), inContext: dataStack.mainContext).first - note1Tags = note1?.value(forKey: "tags") as? Set<NSManagedObject> - XCTAssertEqual(note1Tags?.count, 0) - note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 2"), inContext: dataStack.mainContext).first - note2Tags = note2?.value(forKey: "tags") as? Set<NSManagedObject> - XCTAssertEqual(note2Tags?.count, 2) - note3 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 3"), inContext: dataStack.mainContext).first - note3Tags = note3?.value(forKey: "tags") as? Set<NSManagedObject> - XCTAssertEqual(note3Tags?.count, 0) - - dataStack.drop() - } - - // MARK: - Support multiple ids to set a relationship (many-to-many) => https://github.com/SyncDB/Sync/issues/151 - - func testOrderedMultipleIDRelationshipManyToMany() { - let dataStack = Helper.dataStackWithModelName("151-ordered-many-to-many") - - // Inserts 4 notes - let notes = Helper.objectsFromJSON("151-many-to-many-notes.json") as! [[String: Any]] - Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) - - // Inserts 3 tags - let tags = Helper.objectsFromJSON("151-many-to-many-tags.json") as! [[String: Any]] - Sync.changes(tags, inEntityNamed: "Tag", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) - let savedNotes = Helper.fetchEntity("Note", inContext: dataStack.mainContext) - var total = 0 - for note in savedNotes { - let tags = note.value(forKey: "tags") as? Set<NSManagedObject> ?? Set<NSManagedObject>() - total += tags.count - } - XCTAssertEqual(total, 0) - - // Updates the first 4 notes, but now it makes the relationships with the tags - Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) - var note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 0"), inContext: dataStack.mainContext).first - var note0Tags = note0?.value(forKey: "tags") as? NSOrderedSet - XCTAssertEqual(note0Tags?.count, 2) - var note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 1"), inContext: dataStack.mainContext).first - var note1Tags = note1?.value(forKey: "tags") as? NSOrderedSet - XCTAssertEqual(note1Tags?.count, 1) - var note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 2"), inContext: dataStack.mainContext).first - var note2Tags = note2?.value(forKey: "tags") as? NSOrderedSet - XCTAssertEqual(note2Tags?.count, 0) - var note3 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 3"), inContext: dataStack.mainContext).first - var note3Tags = note3?.value(forKey: "tags") as? NSOrderedSet - XCTAssertEqual(note3Tags?.count, 1) - - // Updates the first 4 notes again, but now it changes all the relationships - let updatedNotes = Helper.objectsFromJSON("151-many-to-many-notes-update.json") as! [[String: Any]] - XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) - Sync.changes(updatedNotes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) - note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 0"), inContext: dataStack.mainContext).first - note0Tags = note0?.value(forKey: "tags") as? NSOrderedSet - XCTAssertEqual(note0Tags?.set.count, 1) - note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 1"), inContext: dataStack.mainContext).first - note1Tags = note1?.value(forKey: "tags") as? NSOrderedSet - XCTAssertEqual(note1Tags?.set.count, 0) - note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 2"), inContext: dataStack.mainContext).first - note2Tags = note2?.value(forKey: "tags") as? NSOrderedSet - XCTAssertEqual(note2Tags?.set.count, 2) - note3 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 3"), inContext: dataStack.mainContext).first - note3Tags = note3?.value(forKey: "tags") as? NSOrderedSet - XCTAssertEqual(note3Tags?.count, 0) - - dataStack.drop() - } - - // MARK: - Bug 257 => https://github.com/SyncDB/Sync/issues/257 - - func testBug257() { - let dataStack = Helper.dataStackWithModelName("257") - - let JSON = Helper.objectsFromJSON("bug-257.json") as! [String: Any] - Sync.changes([JSON], inEntityNamed: "Workout", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Workout", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Exercise", inContext: dataStack.mainContext), 2) - - dataStack.drop() - } - - // MARK: - Bug 254 => https://github.com/SyncDB/Sync/issues/254 - - func testBug254() { - let dataStack = Helper.dataStackWithModelName("254") - - let JSON = Helper.objectsFromJSON("bug-254.json") as! [String: Any] - Sync.changes([JSON], inEntityNamed: "House", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("House", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Human", inContext: dataStack.mainContext), 1) - - // Verify correct "House -> Resident" connections - let house = Helper.fetchEntity("House", predicate: NSPredicate(format: "id = 0"), inContext: dataStack.mainContext).first - let residents = house?.value(forKey: "residents") as? Set<NSManagedObject> - let resident = residents?.first - XCTAssertEqual(resident?.value(forKey: "id") as? Int, 0) - - let residentHouse = resident?.value(forKey: "residenthouse") as? NSManagedObject - XCTAssertEqual(residentHouse?.value(forKey: "id") as? Int, 0) - - // Verify empty "Ownhouses -> Owners" connections - let human = Helper.fetchEntity("Human", predicate: NSPredicate(format: "id = 0"), inContext: dataStack.mainContext).first - let ownhouses = human?.value(forKey: "ownhouses") as? Set<NSManagedObject> - XCTAssertEqual(ownhouses?.count, 0) - - dataStack.drop() - } - - // MARK: Bug 260 => https://github.com/SyncDB/Sync/issues/260 - - func testBug260CamelCase() { - let dataStack = Helper.dataStackWithModelName("ToOne") - - let snakeCaseJSON = Helper.objectsFromJSON("to-one-snakecase.json") as! [String: Any] - Sync.changes([snakeCaseJSON], inEntityNamed: "RentedHome", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("RentedHome", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("LegalPerson", inContext: dataStack.mainContext), 1) - - dataStack.drop() - } - - func testBug260SnakeCase() { - let dataStack = Helper.dataStackWithModelName("ToOne") - - let camelCaseJSON = Helper.objectsFromJSON("to-one-camelcase.json") as! [String: Any] - Sync.changes([camelCaseJSON], inEntityNamed: "RentedHome", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("RentedHome", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("LegalPerson", inContext: dataStack.mainContext), 1) - - dataStack.drop() - } - - // MARK: Bug 239 => https://github.com/SyncDB/Sync/pull/239 - - func testBug239() { - let carsObject = Helper.objectsFromJSON("bug-239.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("239") - Sync.changes(carsObject, inEntityNamed: "Racecar", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Racecar", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Passenger", inContext: dataStack.mainContext), 2) - - let racecars = Helper.fetchEntity("Racecar", predicate: nil, inContext: dataStack.mainContext) - let racecar = racecars.first! - XCTAssertEqual((racecar.value(forKey: "passengers") as? NSSet)!.allObjects.count, 2) - - dataStack.drop() - } - - // MARK: - https://github.com/SyncDB/Sync/issues/225 - - func test225ReplacedTag() { - let dataStack = Helper.dataStackWithModelName("225") - - let usersA = Helper.objectsFromJSON("225-a.json") as! [[String: Any]] - Sync.changes(usersA, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) - - // This should remove the old tag reference to the user and insert this new one. - let usersB = Helper.objectsFromJSON("225-a-replaced.json") as! [[String: Any]] - Sync.changes(usersB, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) - - let user = Helper.fetchEntity("User", inContext: dataStack.mainContext).first! - let predicate = NSPredicate(format: "ANY users IN %@", [user]) - let tags = Helper.fetchEntity("Tag", predicate: predicate, inContext: dataStack.mainContext) - XCTAssertEqual(tags.count, 1) - - dataStack.drop() - } - - func test225RemovedTagsWithEmptyArray() { - let dataStack = Helper.dataStackWithModelName("225") - - let usersA = Helper.objectsFromJSON("225-a.json") as! [[String: Any]] - Sync.changes(usersA, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) - - // This should remove all the references. - let usersB = Helper.objectsFromJSON("225-a-empty.json") as! [[String: Any]] - Sync.changes(usersB, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - - // WARNING: Maybe this shouldn't be 0, but should be 1 instead, since it shouldn't delete the - // object, but instead, it should just remove the reference. - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) - - let user = Helper.fetchEntity("User", inContext: dataStack.mainContext).first! - let predicate = NSPredicate(format: "ANY users IN %@", [user]) - let tags = Helper.fetchEntity("Tag", predicate: predicate, inContext: dataStack.mainContext) - XCTAssertEqual(tags.count, 0) - - dataStack.drop() - } - - func test225RemovedTagsWithNull() { - let dataStack = Helper.dataStackWithModelName("225") - - let usersA = Helper.objectsFromJSON("225-a.json") as! [[String: Any]] - Sync.changes(usersA, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) - - // WARNING: Maybe this shouldn't be 0, but should be 1 instead, since it shouldn't delete the - // object, but instead, it should just remove the reference. - let usersB = Helper.objectsFromJSON("225-a-null.json") as! [[String: Any]] - Sync.changes(usersB, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) - - let user = Helper.fetchEntity("User", inContext: dataStack.mainContext).first! - let predicate = NSPredicate(format: "ANY users IN %@", [user]) - let tags = Helper.fetchEntity("Tag", predicate: predicate, inContext: dataStack.mainContext) - XCTAssertEqual(tags.count, 0) - - dataStack.drop() - } - - func test280() { - let dataStack = Helper.dataStackWithModelName("280") - - let routes = Helper.objectsFromJSON("280.json") as! [[String: Any]] - Sync.changes(routes, inEntityNamed: "Route", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Route", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("RoutePolylineItem", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("RouteStop", inContext: dataStack.mainContext), 1) - - Sync.changes(routes, inEntityNamed: "Route", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Route", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("RoutePolylineItem", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("RouteStop", inContext: dataStack.mainContext), 1) - - dataStack.drop() - } - - func test283() { - let dataStack = Helper.dataStackWithModelName("283") - - let taskLists = Helper.objectsFromJSON("283.json") as! [[String: Any]] - Sync.changes(taskLists, inEntityNamed: "TaskList", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("TaskList", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Owner", inContext: dataStack.mainContext), 1) - - let taskList = Helper.fetchEntity("TaskList", inContext: dataStack.mainContext).first! - let owner = taskList.value(forKey: "owner") as? NSManagedObject - XCTAssertNotNil(owner) - - let participants = taskList.value(forKey: "participants") as? NSSet ?? NSSet() - XCTAssertEqual(participants.count, 0) - - dataStack.drop() - } - - func test320RemoveOneToToneWithNull() { - let dataStack = Helper.dataStackWithModelName("320") - - let tagA = NSEntityDescription.insertNewObject(forEntityName: "Tag", into: dataStack.mainContext) - tagA.setValue(10, forKey: "remoteID") - - let userA = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) - userA.setValue(1, forKey: "remoteID") - userA.setValue(tagA, forKey: "tag") - - try! dataStack.mainContext.save() - - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) - - let usersB = Helper.objectsFromJSON("320.json") as! [[String: Any]] - Sync.changes(usersB, inEntityNamed: "User", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) - - let user = Helper.fetchEntity("User", inContext: dataStack.mainContext).first! - let predicate = NSPredicate(format: "ANY user = %@", user) - let tag = Helper.fetchEntity("Tag", predicate: predicate, inContext: dataStack.mainContext) - XCTAssertEqual(tag.count, 0) - - dataStack.drop() - } - - func test233() { - let dataStack = Helper.dataStackWithModelName("233") - - let slide1 = NSEntityDescription.insertNewObject(forEntityName: "Slide", into: dataStack.mainContext) - slide1.setValue(1, forKey: "id") - - let slide2 = NSEntityDescription.insertNewObject(forEntityName: "Slide", into: dataStack.mainContext) - slide2.setValue(2, forKey: "id") - - let presentation = NSEntityDescription.insertNewObject(forEntityName: "Presentation", into: dataStack.mainContext) - presentation.setValue(1, forKey: "id") - - let slides = NSMutableOrderedSet() - slides.add(slide1) - slides.add(slide2) - - presentation.setValue(slides, forKey: "slides") - - try! dataStack.mainContext.save() - - XCTAssertEqual(Helper.countForEntity("Presentation", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Slide", inContext: dataStack.mainContext), 2) - let lastSlide = Helper.fetchEntity("Presentation", inContext: dataStack.mainContext).first!.mutableOrderedSetValue(forKey: "slides").lastObject as! NSManagedObject - let lastSlideID = lastSlide.value(forKey: "id") as! Int - XCTAssertEqual(lastSlideID, 2) - - // Change order of slides, before it was [1, 2], now it will be [2, 1] - let presentationOrderB = Helper.objectsFromJSON("233.json") as! [[String: Any]] - Sync.changes(presentationOrderB, inEntityNamed: "Presentation", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Presentation", inContext: dataStack.mainContext), 1) - - let firstSlide = Helper.fetchEntity("Presentation", inContext: dataStack.mainContext).first!.mutableOrderedSetValue(forKey: "slides").firstObject as! NSManagedObject - let firstSlideID = firstSlide.value(forKey: "id") as! Int - - // check if order is properly updated - XCTAssertEqual(firstSlideID, lastSlideID) - - dataStack.drop() - } - - // https://github.com/SyncDB/Sync/issues/327 - - func test327OrderedToMany() { - let dataStack = Helper.dataStackWithModelName("233") - - let slide1 = NSEntityDescription.insertNewObject(forEntityName: "Slide", into: dataStack.mainContext) - slide1.setValue(1, forKey: "id") - - let slide2 = NSEntityDescription.insertNewObject(forEntityName: "Slide", into: dataStack.mainContext) - slide2.setValue(2, forKey: "id") - - let presentation = NSEntityDescription.insertNewObject(forEntityName: "Presentation", into: dataStack.mainContext) - presentation.setValue(1, forKey: "id") - - let slides = NSMutableOrderedSet() - slides.add(slide1) - slides.add(slide2) - - presentation.setValue(slides, forKey: "slides") - - try! dataStack.mainContext.save() - - XCTAssertEqual(Helper.countForEntity("Presentation", inContext: dataStack.mainContext), 1) - XCTAssertEqual(Helper.countForEntity("Slide", inContext: dataStack.mainContext), 2) - let lastSlide = Helper.fetchEntity("Presentation", inContext: dataStack.mainContext).first!.mutableOrderedSetValue(forKey: "slides").lastObject as! NSManagedObject - let lastSlideID = lastSlide.value(forKey: "id") as! Int - XCTAssertEqual(lastSlideID, 2) - - // Change order of slides, before it was [1, 2], now it will be [2, 1] - let presentationOrderB = Helper.objectsFromJSON("237.json") as! [[String: Any]] - Sync.changes(presentationOrderB, inEntityNamed: "Presentation", dataStack: dataStack, completion: nil) - - XCTAssertEqual(Helper.countForEntity("Presentation", inContext: dataStack.mainContext), 1) - - let firstSlide = Helper.fetchEntity("Presentation", inContext: dataStack.mainContext).first!.mutableOrderedSetValue(forKey: "slides").firstObject as! NSManagedObject - let firstSlideID = firstSlide.value(forKey: "id") as! Int - - // check if order is properly updated - XCTAssertEqual(firstSlideID, lastSlideID) - - dataStack.drop() - } - - // https://github.com/SyncDB/Sync/issues/265 - - func test265() { - let dataStack = Helper.dataStackWithModelName("265") - let players = Helper.objectsFromJSON("265.json") as! [[String: Any]] - Sync.changes(players, inEntityNamed: "Player", dataStack: dataStack, completion: nil) - - // Player 1 - // Has one player group: 1 - - // Player group 1 - // This player group has two players: [1] - - // This should be 1, but sadly it's two :( - XCTAssertEqual(Helper.countForEntity("Player", inContext: dataStack.mainContext), 2) - XCTAssertEqual(Helper.countForEntity("PlayerGroup", inContext: dataStack.mainContext), 1) - dataStack.drop() - } - - func test3ca82a0() { - let dataStack = Helper.dataStackWithModelName("3ca82a0") - - let taskLists = Helper.objectsFromJSON("3ca82a0.json") as! [[String: Any]] - Sync.changes(taskLists, inEntityNamed: "Article", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Article", inContext: dataStack.mainContext), 2) - XCTAssertEqual(Helper.countForEntity("ArticleTag", inContext: dataStack.mainContext), 1) - - dataStack.drop() - } - - // MARK: Bug 277 => https://github.com/SyncDB/Sync/pull/277 - - func test277() { - let carsObject = Helper.objectsFromJSON("277.json") as! [[String: Any]] - let dataStack = Helper.dataStackWithModelName("277") - Sync.changes(carsObject, inEntityNamed: "Racecar", dataStack: dataStack, completion: nil) - XCTAssertEqual(Helper.countForEntity("Racecar", inContext: dataStack.mainContext), 2) - XCTAssertEqual(Helper.countForEntity("Passenger", inContext: dataStack.mainContext), 1) - - var racecars = Helper.fetchEntity("Racecar", predicate: nil, inContext: dataStack.mainContext) - var racecar = racecars.first! - XCTAssertEqual(racecar.value(forKey: "remoteID") as? Int, 31) - XCTAssertEqual((racecar.value(forKey: "passengers") as? NSSet)!.allObjects.count, 1) - - racecars = Helper.fetchEntity("Racecar", predicate: nil, inContext: dataStack.mainContext) - racecar = racecars.last! - XCTAssertEqual(racecar.value(forKey: "remoteID") as? Int, 32) - XCTAssertEqual((racecar.value(forKey: "passengers") as? NSSet)!.allObjects.count, 1) - - dataStack.drop() - } -} diff --git a/Tests/Sync/UpdateTests.swift b/Tests/Sync/UpdateTests.swift deleted file mode 100644 index 1e3fac0c..00000000 --- a/Tests/Sync/UpdateTests.swift +++ /dev/null @@ -1,52 +0,0 @@ -import XCTest - -import CoreData -import Sync - -class UpdateTests: XCTestCase { - func testUpdateWithObjectNotFound() { - let dataStack = Helper.dataStackWithModelName("id") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) - user.setValue("id", forKey: "id") - try! dataStack.mainContext.save() - - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - let id = try! Sync.update("someotherid", with: [String: Any](), inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertNil(id) - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - - dataStack.drop() - } - - func testUpdateWhileMaintainingTheSameID() { - let dataStack = Helper.dataStackWithModelName("id") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) - user.setValue("id", forKey: "id") - try! dataStack.mainContext.save() - - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - let updatedObject = try! Sync.update("id", with: ["name": "bossy"], inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(updatedObject?.value(forKey: "id") as? String, "id") - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - - dataStack.mainContext.refresh(user, mergeChanges: false) - - XCTAssertEqual(user.value(forKey: "name") as? String, "bossy") - - dataStack.drop() - } - - func testUpdateWithJSONThatHasNewID() { - let dataStack = Helper.dataStackWithModelName("id") - let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) - user.setValue("id", forKey: "id") - try! dataStack.mainContext.save() - - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - let updatedObject = try! Sync.update("id", with: ["id": "someid"], inEntityNamed: "User", using: dataStack.mainContext) - XCTAssertEqual(updatedObject?.value(forKey: "id") as? String, "someid") - XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) - - dataStack.drop() - } -} diff --git a/Tests/TestCheck/TestCheckTests.swift b/Tests/TestCheck/TestCheckTests.swift deleted file mode 100755 index ee7e3ce6..00000000 --- a/Tests/TestCheck/TestCheckTests.swift +++ /dev/null @@ -1,8 +0,0 @@ -import XCTest -import Sync - -class TestCheckTests: XCTestCase { - func testIsRunning() { - XCTAssertTrue(TestCheck.isTesting) - } -} diff --git a/Tests/Vendor/JSON.swift b/Tests/Vendor/JSON.swift deleted file mode 100755 index 51d30dfc..00000000 --- a/Tests/Vendor/JSON.swift +++ /dev/null @@ -1,43 +0,0 @@ -import Foundation - -/// The ParsingError codes generated by JSON. -public enum ParsingError: Error { - case notFound, failed -} - -public class JSON { - /** - Returns a JSON object from a file. - - parameter fileName: The name of the file, the expected extension is `.json`. - - parameter bundle: The NSBundle where the file is located, by default is the main bundle. - - returns: A JSON object, it can be either a Dictionary or an Array. - */ - public class func from(_ fileName: String, bundle: Bundle = Bundle.main) throws -> Any? { - var JSON: Any? - - guard let url = URL(string: fileName), let filePath = bundle.path(forResource: url.deletingPathExtension().absoluteString, ofType: url.pathExtension) else { throw ParsingError.notFound } - - guard let data = try? Data(contentsOf: URL(fileURLWithPath: filePath)) else { throw ParsingError.failed } - - JSON = try data.toJSON() - - return JSON - } -} - -public extension Data { - /** - Converts NSData to a JSON object. - - returns: A JSON object, it can be either a Dictionary or an Array. - */ - public func toJSON() throws -> Any? { - var JSON: Any? - do { - JSON = try JSONSerialization.jsonObject(with: self, options: []) as Any - } catch { - throw ParsingError.failed - } - - return JSON - } -} From 882041486c9552b6572afc288bb79bea949363e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Nu=C3=B1ez?= <elvisnunez@me.com> Date: Thu, 16 Mar 2017 17:46:53 +0100 Subject: [PATCH 8/8] Add tests --- .../DataFilter.xcdatamodel/contents | 17 + Tests/DataFilter/DataFilterTests.swift | 345 ++++ Tests/DataFilter/note.json | 6 + Tests/DataFilter/simple.json | 14 + Tests/DataFilter/users-with-nil.json | 34 + Tests/DataFilter/users-with-null.json | 41 + Tests/DataFilter/users.json | 38 + Tests/DataFilter/users2.json | 32 + Tests/DataFilter/users3.json | 2 + .../contents | 12 + .../ModelGroup.xcdatamodel/contents | 11 + .../SimpleModel.xcdatamodel/contents | 11 + Tests/DataStack/Tests.swift | 176 ++ Tests/DateParser/DateTests.swift | 171 ++ Tests/Info.plist | 24 + .../PrimaryKeyTests.m | 99 ++ .../.xccurrentversion | 8 + .../SyncPrimaryKey.xcdatamodel/contents | 46 + .../NSString_SyncInflectionsTests.m | 156 ++ Tests/Sync/DeleteTests.swift | 32 + Tests/Sync/FetchTests.swift | 27 + Tests/Sync/Helpers/Helper.swift | 74 + Tests/Sync/InsertOrUpdateTests.swift | 54 + .../JSONs/151-many-to-many-notes-update.json | 22 + Tests/Sync/JSONs/151-many-to-many-notes.json | 22 + Tests/Sync/JSONs/151-many-to-many-tags.json | 10 + Tests/Sync/JSONs/151-to-many-notes.json | 14 + .../Sync/JSONs/151-to-many-users-update.json | 17 + Tests/Sync/JSONs/151-to-many-users.json | 17 + Tests/Sync/JSONs/157-cities.json | 14 + Tests/Sync/JSONs/157-locations-update.json | 17 + Tests/Sync/JSONs/157-locations.json | 17 + Tests/Sync/JSONs/225-a-empty.json | 6 + Tests/Sync/JSONs/225-a-null.json | 6 + Tests/Sync/JSONs/225-a-replaced.json | 10 + Tests/Sync/JSONs/225-a.json | 10 + Tests/Sync/JSONs/233.json | 6 + Tests/Sync/JSONs/237.json | 13 + Tests/Sync/JSONs/265.json | 13 + Tests/Sync/JSONs/277.json | 18 + Tests/Sync/JSONs/280.json | 15 + Tests/Sync/JSONs/283.json | 8 + Tests/Sync/JSONs/320.json | 6 + Tests/Sync/JSONs/3ca82a0.json | 18 + Tests/Sync/JSONs/bug-113-comments-no-id.json | 30 + ...ug-113-custom_relationship_key_to_one.json | 9 + .../bug-113-stories-comments-no-ids.json | 47 + Tests/Sync/JSONs/bug-125-light.json | 38 + Tests/Sync/JSONs/bug-125.json | 167 ++ Tests/Sync/JSONs/bug-179-places.json | 8 + Tests/Sync/JSONs/bug-179-routes.json | 5 + Tests/Sync/JSONs/bug-202-a.json | 12 + Tests/Sync/JSONs/bug-202-b.json | 7 + Tests/Sync/JSONs/bug-239.json | 16 + Tests/Sync/JSONs/bug-254.json | 8 + Tests/Sync/JSONs/bug-257.json | 21 + Tests/Sync/JSONs/bug-number-84.json | 16 + Tests/Sync/JSONs/camelcase.json | 9 + Tests/Sync/JSONs/comments-no-id.json | 30 + .../custom_relationship_key_to_many.json | 20 + .../JSONs/custom_relationship_key_to_one.json | 9 + Tests/Sync/JSONs/id.json | 10 + Tests/Sync/JSONs/images.json | 14 + Tests/Sync/JSONs/markets_items.json | 22 + Tests/Sync/JSONs/notes_for_user_a.json | 8 + Tests/Sync/JSONs/notes_with_user_id.json | 27 + .../Sync/JSONs/notes_with_user_id_custom.json | 27 + Tests/Sync/JSONs/numbers.json | 28 + Tests/Sync/JSONs/numbers_in_collection.json | 10 + Tests/Sync/JSONs/operation-types-users-a.json | 12 + Tests/Sync/JSONs/operation-types-users-b.json | 12 + Tests/Sync/JSONs/organizations-tree.json | 39 + Tests/Sync/JSONs/patients.json | 42 + Tests/Sync/JSONs/stories-comments-no-ids.json | 47 + Tests/Sync/JSONs/story-summarize.json | 11 + Tests/Sync/JSONs/tagged_notes.json | 30 + Tests/Sync/JSONs/to-one-camelcase.json | 6 + Tests/Sync/JSONs/to-one-snakecase.json | 6 + Tests/Sync/JSONs/unique.json | 13 + Tests/Sync/JSONs/users_a.json | 58 + Tests/Sync/JSONs/users_b.json | 32 + Tests/Sync/JSONs/users_c.json | 63 + Tests/Sync/JSONs/users_company.json | 57 + Tests/Sync/JSONs/users_notes.json | 72 + .../Models/113.xcdatamodeld/.xccurrentversion | 8 + .../113.xcdatamodeld/113.xcdatamodel/contents | 32 + .../Models/125.xcdatamodeld/.xccurrentversion | 8 + .../125.xcdatamodeld/125.xcdatamodel/contents | 61 + .../.xccurrentversion | 8 + .../151-many-to-many.xcdatamodel/contents | 27 + .../.xccurrentversion | 8 + .../151-many-to-many.xcdatamodel/contents | 17 + .../.xccurrentversion | 8 + .../151-to-many.xcdatamodel/contents | 17 + .../.xccurrentversion | 8 + .../151-to-many.xcdatamodel/contents | 27 + .../Models/157.xcdatamodeld/.xccurrentversion | 8 + .../157.xcdatamodeld/157.xcdatamodel/contents | 27 + .../179.xcdatamodeld/179.xcdatamodel/contents | 33 + .../Models/202.xcdatamodeld/.xccurrentversion | 8 + .../202.xcdatamodeld/202.xcdatamodel/contents | 15 + .../Models/225.xcdatamodeld/.xccurrentversion | 8 + .../151-many-to-many.xcdatamodel/contents | 15 + .../233.xcdatamodeld/233.xcdatamodel/contents | 15 + .../239.xcdatamodeld/239.xcdatamodel/contents | 30 + .../254.xcdatamodeld/254.xcdatamodel/contents | 17 + .../257.xcdatamodeld/257.xcdatamodel/contents | 28 + .../Models/265.xcdatamodeld/.xccurrentversion | 8 + .../265.xcdatamodeld/265.xcdatamodel/contents | 15 + .../277.xcdatamodeld/239.xcdatamodel/contents | 28 + .../Models/280.xcdatamodeld/.xccurrentversion | 8 + .../151-many-to-many.xcdatamodel/contents | 34 + .../Models/283.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 17 + .../320.xcdatamodeld/320.xcdatamodel/contents | 15 + .../3ca82a0.xcdatamodel/contents | 15 + .../Models/84.xcdatamodeld/.xccurrentversion | 8 + .../84.xcdatamodeld/84.xcdatamodel/contents | 25 + .../Camelcase.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 17 + .../Contacts.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 40 + .../.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 19 + .../.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 19 + .../Markets.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 27 + .../Notes.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 31 + .../NotesB.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 28 + .../.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 14 + .../Organizations.xcdatamodel/contents | 12 + .../Patients.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 49 + .../Recursive.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 19 + .../Social.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 32 + .../Tests.xcdatamodel/contents | 11 + .../ToOne.xcdatamodeld/.xccurrentversion | 8 + .../Demo.xcdatamodel/contents | 15 + .../Unique.xcdatamodel/contents | 21 + .../Models/id.xcdatamodeld/.xccurrentversion | 8 + .../id.xcdatamodeld/Demo.xcdatamodel/contents | 10 + Tests/Sync/NSArray+SyncTests.swift | 14 + .../Sync/NSEntityDescription+SyncTests.swift | 9 + Tests/Sync/NSManagedObject+SyncTests.swift | 25 + .../NSManagedObjectContext+SyncTests.swift | 48 + Tests/Sync/NSPersistentContainerTests.swift | 129 ++ Tests/Sync/SyncDelegateTests.swift | 34 + Tests/Sync/SyncTests.swift | 1413 +++++++++++++++++ Tests/Sync/UpdateTests.swift | 52 + .../SyncPropertyMapper/DictionaryTests.swift | 300 ++++ .../FillWithDictionaryTests.swift | 88 + Tests/SyncPropertyMapper/HelperTests.m | 141 ++ .../hypbug.xcdatamodel/contents | 31 + .../Model.xcdatamodel/contents | 10 + .../Model.xcdatamodel/contents | 14 + .../hypbug.xcdatamodel/contents | 13 + .../hypbug.xcdatamodel/contents | 35 + .../Models/140.xcdatamodeld/.xccurrentversion | 8 + .../smartworkout.xcdatamodel/contents | 62 + .../hypbug.xcdatamodel/contents | 9 + .../Model.xcdatamodel/contents | 137 ++ .../Ordered.xcdatamodel/contents | 46 + .../SyncPropertyMapper/SyncDictionaryTests.m | 398 +++++ .../SyncFillWithDictionaryTests.m | 461 ++++++ .../Transformers/BadAPIValueTransformer.swift | 27 + .../Transformers/DateStringTransformer.h | 8 + .../Transformers/DateStringTransformer.m | 26 + .../Transformers/SyncTestValueTransformer.h | 5 + .../Transformers/SyncTestValueTransformer.m | 43 + Tests/TestCheck/TestCheckTests.swift | 8 + Tests/Vendor/JSON.swift | 43 + 177 files changed, 7526 insertions(+) create mode 100755 Tests/DataFilter/DataFilter.xcdatamodeld/DataFilter.xcdatamodel/contents create mode 100755 Tests/DataFilter/DataFilterTests.swift create mode 100755 Tests/DataFilter/note.json create mode 100755 Tests/DataFilter/simple.json create mode 100755 Tests/DataFilter/users-with-nil.json create mode 100755 Tests/DataFilter/users-with-null.json create mode 100755 Tests/DataFilter/users.json create mode 100755 Tests/DataFilter/users2.json create mode 100755 Tests/DataFilter/users3.json create mode 100755 Tests/DataStack/LightweightMigrationModel.xcdatamodel/contents create mode 100755 Tests/DataStack/ModelGroup.xcdatamodeld/ModelGroup.xcdatamodel/contents create mode 100755 Tests/DataStack/SimpleModel.xcdatamodel/contents create mode 100755 Tests/DataStack/Tests.swift create mode 100755 Tests/DateParser/DateTests.swift create mode 100644 Tests/Info.plist create mode 100755 Tests/NSEntityDescription-SyncPrimaryKey/PrimaryKeyTests.m create mode 100755 Tests/NSEntityDescription-SyncPrimaryKey/SyncPrimaryKey.xcdatamodeld/.xccurrentversion create mode 100755 Tests/NSEntityDescription-SyncPrimaryKey/SyncPrimaryKey.xcdatamodeld/SyncPrimaryKey.xcdatamodel/contents create mode 100755 Tests/NSString-SyncInflections/NSString_SyncInflectionsTests.m create mode 100644 Tests/Sync/DeleteTests.swift create mode 100644 Tests/Sync/FetchTests.swift create mode 100644 Tests/Sync/Helpers/Helper.swift create mode 100644 Tests/Sync/InsertOrUpdateTests.swift create mode 100644 Tests/Sync/JSONs/151-many-to-many-notes-update.json create mode 100644 Tests/Sync/JSONs/151-many-to-many-notes.json create mode 100644 Tests/Sync/JSONs/151-many-to-many-tags.json create mode 100644 Tests/Sync/JSONs/151-to-many-notes.json create mode 100644 Tests/Sync/JSONs/151-to-many-users-update.json create mode 100644 Tests/Sync/JSONs/151-to-many-users.json create mode 100644 Tests/Sync/JSONs/157-cities.json create mode 100644 Tests/Sync/JSONs/157-locations-update.json create mode 100644 Tests/Sync/JSONs/157-locations.json create mode 100755 Tests/Sync/JSONs/225-a-empty.json create mode 100755 Tests/Sync/JSONs/225-a-null.json create mode 100755 Tests/Sync/JSONs/225-a-replaced.json create mode 100755 Tests/Sync/JSONs/225-a.json create mode 100644 Tests/Sync/JSONs/233.json create mode 100644 Tests/Sync/JSONs/237.json create mode 100644 Tests/Sync/JSONs/265.json create mode 100755 Tests/Sync/JSONs/277.json create mode 100644 Tests/Sync/JSONs/280.json create mode 100644 Tests/Sync/JSONs/283.json create mode 100644 Tests/Sync/JSONs/320.json create mode 100644 Tests/Sync/JSONs/3ca82a0.json create mode 100644 Tests/Sync/JSONs/bug-113-comments-no-id.json create mode 100755 Tests/Sync/JSONs/bug-113-custom_relationship_key_to_one.json create mode 100644 Tests/Sync/JSONs/bug-113-stories-comments-no-ids.json create mode 100644 Tests/Sync/JSONs/bug-125-light.json create mode 100644 Tests/Sync/JSONs/bug-125.json create mode 100644 Tests/Sync/JSONs/bug-179-places.json create mode 100644 Tests/Sync/JSONs/bug-179-routes.json create mode 100644 Tests/Sync/JSONs/bug-202-a.json create mode 100644 Tests/Sync/JSONs/bug-202-b.json create mode 100755 Tests/Sync/JSONs/bug-239.json create mode 100644 Tests/Sync/JSONs/bug-254.json create mode 100644 Tests/Sync/JSONs/bug-257.json create mode 100644 Tests/Sync/JSONs/bug-number-84.json create mode 100644 Tests/Sync/JSONs/camelcase.json create mode 100644 Tests/Sync/JSONs/comments-no-id.json create mode 100755 Tests/Sync/JSONs/custom_relationship_key_to_many.json create mode 100755 Tests/Sync/JSONs/custom_relationship_key_to_one.json create mode 100755 Tests/Sync/JSONs/id.json create mode 100644 Tests/Sync/JSONs/images.json create mode 100644 Tests/Sync/JSONs/markets_items.json create mode 100644 Tests/Sync/JSONs/notes_for_user_a.json create mode 100644 Tests/Sync/JSONs/notes_with_user_id.json create mode 100644 Tests/Sync/JSONs/notes_with_user_id_custom.json create mode 100644 Tests/Sync/JSONs/numbers.json create mode 100644 Tests/Sync/JSONs/numbers_in_collection.json create mode 100644 Tests/Sync/JSONs/operation-types-users-a.json create mode 100644 Tests/Sync/JSONs/operation-types-users-b.json create mode 100644 Tests/Sync/JSONs/organizations-tree.json create mode 100644 Tests/Sync/JSONs/patients.json create mode 100644 Tests/Sync/JSONs/stories-comments-no-ids.json create mode 100644 Tests/Sync/JSONs/story-summarize.json create mode 100644 Tests/Sync/JSONs/tagged_notes.json create mode 100644 Tests/Sync/JSONs/to-one-camelcase.json create mode 100644 Tests/Sync/JSONs/to-one-snakecase.json create mode 100644 Tests/Sync/JSONs/unique.json create mode 100644 Tests/Sync/JSONs/users_a.json create mode 100644 Tests/Sync/JSONs/users_b.json create mode 100644 Tests/Sync/JSONs/users_c.json create mode 100644 Tests/Sync/JSONs/users_company.json create mode 100644 Tests/Sync/JSONs/users_notes.json create mode 100644 Tests/Sync/Models/113.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/113.xcdatamodeld/113.xcdatamodel/contents create mode 100644 Tests/Sync/Models/125.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/125.xcdatamodeld/125.xcdatamodel/contents create mode 100644 Tests/Sync/Models/151-many-to-many.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/151-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents create mode 100644 Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents create mode 100644 Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents create mode 100644 Tests/Sync/Models/151-to-many.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/151-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents create mode 100644 Tests/Sync/Models/157.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/157.xcdatamodeld/157.xcdatamodel/contents create mode 100644 Tests/Sync/Models/179.xcdatamodeld/179.xcdatamodel/contents create mode 100644 Tests/Sync/Models/202.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/202.xcdatamodeld/202.xcdatamodel/contents create mode 100755 Tests/Sync/Models/225.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/225.xcdatamodeld/151-many-to-many.xcdatamodel/contents create mode 100644 Tests/Sync/Models/233.xcdatamodeld/233.xcdatamodel/contents create mode 100644 Tests/Sync/Models/239.xcdatamodeld/239.xcdatamodel/contents create mode 100644 Tests/Sync/Models/254.xcdatamodeld/254.xcdatamodel/contents create mode 100644 Tests/Sync/Models/257.xcdatamodeld/257.xcdatamodel/contents create mode 100755 Tests/Sync/Models/265.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/265.xcdatamodeld/265.xcdatamodel/contents create mode 100644 Tests/Sync/Models/277.xcdatamodeld/239.xcdatamodel/contents create mode 100755 Tests/Sync/Models/280.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/280.xcdatamodeld/151-many-to-many.xcdatamodel/contents create mode 100644 Tests/Sync/Models/283.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/283.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/320.xcdatamodeld/320.xcdatamodel/contents create mode 100644 Tests/Sync/Models/3ca82a0.xcdatamodeld/3ca82a0.xcdatamodel/contents create mode 100644 Tests/Sync/Models/84.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/84.xcdatamodeld/84.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Camelcase.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/Camelcase.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Contacts.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/Contacts.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Markets.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/Markets.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Notes.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/Notes.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/NotesB.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/NotesB.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/OrderedSocial.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/OrderedSocial.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Organizations.xcdatamodeld/Organizations.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Patients.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/Patients.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Recursive.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/Recursive.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Social.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/Social.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Tests.xcdatamodeld/Tests.xcdatamodel/contents create mode 100644 Tests/Sync/Models/ToOne.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/ToOne.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/Models/Unique.xcdatamodeld/Unique.xcdatamodel/contents create mode 100644 Tests/Sync/Models/id.xcdatamodeld/.xccurrentversion create mode 100644 Tests/Sync/Models/id.xcdatamodeld/Demo.xcdatamodel/contents create mode 100644 Tests/Sync/NSArray+SyncTests.swift create mode 100644 Tests/Sync/NSEntityDescription+SyncTests.swift create mode 100644 Tests/Sync/NSManagedObject+SyncTests.swift create mode 100644 Tests/Sync/NSManagedObjectContext+SyncTests.swift create mode 100644 Tests/Sync/NSPersistentContainerTests.swift create mode 100644 Tests/Sync/SyncDelegateTests.swift create mode 100644 Tests/Sync/SyncTests.swift create mode 100644 Tests/Sync/UpdateTests.swift create mode 100755 Tests/SyncPropertyMapper/DictionaryTests.swift create mode 100755 Tests/SyncPropertyMapper/FillWithDictionaryTests.swift create mode 100755 Tests/SyncPropertyMapper/HelperTests.m create mode 100644 Tests/SyncPropertyMapper/Models/112.xcdatamodeld/hypbug.xcdatamodel/contents create mode 100644 Tests/SyncPropertyMapper/Models/121.xcdatamodeld/Model.xcdatamodel/contents create mode 100755 Tests/SyncPropertyMapper/Models/123.xcdatamodeld/Model.xcdatamodel/contents create mode 100755 Tests/SyncPropertyMapper/Models/129.xcdatamodeld/hypbug.xcdatamodel/contents create mode 100755 Tests/SyncPropertyMapper/Models/137.xcdatamodeld/hypbug.xcdatamodel/contents create mode 100755 Tests/SyncPropertyMapper/Models/140.xcdatamodeld/.xccurrentversion create mode 100755 Tests/SyncPropertyMapper/Models/140.xcdatamodeld/smartworkout.xcdatamodel/contents create mode 100755 Tests/SyncPropertyMapper/Models/142.xcdatamodeld/hypbug.xcdatamodel/contents create mode 100644 Tests/SyncPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents create mode 100644 Tests/SyncPropertyMapper/Models/Ordered.xcdatamodeld/Ordered.xcdatamodel/contents create mode 100755 Tests/SyncPropertyMapper/SyncDictionaryTests.m create mode 100755 Tests/SyncPropertyMapper/SyncFillWithDictionaryTests.m create mode 100755 Tests/SyncPropertyMapper/Transformers/BadAPIValueTransformer.swift create mode 100755 Tests/SyncPropertyMapper/Transformers/DateStringTransformer.h create mode 100755 Tests/SyncPropertyMapper/Transformers/DateStringTransformer.m create mode 100755 Tests/SyncPropertyMapper/Transformers/SyncTestValueTransformer.h create mode 100755 Tests/SyncPropertyMapper/Transformers/SyncTestValueTransformer.m create mode 100755 Tests/TestCheck/TestCheckTests.swift create mode 100755 Tests/Vendor/JSON.swift diff --git a/Tests/DataFilter/DataFilter.xcdatamodeld/DataFilter.xcdatamodel/contents b/Tests/DataFilter/DataFilter.xcdatamodeld/DataFilter.xcdatamodel/contents new file mode 100755 index 00000000..9c08bfa9 --- /dev/null +++ b/Tests/DataFilter/DataFilter.xcdatamodeld/DataFilter.xcdatamodel/contents @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15F34" minimumToolsVersion="Xcode 4.3"> + <entity name="Note" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + </entity> + <entity name="User" syncable="YES"> + <attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="lastName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + </entity> + <elements> + <element name="Note" positionX="-63" positionY="9" width="128" height="75"/> + <element name="User" positionX="-63" positionY="-18" width="128" height="105"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/DataFilter/DataFilterTests.swift b/Tests/DataFilter/DataFilterTests.swift new file mode 100755 index 00000000..fc6b63b6 --- /dev/null +++ b/Tests/DataFilter/DataFilterTests.swift @@ -0,0 +1,345 @@ +import XCTest +import CoreData +import Sync + +class DataFilterTests: XCTestCase { + @discardableResult func user(remoteID: Int, firstName: String, lastName: String, age: Int, context: NSManagedObjectContext) -> NSManagedObject { + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: context) + user.setValue(remoteID, forKey: "remoteID") + user.setValue(firstName, forKey: "firstName") + user.setValue(lastName, forKey: "lastName") + user.setValue(age, forKey: "age") + + try! context.save() + + return user + } + + @discardableResult func note(remoteID: String, text: String, context: NSManagedObjectContext) -> NSManagedObject { + let note = NSEntityDescription.insertNewObject(forEntityName: "Note", into: context) + note.setValue(remoteID, forKey: "remoteID") + note.setValue(text, forKey: "text") + + try! context.save() + + return note + } + + func createUsers(context: NSManagedObjectContext) { + self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: context) + self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: context) + self.user(remoteID: 2, firstName: "Ricky", lastName: "Underwood", age: 19, context: context) + self.user(remoteID: 3, firstName: "Grace", lastName: "Bowman", age: 20, context: context) + self.user(remoteID: 4, firstName: "Adrian", lastName: "Lee", age: 20, context: context) + } + + func testUsersCount() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + self.createUsers(context: dataStack.mainContext) + + let request = NSFetchRequest<NSFetchRequestResult>(entityName: "User") + let count = try! dataStack.mainContext.count(for: request) + XCTAssertEqual(count, 5) + } + + /* + /* + 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 + In users.json: + - Inserted: 6 and 7 + - Updated: 0, 1, 2 and 3 + - Deleted: 4 + */ + func testMapChangesA() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.createUsers(context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 2) + XCTAssertEqual(updated, 4) + XCTAssertEqual(deleted, 1) + } + } + + /* + 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 + In users.json: + - Inserted: 6 and 7 + - Updated: 0, 1, 2 and 3 + - Deleted: 4 + */ + func testMapChangesAWitNull() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.createUsers(context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users-with-null.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 2) + XCTAssertEqual(updated, 4) + XCTAssertEqual(deleted, 1) + } + } + + /* + 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 + In users.json: + - Inserted: 6 and 7 + - Updated: 0, 1, 2 and 3 + - Deleted: 4 + */ + func testMapChangesAWithNil() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.createUsers(context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users-with-nil.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 2) + XCTAssertEqual(updated, 3) + XCTAssertEqual(deleted, 2) + } + } + + /* + 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 + In users.json: + - Inserted: None + - Updated: 0, 1, 2, 3 and 4 + - Deleted: None + */ + func testMapChangesB() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.createUsers(context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users2.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 0) + XCTAssertEqual(updated, 5) + XCTAssertEqual(deleted, 0) + } + } + + /* + 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 + In users.json: + - Inserted: None + - Updated: None + - Deleted: None + */ + func testMapChangesC() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.createUsers(context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users3.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 0) + XCTAssertEqual(updated, 0) + XCTAssertEqual(deleted, 5) + } + } + + /* + 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 + After the pre-defined ones, we try to insert the user 0 many times. + In users.json: + - Inserted: 6 and 7 + - Updated: 0, 1, 2 and 3 + - Deleted: 4 + */ + func testUniquing() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.createUsers(context: backgroundContext) + + self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) + self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) + self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) + try! backgroundContext.save() + + let request = NSFetchRequest<NSFetchRequestResult>(entityName: "User") + let numberOfUsers = try! backgroundContext.count(for: request) + XCTAssertEqual(numberOfUsers, 8) + + let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + DataFilter.changes(JSONObjects, inEntityNamed: "User", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + }, updated: { objectJSON, updatedObject in + }) + + let deletedNumberOfUsers = try! backgroundContext.count(for: request) + XCTAssertEqual(deletedNumberOfUsers, 4) + } + } + + /* + 1 pre-defined none is inserted with id "123" + In notes.json: + - Inserted: 0 + - Updated: "123" + - Deleted: 0 + */ + func testStringID() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.note(remoteID: "123", text: "text", context: backgroundContext) + try! backgroundContext.save() + + let request = NSFetchRequest<NSFetchRequestResult>(entityName: "Note") + let count = try! backgroundContext.count(for: request) + XCTAssertEqual(count, 1) + + let JSONObjects = try! JSON.from("note.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + DataFilter.changes(JSONObjects, inEntityNamed: "Note", localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + XCTAssertFalse(true) + }, updated: { objectJSON, updatedObject in + XCTAssertEqual(objectJSON["id"] as? String, "123") + }) + } + } + + func testInsertOnly() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) + self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Insert], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 1) + XCTAssertEqual(updated, 0) + XCTAssertEqual(deleted, 2) + } + } + + func testUpdateOnly() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) + self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Update], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 0) + XCTAssertEqual(updated, 1) + XCTAssertEqual(deleted, 1) + } + } + + func testDeleteOnly() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.user(remoteID: 0, firstName: "Amy", lastName: "Juergens", age: 21, context: backgroundContext) + self.user(remoteID: 1, firstName: "Ben", lastName: "Boykewich", age: 23, context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("simple.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: nil, operations: [.Delete], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 0) + XCTAssertEqual(updated, 0) + XCTAssertEqual(deleted, 2) + } + } + + /* + 5 pre-defined users are inserted, IDs: 0, 1, 2, 3, 4 + The predicate "remoteID == 1" means that we will only compare the users.json with + the set existing ID: 1, meaning that if an item with ID: 2 appears, then this item will be inserted. + */ + func testPredicate() { + let dataStack = DataStack(modelName: "DataFilter", bundle: Bundle(for: DataFilterTests.self), storeType: .inMemory) + dataStack.performInNewBackgroundContext { backgroundContext in + self.createUsers(context: backgroundContext) + + let before = DataObjectIDs.objectIDs(inEntityNamed: "User", withAttributesNamed: "remoteID", context: backgroundContext) + let JSONObjects = try! JSON.from("users.json", bundle: Bundle(for: DataFilterTests.self)) as! [[String: Any]] + var inserted = 0 + var updated = 0 + var deleted = before.count + DataFilter.changes(JSONObjects, inEntityNamed: "User", predicate: NSPredicate(format: "remoteID == \(0)"), operations: [.All], localPrimaryKey: "remoteID", remotePrimaryKey: "id", context: backgroundContext, inserted: { objectJSON in + inserted += 1 + }, updated: { objectJSON, updatedObject in + updated += 1 + deleted -= 1 + }) + XCTAssertEqual(inserted, 5) + XCTAssertEqual(updated, 1) + XCTAssertEqual(deleted, 4) + } + } + */ +} diff --git a/Tests/DataFilter/note.json b/Tests/DataFilter/note.json new file mode 100755 index 00000000..6f781673 --- /dev/null +++ b/Tests/DataFilter/note.json @@ -0,0 +1,6 @@ +[ + { + "id": "123", + "text": "text" + } +] diff --git a/Tests/DataFilter/simple.json b/Tests/DataFilter/simple.json new file mode 100755 index 00000000..1d5705b2 --- /dev/null +++ b/Tests/DataFilter/simple.json @@ -0,0 +1,14 @@ +[ + { + "id": 0, + "first_name": "Amy", + "last_name": "Juergens", + "age": 21 + }, + { + "id": 7, + "first_name": "Lauren", + "last_name": "Treacy", + "age": 28 + }, +] diff --git a/Tests/DataFilter/users-with-nil.json b/Tests/DataFilter/users-with-nil.json new file mode 100755 index 00000000..c6769d0d --- /dev/null +++ b/Tests/DataFilter/users-with-nil.json @@ -0,0 +1,34 @@ +[ + { + "id": 0, + "first_name": "Amy", + "last_name": "Juergens", + "age": 21 + }, + { + "id": 1, + "first_name": "Ben", + "last_name": "Boykewich", + "age": 23 + }, + { + "id": 2, + "first_name": "Ricky", + "last_name": "Underwood", + "age": 19 + }, + { + }, + { + "id": 6, + "first_name": "Ashley", + "last_name": "Juergens", + "age": 18 + }, + { + "id": 7, + "first_name": "Lauren", + "last_name": "Treacy", + "age": 28 + }, +] diff --git a/Tests/DataFilter/users-with-null.json b/Tests/DataFilter/users-with-null.json new file mode 100755 index 00000000..aec78409 --- /dev/null +++ b/Tests/DataFilter/users-with-null.json @@ -0,0 +1,41 @@ +[ + { + "id": null + }, + { + "id": 0, + "first_name": "Amy", + "last_name": "Juergens", + "age": 21 + }, + { + "id": 1, + "first_name": "Ben", + "last_name": "Boykewich", + "age": 23 + }, + { + "id": 2, + "first_name": "Ricky", + "last_name": "Underwood", + "age": 19 + }, + { + "id": 3, + "first_name": "Grace", + "last_name": "Bowman", + "age": 20 + }, + { + "id": 6, + "first_name": "Ashley", + "last_name": "Juergens", + "age": 18 + }, + { + "id": 7, + "first_name": "Lauren", + "last_name": "Treacy", + "age": 28 + }, +] diff --git a/Tests/DataFilter/users.json b/Tests/DataFilter/users.json new file mode 100755 index 00000000..c626de66 --- /dev/null +++ b/Tests/DataFilter/users.json @@ -0,0 +1,38 @@ +[ + { + "id": 0, + "first_name": "Amy", + "last_name": "Juergens", + "age": 21 + }, + { + "id": 1, + "first_name": "Ben", + "last_name": "Boykewich", + "age": 23 + }, + { + "id": 2, + "first_name": "Ricky", + "last_name": "Underwood", + "age": 19 + }, + { + "id": 3, + "first_name": "Grace", + "last_name": "Bowman", + "age": 20 + }, + { + "id": 6, + "first_name": "Ashley", + "last_name": "Juergens", + "age": 18 + }, + { + "id": 7, + "first_name": "Lauren", + "last_name": "Treacy", + "age": 28 + }, +] diff --git a/Tests/DataFilter/users2.json b/Tests/DataFilter/users2.json new file mode 100755 index 00000000..12b96319 --- /dev/null +++ b/Tests/DataFilter/users2.json @@ -0,0 +1,32 @@ +[ + { + "id": 0, + "first_name": "Amy", + "last_name": "Juergens", + "age": 21 + }, + { + "id": 1, + "first_name": "Ben", + "last_name": "Boykewich", + "age": 23 + }, + { + "id": 2, + "first_name": "Ricky", + "last_name": "Underwood", + "age": 19 + }, + { + "id": 3, + "first_name": "Grace", + "last_name": "Bowman", + "age": 20 + }, + { + "id": 4, + "first_name": "Name", + "last_name": "Last", + "age": 20 + } +] diff --git a/Tests/DataFilter/users3.json b/Tests/DataFilter/users3.json new file mode 100755 index 00000000..0d4f101c --- /dev/null +++ b/Tests/DataFilter/users3.json @@ -0,0 +1,2 @@ +[ +] diff --git a/Tests/DataStack/LightweightMigrationModel.xcdatamodel/contents b/Tests/DataStack/LightweightMigrationModel.xcdatamodel/contents new file mode 100755 index 00000000..e63b23e9 --- /dev/null +++ b/Tests/DataStack/LightweightMigrationModel.xcdatamodel/contents @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="User" syncable="YES"> + <attribute name="createdDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="updatedDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + </entity> + <elements> + <element name="User" positionX="-63" positionY="-18" width="128" height="105"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/DataStack/ModelGroup.xcdatamodeld/ModelGroup.xcdatamodel/contents b/Tests/DataStack/ModelGroup.xcdatamodeld/ModelGroup.xcdatamodel/contents new file mode 100755 index 00000000..01cb57e5 --- /dev/null +++ b/Tests/DataStack/ModelGroup.xcdatamodeld/ModelGroup.xcdatamodel/contents @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="8195" systemVersion="15B38b" minimumToolsVersion="Xcode 4.3"> + <entity name="User" representedClassName="" syncable="YES"> + <attribute name="createdDate" optional="YES" attributeType="Date" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + </entity> + <elements> + <element name="User" positionX="-54" positionY="-9" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/DataStack/SimpleModel.xcdatamodel/contents b/Tests/DataStack/SimpleModel.xcdatamodel/contents new file mode 100755 index 00000000..8a2f689d --- /dev/null +++ b/Tests/DataStack/SimpleModel.xcdatamodel/contents @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10171" systemVersion="15E65" minimumToolsVersion="Xcode 7.0"> + <entity name="User" syncable="YES"> + <attribute name="createdDate" optional="YES" attributeType="Date" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + </entity> + <elements> + <element name="User" positionX="-63" positionY="-18" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/DataStack/Tests.swift b/Tests/DataStack/Tests.swift new file mode 100755 index 00000000..29269561 --- /dev/null +++ b/Tests/DataStack/Tests.swift @@ -0,0 +1,176 @@ +import XCTest +import CoreData +@testable import Sync + +extension XCTestCase { + func createDataStack(_ storeType: DataStackStoreType = .inMemory) -> DataStack { + let dataStack = DataStack(modelName: "ModelGroup", bundle: Bundle(for: Tests.self), storeType: storeType) + + return dataStack + } + + @discardableResult + func insertUser(in context: NSManagedObjectContext) -> NSManagedObject { + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: context) + user.setValue(NSNumber(value: 1), forKey: "remoteID") + user.setValue("Joshua Ivanof", forKey: "name") + try! context.save() + + return user + } + + func fetch(in context: NSManagedObjectContext) -> [NSManagedObject] { + let request = NSFetchRequest<NSManagedObject>(entityName: "User") + let objects = try! context.fetch(request) + + return objects + } +} + +class InitializerTests: XCTestCase { + func testInitializeUsingXCDataModel() { + let dataStack = DataStack(modelName: "SimpleModel", bundle: Bundle(for: Tests.self), storeType: .inMemory) + + self.insertUser(in: dataStack.mainContext) + let objects = self.fetch(in: dataStack.mainContext) + XCTAssertEqual(objects.count, 1) + } + + // xcdatamodeld is a container for .xcdatamodel files. It's used for versioning and migration. + // When moving from v1 of the model to v2, you add a new xcdatamodel to it that has v2 along with the mapping model. + func testInitializeUsingXCDataModeld() { + let dataStack = self.createDataStack() + + self.insertUser(in: dataStack.mainContext) + let objects = self.fetch(in: dataStack.mainContext) + XCTAssertEqual(objects.count, 1) + } + + func testInitializingUsingNSManagedObjectModel() { + let model = NSManagedObjectModel(bundle: Bundle(for: Tests.self), name: "ModelGroup") + let dataStack = DataStack(model: model, storeType: .inMemory) + + self.insertUser(in: dataStack.mainContext) + let objects = self.fetch(in: dataStack.mainContext) + XCTAssertEqual(objects.count, 1) + } +} + +class Tests: XCTestCase { + func testSynchronousBackgroundContext() { + let dataStack = self.createDataStack() + + var synchronous = false + dataStack.performInNewBackgroundContext { _ in + synchronous = true + } + + XCTAssertTrue(synchronous) + } + + func testBackgroundContextSave() { + let dataStack = self.createDataStack() + + dataStack.performInNewBackgroundContext { backgroundContext in + self.insertUser(in: backgroundContext) + + let objects = self.fetch(in: backgroundContext) + XCTAssertEqual(objects.count, 1) + } + + let objects = self.fetch(in: dataStack.mainContext) + XCTAssertEqual(objects.count, 1) + } + + func testNewBackgroundContextSave() { + var synchronous = false + let dataStack = self.createDataStack() + let backgroundContext = dataStack.newBackgroundContext() + backgroundContext.performAndWait { + synchronous = true + self.insertUser(in: backgroundContext) + let objects = self.fetch(in: backgroundContext) + XCTAssertEqual(objects.count, 1) + } + + let objects = self.fetch(in: dataStack.mainContext) + XCTAssertEqual(objects.count, 1) + + XCTAssertTrue(synchronous) + } + + func testRequestWithDictionaryResultType() { + let dataStack = self.createDataStack() + self.insertUser(in: dataStack.mainContext) + + let request = NSFetchRequest<NSManagedObject>(entityName: "User") + let objects = try! dataStack.mainContext.fetch(request) + XCTAssertEqual(objects.count, 1) + + let expression = NSExpressionDescription() + expression.name = "objectID" + expression.expression = NSExpression.expressionForEvaluatedObject() + expression.expressionResultType = .objectIDAttributeType + + let dictionaryRequest = NSFetchRequest<NSDictionary>(entityName: "User") + dictionaryRequest.resultType = .dictionaryResultType + dictionaryRequest.propertiesToFetch = [expression, "remoteID"] + + let dictionaryObjects = try! dataStack.mainContext.fetch(dictionaryRequest) + XCTAssertEqual(dictionaryObjects.count, 1) + } + + func testDisposableContextSave() { + let dataStack = self.createDataStack() + + let disposableContext = dataStack.newDisposableMainContext() + self.insertUser(in: disposableContext) + let objects = self.fetch(in: disposableContext) + XCTAssertEqual(objects.count, 0) + } + + func testDrop() { + let dataStack = self.createDataStack(.sqLite) + + dataStack.performInNewBackgroundContext { backgroundContext in + self.insertUser(in: backgroundContext) + } + + let objectsA = self.fetch(in: dataStack.mainContext) + XCTAssertEqual(objectsA.count, 1) + + dataStack.drop() + + let objects = self.fetch(in: dataStack.mainContext) + XCTAssertEqual(objects.count, 0) + + dataStack.performInNewBackgroundContext { backgroundContext in + self.insertUser(in: backgroundContext) + } + + let objectsB = self.fetch(in: dataStack.mainContext) + XCTAssertEqual(objectsB.count, 1) + + dataStack.drop() + } + + func testAutomaticMigration() { + let firstDataStack = DataStack(modelName: "SimpleModel", bundle: Bundle(for: Tests.self), storeType: .sqLite, storeName: "Shared") + self.insertUser(in: firstDataStack.mainContext) + let objects = self.fetch(in: firstDataStack.mainContext) + XCTAssertEqual(objects.count, 1) + + // LightweightMigrationModel is a copy of DataModel with the main difference that adds the updatedDate attribute. + let secondDataStack = DataStack(modelName: "LightweightMigrationModel", bundle: Bundle(for: Tests.self), storeType: .sqLite, storeName: "Shared") + let fetchRequest = NSFetchRequest<NSManagedObject>(entityName: "User") + fetchRequest.predicate = NSPredicate(format: "remoteID = %@", NSNumber(value: 1)) + let user = try! secondDataStack.mainContext.fetch(fetchRequest).first + XCTAssertNotNil(user) + XCTAssertEqual(user?.value(forKey: "name") as? String, "Joshua Ivanof") + user?.setValue(Date().addingTimeInterval(16000), forKey: "updatedDate") + try! secondDataStack.mainContext.save() + + firstDataStack.drop() + secondDataStack.drop() + } +} diff --git a/Tests/DateParser/DateTests.swift b/Tests/DateParser/DateTests.swift new file mode 100755 index 00000000..751e1dd6 --- /dev/null +++ b/Tests/DateParser/DateTests.swift @@ -0,0 +1,171 @@ +import XCTest +import Sync + +class DateTests: XCTestCase { + + func testDateA() { + let date = Date.dateWithHourAndTimeZoneString(dateString: "2015-06-23T12:40:08.000") + let resultDate = NSDate(fromDateString: "2015-06-23T14:40:08.000+02:00") as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date.timeIntervalSince1970, resultDate.timeIntervalSince1970) + } + + func testDateB() { + let date = Date.dateWithDayString(dateString: "2014-01-01") + let resultDate = NSDate(fromDateString: "2014-01-01T00:00:00+00:00") as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateC() { + let date = Date.dateWithDayString(dateString: "2014-01-02") + let resultDate = NSDate(fromDateString: "2014-01-02") as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateD() { + let date = Date.dateWithDayString(dateString: "2014-01-02") + let resultDate = NSDate(fromDateString: "2014-01-02T00:00:00.000000+00:00") as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateE() { + let date = Date.dateWithDayString(dateString: "2015-09-10") + let resultDate = NSDate(fromDateString: "2015-09-10T00:00:00.116+0000") as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateF() { + let date = Date.dateWithDayString(dateString: "2015-09-10") + let resultDate = NSDate(fromDateString: "2015-09-10T00:00:00.184968Z") as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateG() { + let date = Date.dateWithHourAndTimeZoneString(dateString: "2015-06-23T19:04:19.911Z") + let resultDate = NSDate(fromDateString: "2015-06-23T19:04:19.911Z") as! Date + print(date.timeIntervalSince1970) + print(resultDate.timeIntervalSince1970) + date.prettyPrint() + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateH() { + let date = Date.dateWithHourAndTimeZoneString(dateString: "2014-03-30T09:13:00.000Z") + let resultDate = NSDate(fromDateString: "2014-03-30T09:13:00Z") as! Date + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateI() { + let resultDate = NSDate(fromDateString: "2014-01-02T00:monsterofthelakeI'mhere00:00.007450+00:00") + XCTAssertNil(resultDate) + } + + func testDateJ() { + let date = Date.dateWithDayString(dateString: "2016-01-09") + let resultDate = NSDate(fromDateString: "2016-01-09T00:00:00.00") as! Date + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateK() { + let date = Date.dateWithDayString(dateString: "2016-01-09") + let resultDate = NSDate(fromDateString: "2016-01-09T00:00:00") as! Date + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testDateL() { + let date = Date.dateWithDayString(dateString: "2009-10-09") + let resultDate = NSDate(fromDateString: "2009-10-09 00:00:00") as! Date + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } +} + +class TimestampDateTests: XCTestCase { + + func testTimestampA() { + let date = Date.dateWithDayString(dateString: "2015-09-10") + let resultDate = NSDate(fromDateString: "1441843200") as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testTimestampB() { + let date = Date.dateWithDayString(dateString: "2015-09-10") + let resultDate = NSDate(fromDateString: "1441843200000000") as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testTimestampC() { + let date = Date.dateWithDayString(dateString: "2015-09-10") + let resultDate = NSDate(fromUnixTimestampNumber: 1441843200) as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } + + func testTimestampD() { + let date = Date.dateWithDayString(dateString: "2015-09-10") + let resultDate = NSDate(fromUnixTimestampNumber: NSNumber(value: 1441843200000000.0)) as! Date + + XCTAssertNotNil(resultDate) + XCTAssertEqual(date, resultDate) + } +} + +class OtherDateTests: XCTestCase { + + func testDateType() { + let isoDateType = "2014-01-02T00:00:00.007450+00:00".dateType() + XCTAssertEqual(isoDateType, DateType.iso8601) + + let timestampDateType = "1441843200000000".dateType() + XCTAssertEqual(timestampDateType, DateType.unixTimestamp) + } +} + +extension Date { + + static func dateWithDayString(dateString: String) -> Date { + let formatter = DateFormatter() + formatter.dateFormat = "yyyy-MM-dd" + formatter.timeZone = TimeZone(identifier: "UTC") + let date = formatter.date(from: dateString)! + + return date + } + + static func dateWithHourAndTimeZoneString(dateString: String) -> Date { + let formatter = DateFormatter() + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" + formatter.timeZone = TimeZone(identifier: "UTC") + let date = formatter.date(from: dateString)! + + return date + } + + func prettyPrint() { + let formatter = DateFormatter() + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" + let string = formatter.string(from: self) + print(string) + } +} diff --git a/Tests/Info.plist b/Tests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/Tests/Info.plist @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist> diff --git a/Tests/NSEntityDescription-SyncPrimaryKey/PrimaryKeyTests.m b/Tests/NSEntityDescription-SyncPrimaryKey/PrimaryKeyTests.m new file mode 100755 index 00000000..d3be57d9 --- /dev/null +++ b/Tests/NSEntityDescription-SyncPrimaryKey/PrimaryKeyTests.m @@ -0,0 +1,99 @@ +@import CoreData; +@import XCTest; +@import Sync; + +#import "NSEntityDescription+SyncPrimaryKey.h" + +@interface PrimaryKeyTests : XCTestCase + +@end + +@implementation PrimaryKeyTests + +- (NSEntityDescription *)entityForName:(NSString *)name { + DataStack *dataStack = [[DataStack alloc] initWithModelName:@"SyncPrimaryKey" + bundle:[NSBundle bundleForClass:[self class]] + storeType:DataStackStoreTypeInMemory]; + + return [NSEntityDescription entityForName:name + inManagedObjectContext:dataStack.mainContext]; + +} + +- (void)testPrimaryKeyAttribute { + NSEntityDescription *entity = [self entityForName:@"User"]; + + NSAttributeDescription *attribute = [entity sync_primaryKeyAttribute]; + XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSNumber"); + XCTAssertEqual(attribute.attributeType, NSInteger32AttributeType); + + entity = [self entityForName:@"SimpleID"]; + attribute = [entity sync_primaryKeyAttribute]; + XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSString"); + XCTAssertEqual(attribute.attributeType, NSStringAttributeType); + XCTAssertEqualObjects(attribute.name, @"id"); + + entity = [self entityForName:@"Note"]; + attribute = [entity sync_primaryKeyAttribute]; + XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSNumber"); + XCTAssertEqual(attribute.attributeType, NSInteger16AttributeType); + XCTAssertEqualObjects(attribute.name, @"uniqueID"); + + entity = [self entityForName:@"Tag"]; + attribute = [entity sync_primaryKeyAttribute]; + XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSString"); + XCTAssertEqual(attribute.attributeType, NSStringAttributeType); + XCTAssertEqualObjects(attribute.name, @"randomId"); + + entity = [self entityForName:@"NoID"]; + attribute = [entity sync_primaryKeyAttribute]; + XCTAssertNil(attribute); + + entity = [self entityForName:@"AlternativeID"]; + attribute = [entity sync_primaryKeyAttribute]; + XCTAssertEqualObjects(attribute.attributeValueClassName, @"NSString"); + XCTAssertEqual(attribute.attributeType, NSStringAttributeType); + XCTAssertEqualObjects(attribute.name, @"alternativeID"); +} + +- (void)testLocalKey { + NSEntityDescription *entity = [self entityForName:@"User"]; + XCTAssertEqualObjects([entity sync_localPrimaryKey], @"remoteID"); + + entity = [self entityForName:@"SimpleID"]; + XCTAssertEqualObjects([entity sync_localPrimaryKey], @"id"); + + entity = [self entityForName:@"Note"]; + XCTAssertEqualObjects([entity sync_localPrimaryKey], @"uniqueID"); + + entity = [self entityForName:@"Tag"]; + XCTAssertEqualObjects([entity sync_localPrimaryKey], @"randomId"); + + entity = [self entityForName:@"NoID"]; + XCTAssertNil([entity sync_localPrimaryKey]); + + entity = [self entityForName:@"AlternativeID"]; + XCTAssertEqualObjects([entity sync_localPrimaryKey], @"alternativeID"); +} + +- (void)testRemoteKey { + NSEntityDescription *entity = [self entityForName:@"User"]; + XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"id"); + + entity = [self entityForName:@"SimpleID"]; + XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"id"); + + entity = [self entityForName:@"Note"]; + XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"unique_id"); + + entity = [self entityForName:@"Tag"]; + XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"id"); + + entity = [self entityForName:@"NoID"]; + XCTAssertNil([entity sync_remotePrimaryKey]); + + entity = [self entityForName:@"AlternativeID"]; + XCTAssertEqualObjects([entity sync_remotePrimaryKey], @"alternative_id"); +} + +@end diff --git a/Tests/NSEntityDescription-SyncPrimaryKey/SyncPrimaryKey.xcdatamodeld/.xccurrentversion b/Tests/NSEntityDescription-SyncPrimaryKey/SyncPrimaryKey.xcdatamodeld/.xccurrentversion new file mode 100755 index 00000000..62cddee8 --- /dev/null +++ b/Tests/NSEntityDescription-SyncPrimaryKey/SyncPrimaryKey.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>SyncPrimaryKey.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/NSEntityDescription-SyncPrimaryKey/SyncPrimaryKey.xcdatamodeld/SyncPrimaryKey.xcdatamodel/contents b/Tests/NSEntityDescription-SyncPrimaryKey/SyncPrimaryKey.xcdatamodeld/SyncPrimaryKey.xcdatamodel/contents new file mode 100755 index 00000000..c6c3ccbd --- /dev/null +++ b/Tests/NSEntityDescription-SyncPrimaryKey/SyncPrimaryKey.xcdatamodeld/SyncPrimaryKey.xcdatamodel/contents @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="AlternativeID" syncable="YES"> + <attribute name="alternativeID" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + </userInfo> + </attribute> + </entity> + <entity name="NoID" syncable="YES"> + <attribute name="attribute" optional="YES" attributeType="String" syncable="YES"/> + </entity> + <entity name="Note" syncable="YES"> + <attribute name="attribute" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="uniqueID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + </entity> + <entity name="SimpleID" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + </entity> + <entity name="Tag" syncable="YES"> + <attribute name="attribute" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="randomId" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + </entity> + <entity name="User" representedClassName="" syncable="YES"> + <attribute name="attribute" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + </entity> + <elements> + <element name="NoID" positionX="-27" positionY="18" width="128" height="60"/> + <element name="Note" positionX="-20" positionY="18" width="128" height="75"/> + <element name="SimpleID" positionX="-27" positionY="18" width="128" height="75"/> + <element name="Tag" positionX="160" positionY="0" width="128" height="75"/> + <element name="User" positionX="-207" positionY="-15" width="128" height="73"/> + <element name="AlternativeID" positionX="-27" positionY="18" width="128" height="60"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/NSString-SyncInflections/NSString_SyncInflectionsTests.m b/Tests/NSString-SyncInflections/NSString_SyncInflectionsTests.m new file mode 100755 index 00000000..975ad329 --- /dev/null +++ b/Tests/NSString-SyncInflections/NSString_SyncInflectionsTests.m @@ -0,0 +1,156 @@ +@import XCTest; + +#import "NSString+SyncInflections.h" + +@interface NSString (PrivateInflections) + +- (BOOL)hyp_containsWord:(NSString *)word; +- (NSString *)hyp_lowerCaseFirstLetter; +- (NSString *)hyp_replaceIdentifierWithString:(NSString *)replacementString; + +@end + +@interface NSString_SyncInflectionsTests : XCTestCase + +@end + +@implementation NSString_SyncInflectionsTests + +#pragma mark - Inflections + +- (void)testReplacementIdentifier { + NSString *testString = @"first_name"; + + XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"FirstName"); + + testString = @"id"; + + XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"ID"); + + testString = @"user_id"; + + XCTAssertEqualObjects([testString hyp_replaceIdentifierWithString:@""], @"UserID"); +} + +- (void)testLowerCaseFirstLetter { + NSString *testString = @"FirstName"; + + XCTAssertEqualObjects([testString hyp_lowerCaseFirstLetter], @"firstName"); +} + +- (void)testSnakeCase { + NSString *camelCase = @"age"; + NSString *snakeCase = @"age"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"id"; + snakeCase = @"id"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"pdf"; + snakeCase = @"pdf"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"driverIdentifier"; + snakeCase = @"driver_identifier"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"integer16"; + snakeCase = @"integer16"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"userID"; + snakeCase = @"user_id"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"createdAt"; + snakeCase = @"created_at"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"userIDFirst"; + snakeCase = @"user_id_first"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); + + camelCase = @"OrderedUser"; + snakeCase = @"ordered_user"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_snakeCase]); +} + +- (void)testCamelCase { + NSString *snakeCase = @"age"; + NSString *camelCase = @"age"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"id"; + camelCase = @"id"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"pdf"; + camelCase = @"pdf"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"driver_identifier"; + camelCase = @"driverIdentifier"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"integer16"; + camelCase = @"integer16"; + + XCTAssertEqualObjects(snakeCase, [camelCase hyp_camelCase]); + + snakeCase = @"user_id"; + camelCase = @"userID"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"updated_at"; + camelCase = @"updatedAt"; + + XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + +// snakeCase = @"f2f_url"; +// camelCase = @"f2fURL"; +// +// XCTAssertEqualObjects(camelCase, [snakeCase hyp_camelCase]); + + snakeCase = @"test_!_key"; + + XCTAssertNil([snakeCase hyp_camelCase]); +} + +- (void)testCamelCaseCapitalizedString { + NSString *capitalizedString = @"GreenWallet"; + NSString *camelCase = @"greenWallet"; + + XCTAssertEqualObjects(camelCase, [capitalizedString hyp_camelCase]); +} + +- (void)testStorageForSameWordButDifferentInflections { + XCTAssertEqualObjects(@"greenWallet", [@"GreenWallet" hyp_camelCase]); + XCTAssertEqualObjects(@"green_wallet", [@"GreenWallet" hyp_snakeCase]); +} + +- (void)testConcurrentAccess { + dispatch_queue_t concurrentQueue = dispatch_queue_create("com.syncdb.test", DISPATCH_QUEUE_CONCURRENT); + + dispatch_apply(6000, concurrentQueue, ^(const size_t i){ + [self testSnakeCase]; + [self testCamelCase]; + }); + +} + +@end diff --git a/Tests/Sync/DeleteTests.swift b/Tests/Sync/DeleteTests.swift new file mode 100644 index 00000000..0de92435 --- /dev/null +++ b/Tests/Sync/DeleteTests.swift @@ -0,0 +1,32 @@ +import XCTest + +import CoreData +import Sync + +class DeleteTests: XCTestCase { + func testDeleteWithStringID() { + let dataStack = Helper.dataStackWithModelName("id") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) + user.setValue("id", forKey: "id") + try! dataStack.mainContext.save() + + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + try! Sync.delete("id", inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(0, Helper.countForEntity("User", inContext: dataStack.mainContext)) + + dataStack.drop() + } + + func testDeleteWithNumberID() { + let dataStack = Helper.dataStackWithModelName("Tests") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) + user.setValue(1, forKey: "remoteID") + try! dataStack.mainContext.save() + + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + try! Sync.delete(1, inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(0, Helper.countForEntity("User", inContext: dataStack.mainContext)) + + dataStack.drop() + } +} diff --git a/Tests/Sync/FetchTests.swift b/Tests/Sync/FetchTests.swift new file mode 100644 index 00000000..95ee33c3 --- /dev/null +++ b/Tests/Sync/FetchTests.swift @@ -0,0 +1,27 @@ +import XCTest + +import CoreData +import Sync + +class FetchTests: XCTestCase { + func testFetch() { + let dataStack = Helper.dataStackWithModelName("id") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) + user.setValue("id", forKey: "id") + user.setValue("dada", forKey: "name") + try! dataStack.mainContext.save() + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + + let fetched = try! Sync.fetch("id", inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(fetched?.value(forKey: "id") as? String, "id") + XCTAssertEqual(fetched?.value(forKey: "name") as? String, "dada") + + try! Sync.delete("id", inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(0, Helper.countForEntity("User", inContext: dataStack.mainContext)) + + let newFetched = try! Sync.fetch("id", inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertNil(newFetched) + + dataStack.drop() + } +} diff --git a/Tests/Sync/Helpers/Helper.swift b/Tests/Sync/Helpers/Helper.swift new file mode 100644 index 00000000..77525ed0 --- /dev/null +++ b/Tests/Sync/Helpers/Helper.swift @@ -0,0 +1,74 @@ +import XCTest +import CoreData +import Sync + +@objc class Helper: NSObject { + class func objectsFromJSON(_ fileName: String) -> Any { + let bundle = Bundle(for: Helper.self) + let objects = try! JSON.from(fileName, bundle: bundle)! + + return objects + } + + class func dataStackWithModelName(_ modelName: String) -> DataStack { + let bundle = Bundle(for: Helper.self) + let dataStack = DataStack(modelName: modelName, bundle: bundle, storeType: .sqLite) + + return dataStack + } + + @available(iOS 10, watchOS 3, tvOS 10, OSX 10.12, *) + class func persistentStoreWithModelName(_ modelName: String) -> NSPersistentContainer { + let momdModelURL = Bundle(for: NSPersistentContainerTests.self).url(forResource: modelName, withExtension: "momd")! + let model = NSManagedObjectModel(contentsOf: momdModelURL)! + let persistentContainer = NSPersistentContainer(name: modelName, managedObjectModel: model) + try! persistentContainer.persistentStoreCoordinator.addPersistentStore(ofType: NSInMemoryStoreType, configurationName: nil, at: nil, options: nil) + + return persistentContainer + } + + class func countForEntity(_ entityName: String, inContext context: NSManagedObjectContext) -> Int { + return self.countForEntity(entityName, predicate: nil, inContext: context) + } + + class func countForEntity(_ entityName: String, predicate: NSPredicate?, inContext context: NSManagedObjectContext) -> Int { + let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: entityName) + fetchRequest.predicate = predicate + let count = try! context.count(for: fetchRequest) + + return count + } + + class func fetchEntity(_ entityName: String, inContext context: NSManagedObjectContext) -> [NSManagedObject] { + return self.fetchEntity(entityName, predicate: nil, sortDescriptors: nil, inContext: context) + } + + class func fetchEntity(_ entityName: String, predicate: NSPredicate?, inContext context: NSManagedObjectContext) -> [NSManagedObject] { + return self.fetchEntity(entityName, predicate: predicate, sortDescriptors: nil, inContext: context) + } + + class func fetchEntity(_ entityName: String, sortDescriptors: [NSSortDescriptor]?, inContext context: NSManagedObjectContext) -> [NSManagedObject] { + return self.fetchEntity(entityName, predicate: nil, sortDescriptors: sortDescriptors, inContext: context) + } + + class func fetchEntity(_ entityName: String, predicate: NSPredicate?, sortDescriptors: [NSSortDescriptor]?, inContext context: NSManagedObjectContext) -> [NSManagedObject] { + let request = NSFetchRequest<NSFetchRequestResult>(entityName: entityName) + request.predicate = predicate + request.sortDescriptors = sortDescriptors + let objects = try! context.fetch(request) as? [NSManagedObject] ?? [NSManagedObject]() + + return objects + } + + class func dataStackWithModelName(_ modelName: String, storeType: DataStackStoreType = .sqLite) -> DataStack { + let bundle = Bundle(for: Helper.self) + let dataStack = DataStack(modelName: modelName, bundle: bundle, storeType: storeType) + return dataStack + } + + class func insertEntity(_ name: String, dataStack: DataStack) -> NSManagedObject { + let entity = NSEntityDescription.entity(forEntityName: name, in: dataStack.mainContext)! + return NSManagedObject(entity: entity, insertInto: dataStack.mainContext) + } + +} diff --git a/Tests/Sync/InsertOrUpdateTests.swift b/Tests/Sync/InsertOrUpdateTests.swift new file mode 100644 index 00000000..6606619f --- /dev/null +++ b/Tests/Sync/InsertOrUpdateTests.swift @@ -0,0 +1,54 @@ +import XCTest + +import CoreData +import Sync + +class InsertOrUpdateTests: XCTestCase { + func testInsertOrUpdateWithStringID() { + let dataStack = Helper.dataStackWithModelName("id") + let json = ["id": "id", "name": "name"] + let insertedObject = try! Sync.insertOrUpdate(json, inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + + XCTAssertEqual(insertedObject.value(forKey: "id") as? String, "id") + XCTAssertEqual(insertedObject.value(forKey: "name") as? String, "name") + + if let object = Helper.fetchEntity("User", inContext: dataStack.mainContext).first { + XCTAssertEqual(object.value(forKey: "id") as? String, "id") + XCTAssertEqual(object.value(forKey: "name") as? String, "name") + } else { + XCTFail() + } + dataStack.drop() + } + + func testInsertOrUpdateWithNumberID() { + let dataStack = Helper.dataStackWithModelName("Tests") + let json = ["id": 1] + try! Sync.insertOrUpdate(json, inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + dataStack.drop() + } + + func testInsertOrUpdateUpdate() { + let dataStack = Helper.dataStackWithModelName("id") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) + user.setValue("id", forKey: "id") + user.setValue("old", forKey: "name") + try! dataStack.mainContext.save() + + let json = ["id": "id", "name": "new"] + let updatedObject = try! Sync.insertOrUpdate(json, inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(updatedObject.value(forKey: "id") as? String, "id") + XCTAssertEqual(updatedObject.value(forKey: "name") as? String, "new") + + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + if let object = Helper.fetchEntity("User", inContext: dataStack.mainContext).first { + XCTAssertEqual(object.value(forKey: "id") as? String, "id") + XCTAssertEqual(object.value(forKey: "name") as? String, "new") + } else { + XCTFail() + } + dataStack.drop() + } +} diff --git a/Tests/Sync/JSONs/151-many-to-many-notes-update.json b/Tests/Sync/JSONs/151-many-to-many-notes-update.json new file mode 100644 index 00000000..eb3e2c90 --- /dev/null +++ b/Tests/Sync/JSONs/151-many-to-many-notes-update.json @@ -0,0 +1,22 @@ +[ + { + "id": 0, + "name": "Note 0", + "tags_ids": ["0"] + }, + { + "id": 1, + "name": "Note 1", + "tags_ids": [] + }, + { + "id": 2, + "name": "Note 2", + "tags_ids": ["0", "1"] + }, + { + "id": 3, + "name": "Note 3", + "tags_ids": null + } +] diff --git a/Tests/Sync/JSONs/151-many-to-many-notes.json b/Tests/Sync/JSONs/151-many-to-many-notes.json new file mode 100644 index 00000000..f6146450 --- /dev/null +++ b/Tests/Sync/JSONs/151-many-to-many-notes.json @@ -0,0 +1,22 @@ +[ + { + "id": 0, + "name": "Note 0", + "tags_ids": ["0", "1"] + }, + { + "id": 1, + "name": "Note 1", + "tags_ids": ["0"] + }, + { + "id": 2, + "name": "Note 2", + "tags_ids": [] + }, + { + "id": 3, + "name": "Note 3", + "tags_ids": ["1"] + } +] diff --git a/Tests/Sync/JSONs/151-many-to-many-tags.json b/Tests/Sync/JSONs/151-many-to-many-tags.json new file mode 100644 index 00000000..dafd7c65 --- /dev/null +++ b/Tests/Sync/JSONs/151-many-to-many-tags.json @@ -0,0 +1,10 @@ +[ + { + "id": "0", + "name": "#yolo" + }, + { + "id": "1", + "name": "#nofilter" + } +] diff --git a/Tests/Sync/JSONs/151-to-many-notes.json b/Tests/Sync/JSONs/151-to-many-notes.json new file mode 100644 index 00000000..18ad8b7b --- /dev/null +++ b/Tests/Sync/JSONs/151-to-many-notes.json @@ -0,0 +1,14 @@ +[ + { + "id": 0, + "name": "Note 0" + }, + { + "id": 1, + "name": "Note 1" + }, + { + "id": 2, + "name": "Note 2" + } +] diff --git a/Tests/Sync/JSONs/151-to-many-users-update.json b/Tests/Sync/JSONs/151-to-many-users-update.json new file mode 100644 index 00000000..8d560f79 --- /dev/null +++ b/Tests/Sync/JSONs/151-to-many-users-update.json @@ -0,0 +1,17 @@ +[ + { + "id": 10, + "name": "User 10", + "notes_ids": [] + }, + { + "id": 11, + "name": "User 11", + "notes_ids": [2] + }, + { + "id": 12, + "name": "User 12", + "notes_ids": [0, 1] + } +] diff --git a/Tests/Sync/JSONs/151-to-many-users.json b/Tests/Sync/JSONs/151-to-many-users.json new file mode 100644 index 00000000..36431754 --- /dev/null +++ b/Tests/Sync/JSONs/151-to-many-users.json @@ -0,0 +1,17 @@ +[ + { + "id": 10, + "name": "User 10", + "notes_ids": [0, 1] + }, + { + "id": 11, + "name": "User 11", + "notes_ids": [2] + }, + { + "id": 12, + "name": "User 12", + "notes_ids": [] + } +] diff --git a/Tests/Sync/JSONs/157-cities.json b/Tests/Sync/JSONs/157-cities.json new file mode 100644 index 00000000..30bf476b --- /dev/null +++ b/Tests/Sync/JSONs/157-cities.json @@ -0,0 +1,14 @@ +[ + { + "id": 0, + "name": "Oslo" + }, + { + "id": 1, + "name": "Paris" + }, + { + "id": 2, + "name": "Berlin" + } +] diff --git a/Tests/Sync/JSONs/157-locations-update.json b/Tests/Sync/JSONs/157-locations-update.json new file mode 100644 index 00000000..4d6a6805 --- /dev/null +++ b/Tests/Sync/JSONs/157-locations-update.json @@ -0,0 +1,17 @@ +[ + { + "id": 0, + "name": "Mesh", + "city_id": null + }, + { + "id": 1, + "name": "Makerspace", + "city_id": 0 + }, + { + "id": 2, + "name": "WorldHack", + "city_id": 1 + } +] diff --git a/Tests/Sync/JSONs/157-locations.json b/Tests/Sync/JSONs/157-locations.json new file mode 100644 index 00000000..a412192c --- /dev/null +++ b/Tests/Sync/JSONs/157-locations.json @@ -0,0 +1,17 @@ +[ + { + "id": 0, + "name": "Mesh", + "city_id": 0 + }, + { + "id": 1, + "name": "Makerspace", + "city_id": 1 + }, + { + "id": 2, + "name": "WorldHack", + "city_id": null + } +] diff --git a/Tests/Sync/JSONs/225-a-empty.json b/Tests/Sync/JSONs/225-a-empty.json new file mode 100755 index 00000000..e59f15ad --- /dev/null +++ b/Tests/Sync/JSONs/225-a-empty.json @@ -0,0 +1,6 @@ +[ + { + "id": 1, + "tags": [] + } +] diff --git a/Tests/Sync/JSONs/225-a-null.json b/Tests/Sync/JSONs/225-a-null.json new file mode 100755 index 00000000..130b63a5 --- /dev/null +++ b/Tests/Sync/JSONs/225-a-null.json @@ -0,0 +1,6 @@ +[ + { + "id": 1, + "tags": null + } +] diff --git a/Tests/Sync/JSONs/225-a-replaced.json b/Tests/Sync/JSONs/225-a-replaced.json new file mode 100755 index 00000000..5a675570 --- /dev/null +++ b/Tests/Sync/JSONs/225-a-replaced.json @@ -0,0 +1,10 @@ +[ + { + "id": 1, + "tags": [ + { + "id": 20 + } + ] + } +] diff --git a/Tests/Sync/JSONs/225-a.json b/Tests/Sync/JSONs/225-a.json new file mode 100755 index 00000000..0b5fae8d --- /dev/null +++ b/Tests/Sync/JSONs/225-a.json @@ -0,0 +1,10 @@ +[ + { + "id": 1, + "tags": [ + { + "id": 10 + } + ] + } +] diff --git a/Tests/Sync/JSONs/233.json b/Tests/Sync/JSONs/233.json new file mode 100644 index 00000000..8c003be1 --- /dev/null +++ b/Tests/Sync/JSONs/233.json @@ -0,0 +1,6 @@ +[ + { + "id": 1, + "slides_ids": [ 2, 1 ] + } +] diff --git a/Tests/Sync/JSONs/237.json b/Tests/Sync/JSONs/237.json new file mode 100644 index 00000000..aeefe0b4 --- /dev/null +++ b/Tests/Sync/JSONs/237.json @@ -0,0 +1,13 @@ +[ + { + "id": 1, + "slides": [ + { + "id": 2 + }, + { + "id": 1 + } + ] + } +] diff --git a/Tests/Sync/JSONs/265.json b/Tests/Sync/JSONs/265.json new file mode 100644 index 00000000..671ac805 --- /dev/null +++ b/Tests/Sync/JSONs/265.json @@ -0,0 +1,13 @@ +[ + { + "id": 1, + "player_group": { + "id": 1, + "players": [ + { + "id": 1 + } + ] + } + } +] diff --git a/Tests/Sync/JSONs/277.json b/Tests/Sync/JSONs/277.json new file mode 100755 index 00000000..6ffde54d --- /dev/null +++ b/Tests/Sync/JSONs/277.json @@ -0,0 +1,18 @@ +[ + { + "id": 31, + "passengers": [ + { + "id": 22 + } + ] + }, + { + "id": 32, + "passengers": [ + { + "id": 22 + } + ] + } +] diff --git a/Tests/Sync/JSONs/280.json b/Tests/Sync/JSONs/280.json new file mode 100644 index 00000000..4ce2540b --- /dev/null +++ b/Tests/Sync/JSONs/280.json @@ -0,0 +1,15 @@ +[ + { + "busID": "0", + "stops": [ + { + "index": "0", + } + ], + "polyline": [ + { + "index": "0", + } + ] + } +] diff --git a/Tests/Sync/JSONs/283.json b/Tests/Sync/JSONs/283.json new file mode 100644 index 00000000..ee15816f --- /dev/null +++ b/Tests/Sync/JSONs/283.json @@ -0,0 +1,8 @@ +[ + { + "id": "0", + "owner": { + "id": "a" + } + } +] diff --git a/Tests/Sync/JSONs/320.json b/Tests/Sync/JSONs/320.json new file mode 100644 index 00000000..71f99820 --- /dev/null +++ b/Tests/Sync/JSONs/320.json @@ -0,0 +1,6 @@ +[ + { + "id": 1, + "tag": null + } +] diff --git a/Tests/Sync/JSONs/3ca82a0.json b/Tests/Sync/JSONs/3ca82a0.json new file mode 100644 index 00000000..9ddca929 --- /dev/null +++ b/Tests/Sync/JSONs/3ca82a0.json @@ -0,0 +1,18 @@ +[ + { + "id": 1, + "tags": [ + { + "id": 6 + }, + ] + }, + { + "id": 2, + "tags": [ + { + "id": 6 + }, + ] + } +] diff --git a/Tests/Sync/JSONs/bug-113-comments-no-id.json b/Tests/Sync/JSONs/bug-113-comments-no-id.json new file mode 100644 index 00000000..371de465 --- /dev/null +++ b/Tests/Sync/JSONs/bug-113-comments-no-id.json @@ -0,0 +1,30 @@ +[ + { + "body":"comment 1", + "awesome_comments":[ + { + "body":"sub-comment 1" + }, + { + "body":"sub-comment 2" + }, + { + "body":"sub-comment 3" + } + ] + }, + { + "body":"comment 2", + "awesome_comments":[ + { + "body":"sub-comment 4" + }, + { + "body":"sub-comment 5" + }, + { + "body":"sub-comment 6" + } + ] + } +] diff --git a/Tests/Sync/JSONs/bug-113-custom_relationship_key_to_one.json b/Tests/Sync/JSONs/bug-113-custom_relationship_key_to_one.json new file mode 100755 index 00000000..ff2beca4 --- /dev/null +++ b/Tests/Sync/JSONs/bug-113-custom_relationship_key_to_one.json @@ -0,0 +1,9 @@ +[ + { + "id":50, + "title":"Fairy tale", + "summarize_text":{ + "body":"Body of tale" + } + } +] diff --git a/Tests/Sync/JSONs/bug-113-stories-comments-no-ids.json b/Tests/Sync/JSONs/bug-113-stories-comments-no-ids.json new file mode 100644 index 00000000..3c2c974b --- /dev/null +++ b/Tests/Sync/JSONs/bug-113-stories-comments-no-ids.json @@ -0,0 +1,47 @@ +[ + { + "id":0, + "title":"story 1", + "awesome_comments":[ + { + "body":"comment 1" + }, + { + "body":"comment 2" + }, + { + "body":"comment 3" + } + ] + }, + { + "id":1, + "title":"story 2", + "awesome_comments":[ + { + "body":"comment 1" + }, + { + "body":"comment 2" + }, + { + "body":"comment 3" + } + ] + }, + { + "id":2, + "title":"story 3", + "awesome_comments":[ + { + "body":"comment 1" + }, + { + "body":"comment 2" + }, + { + "body":"comment 3" + } + ] + } +] diff --git a/Tests/Sync/JSONs/bug-125-light.json b/Tests/Sync/JSONs/bug-125-light.json new file mode 100644 index 00000000..2f7e3bd0 --- /dev/null +++ b/Tests/Sync/JSONs/bug-125-light.json @@ -0,0 +1,38 @@ + +{ + "element":{ + "elements":[ + { + "elements":[ + { + "elements":[], + "items":[ + { + "value":"option1" + } + ], + "label":"Any Single Select" + } + ], + "items":[], + "label":"Any Group" + } + ], + "items":[], + "label":"Any Form" + }, + "model":{ + "uri":"http://tempuri.org/any/path/mymodel/1.0/", + "properties":[ + { + "id":"anyString", + "restrictions":[ + { + "restriction":"enumeration" + } + ] + } + ] + }, + "uri":"http://tempuri.org/any/path/mydescriptor/1.2?language=en-US" +} diff --git a/Tests/Sync/JSONs/bug-125.json b/Tests/Sync/JSONs/bug-125.json new file mode 100644 index 00000000..8711ae2c --- /dev/null +++ b/Tests/Sync/JSONs/bug-125.json @@ -0,0 +1,167 @@ +{ + "uri":"http://tempuri.org/any/path/mydescriptor/1.2?language=en-US", + "type":"http://tempuri.org/any/path/mydescriptor/", + "version":"1.2", + "language":"en-US", + "element":{ + "type":"group", + "label":"Any Form", + "elements":[ + { + "type":"input", + "label":"Any Input", + "reference":"anyInteger", + "inputConfiguration":{ + "justAHint":[ + "a", + "b", + "c" + ] + } + }, + { + "type":"group", + "label":"Any Group", + "elements":[ + { + "type":"selectSingle", + "label":"Any Single Select", + "reference":"anyString", + "selection":"closed", + "items":[ + { + "value":"option1", + "label":"Option One" + }, + { + "value":"option2", + "label":"Option Two" + } + ] + }, + { + "type":"selectMultiple", + "label":"Any Multiple Select", + "reference":"anyString", + "selection":"open", + "items":[ + { + "value":"option3", + "label":"Option Three", + "aliasLabels":[ + { + "label":"Option Three A" + }, + { + "label":"Option Three B" + } + ] + }, + { + "value":"option4", + "label":"Option Four" + } + ] + } + ] + }, + { + "type":"textArea", + "label":"Any Text Area", + "reference":"anyString", + "comment":"This is a Comment for Any Text Area" + }, + { + "type":"image", + "label":"Any Image", + "reference":"anyMultimedia", + "maximumFileSize":12000 + }, + { + "type":"location", + "label":"Any Address Location", + "reference":"anyString", + "locationRepresentation":"address" + }, + { + "type":"custom", + "label":"Any Custom", + "reference":"anyString", + "customType":"http://tempuri.org/path/to/custom/element" + }, + { + "type":"input", + "label":"Any Input With Keyboard", + "reference":"anyString" + }, + { + "type":"form", + "label":"Any Form Link", + "formURI":"http://tempuri.org/path/to/another/form" + } + ] + }, + "model":{ + "uri":"http://tempuri.org/any/path/mymodel/1.0/", + "type":"http://tempuri.org/any/path/mymodel/", + "version":"1.0", + "properties":[ + { + "id":"anyString", + "type":"string", + "restrictions":[ + { + "restriction":"enumeration", + "items":[ + "option1", + "option2", + "option3" + ] + } + ] + }, + { + "id":"anyBoolean", + "type":"boolean", + "restrictions":[ + { + "restriction":"minLength", + "value":2 + }, + { + "restriction":"maxLength", + "value":50 + } + ] + }, + { + "id":"anyDecimal", + "type":"decimal" + }, + { + "id":"anyInteger", + "type":"integer" + }, + { + "id":"anyDateTime", + "type":"dateTime" + }, + { + "id":"anyDate", + "type":"date" + }, + { + "id":"anyDuration", + "type":"duration" + }, + { + "id":"anyMultimedia", + "type":"multimedia" + }, + { + "id":"anyLocation", + "type":"location" + } + ] + } +} diff --git a/Tests/Sync/JSONs/bug-179-places.json b/Tests/Sync/JSONs/bug-179-places.json new file mode 100644 index 00000000..20334741 --- /dev/null +++ b/Tests/Sync/JSONs/bug-179-places.json @@ -0,0 +1,8 @@ +[ + { + "name" : "Here", + }, + { + "name" : "There" + } + ] \ No newline at end of file diff --git a/Tests/Sync/JSONs/bug-179-routes.json b/Tests/Sync/JSONs/bug-179-routes.json new file mode 100644 index 00000000..b0240b9b --- /dev/null +++ b/Tests/Sync/JSONs/bug-179-routes.json @@ -0,0 +1,5 @@ +{ + "ident" : "1", + "start" : "Here", + "end" : "There" +} \ No newline at end of file diff --git a/Tests/Sync/JSONs/bug-202-a.json b/Tests/Sync/JSONs/bug-202-a.json new file mode 100644 index 00000000..0fea280e --- /dev/null +++ b/Tests/Sync/JSONs/bug-202-a.json @@ -0,0 +1,12 @@ +[ + { + "id": "1", + "name": "First", + "favorite_tags": [ + { + "id": "1", + "hashtag": "#first" + } + ] + } +] diff --git a/Tests/Sync/JSONs/bug-202-b.json b/Tests/Sync/JSONs/bug-202-b.json new file mode 100644 index 00000000..f9c3cc6b --- /dev/null +++ b/Tests/Sync/JSONs/bug-202-b.json @@ -0,0 +1,7 @@ +[ + { + "id": "1", + "name": "First", + "favorite_tags": [] + } +] diff --git a/Tests/Sync/JSONs/bug-239.json b/Tests/Sync/JSONs/bug-239.json new file mode 100755 index 00000000..3e92ed3e --- /dev/null +++ b/Tests/Sync/JSONs/bug-239.json @@ -0,0 +1,16 @@ +[ + { + "id": 31, + "max_speed": 370, + "passengers": [ + { + "id": 22, + "name": "Jenson Button" + }, + { + "id": 7, + "name": "Kimi Raikkonen" + } + ] + } +] diff --git a/Tests/Sync/JSONs/bug-254.json b/Tests/Sync/JSONs/bug-254.json new file mode 100644 index 00000000..6242a81a --- /dev/null +++ b/Tests/Sync/JSONs/bug-254.json @@ -0,0 +1,8 @@ +{ + "id": 0, + "residents": [ + { + "id": 0 + } + ] +} diff --git a/Tests/Sync/JSONs/bug-257.json b/Tests/Sync/JSONs/bug-257.json new file mode 100644 index 00000000..e7c5aaa6 --- /dev/null +++ b/Tests/Sync/JSONs/bug-257.json @@ -0,0 +1,21 @@ +{ + "_id" : "4yCb6LwmqwM2gnyWA", + "workoutName" : "Test new training program", + "workoutDesc" : "<p>Description</p>", + "workoutExercises" : [ + { + "_id" : "6JDa8DFBe8K6Kkguw", + "exerciseName" : "Exercise 1", + "exerciseDesc" : "Description exercise 1", + "mainMuscle" : "Biceps", + "mechanicsType" : "Pull" + }, + { + "_id" : "Lx5mZNG5iGRagmtS4", + "exerciseName" : "Exercise 2", + "exerciseDesc" : "Description exercise 2", + "mainMuscle" : "Abs", + "mechanicsType" : "crunch" + } + ] +} diff --git a/Tests/Sync/JSONs/bug-number-84.json b/Tests/Sync/JSONs/bug-number-84.json new file mode 100644 index 00000000..a9ebf1e9 --- /dev/null +++ b/Tests/Sync/JSONs/bug-number-84.json @@ -0,0 +1,16 @@ +[ + { + "xid": "mstaff_F58dVBTsXznvMpCPmpQgyV", + "image": "a.jpg", + "fulfillers": [ + { + "xid": "ffr_AkAHQegYkrobp5xc2ySc5D", + "name": "New York" + }, + { + "xid": "ffr_n5eGjfHQRqKr4tAfL7RNi9", + "name": "Chicago" + } + ] + } +] diff --git a/Tests/Sync/JSONs/camelcase.json b/Tests/Sync/JSONs/camelcase.json new file mode 100644 index 00000000..093688ce --- /dev/null +++ b/Tests/Sync/JSONs/camelcase.json @@ -0,0 +1,9 @@ +[ + { + "id": "1", + "numberOfChildren": 1, + "fullName": "Elvis Nuñez", + "first_name": "Elvis", + "last_name": "Nuñez" + } +] diff --git a/Tests/Sync/JSONs/comments-no-id.json b/Tests/Sync/JSONs/comments-no-id.json new file mode 100644 index 00000000..fe3fc540 --- /dev/null +++ b/Tests/Sync/JSONs/comments-no-id.json @@ -0,0 +1,30 @@ +[ + { + "body":"comment 1", + "comments":[ + { + "body":"sub-comment 1" + }, + { + "body":"sub-comment 2" + }, + { + "body":"sub-comment 3" + } + ] + }, + { + "body":"comment 2", + "comments":[ + { + "body":"sub-comment 4" + }, + { + "body":"sub-comment 5" + }, + { + "body":"sub-comment 6" + } + ] + } +] diff --git a/Tests/Sync/JSONs/custom_relationship_key_to_many.json b/Tests/Sync/JSONs/custom_relationship_key_to_many.json new file mode 100755 index 00000000..f1d50565 --- /dev/null +++ b/Tests/Sync/JSONs/custom_relationship_key_to_many.json @@ -0,0 +1,20 @@ +[ + { + "id":10, + "name":"Legen Dary", + "email":"awesome@ness.com", + "created_at":"2014-02-14T00:00:00+00:00", + "updated_at":"2014-02-17T00:00:00+00:00", + "annotations":[ + { + "id":30 + }, + { + "id":50 + }, + { + "id":70 + } + ] + } +] diff --git a/Tests/Sync/JSONs/custom_relationship_key_to_one.json b/Tests/Sync/JSONs/custom_relationship_key_to_one.json new file mode 100755 index 00000000..ff2beca4 --- /dev/null +++ b/Tests/Sync/JSONs/custom_relationship_key_to_one.json @@ -0,0 +1,9 @@ +[ + { + "id":50, + "title":"Fairy tale", + "summarize_text":{ + "body":"Body of tale" + } + } +] diff --git a/Tests/Sync/JSONs/id.json b/Tests/Sync/JSONs/id.json new file mode 100755 index 00000000..5cd7db89 --- /dev/null +++ b/Tests/Sync/JSONs/id.json @@ -0,0 +1,10 @@ +[ + { + "id": "a", + "name": "Legen Dary" + }, + { + "id": "b", + "name": "Wait Forit" + } +] diff --git a/Tests/Sync/JSONs/images.json b/Tests/Sync/JSONs/images.json new file mode 100644 index 00000000..ffd6c697 --- /dev/null +++ b/Tests/Sync/JSONs/images.json @@ -0,0 +1,14 @@ +[ + { + "ImageId": 0, + "url": "http://sample.com/sample0.png" + }, + { + "ImageId": 1, + "url": "http://sample.com/sample1.png" + }, + { + "ImageId": 2, + "url": "http://sample.com/sample2.png" + } +] diff --git a/Tests/Sync/JSONs/markets_items.json b/Tests/Sync/JSONs/markets_items.json new file mode 100644 index 00000000..4f0f3e3f --- /dev/null +++ b/Tests/Sync/JSONs/markets_items.json @@ -0,0 +1,22 @@ +[ + { + "id": "1", + "other_attribute": "Market 1", + "items": [ + { + "id": "1", + "other_attribute": "Item 1" + } + ] + }, + { + "id": "2", + "other_attribute": "Market 2", + "items": [ + { + "id": "1", + "other_attribute": "Item 1" + } + ] + } +] diff --git a/Tests/Sync/JSONs/notes_for_user_a.json b/Tests/Sync/JSONs/notes_for_user_a.json new file mode 100644 index 00000000..d751b578 --- /dev/null +++ b/Tests/Sync/JSONs/notes_for_user_a.json @@ -0,0 +1,8 @@ +[ + { + "id": 0, + }, + { + "id": 1, + } +] diff --git a/Tests/Sync/JSONs/notes_with_user_id.json b/Tests/Sync/JSONs/notes_with_user_id.json new file mode 100644 index 00000000..643174e7 --- /dev/null +++ b/Tests/Sync/JSONs/notes_with_user_id.json @@ -0,0 +1,27 @@ +[ + { + "id": 0, + "text": "Melisa White's diary, episode 0", + "super_user_id": 0 + }, + { + "id": 1, + "text": "Melisa White's diary, episode 1", + "super_user_id": 0 + }, + { + "id": 2, + "text": "Melisa White's diary, episode 2", + "super_user_id": 0 + }, + { + "id": 3, + "text": "Glass Oconnor's diary, episode 0", + "super_user_id": 1 + }, + { + "id": 4, + "text": "Glass Oconnor's diary, episode 1", + "super_user_id": 1 + } +] diff --git a/Tests/Sync/JSONs/notes_with_user_id_custom.json b/Tests/Sync/JSONs/notes_with_user_id_custom.json new file mode 100644 index 00000000..e52c13f5 --- /dev/null +++ b/Tests/Sync/JSONs/notes_with_user_id_custom.json @@ -0,0 +1,27 @@ +[ + { + "id": 0, + "text": "Melisa White's diary, episode 0", + "super_user": 0 + }, + { + "id": 1, + "text": "Melisa White's diary, episode 1", + "super_user": 0 + }, + { + "id": 2, + "text": "Melisa White's diary, episode 2", + "super_user": 0 + }, + { + "id": 3, + "text": "Glass Oconnor's diary, episode 0", + "super_user": 1 + }, + { + "id": 4, + "text": "Glass Oconnor's diary, episode 1", + "super_user": 1 + } +] diff --git a/Tests/Sync/JSONs/numbers.json b/Tests/Sync/JSONs/numbers.json new file mode 100644 index 00000000..fa7e6a38 --- /dev/null +++ b/Tests/Sync/JSONs/numbers.json @@ -0,0 +1,28 @@ +[ + { + "id": 0, + "values": 10, + "numbers": [ + { + "id": 1, + "values": 11, + }, + { + "id": 2, + "values": 12, + }] + }, + { + "id": 10, + "values": 20, + "numbers": [ + { + "id": 11, + "values": 21, + }, + { + "id": 12, + "values": 22, + }] + }, +] diff --git a/Tests/Sync/JSONs/numbers_in_collection.json b/Tests/Sync/JSONs/numbers_in_collection.json new file mode 100644 index 00000000..a651d481 --- /dev/null +++ b/Tests/Sync/JSONs/numbers_in_collection.json @@ -0,0 +1,10 @@ +[ + { + "id": 0, + "values": 10, + "parent" : + { + "name": "Collection 1" + } + } +] diff --git a/Tests/Sync/JSONs/operation-types-users-a.json b/Tests/Sync/JSONs/operation-types-users-a.json new file mode 100644 index 00000000..95783f6e --- /dev/null +++ b/Tests/Sync/JSONs/operation-types-users-a.json @@ -0,0 +1,12 @@ +[ + { + "id": 0, + "name": "Melisa White", + "email": "melisawhite@ovium.com" + }, + { + "id": 1, + "name": "Glass Oconnor", + "email": "glassoconnor@ovium.com" + } +] diff --git a/Tests/Sync/JSONs/operation-types-users-b.json b/Tests/Sync/JSONs/operation-types-users-b.json new file mode 100644 index 00000000..841f04a0 --- /dev/null +++ b/Tests/Sync/JSONs/operation-types-users-b.json @@ -0,0 +1,12 @@ +[ + { + "id": 0, + "name": "Melisa White", + "email": "updated@ovium.com" + }, + { + "id": 6, + "name": "Shawn Merrill", + "email": "shawnmerrill@ovium.com" + } +] diff --git a/Tests/Sync/JSONs/organizations-tree.json b/Tests/Sync/JSONs/organizations-tree.json new file mode 100644 index 00000000..ec29bb28 --- /dev/null +++ b/Tests/Sync/JSONs/organizations-tree.json @@ -0,0 +1,39 @@ +[ + { + "id" : 1, + "name" : "Org 1", + "children" : [ + { + "id" : 11, + "name" : "Org 11", + "children" : [ + { + "id" : 111, + "name" : "Org 111", + "children" : [ + { + "id" : 1106, + "name" : "Org 1106" + }, + { + "id" : 1131, + "name" : "Org 1131" + } + ] + }, + { + "id" : 112, + "name" : "Org 1213", + "children" : [ + { + "id" : 1114, + "name" : "Org 12132" + } + ] + } + ] + } + ] + } +] + \ No newline at end of file diff --git a/Tests/Sync/JSONs/patients.json b/Tests/Sync/JSONs/patients.json new file mode 100644 index 00000000..6604c7d3 --- /dev/null +++ b/Tests/Sync/JSONs/patients.json @@ -0,0 +1,42 @@ +[ + { + "id": 0, + "text": "Melisa White", + "baselines": [ + { + "id": 0, + "text": "Baseline 1" + } + ], + "alcohols": [ + { + "id": 0, + "text": "Alcohol 1", + "measure": { + "id": 0, + "text": "Alcohol Measure 1" + } + } + ], + "fitnesses": [ + { + "id": 0, + "text": "Fitness 1", + "measure": { + "id": 0, + "text": "Fitness Measure 1" + } + } + ], + "weights": [ + { + "id": 0, + "text": "Weight 1", + "measure": { + "id": 0, + "text": "Weight Measure 1" + } + } + ] + } +] diff --git a/Tests/Sync/JSONs/stories-comments-no-ids.json b/Tests/Sync/JSONs/stories-comments-no-ids.json new file mode 100644 index 00000000..cdc7eea8 --- /dev/null +++ b/Tests/Sync/JSONs/stories-comments-no-ids.json @@ -0,0 +1,47 @@ +[ + { + "id":0, + "title":"story 1", + "comments":[ + { + "body":"comment 1" + }, + { + "body":"comment 2" + }, + { + "body":"comment 3" + } + ] + }, + { + "id":1, + "title":"story 2", + "comments":[ + { + "body":"comment 1" + }, + { + "body":"comment 2" + }, + { + "body":"comment 3" + } + ] + }, + { + "id":2, + "title":"story 3", + "comments":[ + { + "body":"comment 1" + }, + { + "body":"comment 2" + }, + { + "body":"comment 3" + } + ] + } +] diff --git a/Tests/Sync/JSONs/story-summarize.json b/Tests/Sync/JSONs/story-summarize.json new file mode 100644 index 00000000..a97d2779 --- /dev/null +++ b/Tests/Sync/JSONs/story-summarize.json @@ -0,0 +1,11 @@ +{ + "id":1, + "summarize_text":{ + "id":1 + }, + "comments":[ + { + "body":"Hi" + } + ] +} diff --git a/Tests/Sync/JSONs/tagged_notes.json b/Tests/Sync/JSONs/tagged_notes.json new file mode 100644 index 00000000..61d5468f --- /dev/null +++ b/Tests/Sync/JSONs/tagged_notes.json @@ -0,0 +1,30 @@ +[ + { + "id": 0, + "text": "Shawn Merril's diary, episode 0", + "super_tags": [ + { + "id": 1, + "name": "diary" + }, + { + "id": 2, + "name": "neverforget" + } + ] + }, + { + "id": 1, + "text": "Shawn Merril's diary, episode 1", + "super_tags": [ + { + "id": 1, + "name": "diary" + } + ] + }, + { + "id": 2, + "text": "Shawn Merril's diary, episode 4" + } +] diff --git a/Tests/Sync/JSONs/to-one-camelcase.json b/Tests/Sync/JSONs/to-one-camelcase.json new file mode 100644 index 00000000..eb24fb8f --- /dev/null +++ b/Tests/Sync/JSONs/to-one-camelcase.json @@ -0,0 +1,6 @@ +{ + "id": 0, + "legalTenant": { + "id": 0 + } +} diff --git a/Tests/Sync/JSONs/to-one-snakecase.json b/Tests/Sync/JSONs/to-one-snakecase.json new file mode 100644 index 00000000..2501f470 --- /dev/null +++ b/Tests/Sync/JSONs/to-one-snakecase.json @@ -0,0 +1,6 @@ +{ + "id": 0, + "legal_tenant": { + "id": 0 + } +} diff --git a/Tests/Sync/JSONs/unique.json b/Tests/Sync/JSONs/unique.json new file mode 100644 index 00000000..5ed81b8d --- /dev/null +++ b/Tests/Sync/JSONs/unique.json @@ -0,0 +1,13 @@ +[ + { + "id" : 1, + "b" : [ + { + "id" : 2 + }, + { + "id" : 3 + } + ] + } +] \ No newline at end of file diff --git a/Tests/Sync/JSONs/users_a.json b/Tests/Sync/JSONs/users_a.json new file mode 100644 index 00000000..9452f1c0 --- /dev/null +++ b/Tests/Sync/JSONs/users_a.json @@ -0,0 +1,58 @@ +[ + { + "id": 0, + "name": "Melisa White", + "email": "melisawhite@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-17T00:00:00+00:00" + }, + { + "id": 1, + "name": "Glass Oconnor", + "email": "glassoconnor@ovium.com", + "created_at": "2014-02-15T00:00:00+00:00", + "updated_at": "2014-02-18T00:00:00+00:00" + }, + { + "id": 2, + "name": "Maritza Boyer", + "email": "maritzaboyer@ovium.com", + "created_at": "2014-02-18T00:00:00+00:00", + "updated_at": "2014-02-19T00:00:00+00:00" + }, + { + "id": 3, + "name": "Margo Nixon", + "email": "margonixon@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-14T00:00:00+00:00" + }, + { + "id": 4, + "name": "Valencia Foley", + "email": "valenciafoley@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-14T00:00:00+00:00" + }, + { + "id": 5, + "name": "Hayden Livingston", + "email": "haydenlivingston@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-14T00:00:00+00:00" + }, + { + "id": 6, + "name": "Shawn Merrill", + "email": "shawnmerrill@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-14T00:00:00+00:00" + }, + { + "id": 7, + "name": "Bradford Duke", + "email": "bradfordduke@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-17T00:00:00+00:00" + } +] diff --git a/Tests/Sync/JSONs/users_b.json b/Tests/Sync/JSONs/users_b.json new file mode 100644 index 00000000..cd8f1fdb --- /dev/null +++ b/Tests/Sync/JSONs/users_b.json @@ -0,0 +1,32 @@ +[ + { + "id": 6, + "name": "Shawn Merrill", + "email": "firstupdate@ovium.com" + }, + { + "id": 7, + "name": "Bradford Duke", + "email": "secondupdated@ovium.com" + }, + { + "id": 8, + "name": "Dodson Vaughan", + "email": "dodsonvaughan@ovium.com" + }, + { + "id": 9, + "name": "Alexis Richmond", + "email": "alexisrichmond@ovium.com" + }, + { + "id": 10, + "name": "Flores Daniel", + "email": "floresdaniel@ovium.com" + }, + { + "id": 11, + "name": "Odessa Turner", + "email": "odessaturner@ovium.com" + } +] diff --git a/Tests/Sync/JSONs/users_c.json b/Tests/Sync/JSONs/users_c.json new file mode 100644 index 00000000..db9f16b1 --- /dev/null +++ b/Tests/Sync/JSONs/users_c.json @@ -0,0 +1,63 @@ +[ + { + "id": 6, + "name": "Shawn Merrill", + "email": "firstupdate@ovium.com", + "location": { + "city": "New York", + "street": "Broadway", + "zip_code": 10012 + }, + "profile_pictures": [ + { + "ImageId": 0, + "url": "http://sample.com/sample0.png" + }, + { + "ImageId": 1, + "url": "http://sample.com/sample1.png" + }, + { + "ImageId": 2, + "url": "http://sample.com/sample2.png" + } + ], + }, + { + "id": 7, + "name": "Bradford Duke", + "email": "secondupdated@ovium.com", + "location": { + "city": "London" + }, + "profile_pictures": [ + { + "ImageId": 0, + "url": "http://sample.com/sample0.png" + }, + { + "ImageId": 1, + "url": "http://sample.com/sample1.png" + } + ], + }, + { + "id": 8, + "name": "Dodson Vaughan", + "email": "dodsonvaughan@ovium.com", + "profile_pictures": [ + { + "ImageId": 0, + "url": "http://sample.com/sample0.png" + } + ], + }, + { + "id": 9, + "name": "Alexis Richmond", + "email": "alexisrichmond@ovium.com", + "location": { + "city": "Lille" + }, + } +] diff --git a/Tests/Sync/JSONs/users_company.json b/Tests/Sync/JSONs/users_company.json new file mode 100644 index 00000000..3ebfa844 --- /dev/null +++ b/Tests/Sync/JSONs/users_company.json @@ -0,0 +1,57 @@ +[ + { + "id": 0, + "name": "Melisa White", + "email": "melisawhite@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-17T00:00:00+00:00", + "company":{ + "id": 0, + "name": "Apple" + } + }, + { + "id": 1, + "name": "Glass Oconnor", + "email": "glassoconnor@ovium.com", + "created_at": "2014-02-15T00:00:00+00:00", + "updated_at": "2014-02-18T00:00:00+00:00", + "company":{ + "id": 0, + "name": "Apple" + } + }, + { + "id": 2, + "name": "Maritza Boyer", + "email": "maritzaboyer@ovium.com", + "created_at": "2014-02-18T00:00:00+00:00", + "updated_at": "2014-02-19T00:00:00+00:00", + "company":{ + "id": 0, + "name": "Apple" + } + }, + { + "id": 3, + "name": "Margo Nixon", + "email": "margonixon@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-14T00:00:00+00:00", + "company":{ + "id": 1, + "name": "Facebook" + } + }, + { + "id": 4, + "name": "Valencia Foley", + "email": "valenciafoley@ovium.com", + "created_at": "2014-02-14T00:00:00+00:00", + "updated_at": "2014-02-14T00:00:00+00:00", + "company":{ + "id": 1, + "name": "Facebook" + } + } +] diff --git a/Tests/Sync/JSONs/users_notes.json b/Tests/Sync/JSONs/users_notes.json new file mode 100644 index 00000000..389e729a --- /dev/null +++ b/Tests/Sync/JSONs/users_notes.json @@ -0,0 +1,72 @@ +[ + { + "id": 6, + "name": "Shawn Merrill", + "email": "firstupdate@ovium.com", + "annotations": [ + { + "id": 0, + "text": "Shawn Merril's diary, episode 1" + }, + { + "id": 6, + "text": "Shawn Merril's diary, episode 2" + }, + { + "id": 7, + "text": "Shawn Merril's diary, episode 3" + }, + { + "id": 8, + "text": "Shawn Merril's diary, episode 4" + }, + { + "id": 9, + "text": "Shawn Merril's diary, episode 5" + } + ] + }, + { + "id": 7, + "name": "Bradford Duke", + "email": "secondupdated@ovium.com", + "annotations": [ + { + "id": 1, + "text": "Bradford Duke's diary, episode 1" + }, + { + "id": 2, + "text": "Bradford Duke's diary, episode 2" + }, + { + "id": 3, + "text": "Bradford Duke's diary, episode 3" + }, + { + "id": 4, + "text": "Bradford Duke's diary, episode 4" + }, + { + "id": 5, + "text": "Bradford Duke's diary, episode 5" + } + ] + }, + { + "id": 8, + "name": "Dodson Vaughan", + "email": "dodsonvaughan@ovium.com", + "annotations": [ + { + "id": 10, + "text": "Bradford Duke's diary, episode 1" + } + ] + }, + { + "id": 9, + "name": "Alexis Richmond", + "email": "alexisrichmond@ovium.com" + } +] diff --git a/Tests/Sync/Models/113.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/113.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..17d74ca8 --- /dev/null +++ b/Tests/Sync/Models/113.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>113.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/113.xcdatamodeld/113.xcdatamodel/contents b/Tests/Sync/Models/113.xcdatamodeld/113.xcdatamodel/contents new file mode 100644 index 00000000..fceec10e --- /dev/null +++ b/Tests/Sync/Models/113.xcdatamodeld/113.xcdatamodel/contents @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="AwesomeComment" syncable="YES"> + <attribute name="body" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="awesomeComments" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="AwesomeComment" inverseName="awesomeComments" inverseEntity="AwesomeComment" syncable="YES"/> + <relationship name="awesomeStory" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="AwesomeStory" inverseName="awesomeComments" inverseEntity="AwesomeStory" syncable="YES"/> + </entity> + <entity name="AwesomeStory" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="title" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="awesomeComments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="AwesomeComment" inverseName="awesomeStory" inverseEntity="AwesomeComment" syncable="YES"/> + <relationship name="awesomeSummarize" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="AwesomeSummarize" inverseName="awesomeStory" inverseEntity="AwesomeSummarize" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="summarize_text"/> + </userInfo> + </relationship> + </entity> + <entity name="AwesomeSummarize" syncable="YES"> + <attribute name="body" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="awesomeStory" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="AwesomeStory" inverseName="awesomeSummarize" inverseEntity="AwesomeStory" syncable="YES"/> + </entity> + <elements> + <element name="AwesomeComment" positionX="234" positionY="164" width="128" height="88"/> + <element name="AwesomeStory" positionX="25" positionY="176" width="128" height="103"/> + <element name="AwesomeSummarize" positionX="52" positionY="45" width="128" height="88"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/125.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/125.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..258167bc --- /dev/null +++ b/Tests/Sync/Models/125.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>125.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/125.xcdatamodeld/125.xcdatamodel/contents b/Tests/Sync/Models/125.xcdatamodeld/125.xcdatamodel/contents new file mode 100644 index 00000000..e4e32374 --- /dev/null +++ b/Tests/Sync/Models/125.xcdatamodeld/125.xcdatamodel/contents @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="8195" systemVersion="15B30a" minimumToolsVersion="Automatic"> + <entity name="Element" syncable="YES"> + <attribute name="label" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="element" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Element" inverseName="elements" inverseEntity="Element" syncable="YES"/> + <relationship name="elements" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Element" inverseName="element" inverseEntity="Element" syncable="YES"/> + <relationship name="form" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Form" inverseName="element" inverseEntity="Form" syncable="YES"/> + <relationship name="items" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="SelectionItem" inverseName="element" inverseEntity="SelectionItem" syncable="YES"/> + </entity> + <entity name="Form" syncable="YES"> + <attribute name="uri" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="element" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Element" inverseName="form" inverseEntity="Element" syncable="YES"/> + <relationship name="model" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Model" inverseName="form" inverseEntity="Model" syncable="YES"/> + </entity> + <entity name="Model" syncable="YES"> + <attribute name="uri" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="form" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Form" inverseName="model" inverseEntity="Form" syncable="YES"/> + <relationship name="properties" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="ModelProperty" inverseName="model" inverseEntity="ModelProperty" syncable="YES"/> + </entity> + <entity name="ModelProperty" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="model" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Model" inverseName="properties" inverseEntity="Model" syncable="YES"/> + <relationship name="restrictions" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Restriction" inverseName="property" inverseEntity="Restriction" syncable="YES"/> + </entity> + <entity name="Restriction" syncable="YES"> + <attribute name="restriction" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="property" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="ModelProperty" inverseName="restrictions" inverseEntity="ModelProperty" syncable="YES"/> + </entity> + <entity name="SelectionItem" syncable="YES"> + <attribute name="value" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="element" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Element" inverseName="items" inverseEntity="Element" syncable="YES"/> + </entity> + <elements> + <element name="Element" positionX="151" positionY="-279" width="128" height="118"/> + <element name="Form" positionX="-56" positionY="-243" width="128" height="88"/> + <element name="Model" positionX="-81" positionY="-28" width="128" height="88"/> + <element name="ModelProperty" positionX="-72" positionY="189" width="128" height="88"/> + <element name="Restriction" positionX="-297" positionY="188" width="128" height="73"/> + <element name="SelectionItem" positionX="151" positionY="176" width="128" height="73"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/151-many-to-many.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/151-many-to-many.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..2477a35b --- /dev/null +++ b/Tests/Sync/Models/151-many-to-many.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>151-many-to-many.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/151-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents b/Tests/Sync/Models/151-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents new file mode 100644 index 00000000..fee9c750 --- /dev/null +++ b/Tests/Sync/Models/151-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="Note" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="noteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Tag" inverseName="notes" inverseEntity="Tag" syncable="YES"/> + </entity> + <entity name="Tag" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="tagID" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + <relationship name="notes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Note" inverseName="tags" inverseEntity="Note" syncable="YES"/> + </entity> + <elements> + <element name="Note" positionX="124" positionY="-27" width="128" height="90"/> + <element name="Tag" positionX="36" positionY="18" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..2477a35b --- /dev/null +++ b/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>151-many-to-many.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents b/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents new file mode 100644 index 00000000..5380e015 --- /dev/null +++ b/Tests/Sync/Models/151-ordered-many-to-many.xcdatamodeld/151-many-to-many.xcdatamodel/contents @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="Note" syncable="YES"> + <attribute name="id" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Tag" inverseName="notes" inverseEntity="Tag" syncable="YES"/> + </entity> + <entity name="Tag" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="notes" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Note" inverseName="tags" inverseEntity="Note" syncable="YES"/> + </entity> + <elements> + <element name="Note" positionX="124" positionY="-27" width="128" height="90"/> + <element name="Tag" positionX="36" positionY="18" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..2300ed4f --- /dev/null +++ b/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>151-to-many.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents b/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents new file mode 100644 index 00000000..885d7da4 --- /dev/null +++ b/Tests/Sync/Models/151-ordered-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="Note" syncable="YES"> + <attribute name="id" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="notes" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="User" syncable="YES"> + <attribute name="id" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="notes" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="Note" inverseName="user" inverseEntity="Note" syncable="YES"/> + </entity> + <elements> + <element name="Note" positionX="405" positionY="-27" width="128" height="88"/> + <element name="User" positionX="223" positionY="-27" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/151-to-many.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/151-to-many.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..2300ed4f --- /dev/null +++ b/Tests/Sync/Models/151-to-many.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>151-to-many.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/151-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents b/Tests/Sync/Models/151-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents new file mode 100644 index 00000000..9f79c576 --- /dev/null +++ b/Tests/Sync/Models/151-to-many.xcdatamodeld/151-to-many.xcdatamodel/contents @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="Note" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="noteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="notes" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="User" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="userID" attributeType="Integer 32" defaultValueString="0" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + <relationship name="notes" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Note" inverseName="user" inverseEntity="Note" syncable="YES"/> + </entity> + <elements> + <element name="Note" positionX="405" positionY="-27" width="128" height="90"/> + <element name="User" positionX="223" positionY="-27" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/157.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/157.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..69a39526 --- /dev/null +++ b/Tests/Sync/Models/157.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>157.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/157.xcdatamodeld/157.xcdatamodel/contents b/Tests/Sync/Models/157.xcdatamodeld/157.xcdatamodel/contents new file mode 100644 index 00000000..bcb8e09d --- /dev/null +++ b/Tests/Sync/Models/157.xcdatamodeld/157.xcdatamodel/contents @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="City" syncable="YES"> + <attribute name="cityID" attributeType="Integer 16" defaultValueString="0" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="locations" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Location" inverseName="city" inverseEntity="Location" syncable="YES"/> + </entity> + <entity name="Location" syncable="YES"> + <attribute name="locationID" attributeType="Integer 16" defaultValueString="0" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="city" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="City" inverseName="locations" inverseEntity="City" syncable="YES"/> + </entity> + <elements> + <element name="City" positionX="-63" positionY="-18" width="128" height="90"/> + <element name="Location" positionX="-54" positionY="-9" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/179.xcdatamodeld/179.xcdatamodel/contents b/Tests/Sync/Models/179.xcdatamodeld/179.xcdatamodel/contents new file mode 100644 index 00000000..efa2f7dd --- /dev/null +++ b/Tests/Sync/Models/179.xcdatamodeld/179.xcdatamodel/contents @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Xcode 7.0"> + <entity name="Place" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="endRoutes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Route" inverseName="endPlace" inverseEntity="Route" syncable="YES"/> + <relationship name="startRoutes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Route" inverseName="startPlace" inverseEntity="Route" syncable="YES"/> + </entity> + <entity name="Route" syncable="YES"> + <attribute name="ident" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="endPlace" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" inverseName="endRoutes" inverseEntity="Place" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="end"/> + </userInfo> + </relationship> + <relationship name="startPlace" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Place" inverseName="startRoutes" inverseEntity="Place" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="start"/> + </userInfo> + </relationship> + </entity> + <elements> + <element name="Route" positionX="-63" positionY="-18" width="128" height="88"/> + <element name="Place" positionX="151" positionY="-18" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/202.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/202.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..207e4146 --- /dev/null +++ b/Tests/Sync/Models/202.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>202.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/202.xcdatamodeld/202.xcdatamodel/contents b/Tests/Sync/Models/202.xcdatamodeld/202.xcdatamodel/contents new file mode 100644 index 00000000..b86cd757 --- /dev/null +++ b/Tests/Sync/Models/202.xcdatamodeld/202.xcdatamodel/contents @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10171" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="Tag" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="users" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="User" inverseName="favoriteTags" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="User" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="favoriteTags" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Tag" inverseName="users" inverseEntity="Tag" syncable="YES"/> + </entity> + <elements> + <element name="Tag" positionX="-63" positionY="-18" width="128" height="75"/> + <element name="User" positionX="-54" positionY="-9" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/225.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/225.xcdatamodeld/.xccurrentversion new file mode 100755 index 00000000..2477a35b --- /dev/null +++ b/Tests/Sync/Models/225.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>151-many-to-many.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/225.xcdatamodeld/151-many-to-many.xcdatamodel/contents b/Tests/Sync/Models/225.xcdatamodeld/151-many-to-many.xcdatamodel/contents new file mode 100644 index 00000000..9f497085 --- /dev/null +++ b/Tests/Sync/Models/225.xcdatamodeld/151-many-to-many.xcdatamodel/contents @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15G31" minimumToolsVersion="Automatic"> + <entity name="Tag" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <relationship name="users" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="User" inverseName="tags" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="User" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Tag" inverseName="users" inverseEntity="Tag" syncable="YES"/> + </entity> + <elements> + <element name="Tag" positionX="-63" positionY="-18" width="128" height="75"/> + <element name="User" positionX="124" positionY="-27" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/233.xcdatamodeld/233.xcdatamodel/contents b/Tests/Sync/Models/233.xcdatamodeld/233.xcdatamodel/contents new file mode 100644 index 00000000..f036ac0c --- /dev/null +++ b/Tests/Sync/Models/233.xcdatamodeld/233.xcdatamodel/contents @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C53a" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> + <entity name="Presentation" representedClassName="" syncable="YES"> + <attribute name="id" attributeType="Integer 16" usesScalarValueType="YES" syncable="YES"/> + <relationship name="slides" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Slide" inverseName="presentation" inverseEntity="Slide" syncable="YES"/> + </entity> + <entity name="Slide" representedClassName="" syncable="YES"> + <attribute name="id" optional="YES" attributeType="Integer 16" usesScalarValueType="YES" syncable="YES"/> + <relationship name="presentation" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Presentation" inverseName="slides" inverseEntity="Presentation" syncable="YES"/> + </entity> + <elements> + <element name="Presentation" positionX="-216" positionY="18" width="128" height="75"/> + <element name="Slide" positionX="-36" positionY="18" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/239.xcdatamodeld/239.xcdatamodel/contents b/Tests/Sync/Models/239.xcdatamodeld/239.xcdatamodel/contents new file mode 100644 index 00000000..b7ab3937 --- /dev/null +++ b/Tests/Sync/Models/239.xcdatamodeld/239.xcdatamodel/contents @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="Car" syncable="YES"> + <relationship name="passengers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Passenger" inverseName="car" inverseEntity="Passenger" syncable="YES"/> + </entity> + <entity name="Passenger" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="car" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Car" inverseName="passengers" inverseEntity="Car" syncable="YES"/> + </entity> + <entity name="Racecar" parentEntity="Car" syncable="YES"> + <attribute name="maxSpeed" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + </entity> + <entity name="Sedan" parentEntity="Car" syncable="YES"/> + <elements> + <element name="Car" positionX="-72" positionY="-18" width="128" height="58"/> + <element name="Passenger" positionX="187" positionY="-52" width="128" height="88"/> + <element name="Racecar" positionX="-162" positionY="101" width="128" height="73"/> + <element name="Sedan" positionX="7" positionY="101" width="128" height="45"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/254.xcdatamodeld/254.xcdatamodel/contents b/Tests/Sync/Models/254.xcdatamodeld/254.xcdatamodel/contents new file mode 100644 index 00000000..95ce75ea --- /dev/null +++ b/Tests/Sync/Models/254.xcdatamodeld/254.xcdatamodel/contents @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="16A294a" minimumToolsVersion="Xcode 7.0"> + <entity name="House" syncable="YES"> + <attribute name="id" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <relationship name="owners" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Human" inverseName="ownhouses" inverseEntity="Human" syncable="YES"/> + <relationship name="residents" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Human" inverseName="residenthouse" inverseEntity="Human" syncable="YES"/> + </entity> + <entity name="Human" syncable="YES"> + <attribute name="id" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <relationship name="ownhouses" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="House" inverseName="owners" inverseEntity="House" syncable="YES"/> + <relationship name="residenthouse" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="House" inverseName="residents" inverseEntity="House" syncable="YES"/> + </entity> + <elements> + <element name="House" positionX="-63" positionY="-18" width="128" height="88"/> + <element name="Human" positionX="162" positionY="-18" width="128" height="88"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/257.xcdatamodeld/257.xcdatamodel/contents b/Tests/Sync/Models/257.xcdatamodeld/257.xcdatamodel/contents new file mode 100644 index 00000000..dff1b1dc --- /dev/null +++ b/Tests/Sync/Models/257.xcdatamodeld/257.xcdatamodel/contents @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15G31" minimumToolsVersion="Xcode 7.0"> + <entity name="Exercise" syncable="YES"> + <attribute name="exerciseDesc" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="exerciseName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="_id"/> + </userInfo> + </attribute> + <attribute name="mainMuscle" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="workout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Workout" inverseName="workoutExercises" inverseEntity="Workout" syncable="YES"/> + </entity> + <entity name="Workout" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="_id"/> + </userInfo> + </attribute> + <attribute name="workoutDesc" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="workoutName" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="workoutExercises" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Exercise" inverseName="workout" inverseEntity="Exercise" syncable="YES"/> + </entity> + <elements> + <element name="Workout" positionX="-252" positionY="-18" width="128" height="103"/> + <element name="Exercise" positionX="-54" positionY="-9" width="128" height="118"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/265.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/265.xcdatamodeld/.xccurrentversion new file mode 100755 index 00000000..31a1c6cd --- /dev/null +++ b/Tests/Sync/Models/265.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>265.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/265.xcdatamodeld/265.xcdatamodel/contents b/Tests/Sync/Models/265.xcdatamodeld/265.xcdatamodel/contents new file mode 100644 index 00000000..1c8c1042 --- /dev/null +++ b/Tests/Sync/Models/265.xcdatamodeld/265.xcdatamodel/contents @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="Player" syncable="YES"> + <attribute name="id" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="playerGroup" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PlayerGroup" inverseName="players" inverseEntity="PlayerGroup" syncable="YES"/> + </entity> + <entity name="PlayerGroup" syncable="YES"> + <attribute name="id" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="players" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Player" inverseName="playerGroup" inverseEntity="Player" syncable="YES"/> + </entity> + <elements> + <element name="Player" positionX="-27" positionY="18" width="128" height="73"/> + <element name="PlayerGroup" positionX="268" positionY="18" width="128" height="73"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/277.xcdatamodeld/239.xcdatamodel/contents b/Tests/Sync/Models/277.xcdatamodeld/239.xcdatamodel/contents new file mode 100644 index 00000000..947d82b7 --- /dev/null +++ b/Tests/Sync/Models/277.xcdatamodeld/239.xcdatamodel/contents @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="Car" syncable="YES"> + <relationship name="passengers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Passenger" inverseName="cars" inverseEntity="Passenger" syncable="YES"/> + </entity> + <entity name="Passenger" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="cars" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Car" inverseName="passengers" inverseEntity="Car" syncable="YES"/> + </entity> + <entity name="Racecar" parentEntity="Car" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + </entity> + <entity name="Sedan" parentEntity="Car" syncable="YES"/> + <elements> + <element name="Car" positionX="-72" positionY="-18" width="128" height="58"/> + <element name="Passenger" positionX="153" positionY="-52" width="128" height="73"/> + <element name="Racecar" positionX="-162" positionY="101" width="128" height="58"/> + <element name="Sedan" positionX="7" positionY="101" width="128" height="45"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/280.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/280.xcdatamodeld/.xccurrentversion new file mode 100755 index 00000000..2477a35b --- /dev/null +++ b/Tests/Sync/Models/280.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>151-many-to-many.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/280.xcdatamodeld/151-many-to-many.xcdatamodel/contents b/Tests/Sync/Models/280.xcdatamodeld/151-many-to-many.xcdatamodel/contents new file mode 100644 index 00000000..93df3e47 --- /dev/null +++ b/Tests/Sync/Models/280.xcdatamodeld/151-many-to-many.xcdatamodel/contents @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="Route" syncable="YES"> + <attribute name="busID" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + <entry key="hyper.remoteKey" value="busID"/> + </userInfo> + </attribute> + <relationship name="polyline" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="RoutePolylineItem" inverseName="route" inverseEntity="RoutePolylineItem" syncable="YES"/> + <relationship name="stops" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="RouteStop" inverseName="route" inverseEntity="RouteStop" syncable="YES"/> + </entity> + <entity name="RoutePolylineItem" syncable="YES"> + <attribute name="index" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + </userInfo> + </attribute> + <relationship name="route" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" inverseName="polyline" inverseEntity="Route" syncable="YES"/> + </entity> + <entity name="RouteStop" syncable="YES"> + <attribute name="index" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + </userInfo> + </attribute> + <relationship name="route" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Route" inverseName="stops" inverseEntity="Route" syncable="YES"/> + </entity> + <elements> + <element name="Route" positionX="-117" positionY="-270" width="128" height="88"/> + <element name="RoutePolylineItem" positionX="88" positionY="-300" width="128" height="75"/> + <element name="RouteStop" positionX="88" positionY="-183" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/283.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/283.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/283.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/283.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/283.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..4c122e62 --- /dev/null +++ b/Tests/Sync/Models/283.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="Owner" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="taskList" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TaskList" inverseName="owner" inverseEntity="TaskList" syncable="YES"/> + <relationship name="taskListParticipants" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TaskList" inverseName="participants" inverseEntity="TaskList" syncable="YES"/> + </entity> + <entity name="TaskList" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="owner" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Owner" inverseName="taskList" inverseEntity="Owner" syncable="YES"/> + <relationship name="participants" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Owner" inverseName="taskListParticipants" inverseEntity="Owner" syncable="YES"/> + </entity> + <elements> + <element name="TaskList" positionX="-63" positionY="-18" width="128" height="90"/> + <element name="Owner" positionX="-54" positionY="-9" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/320.xcdatamodeld/320.xcdatamodel/contents b/Tests/Sync/Models/320.xcdatamodeld/320.xcdatamodel/contents new file mode 100644 index 00000000..6a4257a0 --- /dev/null +++ b/Tests/Sync/Models/320.xcdatamodeld/320.xcdatamodel/contents @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C53a" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> + <entity name="Tag" representedClassName="" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/> + <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="tag" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="User" representedClassName="" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/> + <relationship name="tag" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Tag" inverseName="user" inverseEntity="Tag" syncable="YES"/> + </entity> + <elements> + <element name="Tag" positionX="-54" positionY="-9" width="128" height="75"/> + <element name="User" positionX="-63" positionY="-18" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/3ca82a0.xcdatamodeld/3ca82a0.xcdatamodel/contents b/Tests/Sync/Models/3ca82a0.xcdatamodeld/3ca82a0.xcdatamodel/contents new file mode 100644 index 00000000..7e4c8d74 --- /dev/null +++ b/Tests/Sync/Models/3ca82a0.xcdatamodeld/3ca82a0.xcdatamodel/contents @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C53a" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> + <entity name="Article" representedClassName="" syncable="YES"> + <attribute name="id" attributeType="Integer 16" usesScalarValueType="YES" syncable="YES"/> + <relationship name="tags" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="ArticleTag" inverseName="articles" inverseEntity="ArticleTag" syncable="YES"/> + </entity> + <entity name="ArticleTag" representedClassName="" syncable="YES"> + <attribute name="id" attributeType="Integer 16" usesScalarValueType="YES" syncable="YES"/> + <relationship name="articles" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Article" inverseName="tags" inverseEntity="Article" syncable="YES"/> + </entity> + <elements> + <element name="Article" positionX="-45" positionY="0" width="128" height="75"/> + <element name="ArticleTag" positionX="-18" positionY="27" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/84.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/84.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..9238c02b --- /dev/null +++ b/Tests/Sync/Models/84.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>84.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/84.xcdatamodeld/84.xcdatamodel/contents b/Tests/Sync/Models/84.xcdatamodeld/84.xcdatamodel/contents new file mode 100644 index 00000000..f451551d --- /dev/null +++ b/Tests/Sync/Models/84.xcdatamodeld/84.xcdatamodel/contents @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E7f" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic"> + <entity name="MSFulfiller" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="xid" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="staff" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="MSStaff" inverseName="fulfillers" inverseEntity="MSStaff" syncable="YES"/> + </entity> + <entity name="MSStaff" syncable="YES"> + <attribute name="image" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="xid" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="fulfillers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="MSFulfiller" inverseName="staff" inverseEntity="MSFulfiller" syncable="YES"/> + </entity> + <elements> + <element name="MSFulfiller" positionX="117" positionY="-7" width="128" height="90"/> + <element name="MSStaff" positionX="-63" positionY="-18" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Camelcase.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Camelcase.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/Camelcase.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/Camelcase.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Camelcase.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..4291d66e --- /dev/null +++ b/Tests/Sync/Models/Camelcase.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10171" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="NormalUser" syncable="YES"> + <attribute name="etternavn" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="last_name"/> + </userInfo> + </attribute> + <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="fullName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="numberOfChildren" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> + </entity> + <elements> + <element name="NormalUser" positionX="234" positionY="164" width="128" height="120"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Contacts.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Contacts.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/Contacts.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/Contacts.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Contacts.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..eef25ba8 --- /dev/null +++ b/Tests/Sync/Models/Contacts.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E7f" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic"> + <entity name="Company" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <relationship name="users" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="User" inverseName="company" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="Image" syncable="YES"> + <attribute name="imageId" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="ImageId"/> + </userInfo> + </attribute> + <attribute name="url" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="profilePictures" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="Location" syncable="YES"> + <attribute name="city" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="street" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="zipCode" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <relationship name="user" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="User" inverseName="location" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="User" representedClassName="" syncable="YES"> + <attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/> + <attribute name="email" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/> + <relationship name="company" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Company" inverseName="users" inverseEntity="Company" syncable="YES"/> + <relationship name="location" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Location" inverseName="user" inverseEntity="Location" syncable="YES"/> + <relationship name="profilePictures" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Image" inverseName="user" inverseEntity="Image" syncable="YES"/> + </entity> + <elements> + <element name="Company" positionX="-380" positionY="18" width="128" height="88"/> + <element name="Image" positionX="-198" positionY="200" width="128" height="88"/> + <element name="Location" positionX="-27" positionY="-45" width="128" height="105"/> + <element name="User" positionX="-207" positionY="-15" width="128" height="165"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..19417a79 --- /dev/null +++ b/Tests/Sync/Models/CustomRelationshipKey.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A313a" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="Note" syncable="YES"> + <attribute name="id" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="notes" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="User" representedClassName="" syncable="YES"> + <attribute name="id" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="notes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Note" inverseName="user" inverseEntity="Note" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="annotations"/> + </userInfo> + </relationship> + </entity> + <elements> + <element name="Note" positionX="-20" positionY="18" width="128" height="75"/> + <element name="User" positionX="-207" positionY="-15" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..0c7e5e4b --- /dev/null +++ b/Tests/Sync/Models/InsertObjectsInParent.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A313a" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="SuperNote" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="superUser" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="SuperUser" inverseName="superNotes" inverseEntity="SuperUser" syncable="YES"/> + </entity> + <entity name="SuperUser" representedClassName="" syncable="YES"> + <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="superNotes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperNote" inverseName="superUser" inverseEntity="SuperNote" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="annotations"/> + </userInfo> + </relationship> + </entity> + <elements> + <element name="SuperNote" positionX="-20" positionY="18" width="128" height="75"/> + <element name="SuperUser" positionX="-207" positionY="-15" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Markets.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Markets.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/Markets.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/Markets.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Markets.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..038a1ba2 --- /dev/null +++ b/Tests/Sync/Models/Markets.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E7f" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic"> + <entity name="Item" syncable="YES"> + <attribute name="otherAttribute" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="uniqueId" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + <relationship name="markets" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Market" inverseName="items" inverseEntity="Market" syncable="YES"/> + </entity> + <entity name="Market" syncable="YES"> + <attribute name="otherAttribute" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="uniqueId" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + <relationship name="items" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Item" inverseName="markets" inverseEntity="Item" syncable="YES"/> + </entity> + <elements> + <element name="Item" positionX="-63" positionY="-18" width="128" height="88"/> + <element name="Market" positionX="196" positionY="-9" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Notes.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Notes.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/Notes.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/Notes.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Notes.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..207493dc --- /dev/null +++ b/Tests/Sync/Models/Notes.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A313a" minimumToolsVersion="Xcode 7.3" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="SuperNote" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="superTags" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperTag" inverseName="superNotes" inverseEntity="SuperTag" syncable="YES"/> + <relationship name="superUser" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="SuperUser" inverseName="superNotes" inverseEntity="SuperUser" syncable="YES"/> + </entity> + <entity name="SuperTag" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="superNotes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperNote" inverseName="superTags" inverseEntity="SuperNote" syncable="YES"/> + </entity> + <entity name="SuperUser" representedClassName="" syncable="YES"> + <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <attribute name="email" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="updatedAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <relationship name="superNotes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperNote" inverseName="superUser" inverseEntity="SuperNote" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="annotations"/> + </userInfo> + </relationship> + </entity> + <elements> + <element name="SuperNote" positionX="-20" positionY="18" width="128" height="103"/> + <element name="SuperTag" positionX="160" positionY="0" width="128" height="90"/> + <element name="SuperUser" positionX="-207" positionY="-15" width="128" height="135"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/NotesB.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/NotesB.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/NotesB.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/NotesB.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/NotesB.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..65903b4a --- /dev/null +++ b/Tests/Sync/Models/NotesB.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Automatic"> + <entity name="SuperNoteB" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="superUser" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="SuperUserB" inverseName="superNotes" inverseEntity="SuperUserB" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="super_user"/> + </userInfo> + </relationship> + </entity> + <entity name="SuperUserB" representedClassName="" syncable="YES"> + <attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/> + <attribute name="email" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/> + <relationship name="superNotes" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SuperNoteB" inverseName="superUser" inverseEntity="SuperNoteB" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="annotations"/> + </userInfo> + </relationship> + </entity> + <elements> + <element name="SuperNoteB" positionX="-20" positionY="18" width="128" height="90"/> + <element name="SuperUserB" positionX="-207" positionY="-15" width="128" height="135"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/OrderedSocial.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/OrderedSocial.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/OrderedSocial.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/OrderedSocial.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/OrderedSocial.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..d9272a26 --- /dev/null +++ b/Tests/Sync/Models/OrderedSocial.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15C50" minimumToolsVersion="Automatic"> + <entity name="Comment" syncable="YES"> + <attribute name="body" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="comments" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Comment" inverseName="comments" inverseEntity="Comment" syncable="YES"/> + </entity> + <elements> + <element name="Comment" positionX="234" positionY="164" width="128" height="73"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Organizations.xcdatamodeld/Organizations.xcdatamodel/contents b/Tests/Sync/Models/Organizations.xcdatamodeld/Organizations.xcdatamodel/contents new file mode 100644 index 00000000..e39762d1 --- /dev/null +++ b/Tests/Sync/Models/Organizations.xcdatamodeld/Organizations.xcdatamodel/contents @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E11f" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic"> + <entity name="OrganizationUnit" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 64" syncable="YES"/> + <relationship name="children" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="OrganizationUnit" inverseName="parentUnit" inverseEntity="OrganizationUnit" syncable="YES"/> + <relationship name="parentUnit" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OrganizationUnit" inverseName="children" inverseEntity="OrganizationUnit" syncable="YES"/> + </entity> + <elements> + <element name="OrganizationUnit" positionX="-900" positionY="-306" width="128" height="105"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Patients.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Patients.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/Patients.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/Patients.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Patients.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..cfd99816 --- /dev/null +++ b/Tests/Sync/Models/Patients.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="8195" systemVersion="14F27" minimumToolsVersion="Automatic"> + <entity name="Alcohol" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="measure" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="Measure" inverseName="alcohol" inverseEntity="Measure" syncable="YES"/> + <relationship name="patient" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Patient" inverseName="alcohols" inverseEntity="Patient" syncable="YES"/> + </entity> + <entity name="Baseline" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="patient" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Patient" inverseName="baselines" inverseEntity="Patient" syncable="YES"/> + </entity> + <entity name="Fitness" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="measure" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="Measure" inverseName="fitness" inverseEntity="Measure" syncable="YES"/> + <relationship name="patient" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Patient" inverseName="fitnesses" inverseEntity="Patient" syncable="YES"/> + </entity> + <entity name="Measure" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="alcohol" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Alcohol" inverseName="measure" inverseEntity="Alcohol" syncable="YES"/> + <relationship name="fitness" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Fitness" inverseName="measure" inverseEntity="Fitness" syncable="YES"/> + <relationship name="weight" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Weight" inverseName="measure" inverseEntity="Weight" syncable="YES"/> + </entity> + <entity name="Patient" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="alcohols" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Alcohol" inverseName="patient" inverseEntity="Alcohol" syncable="YES"/> + <relationship name="baselines" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Baseline" inverseName="patient" inverseEntity="Baseline" syncable="YES"/> + <relationship name="fitnesses" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Fitness" inverseName="patient" inverseEntity="Fitness" syncable="YES"/> + <relationship name="weights" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Weight" inverseName="patient" inverseEntity="Weight" syncable="YES"/> + </entity> + <entity name="Weight" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="measure" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="Measure" inverseName="weight" inverseEntity="Measure" syncable="YES"/> + <relationship name="patient" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Patient" inverseName="weights" inverseEntity="Patient" syncable="YES"/> + </entity> + <elements> + <element name="Baseline" positionX="-270" positionY="-63" width="128" height="88"/> + <element name="Patient" positionX="-9" positionY="-63" width="128" height="133"/> + <element name="Alcohol" positionX="259" positionY="-115" width="128" height="103"/> + <element name="Fitness" positionX="261" positionY="9" width="128" height="103"/> + <element name="Weight" positionX="232" positionY="146" width="128" height="103"/> + <element name="Measure" positionX="574" positionY="-9" width="128" height="118"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Recursive.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Recursive.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/Recursive.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/Recursive.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Recursive.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..7233fef4 --- /dev/null +++ b/Tests/Sync/Models/Recursive.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15C50" minimumToolsVersion="Automatic"> + <entity name="Collection" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <relationship name="numbers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Number" inverseName="parent" inverseEntity="Number" syncable="YES"/> + </entity> + <entity name="Number" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="value" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <relationship name="numbers" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Number" inverseName="parentNumber" inverseEntity="Number" syncable="YES"/> + <relationship name="parent" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Collection" inverseName="numbers" inverseEntity="Collection" syncable="YES"/> + <relationship name="parentNumber" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Number" inverseName="numbers" inverseEntity="Number" syncable="YES"/> + </entity> + <elements> + <element name="Collection" positionX="-254" positionY="338" width="128" height="88"/> + <element name="Number" positionX="-72" positionY="360" width="128" height="118"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Social.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/Social.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/Social.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/Social.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/Social.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..0c0085a3 --- /dev/null +++ b/Tests/Sync/Models/Social.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Automatic"> + <entity name="SocialComment" syncable="YES"> + <attribute name="body" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + </userInfo> + </attribute> + <relationship name="comments" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SocialComment" inverseName="comments" inverseEntity="SocialComment" syncable="YES"/> + <relationship name="story" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Story" inverseName="comments" inverseEntity="Story" syncable="YES"/> + </entity> + <entity name="Story" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <attribute name="title" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="comments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="SocialComment" inverseName="story" inverseEntity="SocialComment" syncable="YES"/> + <relationship name="summarize" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Summarize" inverseName="story" inverseEntity="Summarize" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="summarize_text"/> + </userInfo> + </relationship> + </entity> + <entity name="Summarize" syncable="YES"> + <attribute name="body" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/> + <relationship name="story" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Story" inverseName="summarize" inverseEntity="Story" syncable="YES"/> + </entity> + <elements> + <element name="SocialComment" positionX="234" positionY="164" width="128" height="90"/> + <element name="Story" positionX="25" positionY="176" width="128" height="105"/> + <element name="Summarize" positionX="52" positionY="45" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Tests.xcdatamodeld/Tests.xcdatamodel/contents b/Tests/Sync/Models/Tests.xcdatamodeld/Tests.xcdatamodel/contents new file mode 100644 index 00000000..fbbc85b0 --- /dev/null +++ b/Tests/Sync/Models/Tests.xcdatamodeld/Tests.xcdatamodel/contents @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="User" representedClassName="" syncable="YES"> + <attribute name="localID" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + </entity> + <elements> + <element name="User" positionX="-63" positionY="-18" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/ToOne.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/ToOne.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/ToOne.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/ToOne.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/ToOne.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..25998b70 --- /dev/null +++ b/Tests/Sync/Models/ToOne.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15G31" minimumToolsVersion="Automatic"> + <entity name="LegalPerson" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="rentedResidence" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="RentedHome" inverseName="legalTenant" inverseEntity="RentedHome" syncable="YES"/> + </entity> + <entity name="RentedHome" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="legalTenant" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="LegalPerson" inverseName="rentedResidence" inverseEntity="LegalPerson" syncable="YES"/> + </entity> + <elements> + <element name="LegalPerson" positionX="-54" positionY="-9" width="128" height="75"/> + <element name="RentedHome" positionX="-272" positionY="-9" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/Unique.xcdatamodeld/Unique.xcdatamodel/contents b/Tests/Sync/Models/Unique.xcdatamodeld/Unique.xcdatamodel/contents new file mode 100644 index 00000000..2f1051fe --- /dev/null +++ b/Tests/Sync/Models/Unique.xcdatamodeld/Unique.xcdatamodel/contents @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="7549" systemVersion="14E11f" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic"> + <entity name="A" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <relationship name="b" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="B" inverseName="a" inverseEntity="B" syncable="YES"/> + </entity> + <entity name="B" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <relationship name="a" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="A" inverseName="b" inverseEntity="A" syncable="YES"/> + <relationship name="c" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="C" inverseName="b" inverseEntity="C" syncable="YES"/> + </entity> + <entity name="C" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/> + <relationship name="b" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="B" inverseName="c" inverseEntity="B" syncable="YES"/> + </entity> + <elements> + <element name="A" positionX="-92" positionY="72" width="128" height="73"/> + <element name="B" positionX="79" positionY="101" width="128" height="88"/> + <element name="C" positionX="250" positionY="71" width="128" height="73"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/Models/id.xcdatamodeld/.xccurrentversion b/Tests/Sync/Models/id.xcdatamodeld/.xccurrentversion new file mode 100644 index 00000000..00318b09 --- /dev/null +++ b/Tests/Sync/Models/id.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>Demo.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/Sync/Models/id.xcdatamodeld/Demo.xcdatamodel/contents b/Tests/Sync/Models/id.xcdatamodeld/Demo.xcdatamodel/contents new file mode 100644 index 00000000..d6e5fe8c --- /dev/null +++ b/Tests/Sync/Models/id.xcdatamodeld/Demo.xcdatamodel/contents @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15E65" minimumToolsVersion="Automatic"> + <entity name="User" syncable="YES"> + <attribute name="id" attributeType="String" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + </entity> + <elements> + <element name="User" positionX="117" positionY="-7" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/Sync/NSArray+SyncTests.swift b/Tests/Sync/NSArray+SyncTests.swift new file mode 100644 index 00000000..ab4eaa00 --- /dev/null +++ b/Tests/Sync/NSArray+SyncTests.swift @@ -0,0 +1,14 @@ +import XCTest + +class NSArray_SyncTests: XCTestCase { + // Bug 125 => https://github.com/SyncDB/Sync/issues/125 + + /*func testPreprocessForEntityNamed() { + let formDictionary = Helper.objectsFromJSON("bug-125-light.json") as! [String : NSObject] + let uri = formDictionary["uri"] as! String + let dataStack = Helper.dataStackWithModelName("Bug125") + + let preprocessed = ([formDictionary] as NSArray).preprocessForEntityNamed("Form", predicate: NSPredicate(format: "uri = %@", uri), parent: nil, dataStack: dataStack).first! as! [String : NSObject] + XCTAssertEqual(preprocessed, formDictionary) + }*/ +} \ No newline at end of file diff --git a/Tests/Sync/NSEntityDescription+SyncTests.swift b/Tests/Sync/NSEntityDescription+SyncTests.swift new file mode 100644 index 00000000..2d3847e5 --- /dev/null +++ b/Tests/Sync/NSEntityDescription+SyncTests.swift @@ -0,0 +1,9 @@ +import XCTest + +class NSEntityDescription_SyncTests: XCTestCase { + func testRelationships() { + } + + func testParentEntity() { + } +} diff --git a/Tests/Sync/NSManagedObject+SyncTests.swift b/Tests/Sync/NSManagedObject+SyncTests.swift new file mode 100644 index 00000000..cf1c80f3 --- /dev/null +++ b/Tests/Sync/NSManagedObject+SyncTests.swift @@ -0,0 +1,25 @@ +import XCTest +import CoreData + +class NSManagedObject_SyncTests: XCTestCase { + func testCopyInContext() { + // Create and fetch an item in a mainContext, then copy that item + // to a background context. Then do the check there. + } + + func testFillWithDictionary() { + // This method is mostly to categorize the type of filling that we should do. + // Maybe is better to just unit test a method that returns the type of relationship syncing. + } + + // I am afraid that we will end up duplicating many of the current existing tests in order to test the following + // methods. Maybe a better idea would be to split up those into methods that return things instead of just mutations. + func testToManyRelationship() { + } + + func testRelationshipUsingIDInsteadOfDictionary() { + } + + func testToOneRelationship() { + } +} diff --git a/Tests/Sync/NSManagedObjectContext+SyncTests.swift b/Tests/Sync/NSManagedObjectContext+SyncTests.swift new file mode 100644 index 00000000..d11933a5 --- /dev/null +++ b/Tests/Sync/NSManagedObjectContext+SyncTests.swift @@ -0,0 +1,48 @@ +import XCTest + +import Sync + +class NSManagedObjectContext_SyncTests: XCTestCase { + func testSafeObjectInContext() { + } + + func configureUserWithRemoteID(remoteID: NSNumber?, localID: String?, name: String, block: @escaping (_ user: NSManagedObject, _ context: NSManagedObjectContext) -> Void) { + let stack = DataStack(modelName: "Tests", bundle: Bundle(for: NSManagedObjectContext_SyncTests.self), storeType: .inMemory) + stack.performInNewBackgroundContext { context in + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: context) + user.setValue(remoteID, forKey: "remoteID") + user.setValue(localID, forKey: "localID") + user.setValue(name, forKey: "name") + try! context.save() + block(user, context) + } + } + + func testDictionary() { + self.configureUserWithRemoteID(remoteID: 1, localID: nil, name: "Joshua") { user, context in + let dictionary = context.managedObjectIDs(in: "User", usingAsKey: "remoteID", predicate: nil) + XCTAssertNotNil(dictionary) + XCTAssertTrue(dictionary.count == 1) + XCTAssertEqual(dictionary[NSNumber(value: 1)], user.objectID) + + let objectID = dictionary[NSNumber(value: 1)]! + let retreivedUser = context.object(with: objectID) + XCTAssertEqual(retreivedUser.value(forKey: "remoteID") as? Int, 1) + XCTAssertEqual(retreivedUser.value(forKey: "name") as? String, "Joshua") + } + } + + func testDictionaryStringLocalKey() { + self.configureUserWithRemoteID(remoteID: nil, localID: "100", name: "Joshua") { user, context in + let dictionary = context.managedObjectIDs(in: "User", usingAsKey: "localID", predicate: nil) + XCTAssertNotNil(dictionary) + XCTAssertTrue(dictionary.count == 1) + XCTAssertEqual(dictionary["100"], user.objectID) + + let objectID = dictionary["100"]! + let retreivedUser = context.object(with: objectID) + XCTAssertEqual(retreivedUser.value(forKey: "localID") as? String, "100") + XCTAssertEqual(retreivedUser.value(forKey: "name") as? String, "Joshua") + } + } +} diff --git a/Tests/Sync/NSPersistentContainerTests.swift b/Tests/Sync/NSPersistentContainerTests.swift new file mode 100644 index 00000000..3de3a25f --- /dev/null +++ b/Tests/Sync/NSPersistentContainerTests.swift @@ -0,0 +1,129 @@ +import XCTest + +import CoreData +import Sync + +class NSPersistentContainerTests: XCTestCase { + func testPersistentContainer() { + if #available(iOS 10, *) { + let expectation = self.expectation(description: "testSkipTestMode") + + let momdModelURL = Bundle(for: NSPersistentContainerTests.self).url(forResource: "Camelcase", withExtension: "momd")! + let model = NSManagedObjectModel(contentsOf: momdModelURL)! + let persistentContainer = NSPersistentContainer(name: "Camelcase", managedObjectModel: model) + try! persistentContainer.persistentStoreCoordinator.addPersistentStore(ofType: NSInMemoryStoreType, configurationName: nil, at: nil, options: nil) + let objects = Helper.objectsFromJSON("camelcase.json") as! [[String: Any]] + + Sync.changes(objects, inEntityNamed: "NormalUser", predicate: nil, persistentContainer: persistentContainer) { error in + let result = Helper.fetchEntity("NormalUser", inContext: persistentContainer.viewContext) + XCTAssertEqual(result.count, 1) + + if let first = result.first { + XCTAssertEqual(first.value(forKey: "etternavn") as? String, "Nuñez") + XCTAssertEqual(first.value(forKey: "firstName") as? String, "Elvis") + XCTAssertEqual(first.value(forKey: "fullName") as? String, "Elvis Nuñez") + XCTAssertEqual(first.value(forKey: "numberOfChildren") as? Int, 1) + XCTAssertEqual(first.value(forKey: "remoteID") as? String, "1") + } else { + XCTFail() + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: 150.0, handler: nil) + } + } + + func testPersistentContainerExtension() { + if #available(iOS 10, *) { + let expectation = self.expectation(description: "testSkipTestMode") + + let persistentContainer = Helper.persistentStoreWithModelName("Camelcase") + let objects = Helper.objectsFromJSON("camelcase.json") as! [[String: Any]] + + persistentContainer.sync(objects, inEntityNamed: "NormalUser") { error in + let result = Helper.fetchEntity("NormalUser", inContext: persistentContainer.viewContext) + XCTAssertEqual(result.count, 1) + + if let first = result.first { + XCTAssertEqual(first.value(forKey: "etternavn") as? String, "Nuñez") + XCTAssertEqual(first.value(forKey: "firstName") as? String, "Elvis") + XCTAssertEqual(first.value(forKey: "fullName") as? String, "Elvis Nuñez") + XCTAssertEqual(first.value(forKey: "numberOfChildren") as? Int, 1) + XCTAssertEqual(first.value(forKey: "remoteID") as? String, "1") + } else { + XCTFail() + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: 150.0, handler: nil) + } + } + + func testInsertOrUpdate() { + if #available(iOS 10, *) { + let expectation = self.expectation(description: "testSkipTestMode") + let persistentContainer = Helper.persistentStoreWithModelName("Tests") + let json = ["id": 1] + persistentContainer.insertOrUpdate(json, inEntityNamed: "User") { result in + switch result { + case .success: + XCTAssertEqual(1, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) + case .failure: + XCTFail() + } + + expectation.fulfill() + } + self.waitForExpectations(timeout: 150.0, handler: nil) + } + } + + func testUpdate() { + if #available(iOS 10, *) { + let expectation = self.expectation(description: "testSkipTestMode") + let persistentContainer = Helper.persistentStoreWithModelName("id") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: persistentContainer.viewContext) + user.setValue("id", forKey: "id") + try! persistentContainer.viewContext.save() + + XCTAssertEqual(1, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) + persistentContainer.update("id", with: ["name": "bossy"], inEntityNamed: "User") { result in + switch result { + case .success(let id): + XCTAssertEqual(id as? String, "id") + XCTAssertEqual(1, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) + + persistentContainer.viewContext.refresh(user, mergeChanges: false) + + XCTAssertEqual(user.value(forKey: "name") as? String, "bossy") + case .failure: + XCTFail() + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: 150.0, handler: nil) + } + } + + func testDelete() { + let expectation = self.expectation(description: "testSkipTestMode") + let persistentContainer = Helper.persistentStoreWithModelName("id") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: persistentContainer.viewContext) + user.setValue("id", forKey: "id") + try! persistentContainer.viewContext.save() + + XCTAssertEqual(1, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) + persistentContainer.delete("id", inEntityNamed: "User") { error in + XCTAssertEqual(0, Helper.countForEntity("User", inContext: persistentContainer.viewContext)) + expectation.fulfill() + } + + self.waitForExpectations(timeout: 150.0, handler: nil) + } +} diff --git a/Tests/Sync/SyncDelegateTests.swift b/Tests/Sync/SyncDelegateTests.swift new file mode 100644 index 00000000..77a9e070 --- /dev/null +++ b/Tests/Sync/SyncDelegateTests.swift @@ -0,0 +1,34 @@ +import XCTest + +import CoreData +import Sync + +class SyncDelegateTests: XCTestCase { + func testWillInsertJSON() { + let dataStack = Helper.dataStackWithModelName("Tests") + + let json = [["id": 9, "completed": false]] + let syncOperation = Sync(changes: json, inEntityNamed: "User", dataStack: dataStack) + syncOperation.delegate = self + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 0) + syncOperation.start() + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + + if let task = Helper.fetchEntity("User", inContext: dataStack.mainContext).first { + XCTAssertEqual(task.value(forKey: "remoteID") as? Int, 9) + XCTAssertEqual(task.value(forKey: "localID") as? String, "local") + } else { + XCTFail() + } + dataStack.drop() + } +} + +extension SyncDelegateTests: SyncDelegate { + func sync(_ sync: Sync, willInsert json: [String: Any], in entityNamed: String, parent: NSManagedObject?) -> [String: Any] { + var newJSON = json + newJSON["localID"] = "local" + + return newJSON + } +} diff --git a/Tests/Sync/SyncTests.swift b/Tests/Sync/SyncTests.swift new file mode 100644 index 00000000..cd1bb1de --- /dev/null +++ b/Tests/Sync/SyncTests.swift @@ -0,0 +1,1413 @@ +import XCTest + +import CoreData +import Sync + +class SyncTests: XCTestCase { + func testSynchronous() { + let dataStack = Helper.dataStackWithModelName("Camelcase") + let objects = Helper.objectsFromJSON("camelcase.json") as! [[String: Any]] + var synchronous = false + Sync.changes(objects, inEntityNamed: "NormalUser", dataStack: dataStack) { _ in + synchronous = true + } + XCTAssertTrue(synchronous) + dataStack.drop() + } + + // MARK: - Camelcase + func testAutomaticCamelcaseMapping() { + let dataStack = Helper.dataStackWithModelName("Camelcase") + let objects = Helper.objectsFromJSON("camelcase.json") as! [[String: Any]] + Sync.changes(objects, inEntityNamed: "NormalUser", dataStack: dataStack, completion: nil) + + let result = Helper.fetchEntity("NormalUser", inContext: dataStack.mainContext) + XCTAssertEqual(result.count, 1) + + let first = result.first! + XCTAssertEqual(first.value(forKey: "etternavn") as? String, "Nuñez") + XCTAssertEqual(first.value(forKey: "firstName") as? String, "Elvis") + XCTAssertEqual(first.value(forKey: "fullName") as? String, "Elvis Nuñez") + XCTAssertEqual(first.value(forKey: "numberOfChildren") as? Int, 1) + XCTAssertEqual(first.value(forKey: "remoteID") as? String, "1") + + dataStack.drop() + } + + // MARK: - Contacts + + func testLoadAndUpdateUsers() { + let dataStack = Helper.dataStackWithModelName("Contacts") + + let objectsA = Helper.objectsFromJSON("users_a.json") as! [[String: Any]] + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 8) + + let objectsB = Helper.objectsFromJSON("users_b.json") as! [[String: Any]] + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 6) + + let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 7)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertEqual(result.value(forKey: "email") as? String, "secondupdated@ovium.com") + + let dateFormat = DateFormatter() + dateFormat.dateFormat = "yyyy-MM-dd" + dateFormat.timeZone = TimeZone(identifier: "GMT") + + let createdDate = dateFormat.date(from: "2014-02-14") + XCTAssertEqual(result.value(forKey: "createdAt") as? Date, createdDate) + + let updatedDate = dateFormat.date(from: "2014-02-17") + XCTAssertEqual(result.value(forKey: "updatedAt") as? Date, updatedDate) + + dataStack.drop() + } + + func testUsersAndCompanies() { + let dataStack = Helper.dataStackWithModelName("Contacts") + + let objects = Helper.objectsFromJSON("users_company.json") as! [[String: Any]] + Sync.changes(objects, inEntityNamed: "User", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 5) + let user = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertEqual((user.value(forKey: "company")! as? NSManagedObject)!.value(forKey: "name") as? String, "Apple") + + XCTAssertEqual(Helper.countForEntity("Company", inContext: dataStack.mainContext), 2) + let company = Helper.fetchEntity("Company", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 1)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertEqual(company.value(forKey: "name") as? String, "Facebook") + + dataStack.drop() + } + + func testCustomMappingAndCustomPrimaryKey() { + let dataStack = Helper.dataStackWithModelName("Contacts") + let objects = Helper.objectsFromJSON("images.json") as! [[String: Any]] + Sync.changes(objects, inEntityNamed: "Image", dataStack: dataStack, completion: nil) + + let array = Helper.fetchEntity("Image", sortDescriptors: [NSSortDescriptor(key: "url", ascending: true)], inContext: dataStack.mainContext) + XCTAssertEqual(array.count, 3) + let image = array.first + XCTAssertEqual(image!.value(forKey: "url") as? String, "http://sample.com/sample0.png") + + dataStack.drop() + } + + func testRelationshipsB() { + let dataStack = Helper.dataStackWithModelName("Contacts") + + let objects = Helper.objectsFromJSON("users_c.json") as! [[String: Any]] + Sync.changes(objects, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 4) + + let users = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 6)), inContext: dataStack.mainContext) + let user = users.first! + XCTAssertEqual(user.value(forKey: "name") as? String, "Shawn Merrill") + + let location = user.value(forKey: "location") as! NSManagedObject + XCTAssertEqual(location.value(forKey: "city") as? String, "New York") + XCTAssertEqual(location.value(forKey: "street") as? String, "Broadway") + XCTAssertEqual(location.value(forKey: "zipCode") as? NSNumber, NSNumber(value: 10012)) + + let profilePicturesCount = Helper.countForEntity("Image", predicate: NSPredicate(format: "user = %@", user), inContext: dataStack.mainContext) + XCTAssertEqual(profilePicturesCount, 3) + + dataStack.drop() + } + + // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated + // and one user deleted. In this test we try only inserting user, no update, no insert, so the second sync should leave us with + // 2 users with no changes and 1 inserted user. + func testSyncingWithOnlyInsertOperationType() { + let dataStack = Helper.dataStackWithModelName("Contacts") + + let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) + + let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + + let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertEqual(result.value(forKey: "email") as? String, "melisawhite@ovium.com") + + dataStack.drop() + } + + // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated + // and one user deleted. In this test we try only inserting user, no update, no insert, so the second sync should leave us with + // 2 users with no changes and 1 inserted user. After this is done, we'll try inserting again, this shouldn't make any changes. + func testSyncingWithMultipleInsertOperationTypes() { + let dataStack = Helper.dataStackWithModelName("Contacts") + + let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) + + let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + + let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertEqual(result.value(forKey: "email") as? String, "melisawhite@ovium.com") + + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + + dataStack.drop() + } + + // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated + // and one user deleted. In this test we try only updating users, no insert, no delete, so the second sync should leave us with + // one updated user and one inserted user, the third user will be discarded. + func testSyncingWithOnlyUpdateOperationType() { + let dataStack = Helper.dataStackWithModelName("Contacts") + + let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) + + let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.update], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) + + let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertEqual(result.value(forKey: "email") as? String, "updated@ovium.com") + + dataStack.drop() + } + + // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated + // and one user deleted. In this test we try only deleting users, no insert, no update, so the second sync should leave us with + // one inserted user, one deleted user and one discarded user. + func testSyncingWithOnlyDeleteOperationType() { + let dataStack = Helper.dataStackWithModelName("Contacts") + + let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) + + let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.delete], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + + let result = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertEqual(result.value(forKey: "email") as? String, "melisawhite@ovium.com") + + dataStack.drop() + } + + // If all operations where enabled in the first sync, 2 users would be inserted, in the second sync 1 user would be updated + // and one user deleted. In this test we try inserting and updating users, no delete, so the second sync should leave us with + // one updated user, one inserted user, and one user with no changes. + func testSyncingWithInsertAndUpdateOperationType() { + let dataStack = Helper.dataStackWithModelName("Contacts") + + let objectsA = Helper.objectsFromJSON("operation-types-users-a.json") as! [[String: Any]] + Sync.changes(objectsA, inEntityNamed: "User", dataStack: dataStack, operations: [.all], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) + + let objectsB = Helper.objectsFromJSON("operation-types-users-b.json") as! [[String: Any]] + Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.insert, .update], completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + + let user0 = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertEqual(user0.value(forKey: "email") as? String, "updated@ovium.com") + + let user1 = Helper.fetchEntity("User", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 1)), sortDescriptors: [NSSortDescriptor(key: "remoteID", ascending: true)], inContext: dataStack.mainContext).first! + XCTAssertNotNil(user1) + + dataStack.drop() + } + + // MARK: - Notes + + func testRelationshipsA() { + let objects = Helper.objectsFromJSON("users_notes.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Notes") + + Sync.changes(objects, inEntityNamed: "SuperUser", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("SuperUser", inContext: dataStack.mainContext), 4) + let users = Helper.fetchEntity("SuperUser", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 6)), inContext: dataStack.mainContext) + let user = users.first! + XCTAssertEqual(user.value(forKey: "name") as? String, "Shawn Merrill") + + let notesCount = Helper.countForEntity("SuperNote", predicate: NSPredicate(format: "superUser = %@", user), inContext: dataStack.mainContext) + XCTAssertEqual(notesCount, 5) + + dataStack.drop() + } + + func testObjectsForParent() { + let objects = Helper.objectsFromJSON("notes_for_user_a.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("InsertObjectsInParent") + dataStack.performInNewBackgroundContext { backgroundContext in + // First, we create a parent user, this user is the one that will own all the notes + let user = NSEntityDescription.insertNewObject(forEntityName: "SuperUser", into: backgroundContext) + user.setValue(NSNumber(value: 6), forKey: "remoteID") + + try! backgroundContext.save() + } + + // Then we fetch the user on the main context, because we don't want to break things between contexts + var users = Helper.fetchEntity("SuperUser", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 6)), inContext: dataStack.mainContext) + XCTAssertEqual(users.count, 1) + + // Finally we say "Sync all the notes, for this user" + Sync.changes(objects, inEntityNamed: "SuperNote", parent: users.first!, dataStack: dataStack, completion: nil) + + // Here we just make sure that the user has the notes that we just inserted + users = Helper.fetchEntity("SuperUser", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 6)), inContext: dataStack.mainContext) + let user = users.first! + XCTAssertEqual(user.value(forKey: "remoteID") as? NSNumber, NSNumber(value: 6)) + + let notesCount = Helper.countForEntity("SuperNote", predicate: NSPredicate(format: "superUser = %@", user), inContext: dataStack.mainContext) + XCTAssertEqual(notesCount, 2) + + dataStack.drop() + } + + func testTaggedNotesForUser() { + let objects = Helper.objectsFromJSON("tagged_notes.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Notes") + + Sync.changes(objects, inEntityNamed: "SuperNote", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("SuperNote", inContext: dataStack.mainContext), 3) + let notes = Helper.fetchEntity("SuperNote", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) + let note = notes.first! + XCTAssertEqual((note.value(forKey: "superTags") as? NSSet)!.allObjects.count, 2) + + XCTAssertEqual(Helper.countForEntity("SuperTag", inContext: dataStack.mainContext), 2) + let tags = Helper.fetchEntity("SuperTag", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 1)), inContext: dataStack.mainContext) + XCTAssertEqual(tags.count, 1) + + let tag = tags.first! + XCTAssertEqual((tag.value(forKey: "superNotes") as? NSSet)!.allObjects.count, 2) + dataStack.drop() + } + + func testCustomKeysInRelationshipsToMany() { + let objects = Helper.objectsFromJSON("custom_relationship_key_to_many.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("CustomRelationshipKey") + + Sync.changes(objects, inEntityNamed: "User", dataStack: dataStack, completion: nil) + + let array = Helper.fetchEntity("User", inContext: dataStack.mainContext) + let user = array.first! + XCTAssertEqual((user.value(forKey: "notes") as? NSSet)!.allObjects.count, 3) + + dataStack.drop() + } + + // MARK: - Recursive + + func testNumbersWithEmptyRelationship() { + let objects = Helper.objectsFromJSON("numbers.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Recursive") + + Sync.changes(objects, inEntityNamed: "Number", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Number", inContext: dataStack.mainContext), 6) + + dataStack.drop() + } + + func testRelationshipName() { + let objects = Helper.objectsFromJSON("numbers_in_collection.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Recursive") + + Sync.changes(objects, inEntityNamed: "Number", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Collection", inContext: dataStack.mainContext), 1) + + let numbers = Helper.fetchEntity("Number", inContext: dataStack.mainContext) + let number = numbers.first! + XCTAssertNotNil(number.value(forKey: "parent")) + XCTAssertEqual((number.value(forKey: "parent") as! NSManagedObject).value(forKey: "name") as? String, "Collection 1") + + dataStack.drop() + } + + // MARK: - Social + + func testCustomPrimaryKey() { + let objects = Helper.objectsFromJSON("comments-no-id.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Social") + + Sync.changes(objects, inEntityNamed: "SocialComment", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("SocialComment", inContext: dataStack.mainContext), 8) + let comments = Helper.fetchEntity("SocialComment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) + XCTAssertEqual(comments.count, 1) + XCTAssertEqual((comments.first!.value(forKey: "comments") as! NSSet).count, 3) + + let comment = comments.first! + XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") + + dataStack.drop() + } + + func testCustomPrimaryKeyInsideToManyRelationship() { + let objects = Helper.objectsFromJSON("stories-comments-no-ids.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Social") + + Sync.changes(objects, inEntityNamed: "Story", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Story", inContext: dataStack.mainContext), 3) + let stories = Helper.fetchEntity("Story", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) + let story = stories.first! + + XCTAssertEqual((story.value(forKey: "comments") as! NSSet).count, 3) + + XCTAssertEqual(Helper.countForEntity("SocialComment", inContext: dataStack.mainContext), 9) + var comments = Helper.fetchEntity("SocialComment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) + XCTAssertEqual(comments.count, 3) + + comments = Helper.fetchEntity("SocialComment", predicate: NSPredicate(format: "body = %@ AND story = %@", "comment 1", story), inContext: dataStack.mainContext) + XCTAssertEqual(comments.count, 1) + if let comment = comments.first { + XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") + XCTAssertEqual((comment.value(forKey: "story") as? NSManagedObject)!.value(forKey: "remoteID") as? NSNumber, NSNumber(value: 0)) + XCTAssertEqual((comment.value(forKey: "story") as? NSManagedObject)!.value(forKey: "title") as? String, "story 1") + } else { + XCTFail() + } + + dataStack.drop() + } + + func testCustomKeysInRelationshipsToOne() { + let objects = Helper.objectsFromJSON("custom_relationship_key_to_one.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Social") + + Sync.changes(objects, inEntityNamed: "Story", dataStack: dataStack, completion: nil) + + let array = Helper.fetchEntity("Story", inContext: dataStack.mainContext) + let story = array.first! + XCTAssertNotNil(story.value(forKey: "summarize")) + + dataStack.drop() + } + + // MARK: - Markets + + func testMarketsAndItems() { + let objects = Helper.objectsFromJSON("markets_items.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Markets") + + Sync.changes(objects, inEntityNamed: "Market", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Market", inContext: dataStack.mainContext), 2) + let markets = Helper.fetchEntity("Market", predicate: NSPredicate(format: "uniqueId = %@", "1"), inContext: dataStack.mainContext) + let market = markets.first! + XCTAssertEqual(market.value(forKey: "otherAttribute") as? String, "Market 1") + XCTAssertEqual((market.value(forKey: "items") as? NSSet)!.allObjects.count, 1) + + XCTAssertEqual(Helper.countForEntity("Item", inContext: dataStack.mainContext), 1) + let items = Helper.fetchEntity("Item", predicate: NSPredicate(format: "uniqueId = %@", "1"), inContext: dataStack.mainContext) + let item = items.first! + XCTAssertEqual(item.value(forKey: "otherAttribute") as? String, "Item 1") + XCTAssertEqual((item.value(forKey: "markets") as? NSSet)!.allObjects.count, 2) + + dataStack.drop() + } + + // MARK: - Organization + + func testOrganization() { + let json = Helper.objectsFromJSON("organizations-tree.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Organizations") + + Sync.changes(json, inEntityNamed: "OrganizationUnit", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("OrganizationUnit", inContext: dataStack.mainContext), 7) + + Sync.changes(json, inEntityNamed: "OrganizationUnit", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("OrganizationUnit", inContext: dataStack.mainContext), 7) + + dataStack.drop() + } + + // MARK: - Unique + + /** + * C and A share the same collection of B, so in the first block + * 2 entries of B get stored in A, in the second block this + * 2 entries of B get updated and one entry of C gets added. + */ + func testUniqueObject() { + let objects = Helper.objectsFromJSON("unique.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Unique") + + Sync.changes(objects, inEntityNamed: "A", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("A", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("B", inContext: dataStack.mainContext), 2) + XCTAssertEqual(Helper.countForEntity("C", inContext: dataStack.mainContext), 0) + + Sync.changes(objects, inEntityNamed: "C", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("A", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("B", inContext: dataStack.mainContext), 2) + XCTAssertEqual(Helper.countForEntity("C", inContext: dataStack.mainContext), 1) + + dataStack.drop() + } + + // MARK: - Patients => https://github.com/SyncDB/Sync/issues/121 + + func testPatients() { + let objects = Helper.objectsFromJSON("patients.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Patients") + + Sync.changes(objects, inEntityNamed: "Patient", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Patient", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Baseline", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Alcohol", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Fitness", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Weight", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Measure", inContext: dataStack.mainContext), 1) + + dataStack.drop() + } + + // MARK: - Bug 84 => https://github.com/SyncDB/Sync/issues/84 + + func testStaffAndfulfillers() { + let objects = Helper.objectsFromJSON("bug-number-84.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("84") + + Sync.changes(objects, inEntityNamed: "MSStaff", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("MSStaff", inContext: dataStack.mainContext), 1) + + let staff = Helper.fetchEntity("MSStaff", predicate: NSPredicate(format: "xid = %@", "mstaff_F58dVBTsXznvMpCPmpQgyV"), inContext: dataStack.mainContext) + let oneStaff = staff.first! + XCTAssertEqual(oneStaff.value(forKey: "image") as? String, "a.jpg") + XCTAssertEqual((oneStaff.value(forKey: "fulfillers") as? NSSet)!.allObjects.count, 2) + + let numberOffulfillers = Helper.countForEntity("MSFulfiller", inContext: dataStack.mainContext) + XCTAssertEqual(numberOffulfillers, 2) + + let fulfillers = Helper.fetchEntity("MSFulfiller", predicate: NSPredicate(format: "xid = %@", "ffr_AkAHQegYkrobp5xc2ySc5D"), inContext: dataStack.mainContext) + let fullfiller = fulfillers.first! + XCTAssertEqual(fullfiller.value(forKey: "name") as? String, "New York") + XCTAssertEqual((fullfiller.value(forKey: "staff") as? NSSet)!.allObjects.count, 1) + + dataStack.drop() + } + + // MARK: - Bug 113 => https://github.com/SyncDB/Sync/issues/113 + + func testCustomPrimaryKeyBug113() { + let objects = Helper.objectsFromJSON("bug-113-comments-no-id.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("113") + + Sync.changes(objects, inEntityNamed: "AwesomeComment", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("AwesomeComment", inContext: dataStack.mainContext), 8) + let comments = Helper.fetchEntity("AwesomeComment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) + XCTAssertEqual(comments.count, 1) + XCTAssertEqual((comments.first!.value(forKey: "awesomeComments") as! NSSet).count, 3) + + let comment = comments.first! + XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") + + dataStack.drop() + } + + func testCustomPrimaryKeyInsideToManyRelationshipBug113() { + let objects = Helper.objectsFromJSON("bug-113-stories-comments-no-ids.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("113") + + Sync.changes(objects, inEntityNamed: "AwesomeStory", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("AwesomeStory", inContext: dataStack.mainContext), 3) + let stories = Helper.fetchEntity("AwesomeStory", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) + let story = stories.first! + XCTAssertEqual((story.value(forKey: "awesomeComments") as! NSSet).count, 3) + + XCTAssertEqual(Helper.countForEntity("AwesomeComment", inContext: dataStack.mainContext), 9) + var comments = Helper.fetchEntity("AwesomeComment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) + XCTAssertEqual(comments.count, 3) + + comments = Helper.fetchEntity("AwesomeComment", predicate: NSPredicate(format: "body = %@ AND awesomeStory = %@", "comment 1", story), inContext: dataStack.mainContext) + XCTAssertEqual(comments.count, 1) + if let comment = comments.first { + XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") + let awesomeStory = comment.value(forKey: "awesomeStory") as! NSManagedObject + XCTAssertEqual(awesomeStory.value(forKey: "remoteID") as? NSNumber, NSNumber(value: 0)) + XCTAssertEqual(awesomeStory.value(forKey: "title") as? String, "story 1") + } else { + XCTFail() + } + + dataStack.drop() + } + + func testCustomKeysInRelationshipsToOneBug113() { + let objects = Helper.objectsFromJSON("bug-113-custom_relationship_key_to_one.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("113") + + Sync.changes(objects, inEntityNamed: "AwesomeStory", dataStack: dataStack, completion: nil) + + let array = Helper.fetchEntity("AwesomeStory", inContext: dataStack.mainContext) + let story = array.first! + XCTAssertNotNil(story.value(forKey: "awesomeSummarize")) + + dataStack.drop() + } + + // MARK: - Bug 125 => https://github.com/SyncDB/Sync/issues/125 + + func testNilRelationshipsAfterUpdating_Sync_1_0_10() { + let formDictionary = Helper.objectsFromJSON("bug-125.json") as! [String: Any] + let uri = formDictionary["uri"] as! String + let dataStack = Helper.dataStackWithModelName("125") + + Sync.changes([formDictionary], inEntityNamed: "Form", predicate: NSPredicate(format: "uri == %@", uri), dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Form", inContext: dataStack.mainContext), 1) + + XCTAssertEqual(Helper.countForEntity("Element", inContext: dataStack.mainContext), 11) + + XCTAssertEqual(Helper.countForEntity("SelectionItem", inContext: dataStack.mainContext), 4) + + XCTAssertEqual(Helper.countForEntity("Model", inContext: dataStack.mainContext), 1) + + XCTAssertEqual(Helper.countForEntity("ModelProperty", inContext: dataStack.mainContext), 9) + + XCTAssertEqual(Helper.countForEntity("Restriction", inContext: dataStack.mainContext), 3) + + let array = Helper.fetchEntity("Form", inContext: dataStack.mainContext) + let form = array.first! + let element = form.value(forKey: "element") as! NSManagedObject + let model = form.value(forKey: "model") as! NSManagedObject + XCTAssertNotNil(element) + XCTAssertNotNil(model) + + dataStack.drop() + } + + func testStoryToSummarize() { + let formDictionary = Helper.objectsFromJSON("story-summarize.json") as! [String: Any] + let dataStack = Helper.dataStackWithModelName("Social") + + Sync.changes([formDictionary], inEntityNamed: "Story", predicate: NSPredicate(format: "remoteID == %@", NSNumber(value: 1)), dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Story", inContext: dataStack.mainContext), 1) + let stories = Helper.fetchEntity("Story", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 1)), inContext: dataStack.mainContext) + let story = stories.first! + let summarize = story.value(forKey: "summarize") as! NSManagedObject + XCTAssertEqual(summarize.value(forKey: "remoteID") as? NSNumber, NSNumber(value: 1)) + XCTAssertEqual((story.value(forKey: "comments") as! NSSet).count, 1) + + XCTAssertEqual(Helper.countForEntity("SocialComment", inContext: dataStack.mainContext), 1) + let comments = Helper.fetchEntity("SocialComment", predicate: NSPredicate(format: "body = %@", "Hi"), inContext: dataStack.mainContext) + XCTAssertEqual(comments.count, 1) + + dataStack.drop() + } + + /** + * When having JSONs like this: + * { + * "id":12345, + * "name":"My Project", + * "category_id":12345 + * } + * It will should map category_id with the necesary category object using the ID 12345 + */ + func testIDRelationshipMapping() { + let usersDictionary = Helper.objectsFromJSON("users_a.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("Notes") + + Sync.changes(usersDictionary, inEntityNamed: "SuperUser", dataStack: dataStack, completion: nil) + + let usersCount = Helper.countForEntity("SuperUser", inContext: dataStack.mainContext) + XCTAssertEqual(usersCount, 8) + + let notesDictionary = Helper.objectsFromJSON("notes_with_user_id.json") as! [[String: Any]] + + Sync.changes(notesDictionary, inEntityNamed: "SuperNote", dataStack: dataStack, completion: nil) + + let notesCount = Helper.countForEntity("SuperNote", inContext: dataStack.mainContext) + XCTAssertEqual(notesCount, 5) + + let notes = Helper.fetchEntity("SuperNote", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) + let note = notes.first! + let user = note.value(forKey: "superUser")! + XCTAssertEqual((user as AnyObject).value(forKey: "name") as? String, "Melisa White") + + dataStack.drop() + } + + /** + * When having JSONs like this: + * { + * "id":12345, + * "name":"My Project", + * "category":12345 + * } + * It will should map category_id with the necesary category object using the ID 12345, but adding a custom remoteKey would make it map to category with ID 12345 + */ + func testIDRelationshipCustomMapping() { + let usersDictionary = Helper.objectsFromJSON("users_a.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("NotesB") + + Sync.changes(usersDictionary, inEntityNamed: "SuperUserB", dataStack: dataStack, completion: nil) + + let usersCount = Helper.countForEntity("SuperUserB", inContext: dataStack.mainContext) + XCTAssertEqual(usersCount, 8) + + let notesDictionary = Helper.objectsFromJSON("notes_with_user_id_custom.json") as! [[String: Any]] + + Sync.changes(notesDictionary, inEntityNamed: "SuperNoteB", dataStack: dataStack, completion: nil) + + let notesCount = Helper.countForEntity("SuperNoteB", inContext: dataStack.mainContext) + XCTAssertEqual(notesCount, 5) + + let notes = Helper.fetchEntity("SuperNoteB", predicate: NSPredicate(format: "remoteID = %@", NSNumber(value: 0)), inContext: dataStack.mainContext) + let note = notes.first! + let user = note.value(forKey: "superUser")! + XCTAssertEqual((user as AnyObject).value(forKey: "name") as? String, "Melisa White") + + dataStack.drop() + } + + // MARK: - Ordered Social + + func testCustomPrimaryKeyInOrderedRelationship() { + let objects = Helper.objectsFromJSON("comments-no-id.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("OrderedSocial") + + Sync.changes(objects, inEntityNamed: "Comment", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Comment", inContext: dataStack.mainContext), 8) + let comments = Helper.fetchEntity("Comment", predicate: NSPredicate(format: "body = %@", "comment 1"), inContext: dataStack.mainContext) + XCTAssertEqual(comments.count, 1) + XCTAssertEqual((comments.first!.value(forKey: "comments") as! NSOrderedSet).count, 3) + + let comment = comments.first! + XCTAssertEqual(comment.value(forKey: "body") as? String, "comment 1") + + dataStack.drop() + } + + // MARK: - Bug 179 => https://github.com/SyncDB/Sync/issues/179 + + func testConnectMultipleRelationships() { + let places = Helper.objectsFromJSON("bug-179-places.json") as! [[String: Any]] + let routes = Helper.objectsFromJSON("bug-179-routes.json") as! [String: Any] + let dataStack = Helper.dataStackWithModelName("179") + + Sync.changes(places, inEntityNamed: "Place", dataStack: dataStack, completion: nil) + Sync.changes([routes], inEntityNamed: "Route", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Route", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Place", inContext: dataStack.mainContext), 2) + let importedRoutes = Helper.fetchEntity("Route", predicate: nil, inContext: dataStack.mainContext) + XCTAssertEqual(importedRoutes.count, 1) + let importedRouter = importedRoutes.first! + XCTAssertEqual(importedRouter.value(forKey: "ident") as? String, "1") + + let startPlace = importedRoutes.first!.value(forKey: "startPlace") as! NSManagedObject + let endPlace = importedRoutes.first!.value(forKey: "endPlace") as! NSManagedObject + XCTAssertEqual(startPlace.value(forKey: "name") as? String, "Here") + XCTAssertEqual(endPlace.value(forKey: "name") as? String, "There") + + dataStack.drop() + } + + // MARK: - Bug 202 => https://github.com/SyncDB/Sync/issues/202 + + func testManyToManyKeyNotAllowedHere() { + let dataStack = Helper.dataStackWithModelName("202") + + let initialInsert = Helper.objectsFromJSON("bug-202-a.json") as! [[String: Any]] + Sync.changes(initialInsert, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) + + let removeAll = Helper.objectsFromJSON("bug-202-b.json") as! [[String: Any]] + Sync.changes(removeAll, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) + + dataStack.drop() + } + + // MARK: - Automatic use of id as remoteID + + func testIDAsRemoteID() { + let dataStack = Helper.dataStackWithModelName("id") + + let users = Helper.objectsFromJSON("id.json") as! [[String: Any]] + Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) + + dataStack.drop() + } + + // MARK: - Bug 157 => https://github.com/SyncDB/Sync/issues/157 + + func testBug157() { + let dataStack = Helper.dataStackWithModelName("157") + + // 3 locations get synced, their references get ignored since no cities are found + let locations = Helper.objectsFromJSON("157-locations.json") as! [[String: Any]] + Sync.changes(locations, inEntityNamed: "Location", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Location", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("City", inContext: dataStack.mainContext), 0) + + // 3 cities get synced + let cities = Helper.objectsFromJSON("157-cities.json") as! [[String: Any]] + Sync.changes(cities, inEntityNamed: "City", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Location", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("City", inContext: dataStack.mainContext), 3) + + // 3 locations get synced, but now since their references are available the relationships get made + Sync.changes(locations, inEntityNamed: "Location", dataStack: dataStack, completion: nil) + var location1 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 0"), inContext: dataStack.mainContext).first + var location1City = location1?.value(forKey: "city") as? NSManagedObject + XCTAssertEqual(location1City?.value(forKey: "name") as? String, "Oslo") + var location2 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 1"), inContext: dataStack.mainContext).first + var location2City = location2?.value(forKey: "city") as? NSManagedObject + XCTAssertEqual(location2City?.value(forKey: "name") as? String, "Paris") + var location3 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 2"), inContext: dataStack.mainContext).first + var location3City = location3?.value(forKey: "city") as? NSManagedObject + XCTAssertNil(location3City?.value(forKey: "name") as? String) + + // Finally we update the relationships to test changing relationships + let updatedLocations = Helper.objectsFromJSON("157-locations-update.json") as! [[String: Any]] + Sync.changes(updatedLocations, inEntityNamed: "Location", dataStack: dataStack, completion: nil) + location1 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 0"), inContext: dataStack.mainContext).first + location1City = location1?.value(forKey: "city") as? NSManagedObject + XCTAssertNil(location1City?.value(forKey: "name") as? String) + location2 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 1"), inContext: dataStack.mainContext).first + location2City = location2?.value(forKey: "city") as? NSManagedObject + XCTAssertEqual(location2City?.value(forKey: "name") as? String, "Oslo") + location3 = Helper.fetchEntity("Location", predicate: NSPredicate(format: "locationID = 2"), inContext: dataStack.mainContext).first + location3City = location3?.value(forKey: "city") as? NSManagedObject + XCTAssertEqual(location3City?.value(forKey: "name") as? String, "Paris") + + dataStack.drop() + } + + // MARK: - Add support for cancellable sync processes https://github.com/SyncDB/Sync/pull/216 + + func testOperation() { + let dataStack = Helper.dataStackWithModelName("id") + + let users = Helper.objectsFromJSON("id.json") as! [[String: Any]] + let operation = Sync(changes: users, inEntityNamed: "User", predicate: nil, dataStack: dataStack) + operation.start() + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 2) + + dataStack.drop() + } + + // MARK: - Support multiple ids to set a relationship (to-many) => https://github.com/SyncDB/Sync/issues/151 + // Notes have to be unique, two users can't have the same note. + + func testMultipleIDRelationshipToMany() { + let dataStack = Helper.dataStackWithModelName("151-to-many") + + // Inserts 3 users, it ignores the relationships since no notes are found + let users = Helper.objectsFromJSON("151-to-many-users.json") as! [[String: Any]] + Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 0) + + // Inserts 3 notes + let notes = Helper.objectsFromJSON("151-to-many-notes.json") as! [[String: Any]] + Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) + let savedUsers = Helper.fetchEntity("User", inContext: dataStack.mainContext) + var total = 0 + for user in savedUsers { + let notes = user.value(forKey: "notes") as? Set<NSManagedObject> ?? Set<NSManagedObject>() + total += notes.count + } + XCTAssertEqual(total, 0) + + // Updates the first 3 users, but now it makes the relationships with the notes + Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) + var user10 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 10"), inContext: dataStack.mainContext).first + var user10Notes = user10?.value(forKey: "notes") as? Set<NSManagedObject> + XCTAssertEqual(user10Notes?.count, 2) + var user11 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 11"), inContext: dataStack.mainContext).first + var user11Notes = user11?.value(forKey: "notes") as? Set<NSManagedObject> + XCTAssertEqual(user11Notes?.count, 1) + var user12 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 12"), inContext: dataStack.mainContext).first + var user12Notes = user12?.value(forKey: "notes") as? Set<NSManagedObject> + XCTAssertEqual(user12Notes?.count, 0) + var note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 0"), inContext: dataStack.mainContext).first + var note0User = note0?.value(forKey: "user") as? NSManagedObject + XCTAssertEqual(note0User?.value(forKey: "userID") as? Int, 10) + var note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 1"), inContext: dataStack.mainContext).first + var note1User = note1?.value(forKey: "user") as? NSManagedObject + XCTAssertEqual(note1User?.value(forKey: "userID") as? Int, 10) + var note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 2"), inContext: dataStack.mainContext).first + var note2User = note2?.value(forKey: "user") as? NSManagedObject + XCTAssertEqual(note2User?.value(forKey: "userID") as? Int, 11) + + // Updates the first 3 users again, but now it changes all the relationships + let updatedUsers = Helper.objectsFromJSON("151-to-many-users-update.json") as! [[String: Any]] + Sync.changes(updatedUsers, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) + user10 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 10"), inContext: dataStack.mainContext).first + user10Notes = user10?.value(forKey: "notes") as? Set<NSManagedObject> + XCTAssertEqual(user10Notes?.count, 0) + user11 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 11"), inContext: dataStack.mainContext).first + user11Notes = user11?.value(forKey: "notes") as? Set<NSManagedObject> + XCTAssertEqual(user11Notes?.count, 1) + user12 = Helper.fetchEntity("User", predicate: NSPredicate(format: "userID = 12"), inContext: dataStack.mainContext).first + user12Notes = user12?.value(forKey: "notes") as? Set<NSManagedObject> + XCTAssertEqual(user12Notes?.count, 2) + note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 0"), inContext: dataStack.mainContext).first + note0User = note0?.value(forKey: "user") as? NSManagedObject + XCTAssertEqual(note0User?.value(forKey: "userID") as? Int, 12) + note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 1"), inContext: dataStack.mainContext).first + note1User = note1?.value(forKey: "user") as? NSManagedObject + XCTAssertEqual(note1User?.value(forKey: "userID") as? Int, 12) + note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 2"), inContext: dataStack.mainContext).first + note2User = note2?.value(forKey: "user") as? NSManagedObject + XCTAssertEqual(note2User?.value(forKey: "userID") as? Int, 11) + + dataStack.drop() + } + + // MARK: - Support multiple ids to set a relationship (to-many) => https://github.com/SyncDB/Sync/issues/151 + // Notes have to be unique, two users can't have the same note. + + func testOrderedMultipleIDRelationshipToMany() { + let dataStack = Helper.dataStackWithModelName("151-ordered-to-many") + + // Inserts 3 users, it ignores the relationships since no notes are found + let users = Helper.objectsFromJSON("151-to-many-users.json") as! [[String: Any]] + Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 0) + + // Inserts 3 notes + let notes = Helper.objectsFromJSON("151-to-many-notes.json") as! [[String: Any]] + Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) + let savedUsers = Helper.fetchEntity("User", inContext: dataStack.mainContext) + var total = 0 + for user in savedUsers { + let notes = user.value(forKey: "notes") as? Set<NSManagedObject> ?? Set<NSManagedObject>() + total += notes.count + } + XCTAssertEqual(total, 0) + + // Updates the first 3 users, but now it makes the relationships with the notes + Sync.changes(users, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) + var user10 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 10"), inContext: dataStack.mainContext).first + var user10Notes = user10?.value(forKey: "notes") as? NSOrderedSet + XCTAssertEqual(user10Notes?.set.count, 2) + var user11 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 11"), inContext: dataStack.mainContext).first + var user11Notes = user11?.value(forKey: "notes") as? NSOrderedSet + XCTAssertEqual(user11Notes?.set.count, 1) + var user12 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 12"), inContext: dataStack.mainContext).first + var user12Notes = user12?.value(forKey: "notes") as? NSOrderedSet + XCTAssertEqual(user12Notes?.set.count, 0) + + // Updates the first 3 users again, but now it changes all the relationships + let updatedUsers = Helper.objectsFromJSON("151-to-many-users-update.json") as! [[String: Any]] + Sync.changes(updatedUsers, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 3) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 3) + user10 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 10"), inContext: dataStack.mainContext).first + user10Notes = user10?.value(forKey: "notes") as? NSOrderedSet + XCTAssertEqual(user10Notes?.set.count, 0) + user11 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 11"), inContext: dataStack.mainContext).first + user11Notes = user11?.value(forKey: "notes") as? NSOrderedSet + XCTAssertEqual(user11Notes?.set.count, 1) + user12 = Helper.fetchEntity("User", predicate: NSPredicate(format: "id = 12"), inContext: dataStack.mainContext).first + user12Notes = user12?.value(forKey: "notes") as? NSOrderedSet + XCTAssertEqual(user12Notes?.set.count, 2) + + dataStack.drop() + } + + // MARK: - Support multiple ids to set a relationship (many-to-many) => https://github.com/SyncDB/Sync/issues/151 + + func testMultipleIDRelationshipManyToMany() { + let dataStack = Helper.dataStackWithModelName("151-many-to-many") + + // Inserts 4 notes + let notes = Helper.objectsFromJSON("151-many-to-many-notes.json") as! [[String: Any]] + Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) + + // Inserts 3 tags + let tags = Helper.objectsFromJSON("151-many-to-many-tags.json") as! [[String: Any]] + Sync.changes(tags, inEntityNamed: "Tag", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) + let savedNotes = Helper.fetchEntity("Note", inContext: dataStack.mainContext) + var total = 0 + for note in savedNotes { + let tags = note.value(forKey: "tags") as? Set<NSManagedObject> ?? Set<NSManagedObject>() + total += tags.count + } + XCTAssertEqual(total, 0) + + // Updates the first 4 notes, but now it makes the relationships with the tags + Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) + var note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 0"), inContext: dataStack.mainContext).first + var note0Tags = note0?.value(forKey: "tags") as? Set<NSManagedObject> + XCTAssertEqual(note0Tags?.count, 2) + var note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 1"), inContext: dataStack.mainContext).first + var note1Tags = note1?.value(forKey: "tags") as? Set<NSManagedObject> + XCTAssertEqual(note1Tags?.count, 1) + var note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 2"), inContext: dataStack.mainContext).first + var note2Tags = note2?.value(forKey: "tags") as? Set<NSManagedObject> + XCTAssertEqual(note2Tags?.count, 0) + var note3 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 3"), inContext: dataStack.mainContext).first + var note3Tags = note3?.value(forKey: "tags") as? Set<NSManagedObject> + XCTAssertEqual(note3Tags?.count, 1) + + // Updates the first 4 notes again, but now it changes all the relationships + let updatedNotes = Helper.objectsFromJSON("151-many-to-many-notes-update.json") as! [[String: Any]] + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) + Sync.changes(updatedNotes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) + note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 0"), inContext: dataStack.mainContext).first + note0Tags = note0?.value(forKey: "tags") as? Set<NSManagedObject> + XCTAssertEqual(note0Tags?.count, 1) + note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 1"), inContext: dataStack.mainContext).first + note1Tags = note1?.value(forKey: "tags") as? Set<NSManagedObject> + XCTAssertEqual(note1Tags?.count, 0) + note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 2"), inContext: dataStack.mainContext).first + note2Tags = note2?.value(forKey: "tags") as? Set<NSManagedObject> + XCTAssertEqual(note2Tags?.count, 2) + note3 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "noteID = 3"), inContext: dataStack.mainContext).first + note3Tags = note3?.value(forKey: "tags") as? Set<NSManagedObject> + XCTAssertEqual(note3Tags?.count, 0) + + dataStack.drop() + } + + // MARK: - Support multiple ids to set a relationship (many-to-many) => https://github.com/SyncDB/Sync/issues/151 + + func testOrderedMultipleIDRelationshipManyToMany() { + let dataStack = Helper.dataStackWithModelName("151-ordered-many-to-many") + + // Inserts 4 notes + let notes = Helper.objectsFromJSON("151-many-to-many-notes.json") as! [[String: Any]] + Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) + + // Inserts 3 tags + let tags = Helper.objectsFromJSON("151-many-to-many-tags.json") as! [[String: Any]] + Sync.changes(tags, inEntityNamed: "Tag", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) + let savedNotes = Helper.fetchEntity("Note", inContext: dataStack.mainContext) + var total = 0 + for note in savedNotes { + let tags = note.value(forKey: "tags") as? Set<NSManagedObject> ?? Set<NSManagedObject>() + total += tags.count + } + XCTAssertEqual(total, 0) + + // Updates the first 4 notes, but now it makes the relationships with the tags + Sync.changes(notes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) + var note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 0"), inContext: dataStack.mainContext).first + var note0Tags = note0?.value(forKey: "tags") as? NSOrderedSet + XCTAssertEqual(note0Tags?.count, 2) + var note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 1"), inContext: dataStack.mainContext).first + var note1Tags = note1?.value(forKey: "tags") as? NSOrderedSet + XCTAssertEqual(note1Tags?.count, 1) + var note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 2"), inContext: dataStack.mainContext).first + var note2Tags = note2?.value(forKey: "tags") as? NSOrderedSet + XCTAssertEqual(note2Tags?.count, 0) + var note3 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 3"), inContext: dataStack.mainContext).first + var note3Tags = note3?.value(forKey: "tags") as? NSOrderedSet + XCTAssertEqual(note3Tags?.count, 1) + + // Updates the first 4 notes again, but now it changes all the relationships + let updatedNotes = Helper.objectsFromJSON("151-many-to-many-notes-update.json") as! [[String: Any]] + XCTAssertEqual(Helper.countForEntity("Note", inContext: dataStack.mainContext), 4) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) + Sync.changes(updatedNotes, inEntityNamed: "Note", dataStack: dataStack, completion: nil) + note0 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 0"), inContext: dataStack.mainContext).first + note0Tags = note0?.value(forKey: "tags") as? NSOrderedSet + XCTAssertEqual(note0Tags?.set.count, 1) + note1 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 1"), inContext: dataStack.mainContext).first + note1Tags = note1?.value(forKey: "tags") as? NSOrderedSet + XCTAssertEqual(note1Tags?.set.count, 0) + note2 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 2"), inContext: dataStack.mainContext).first + note2Tags = note2?.value(forKey: "tags") as? NSOrderedSet + XCTAssertEqual(note2Tags?.set.count, 2) + note3 = Helper.fetchEntity("Note", predicate: NSPredicate(format: "id = 3"), inContext: dataStack.mainContext).first + note3Tags = note3?.value(forKey: "tags") as? NSOrderedSet + XCTAssertEqual(note3Tags?.count, 0) + + dataStack.drop() + } + + // MARK: - Bug 257 => https://github.com/SyncDB/Sync/issues/257 + + func testBug257() { + let dataStack = Helper.dataStackWithModelName("257") + + let JSON = Helper.objectsFromJSON("bug-257.json") as! [String: Any] + Sync.changes([JSON], inEntityNamed: "Workout", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Workout", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Exercise", inContext: dataStack.mainContext), 2) + + dataStack.drop() + } + + // MARK: - Bug 254 => https://github.com/SyncDB/Sync/issues/254 + + func testBug254() { + let dataStack = Helper.dataStackWithModelName("254") + + let JSON = Helper.objectsFromJSON("bug-254.json") as! [String: Any] + Sync.changes([JSON], inEntityNamed: "House", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("House", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Human", inContext: dataStack.mainContext), 1) + + // Verify correct "House -> Resident" connections + let house = Helper.fetchEntity("House", predicate: NSPredicate(format: "id = 0"), inContext: dataStack.mainContext).first + let residents = house?.value(forKey: "residents") as? Set<NSManagedObject> + let resident = residents?.first + XCTAssertEqual(resident?.value(forKey: "id") as? Int, 0) + + let residentHouse = resident?.value(forKey: "residenthouse") as? NSManagedObject + XCTAssertEqual(residentHouse?.value(forKey: "id") as? Int, 0) + + // Verify empty "Ownhouses -> Owners" connections + let human = Helper.fetchEntity("Human", predicate: NSPredicate(format: "id = 0"), inContext: dataStack.mainContext).first + let ownhouses = human?.value(forKey: "ownhouses") as? Set<NSManagedObject> + XCTAssertEqual(ownhouses?.count, 0) + + dataStack.drop() + } + + // MARK: Bug 260 => https://github.com/SyncDB/Sync/issues/260 + + func testBug260CamelCase() { + let dataStack = Helper.dataStackWithModelName("ToOne") + + let snakeCaseJSON = Helper.objectsFromJSON("to-one-snakecase.json") as! [String: Any] + Sync.changes([snakeCaseJSON], inEntityNamed: "RentedHome", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("RentedHome", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("LegalPerson", inContext: dataStack.mainContext), 1) + + dataStack.drop() + } + + func testBug260SnakeCase() { + let dataStack = Helper.dataStackWithModelName("ToOne") + + let camelCaseJSON = Helper.objectsFromJSON("to-one-camelcase.json") as! [String: Any] + Sync.changes([camelCaseJSON], inEntityNamed: "RentedHome", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("RentedHome", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("LegalPerson", inContext: dataStack.mainContext), 1) + + dataStack.drop() + } + + // MARK: Bug 239 => https://github.com/SyncDB/Sync/pull/239 + + func testBug239() { + let carsObject = Helper.objectsFromJSON("bug-239.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("239") + Sync.changes(carsObject, inEntityNamed: "Racecar", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Racecar", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Passenger", inContext: dataStack.mainContext), 2) + + let racecars = Helper.fetchEntity("Racecar", predicate: nil, inContext: dataStack.mainContext) + let racecar = racecars.first! + XCTAssertEqual((racecar.value(forKey: "passengers") as? NSSet)!.allObjects.count, 2) + + dataStack.drop() + } + + // MARK: - https://github.com/SyncDB/Sync/issues/225 + + func test225ReplacedTag() { + let dataStack = Helper.dataStackWithModelName("225") + + let usersA = Helper.objectsFromJSON("225-a.json") as! [[String: Any]] + Sync.changes(usersA, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) + + // This should remove the old tag reference to the user and insert this new one. + let usersB = Helper.objectsFromJSON("225-a-replaced.json") as! [[String: Any]] + Sync.changes(usersB, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 2) + + let user = Helper.fetchEntity("User", inContext: dataStack.mainContext).first! + let predicate = NSPredicate(format: "ANY users IN %@", [user]) + let tags = Helper.fetchEntity("Tag", predicate: predicate, inContext: dataStack.mainContext) + XCTAssertEqual(tags.count, 1) + + dataStack.drop() + } + + func test225RemovedTagsWithEmptyArray() { + let dataStack = Helper.dataStackWithModelName("225") + + let usersA = Helper.objectsFromJSON("225-a.json") as! [[String: Any]] + Sync.changes(usersA, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) + + // This should remove all the references. + let usersB = Helper.objectsFromJSON("225-a-empty.json") as! [[String: Any]] + Sync.changes(usersB, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + + // WARNING: Maybe this shouldn't be 0, but should be 1 instead, since it shouldn't delete the + // object, but instead, it should just remove the reference. + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) + + let user = Helper.fetchEntity("User", inContext: dataStack.mainContext).first! + let predicate = NSPredicate(format: "ANY users IN %@", [user]) + let tags = Helper.fetchEntity("Tag", predicate: predicate, inContext: dataStack.mainContext) + XCTAssertEqual(tags.count, 0) + + dataStack.drop() + } + + func test225RemovedTagsWithNull() { + let dataStack = Helper.dataStackWithModelName("225") + + let usersA = Helper.objectsFromJSON("225-a.json") as! [[String: Any]] + Sync.changes(usersA, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) + + // WARNING: Maybe this shouldn't be 0, but should be 1 instead, since it shouldn't delete the + // object, but instead, it should just remove the reference. + let usersB = Helper.objectsFromJSON("225-a-null.json") as! [[String: Any]] + Sync.changes(usersB, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 0) + + let user = Helper.fetchEntity("User", inContext: dataStack.mainContext).first! + let predicate = NSPredicate(format: "ANY users IN %@", [user]) + let tags = Helper.fetchEntity("Tag", predicate: predicate, inContext: dataStack.mainContext) + XCTAssertEqual(tags.count, 0) + + dataStack.drop() + } + + func test280() { + let dataStack = Helper.dataStackWithModelName("280") + + let routes = Helper.objectsFromJSON("280.json") as! [[String: Any]] + Sync.changes(routes, inEntityNamed: "Route", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Route", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("RoutePolylineItem", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("RouteStop", inContext: dataStack.mainContext), 1) + + Sync.changes(routes, inEntityNamed: "Route", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Route", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("RoutePolylineItem", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("RouteStop", inContext: dataStack.mainContext), 1) + + dataStack.drop() + } + + func test283() { + let dataStack = Helper.dataStackWithModelName("283") + + let taskLists = Helper.objectsFromJSON("283.json") as! [[String: Any]] + Sync.changes(taskLists, inEntityNamed: "TaskList", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("TaskList", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Owner", inContext: dataStack.mainContext), 1) + + let taskList = Helper.fetchEntity("TaskList", inContext: dataStack.mainContext).first! + let owner = taskList.value(forKey: "owner") as? NSManagedObject + XCTAssertNotNil(owner) + + let participants = taskList.value(forKey: "participants") as? NSSet ?? NSSet() + XCTAssertEqual(participants.count, 0) + + dataStack.drop() + } + + func test320RemoveOneToToneWithNull() { + let dataStack = Helper.dataStackWithModelName("320") + + let tagA = NSEntityDescription.insertNewObject(forEntityName: "Tag", into: dataStack.mainContext) + tagA.setValue(10, forKey: "remoteID") + + let userA = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) + userA.setValue(1, forKey: "remoteID") + userA.setValue(tagA, forKey: "tag") + + try! dataStack.mainContext.save() + + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) + + let usersB = Helper.objectsFromJSON("320.json") as! [[String: Any]] + Sync.changes(usersB, inEntityNamed: "User", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("User", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Tag", inContext: dataStack.mainContext), 1) + + let user = Helper.fetchEntity("User", inContext: dataStack.mainContext).first! + let predicate = NSPredicate(format: "ANY user = %@", user) + let tag = Helper.fetchEntity("Tag", predicate: predicate, inContext: dataStack.mainContext) + XCTAssertEqual(tag.count, 0) + + dataStack.drop() + } + + func test233() { + let dataStack = Helper.dataStackWithModelName("233") + + let slide1 = NSEntityDescription.insertNewObject(forEntityName: "Slide", into: dataStack.mainContext) + slide1.setValue(1, forKey: "id") + + let slide2 = NSEntityDescription.insertNewObject(forEntityName: "Slide", into: dataStack.mainContext) + slide2.setValue(2, forKey: "id") + + let presentation = NSEntityDescription.insertNewObject(forEntityName: "Presentation", into: dataStack.mainContext) + presentation.setValue(1, forKey: "id") + + let slides = NSMutableOrderedSet() + slides.add(slide1) + slides.add(slide2) + + presentation.setValue(slides, forKey: "slides") + + try! dataStack.mainContext.save() + + XCTAssertEqual(Helper.countForEntity("Presentation", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Slide", inContext: dataStack.mainContext), 2) + let lastSlide = Helper.fetchEntity("Presentation", inContext: dataStack.mainContext).first!.mutableOrderedSetValue(forKey: "slides").lastObject as! NSManagedObject + let lastSlideID = lastSlide.value(forKey: "id") as! Int + XCTAssertEqual(lastSlideID, 2) + + // Change order of slides, before it was [1, 2], now it will be [2, 1] + let presentationOrderB = Helper.objectsFromJSON("233.json") as! [[String: Any]] + Sync.changes(presentationOrderB, inEntityNamed: "Presentation", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Presentation", inContext: dataStack.mainContext), 1) + + let firstSlide = Helper.fetchEntity("Presentation", inContext: dataStack.mainContext).first!.mutableOrderedSetValue(forKey: "slides").firstObject as! NSManagedObject + let firstSlideID = firstSlide.value(forKey: "id") as! Int + + // check if order is properly updated + XCTAssertEqual(firstSlideID, lastSlideID) + + dataStack.drop() + } + + // https://github.com/SyncDB/Sync/issues/327 + + func test327OrderedToMany() { + let dataStack = Helper.dataStackWithModelName("233") + + let slide1 = NSEntityDescription.insertNewObject(forEntityName: "Slide", into: dataStack.mainContext) + slide1.setValue(1, forKey: "id") + + let slide2 = NSEntityDescription.insertNewObject(forEntityName: "Slide", into: dataStack.mainContext) + slide2.setValue(2, forKey: "id") + + let presentation = NSEntityDescription.insertNewObject(forEntityName: "Presentation", into: dataStack.mainContext) + presentation.setValue(1, forKey: "id") + + let slides = NSMutableOrderedSet() + slides.add(slide1) + slides.add(slide2) + + presentation.setValue(slides, forKey: "slides") + + try! dataStack.mainContext.save() + + XCTAssertEqual(Helper.countForEntity("Presentation", inContext: dataStack.mainContext), 1) + XCTAssertEqual(Helper.countForEntity("Slide", inContext: dataStack.mainContext), 2) + let lastSlide = Helper.fetchEntity("Presentation", inContext: dataStack.mainContext).first!.mutableOrderedSetValue(forKey: "slides").lastObject as! NSManagedObject + let lastSlideID = lastSlide.value(forKey: "id") as! Int + XCTAssertEqual(lastSlideID, 2) + + // Change order of slides, before it was [1, 2], now it will be [2, 1] + let presentationOrderB = Helper.objectsFromJSON("237.json") as! [[String: Any]] + Sync.changes(presentationOrderB, inEntityNamed: "Presentation", dataStack: dataStack, completion: nil) + + XCTAssertEqual(Helper.countForEntity("Presentation", inContext: dataStack.mainContext), 1) + + let firstSlide = Helper.fetchEntity("Presentation", inContext: dataStack.mainContext).first!.mutableOrderedSetValue(forKey: "slides").firstObject as! NSManagedObject + let firstSlideID = firstSlide.value(forKey: "id") as! Int + + // check if order is properly updated + XCTAssertEqual(firstSlideID, lastSlideID) + + dataStack.drop() + } + + // https://github.com/SyncDB/Sync/issues/265 + + func test265() { + let dataStack = Helper.dataStackWithModelName("265") + let players = Helper.objectsFromJSON("265.json") as! [[String: Any]] + Sync.changes(players, inEntityNamed: "Player", dataStack: dataStack, completion: nil) + + // Player 1 + // Has one player group: 1 + + // Player group 1 + // This player group has two players: [1] + + // This should be 1, but sadly it's two :( + XCTAssertEqual(Helper.countForEntity("Player", inContext: dataStack.mainContext), 2) + XCTAssertEqual(Helper.countForEntity("PlayerGroup", inContext: dataStack.mainContext), 1) + dataStack.drop() + } + + func test3ca82a0() { + let dataStack = Helper.dataStackWithModelName("3ca82a0") + + let taskLists = Helper.objectsFromJSON("3ca82a0.json") as! [[String: Any]] + Sync.changes(taskLists, inEntityNamed: "Article", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Article", inContext: dataStack.mainContext), 2) + XCTAssertEqual(Helper.countForEntity("ArticleTag", inContext: dataStack.mainContext), 1) + + dataStack.drop() + } + + // MARK: Bug 277 => https://github.com/SyncDB/Sync/pull/277 + + func test277() { + let carsObject = Helper.objectsFromJSON("277.json") as! [[String: Any]] + let dataStack = Helper.dataStackWithModelName("277") + Sync.changes(carsObject, inEntityNamed: "Racecar", dataStack: dataStack, completion: nil) + XCTAssertEqual(Helper.countForEntity("Racecar", inContext: dataStack.mainContext), 2) + XCTAssertEqual(Helper.countForEntity("Passenger", inContext: dataStack.mainContext), 1) + + var racecars = Helper.fetchEntity("Racecar", predicate: nil, inContext: dataStack.mainContext) + var racecar = racecars.first! + XCTAssertEqual(racecar.value(forKey: "remoteID") as? Int, 31) + XCTAssertEqual((racecar.value(forKey: "passengers") as? NSSet)!.allObjects.count, 1) + + racecars = Helper.fetchEntity("Racecar", predicate: nil, inContext: dataStack.mainContext) + racecar = racecars.last! + XCTAssertEqual(racecar.value(forKey: "remoteID") as? Int, 32) + XCTAssertEqual((racecar.value(forKey: "passengers") as? NSSet)!.allObjects.count, 1) + + dataStack.drop() + } +} diff --git a/Tests/Sync/UpdateTests.swift b/Tests/Sync/UpdateTests.swift new file mode 100644 index 00000000..1e3fac0c --- /dev/null +++ b/Tests/Sync/UpdateTests.swift @@ -0,0 +1,52 @@ +import XCTest + +import CoreData +import Sync + +class UpdateTests: XCTestCase { + func testUpdateWithObjectNotFound() { + let dataStack = Helper.dataStackWithModelName("id") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) + user.setValue("id", forKey: "id") + try! dataStack.mainContext.save() + + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + let id = try! Sync.update("someotherid", with: [String: Any](), inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertNil(id) + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + + dataStack.drop() + } + + func testUpdateWhileMaintainingTheSameID() { + let dataStack = Helper.dataStackWithModelName("id") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) + user.setValue("id", forKey: "id") + try! dataStack.mainContext.save() + + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + let updatedObject = try! Sync.update("id", with: ["name": "bossy"], inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(updatedObject?.value(forKey: "id") as? String, "id") + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + + dataStack.mainContext.refresh(user, mergeChanges: false) + + XCTAssertEqual(user.value(forKey: "name") as? String, "bossy") + + dataStack.drop() + } + + func testUpdateWithJSONThatHasNewID() { + let dataStack = Helper.dataStackWithModelName("id") + let user = NSEntityDescription.insertNewObject(forEntityName: "User", into: dataStack.mainContext) + user.setValue("id", forKey: "id") + try! dataStack.mainContext.save() + + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + let updatedObject = try! Sync.update("id", with: ["id": "someid"], inEntityNamed: "User", using: dataStack.mainContext) + XCTAssertEqual(updatedObject?.value(forKey: "id") as? String, "someid") + XCTAssertEqual(1, Helper.countForEntity("User", inContext: dataStack.mainContext)) + + dataStack.drop() + } +} diff --git a/Tests/SyncPropertyMapper/DictionaryTests.swift b/Tests/SyncPropertyMapper/DictionaryTests.swift new file mode 100755 index 00000000..dd167475 --- /dev/null +++ b/Tests/SyncPropertyMapper/DictionaryTests.swift @@ -0,0 +1,300 @@ +import CoreData +import XCTest +import Sync + +class DictionaryTests: XCTestCase { + let sampleSnakeCaseJSON = [ + "description": "reserved", + "inflection_binary_data": ["one", "two"], + "inflection_date": "1970-01-01", + "custom_remote_key": "randomRemoteKey", + "inflection_id": 1, + "inflection_string": "string", + "inflection_integer": 1, + "ignored_parameter": "ignored", + "ignore_transformable": "string", + ] as [String : Any] + + func testExportDictionaryWithSnakeCase() { + // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. + let dataStack = Helper.dataStackWithModelName("137") + let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) + user.hyp_fill(with: self.sampleSnakeCaseJSON) + try! dataStack.mainContext.save() + + let compared = [ + "description": "reserved", + "inflection_binary_data": NSKeyedArchiver.archivedData(withRootObject: ["one", "two"]) as NSData, + "inflection_date": "1970-01-01", + "randomRemoteKey": "randomRemoteKey", + "inflection_id": 1, + "inflection_string": "string", + "inflection_integer": 1 + ] as [String : Any] + + let formatter = DateFormatter() + formatter.dateFormat = "yyyy-MM-dd" + formatter.timeZone = TimeZone(identifier: "GMT") + + let result = user.hyp_dictionary(with: formatter, using: .snakeCase) + + for (key, value) in compared { + if let comparedValue = result[key] { + XCTAssertEqual(value as? NSObject, comparedValue as? NSObject) + } + } + + dataStack.drop() + } + + func testExportDictionaryWithCamelCase() { + // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. + let dataStack = Helper.dataStackWithModelName("137") + let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) + user.hyp_fill(with: self.sampleSnakeCaseJSON) + try! dataStack.mainContext.save() + + let compared = [ + "description": "reserved", + "inflectionBinaryData": NSKeyedArchiver.archivedData(withRootObject: ["one", "two"]) as NSData, + "inflectionDate": "1970-01-01", + "randomRemoteKey": "randomRemoteKey", + "inflectionID": 1, + "inflectionString": "string", + "inflectionInteger": 1 + ] as [String : Any] + + let formatter = DateFormatter() + formatter.dateFormat = "yyyy-MM-dd" + formatter.timeZone = TimeZone(identifier: "GMT") + + let result = user.hyp_dictionary(with: formatter, using: .camelCase) + print(result) + XCTAssertEqual(compared as NSDictionary, result as NSDictionary) + + dataStack.drop() + } + + let sampleSnakeCaseJSONWithRelationship = ["inflection_id": 1] as [String : Any] + + func testExportDictionaryWithSnakeCaseRelationshipArray() { + // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. + let dataStack = Helper.dataStackWithModelName("137") + let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) + user.hyp_fill(with: self.sampleSnakeCaseJSONWithRelationship) + + let company = NSEntityDescription.insertNewObject(forEntityName: "InflectionCompany", into: dataStack.mainContext) + company.setValue(NSNumber(value: 1), forKey: "inflectionID") + user.setValue(company, forKey: "camelCaseCompany") + + try! dataStack.mainContext.save() + + let compared = [ + "inflection_binary_data": NSNull(), + "inflection_date": NSNull(), + "inflection_id": 1, + "inflection_integer": NSNull(), + "inflection_string": NSNull(), + "randomRemoteKey": NSNull(), + "description": NSNull(), + "camel_case_company": [ + "inflection_id": 1 + ] + ] as [String : Any] + + let result = user.hyp_dictionary(using: .snakeCase, andRelationshipType: .array) + print(result) + XCTAssertEqual(compared as NSDictionary, result as NSDictionary) + + dataStack.drop() + } + + func testExportDictionaryWithCamelCaseRelationshipArray() { + // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. + let dataStack = Helper.dataStackWithModelName("137") + let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) + user.hyp_fill(with: self.sampleSnakeCaseJSONWithRelationship) + + let company = NSEntityDescription.insertNewObject(forEntityName: "InflectionCompany", into: dataStack.mainContext) + company.setValue(NSNumber(value: 1), forKey: "inflectionID") + user.setValue(company, forKey: "camelCaseCompany") + + try! dataStack.mainContext.save() + + let compared = [ + "inflectionBinaryData": NSNull(), + "inflectionDate": NSNull(), + "inflectionID": 1, + "inflectionInteger": NSNull(), + "inflectionString": NSNull(), + "randomRemoteKey": NSNull(), + "description": NSNull(), + "camelCaseCompany": [ + "inflectionID": 1 + ] + ] as [String : Any] + + let result = user.hyp_dictionary(using: .camelCase, andRelationshipType: .array) + print(result) + XCTAssertEqual(compared as NSDictionary, result as NSDictionary) + + dataStack.drop() + } + + func testExportDictionaryWithSnakeCaseRelationshipNested() { + // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. + let dataStack = Helper.dataStackWithModelName("137") + let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) + user.hyp_fill(with: self.sampleSnakeCaseJSONWithRelationship) + + let company = NSEntityDescription.insertNewObject(forEntityName: "InflectionCompany", into: dataStack.mainContext) + company.setValue(NSNumber(value: 1), forKey: "inflectionID") + user.setValue(company, forKey: "camelCaseCompany") + + try! dataStack.mainContext.save() + + let compared = [ + "inflection_binary_data": NSNull(), + "inflection_date": NSNull(), + "inflection_id": 1, + "inflection_integer": NSNull(), + "inflection_string": NSNull(), + "randomRemoteKey": NSNull(), + "description": NSNull(), + "camel_case_company_attributes": [ + "inflection_id": 1 + ] + ] as [String : Any] + + let result = user.hyp_dictionary(using: .snakeCase, andRelationshipType: .nested) + print(result) + XCTAssertEqual(compared as NSDictionary, result as NSDictionary) + + dataStack.drop() + } + + func testExportDictionaryWithCamelCaseRelationshipNested() { + // Fill in transformable attributes is not supported in Swift 3. Crashes when saving the context. + let dataStack = Helper.dataStackWithModelName("137") + let user = NSEntityDescription.insertNewObject(forEntityName: "InflectionUser", into: dataStack.mainContext) + user.hyp_fill(with: self.sampleSnakeCaseJSONWithRelationship) + + let company = NSEntityDescription.insertNewObject(forEntityName: "InflectionCompany", into: dataStack.mainContext) + company.setValue(NSNumber(value: 1), forKey: "inflectionID") + user.setValue(company, forKey: "camelCaseCompany") + + try! dataStack.mainContext.save() + + let compared = [ + "inflectionBinaryData": NSNull(), + "inflectionDate": NSNull(), + "inflectionID": 1, + "inflectionInteger": NSNull(), + "inflectionString": NSNull(), + "randomRemoteKey": NSNull(), + "description": NSNull(), + "camelCaseCompanyAttributes": [ + "inflectionID": 1 + ] + ] as [String : Any] + + let result = user.hyp_dictionary(using: .camelCase, andRelationshipType: .nested) + print(result) + XCTAssertEqual(compared as NSDictionary, result as NSDictionary) + + dataStack.drop() + } + + func testReservedAttributeNotExportingWell() { + let dataStack = Helper.dataStackWithModelName("142") + let user = NSEntityDescription.insertNewObject(forEntityName: "TwoLetterEntity", into: dataStack.mainContext) + user.hyp_fill(with: ["description": "test"]) + try! dataStack.mainContext.save() + + let compared = ["description": "test"] as [String : Any] + + let result = user.hyp_dictionary(using: .camelCase) + print(result) + XCTAssertEqual(compared as NSDictionary, result as NSDictionary) + + dataStack.drop() + } + + func setUpWorkout(dataStack: DataStack) -> NSManagedObject { + let workout = NSEntityDescription.insertNewObject(forEntityName: "Workout", into: dataStack.mainContext) + workout.setValue(UUID().uuidString, forKey: "id") + workout.setValue(UUID().uuidString, forKey: "workoutDesc") + workout.setValue(UUID().uuidString, forKey: "workoutName") + + let calendar = NSEntityDescription.insertNewObject(forEntityName: "Calendar", into: dataStack.mainContext) + calendar.setValue(UUID().uuidString, forKey: "eventSourceType") + calendar.setValue(UUID().uuidString, forKey: "id") + calendar.setValue(NSNumber(value: true), forKey: "isCompleted") + calendar.setValue(Date(timeIntervalSince1970: 0), forKey: "start") + + let plannedToIDs = NSMutableSet() + plannedToIDs.add(calendar) + workout.setValue(plannedToIDs, forKey: "plannedToIDs") + + let exercise = NSEntityDescription.insertNewObject(forEntityName: "Exercise", into: dataStack.mainContext) + exercise.setValue(UUID().uuidString, forKey: "exerciseDesc") + exercise.setValue(UUID().uuidString, forKey: "exerciseName") + exercise.setValue(UUID().uuidString, forKey: "id") + exercise.setValue(UUID().uuidString, forKey: "mainMuscle") + + let exerciseSet = NSEntityDescription.insertNewObject(forEntityName: "ExerciseSet", into: dataStack.mainContext) + exerciseSet.setValue(UUID().uuidString, forKey: "id") + exerciseSet.setValue(NSNumber(value: true), forKey: "isCompleted") + exerciseSet.setValue(NSNumber(value: 0), forKey: "setNumber") + exerciseSet.setValue(NSNumber(value: 0), forKey: "setReps") + exerciseSet.setValue(NSNumber(value: 0), forKey: "setWeight") + + let exerciseSets = NSMutableSet() + exerciseSets.add(exerciseSet) + exercise.setValue(exerciseSets, forKey: "exerciseSets") + + let workoutExercises = NSMutableSet() + workoutExercises.add(exercise) + workout.setValue(workoutExercises, forKey: "workoutExercises") + + try! dataStack.mainContext.save() + + return workout + } + + func testBug140CamelCase() { + let dataStack = Helper.dataStackWithModelName("140") + + let workout = self.setUpWorkout(dataStack: dataStack) + + let result = workout.hyp_dictionary(using: .camelCase, andRelationshipType: .array) + + let rootKeys = Array(result.keys) + XCTAssertEqual(rootKeys.count, 5) + XCTAssertEqual(rootKeys[0], "plannedToIDs") + XCTAssertEqual(rootKeys[1], "workoutName") + XCTAssertEqual(rootKeys[2], "_id") + XCTAssertEqual(rootKeys[3], "workoutExercises") + XCTAssertEqual(rootKeys[4], "workoutDesc") + + dataStack.drop() + } + + func testBug140SnakeCase() { + let dataStack = Helper.dataStackWithModelName("140") + + let workout = self.setUpWorkout(dataStack: dataStack) + + let result = workout.hyp_dictionary(using: .snakeCase, andRelationshipType: .array) + + let rootKeys = Array(result.keys) + XCTAssertEqual(rootKeys.count, 5) + XCTAssertEqual(rootKeys[0], "planned_to_ids") + XCTAssertEqual(rootKeys[1], "_id") + XCTAssertEqual(rootKeys[2], "workout_desc") + XCTAssertEqual(rootKeys[3], "workout_name") + XCTAssertEqual(rootKeys[4], "workout_exercises") + + dataStack.drop() + } +} diff --git a/Tests/SyncPropertyMapper/FillWithDictionaryTests.swift b/Tests/SyncPropertyMapper/FillWithDictionaryTests.swift new file mode 100755 index 00000000..0105d2b0 --- /dev/null +++ b/Tests/SyncPropertyMapper/FillWithDictionaryTests.swift @@ -0,0 +1,88 @@ +import CoreData +import XCTest + + +class FillWithDictionaryTests: XCTestCase { + + func testBug112() { + let dataStack = Helper.dataStackWithModelName("112") + + let owner = Helper.insertEntity("Owner", dataStack: dataStack) + owner.setValue(1, forKey: "id") + + let taskList = Helper.insertEntity("TaskList", dataStack: dataStack) + taskList.setValue(1, forKey: "id") + taskList.setValue(owner, forKey: "owner") + + let task = Helper.insertEntity("Task", dataStack: dataStack) + task.setValue(1, forKey: "id") + task.setValue(taskList, forKey: "taskList") + task.setValue(owner, forKey: "owner") + + try! dataStack.mainContext.save() + + let ownerBody = [ + "id": 1, + ] as [String: Any] + let taskBoby = [ + "id": 1, + "owner": ownerBody, + ] as [String: Any] + let expected = [ + "id": 1, + "owner": ownerBody, + "tasks": [taskBoby], + ] as [String: Any] + + XCTAssertEqual(expected as NSDictionary, taskList.hyp_dictionary(using: .array) as NSDictionary) + + dataStack.drop() + } + + func testBug121() { + let dataStack = Helper.dataStackWithModelName("121") + + let album = Helper.insertEntity("Album", dataStack: dataStack) + let json = [ + "id": "a", + "coverPhoto": ["id": "b"], + ] as [String: Any] + album.hyp_fill(with: json) + + XCTAssertNotNil(album.value(forKey: "coverPhoto")) + + dataStack.drop() + } + + func testBug123() { + let dataStack = Helper.dataStackWithModelName("123") + let user = Helper.insertEntity("User", dataStack: dataStack) + user.setValue(1, forKey: "id") + user.setValue("Ignore me", forKey: "name") + + try! dataStack.mainContext.save() + let expected = [ + "id": 1, + ] as [String: Any] + + XCTAssertEqual(expected as NSDictionary, user.hyp_dictionary(using: .none) as NSDictionary) + + dataStack.drop() + } + + func testBug129() { + ValueTransformer.setValueTransformer(BadAPIValueTransformer(), forName: NSValueTransformerName(rawValue: "BadAPIValueTransformer")) + + let dataStack = Helper.dataStackWithModelName("129") + + let user = Helper.insertEntity("User", dataStack: dataStack) + let json = [ + "name": ["bad-backend-dev"], + ] as [String: Any] + user.hyp_fill(with: json) + + XCTAssertEqual(user.value(forKey: "name") as? String, "bad-backend-dev") + + dataStack.drop() + } +} diff --git a/Tests/SyncPropertyMapper/HelperTests.m b/Tests/SyncPropertyMapper/HelperTests.m new file mode 100755 index 00000000..89c5b630 --- /dev/null +++ b/Tests/SyncPropertyMapper/HelperTests.m @@ -0,0 +1,141 @@ +@import CoreData; +@import XCTest; +@import Sync; + +#import "NSManagedObject+SyncPropertyMapperHelpers.h" + +@interface PrivateTests : XCTestCase + +@end + +@implementation PrivateTests + +- (id)entityNamed:(NSString *)entityName { + return [NSEntityDescription insertNewObjectForEntityForName:entityName + inManagedObjectContext:self.managedObjectContext]; +} + +- (NSManagedObjectContext *)managedObjectContext { + DataStack *dataStack = [[DataStack alloc] initWithModelName:@"Model" + bundle:[NSBundle bundleForClass:[self class]] + storeType:DataStackStoreTypeInMemory]; + return dataStack.mainContext; +} + +- (void)testAttributeDescriptionForKeyA { + NSManagedObject *company = [self entityNamed:@"Company"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = [company attributeDescriptionForRemoteKey:@"name"]; + XCTAssertEqualObjects(attributeDescription.name, @"name"); + + attributeDescription = [company attributeDescriptionForRemoteKey:@"id"]; + XCTAssertEqualObjects(attributeDescription.name, @"remoteID"); +} + +- (void)testAttributeDescriptionForKeyB { + NSManagedObject *market = [self entityNamed:@"Market"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = [market attributeDescriptionForRemoteKey:@"id"]; + XCTAssertEqualObjects(attributeDescription.name, @"uniqueId"); + + attributeDescription = [market attributeDescriptionForRemoteKey:@"other_attribute"]; + XCTAssertEqualObjects(attributeDescription.name, @"otherAttribute"); +} + +- (void)testAttributeDescriptionForKeyC { + NSManagedObject *user = [self entityNamed:@"User"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = [user attributeDescriptionForRemoteKey:@"age_of_person"]; + XCTAssertEqualObjects(attributeDescription.name, @"age"); + + attributeDescription = [user attributeDescriptionForRemoteKey:@"driver_identifier_str"]; + XCTAssertEqualObjects(attributeDescription.name, @"driverIdentifier"); + + attributeDescription = [user attributeDescriptionForRemoteKey:@"not_found_key"]; + XCTAssertNil(attributeDescription); +} + +- (void)testAttributeDescriptionForKeyD { + NSManagedObject *keyPath = [self entityNamed:@"KeyPath"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = [keyPath attributeDescriptionForRemoteKey:@"snake_parent.value_one"]; + XCTAssertEqualObjects(attributeDescription.name, @"snakeCaseDepthOne"); + + attributeDescription = [keyPath attributeDescriptionForRemoteKey:@"snake_parent.depth_one.depth_two"]; + XCTAssertEqualObjects(attributeDescription.name, @"snakeCaseDepthTwo"); + + attributeDescription = [keyPath attributeDescriptionForRemoteKey:@"camelParent.valueOne"]; + XCTAssertEqualObjects(attributeDescription.name, @"camelCaseDepthOne"); + + attributeDescription = [keyPath attributeDescriptionForRemoteKey:@"camelParent.depthOne.depthTwo"]; + XCTAssertEqualObjects(attributeDescription.name, @"camelCaseDepthTwo"); +} + +- (void)testRemoteKeyForAttributeDescriptionA { + NSManagedObject *company = [self entityNamed:@"Company"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = company.entity.propertiesByName[@"name"]; + XCTAssertEqualObjects([company remoteKeyForAttributeDescription:attributeDescription], @"name"); + + attributeDescription = company.entity.propertiesByName[@"remoteID"]; + XCTAssertEqualObjects([company remoteKeyForAttributeDescription:attributeDescription], @"id"); +} + +- (void)testRemoteKeyForAttributeDescriptionB { + NSManagedObject *market = [self entityNamed:@"Market"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = market.entity.propertiesByName[@"uniqueId"]; + XCTAssertEqualObjects([market remoteKeyForAttributeDescription:attributeDescription], @"id"); + + attributeDescription = market.entity.propertiesByName[@"otherAttribute"]; + XCTAssertEqualObjects([market remoteKeyForAttributeDescription:attributeDescription], @"other_attribute"); +} + +- (void)testRemoteKeyForAttributeDescriptionC { + NSManagedObject *user = [self entityNamed:@"User"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = user.entity.propertiesByName[@"age"]; ; + XCTAssertEqualObjects([user remoteKeyForAttributeDescription:attributeDescription], @"age_of_person"); + + attributeDescription = user.entity.propertiesByName[@"driverIdentifier"]; + XCTAssertEqualObjects([user remoteKeyForAttributeDescription:attributeDescription], @"driver_identifier_str"); + + XCTAssertNil([user remoteKeyForAttributeDescription:nil]); +} + +- (void)testRemoteKeyForAttributeDescriptionD { + NSManagedObject *keyPath = [self entityNamed:@"KeyPath"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = keyPath.entity.propertiesByName[@"snakeCaseDepthOne"]; + XCTAssertEqualObjects([keyPath remoteKeyForAttributeDescription:attributeDescription], @"snake_parent.value_one"); + + attributeDescription = keyPath.entity.propertiesByName[@"snakeCaseDepthTwo"]; + XCTAssertEqualObjects([keyPath remoteKeyForAttributeDescription:attributeDescription], @"snake_parent.depth_one.depth_two"); + + attributeDescription = keyPath.entity.propertiesByName[@"camelCaseDepthOne"]; + XCTAssertEqualObjects([keyPath remoteKeyForAttributeDescription:attributeDescription], @"camelParent.valueOne"); + + attributeDescription = keyPath.entity.propertiesByName[@"camelCaseDepthTwo"]; + XCTAssertEqualObjects([keyPath remoteKeyForAttributeDescription:attributeDescription], @"camelParent.depthOne.depthTwo"); +} + +- (void)testDestroyKey { + NSManagedObject *note = [self entityNamed:@"Note"]; + NSAttributeDescription *attributeDescription; + + attributeDescription = note.entity.propertiesByName[@"destroy"]; ; + XCTAssertEqualObjects([note remoteKeyForAttributeDescription:attributeDescription], @"_destroy"); + + attributeDescription = note.entity.propertiesByName[@"destroy"]; + XCTAssertEqualObjects([note remoteKeyForAttributeDescription:attributeDescription usingRelationshipType:SyncPropertyMapperRelationshipTypeArray], @"destroy"); +} + +@end diff --git a/Tests/SyncPropertyMapper/Models/112.xcdatamodeld/hypbug.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/112.xcdatamodeld/hypbug.xcdatamodel/contents new file mode 100644 index 00000000..a0bb9ea1 --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/112.xcdatamodeld/hypbug.xcdatamodel/contents @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="Owner" representedClassName="Owner" syncable="YES"> + <attribute name="id" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="task" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Task" inverseName="owner" inverseEntity="Task" syncable="YES"> + <userInfo> + <entry key="hyper.nonExportable" value="true"/> + </userInfo> + </relationship> + <relationship name="taskList" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TaskList" inverseName="owner" inverseEntity="TaskList" syncable="YES"> + <userInfo> + <entry key="hyper.nonExportable" value="true"/> + </userInfo> + </relationship> + </entity> + <entity name="Task" representedClassName="Task" syncable="YES"> + <attribute name="id" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="owner" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Owner" inverseName="task" inverseEntity="Owner" syncable="YES"/> + <relationship name="taskList" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TaskList" inverseName="tasks" inverseEntity="TaskList" syncable="YES"/> + </entity> + <entity name="TaskList" representedClassName="TaskList" syncable="YES"> + <attribute name="id" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="owner" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Owner" inverseName="taskList" inverseEntity="Owner" syncable="YES"/> + <relationship name="tasks" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Task" inverseName="taskList" inverseEntity="Task" syncable="YES"/> + </entity> + <elements> + <element name="Owner" positionX="-54" positionY="-54" width="128" height="90"/> + <element name="Task" positionX="169" positionY="84" width="128" height="90"/> + <element name="TaskList" positionX="-245" positionY="99" width="128" height="90"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/Models/121.xcdatamodeld/Model.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/121.xcdatamodeld/Model.xcdatamodel/contents new file mode 100644 index 00000000..bce56a99 --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/121.xcdatamodeld/Model.xcdatamodel/contents @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> + <entity name="Album" representedClassName="Album" syncable="YES"> + <attribute name="coverPhoto" optional="YES" attributeType="Binary" syncable="YES"/> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"/> + </entity> + <elements> + <element name="Album" positionX="9" positionY="54" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/Models/123.xcdatamodeld/Model.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/123.xcdatamodeld/Model.xcdatamodel/contents new file mode 100755 index 00000000..5bd4ec7f --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/123.xcdatamodeld/Model.xcdatamodel/contents @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="15G1004" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> + <entity name="User" representedClassName="" syncable="YES"> + <attribute name="id" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.nonExportable" value="true"/> + </userInfo> + </attribute> + </entity> + <elements> + <element name="User" positionX="9" positionY="72" width="128" height="75"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/Models/129.xcdatamodeld/hypbug.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/129.xcdatamodeld/hypbug.xcdatamodel/contents new file mode 100755 index 00000000..ad7fe137 --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/129.xcdatamodeld/hypbug.xcdatamodel/contents @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="16A323" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="User" representedClassName="" syncable="YES"> + <attribute name="name" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.valueTransformer" value="BadAPIValueTransformer"/> + </userInfo> + </attribute> + </entity> + <elements> + <element name="User" positionX="-54" positionY="-54" width="128" height="60"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/Models/137.xcdatamodeld/hypbug.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/137.xcdatamodeld/hypbug.xcdatamodel/contents new file mode 100755 index 00000000..2e7a2c99 --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/137.xcdatamodeld/hypbug.xcdatamodel/contents @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C32f" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="InflectionCompany" representedClassName="" syncable="YES"> + <attribute name="inflectionID" optional="YES" attributeType="Integer 32" usesScalarValueType="NO" syncable="YES"/> + <relationship name="camelCaseUser" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="InflectionUser" inverseName="camelCaseCompany" inverseEntity="InflectionUser" syncable="YES"> + <userInfo> + <entry key="hyper.nonExportable" value="value"/> + </userInfo> + </relationship> + </entity> + <entity name="InflectionUser" representedClassName="" syncable="YES"> + <attribute name="customRemoteKey" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="randomRemoteKey"/> + </userInfo> + </attribute> + <attribute name="ignoredParameter" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.nonExportable" value="true"/> + </userInfo> + </attribute> + <attribute name="ignoreTransformable" optional="YES" attributeType="Transformable" syncable="YES"/> + <attribute name="inflectionBinaryData" optional="YES" attributeType="Binary" syncable="YES"/> + <attribute name="inflectionDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <attribute name="inflectionID" optional="YES" attributeType="Integer 32" usesScalarValueType="NO" syncable="YES"/> + <attribute name="inflectionInteger" optional="YES" attributeType="Integer 16" usesScalarValueType="NO" syncable="YES"/> + <attribute name="inflectionString" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="inflectionUserDescription" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="camelCaseCompany" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="InflectionCompany" inverseName="camelCaseUser" inverseEntity="InflectionCompany" syncable="YES"/> + </entity> + <elements> + <element name="InflectionCompany" positionX="-54" positionY="126" width="128" height="73"/> + <element name="InflectionUser" positionX="-263" positionY="36" width="128" height="195"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/Models/140.xcdatamodeld/.xccurrentversion b/Tests/SyncPropertyMapper/Models/140.xcdatamodeld/.xccurrentversion new file mode 100755 index 00000000..9b33435d --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/140.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>smartworkout.xcdatamodel</string> +</dict> +</plist> diff --git a/Tests/SyncPropertyMapper/Models/140.xcdatamodeld/smartworkout.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/140.xcdatamodeld/smartworkout.xcdatamodel/contents new file mode 100755 index 00000000..3d8de2dd --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/140.xcdatamodeld/smartworkout.xcdatamodel/contents @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16B2555" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> + <entity name="Calendar" representedClassName="" syncable="YES"> + <attribute name="eventSourceType" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="_id"/> + </userInfo> + </attribute> + <attribute name="isCompleted" optional="YES" attributeType="Boolean" usesScalarValueType="YES" syncable="YES"/> + <attribute name="start" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <relationship name="eventSourceID" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Workout" inverseName="plannedToIDs" inverseEntity="Workout" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="eventSourceId"/> + </userInfo> + </relationship> + </entity> + <entity name="Exercise" representedClassName="" syncable="YES"> + <attribute name="exerciseDesc" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="exerciseName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + <entry key="hyper.remoteKey" value="_id"/> + </userInfo> + </attribute> + <attribute name="mainMuscle" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="exerciseSets" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="ExerciseSet" inverseName="exercise" inverseEntity="ExerciseSet" syncable="YES"/> + <relationship name="workout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Workout" inverseName="workoutExercises" inverseEntity="Workout" syncable="YES"/> + </entity> + <entity name="ExerciseSet" representedClassName="" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + <entry key="hyper.remoteKey" value="_id"/> + </userInfo> + </attribute> + <attribute name="isCompleted" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/> + <attribute name="setNumber" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/> + <attribute name="setReps" optional="YES" attributeType="Double" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/> + <attribute name="setWeight" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/> + <relationship name="exercise" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Exercise" inverseName="exerciseSets" inverseEntity="Exercise" syncable="YES"/> + </entity> + <entity name="Workout" representedClassName="" syncable="YES"> + <attribute name="id" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="true"/> + <entry key="hyper.remoteKey" value="_id"/> + </userInfo> + </attribute> + <attribute name="workoutDesc" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="workoutName" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="plannedToIDs" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Calendar" inverseName="eventSourceID" inverseEntity="Calendar" syncable="YES"/> + <relationship name="workoutExercises" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Exercise" inverseName="workout" inverseEntity="Exercise" syncable="YES"/> + </entity> + <elements> + <element name="Calendar" positionX="-288" positionY="-378" width="128" height="118"/> + <element name="Exercise" positionX="-281" positionY="-216" width="128" height="133"/> + <element name="ExerciseSet" positionX="-99" positionY="-342" width="128" height="133"/> + <element name="Workout" positionX="-479" positionY="-312" width="128" height="118"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/Models/142.xcdatamodeld/hypbug.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/142.xcdatamodeld/hypbug.xcdatamodel/contents new file mode 100755 index 00000000..e835928a --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/142.xcdatamodeld/hypbug.xcdatamodel/contents @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11542" systemVersion="16C32f" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="TwoLetterEntity" representedClassName="" syncable="YES"> + <attribute name="twoLetterEntityDescription" attributeType="String" syncable="YES"/> + </entity> + <elements> + <element name="TwoLetterEntity" positionX="-54" positionY="-54" width="128" height="60"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents new file mode 100644 index 00000000..49e034ca --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/Model.xcdatamodeld/Model.xcdatamodel/contents @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="Apartment" representedClassName="Apartment" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="building" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Building" inverseName="apartments" inverseEntity="Building" syncable="YES"/> + <relationship name="rooms" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Room" inverseName="apartment" inverseEntity="Room" syncable="YES"/> + </entity> + <entity name="Attribute" representedClassName="Attribute" syncable="YES"> + <attribute name="attributeType" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="binaryData" optional="YES" attributeType="Binary" syncable="YES"/> + <attribute name="boolean" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/> + <attribute name="customTransformerString" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.valueTransformer" value="SyncTestValueTransformer"/> + </userInfo> + </attribute> + <attribute name="decimal" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES"/> + <attribute name="decimalString" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES"/> + <attribute name="doubleValue" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="doubleValueString" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="floatValue" optional="YES" attributeType="Float" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="floatValueString" optional="YES" attributeType="Float" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="integer16" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="integer32" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="integer64" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="integerString" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="string" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="transformable" optional="YES" attributeType="Transformable" syncable="YES"/> + </entity> + <entity name="Building" representedClassName="Building" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="apartments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Apartment" inverseName="building" inverseEntity="Apartment" syncable="YES"/> + <relationship name="parks" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Park" inverseName="building" inverseEntity="Park" syncable="YES"/> + </entity> + <entity name="Company" representedClassName="Company" syncable="YES"> + <attribute name="name" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="company" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="KeyPath" representedClassName="KeyPath" syncable="YES"> + <attribute name="camelCaseDepthOne" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="camelParent.valueOne"/> + </userInfo> + </attribute> + <attribute name="camelCaseDepthTwo" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="camelParent.depthOne.depthTwo"/> + </userInfo> + </attribute> + <attribute name="snakeCaseDepthOne" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="snake_parent.value_one"/> + </userInfo> + </attribute> + <attribute name="snakeCaseDepthTwo" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="snake_parent.depth_one.depth_two"/> + </userInfo> + </attribute> + </entity> + <entity name="Market" representedClassName="Market" syncable="YES"> + <attribute name="otherAttribute" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="uniqueId" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.isPrimaryKey" value="YES"/> + <entry key="hyper.remoteKey" value="id"/> + </userInfo> + </attribute> + </entity> + <entity name="Note" representedClassName="Note" syncable="YES"> + <attribute name="destroy" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" usesScalarValueType="NO" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="User" inverseName="notes" inverseEntity="User" syncable="YES"/> + </entity> + <entity name="Park" representedClassName="Park" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="building" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Building" inverseName="parks" inverseEntity="Building" syncable="YES"/> + </entity> + <entity name="Recursive" representedClassName="Recursive" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="recursive" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Recursive" inverseName="recursives" inverseEntity="Recursive" syncable="YES"/> + <relationship name="recursives" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Recursive" inverseName="recursive" inverseEntity="Recursive" syncable="YES"/> + </entity> + <entity name="Room" representedClassName="Room" syncable="YES"> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <relationship name="apartment" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Apartment" inverseName="rooms" inverseEntity="Apartment" syncable="YES"/> + </entity> + <entity name="User" representedClassName="User" syncable="YES"> + <attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="age_of_person"/> + </userInfo> + </attribute> + <attribute name="birthDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <attribute name="contractID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <attribute name="driverIdentifier" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="driver_identifier_str"/> + </userInfo> + </attribute> + <attribute name="expenses" optional="YES" attributeType="Binary" syncable="YES"/> + <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="hobbies" optional="YES" attributeType="Binary" syncable="YES"/> + <attribute name="ignoredParameter" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="ignoreTransformable" optional="YES" attributeType="Transformable" syncable="YES"/> + <attribute name="lastName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="numberOfAttendes" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="rawSigned" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="signed"/> + </userInfo> + </attribute> + <attribute name="registeredTransformable" optional="YES" attributeType="Transformable" valueTransformerName="DateStringTransformer" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="updatedAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <attribute name="userDescription" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="userType" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="company" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Company" inverseName="user" inverseEntity="Company" syncable="YES"/> + <relationship name="notes" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Note" inverseName="user" inverseEntity="Note" syncable="YES"/> + </entity> + <elements> + <element name="Apartment" positionX="-18" positionY="27" width="128" height="90"/> + <element name="Attribute" positionX="45" positionY="189" width="128" height="285"/> + <element name="Building" positionX="0" positionY="45" width="128" height="90"/> + <element name="Company" positionX="18" positionY="63" width="128" height="90"/> + <element name="KeyPath" positionX="9" positionY="153" width="128" height="105"/> + <element name="Market" positionX="-45" positionY="0" width="128" height="75"/> + <element name="Note" positionX="9" positionY="54" width="128" height="105"/> + <element name="Park" positionX="27" positionY="72" width="128" height="75"/> + <element name="Recursive" positionX="45" positionY="90" width="128" height="90"/> + <element name="Room" positionX="27" positionY="72" width="128" height="75"/> + <element name="User" positionX="9" positionY="54" width="128" height="345"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/Models/Ordered.xcdatamodeld/Ordered.xcdatamodel/contents b/Tests/SyncPropertyMapper/Models/Ordered.xcdatamodeld/Ordered.xcdatamodel/contents new file mode 100644 index 00000000..41134017 --- /dev/null +++ b/Tests/SyncPropertyMapper/Models/Ordered.xcdatamodeld/Ordered.xcdatamodel/contents @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier=""> + <entity name="OrderedNote" representedClassName="OrderedNote" syncable="YES"> + <attribute name="destroy" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" usesScalarValueType="NO" syncable="YES"/> + <attribute name="text" optional="YES" attributeType="String" syncable="YES"/> + <relationship name="user" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OrderedUser" inverseName="notes" inverseEntity="OrderedUser" syncable="YES"/> + </entity> + <entity name="OrderedUser" representedClassName="OrderedUser" syncable="YES"> + <attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="age_of_person"/> + </userInfo> + </attribute> + <attribute name="birthDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <attribute name="contractID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="createdAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <attribute name="driverIdentifier" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="driver_identifier_str"/> + </userInfo> + </attribute> + <attribute name="expenses" optional="YES" attributeType="Binary" syncable="YES"/> + <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="hobbies" optional="YES" attributeType="Binary" syncable="YES"/> + <attribute name="ignoredParameter" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="ignoreTransformable" optional="YES" attributeType="Transformable" syncable="YES"/> + <attribute name="lastName" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="numberOfAttendes" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="orderedUserDescription" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="orderedUserType" optional="YES" attributeType="String" syncable="YES"/> + <attribute name="rawSigned" optional="YES" attributeType="String" syncable="YES"> + <userInfo> + <entry key="hyper.remoteKey" value="signed"/> + </userInfo> + </attribute> + <attribute name="registeredTransformable" optional="YES" attributeType="Transformable" valueTransformerName="DateStringTransformer" syncable="YES"/> + <attribute name="remoteID" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/> + <attribute name="updatedAt" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/> + <relationship name="notes" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="OrderedNote" inverseName="user" inverseEntity="OrderedNote" syncable="YES"/> + </entity> + <elements> + <element name="OrderedNote" positionX="-63" positionY="-18" width="128" height="105"/> + <element name="OrderedUser" positionX="-54" positionY="-9" width="128" height="330"/> + </elements> +</model> \ No newline at end of file diff --git a/Tests/SyncPropertyMapper/SyncDictionaryTests.m b/Tests/SyncPropertyMapper/SyncDictionaryTests.m new file mode 100755 index 00000000..d5ad5fd8 --- /dev/null +++ b/Tests/SyncPropertyMapper/SyncDictionaryTests.m @@ -0,0 +1,398 @@ +@import CoreData; +@import XCTest; +@import Sync; + +#import "SyncPropertyMapper.h" +#import "SyncTestValueTransformer.h" + + +@interface SyncDictionaryTests : XCTestCase + +@property (nonatomic) NSDate *testDate; + +@end + +@implementation SyncDictionaryTests + +- (NSDate *)testDate { + if (!_testDate) { + _testDate = [NSDate date]; + } + + return _testDate; +} + +#pragma mark - Set up + +- (DataStack *)dataStack { + return [[DataStack alloc] initWithModelName:@"Model" + bundle:[NSBundle bundleForClass:[self class]] + storeType:DataStackStoreTypeInMemory]; +} + +- (id)entityNamed:(NSString *)entityName inContext:(NSManagedObjectContext *)context { + return [NSEntityDescription insertNewObjectForEntityForName:entityName + inManagedObjectContext:context]; +} + +- (NSManagedObject *)userUsingDataStack:(DataStack *)dataStack { + NSManagedObject *user = [self entityNamed:@"User" inContext:dataStack.mainContext]; + [user setValue:@25 forKey:@"age"]; + [user setValue:self.testDate forKey:@"birthDate"]; + [user setValue:@235 forKey:@"contractID"]; + [user setValue:@"ABC8283" forKey:@"driverIdentifier"]; + [user setValue:@"John" forKey:@"firstName"]; + [user setValue:@"Hyperseed" forKey:@"lastName"]; + [user setValue:@"John Description" forKey:@"userDescription"]; + [user setValue:@111 forKey:@"remoteID"]; + [user setValue:@"Manager" forKey:@"userType"]; + [user setValue:self.testDate forKey:@"createdAt"]; + [user setValue:self.testDate forKey:@"updatedAt"]; + [user setValue:@30 forKey:@"numberOfAttendes"]; + [user setValue:@"raw" forKey:@"rawSigned"]; + + NSData *hobbies = [NSKeyedArchiver archivedDataWithRootObject:@[@"Football", + @"Soccer", + @"Code", + @"More code"]]; + [user setValue:hobbies forKey:@"hobbies"]; + + NSData *expenses = [NSKeyedArchiver archivedDataWithRootObject:@{@"cake" : @12.50, + @"juice" : @0.50}]; + [user setValue:expenses forKey:@"expenses"]; + + NSManagedObject *note = [self noteWithID:@1 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + + note = [self noteWithID:@14 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + [note setValue:@YES forKey:@"destroy"]; + + note = [self noteWithID:@7 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + + NSManagedObject *company = [self companyWithID:@1 andName:@"Facebook" inContext:dataStack.mainContext]; + [company setValue:user forKey:@"user"]; + + return user; +} + +- (NSManagedObject *)noteWithID:(NSNumber *)remoteID + inContext:(NSManagedObjectContext *)context { + NSManagedObject *note = [self entityNamed:@"Note" inContext:context]; + [note setValue:remoteID forKey:@"remoteID"]; + [note setValue:[NSString stringWithFormat:@"This is the text for the note %@", remoteID] forKey:@"text"]; + + return note; +} + +- (NSManagedObject *)orderedNoteWithID:(NSNumber *)remoteID + inContext:(NSManagedObjectContext *)context { + NSManagedObject *note = [self entityNamed:@"OrderedNote" inContext:context]; + [note setValue:remoteID forKey:@"remoteID"]; + [note setValue:[NSString stringWithFormat:@"This is the text for the note %@", remoteID] forKey:@"text"]; + + return note; +} + +- (NSManagedObject *)companyWithID:(NSNumber *)remoteID + andName:(NSString *)name + inContext:(NSManagedObjectContext *)context { + NSManagedObject *company = [self entityNamed:@"Company" inContext:context]; + [company setValue:remoteID forKey:@"remoteID"]; + [company setValue:name forKey:@"name"]; + + return company; +} + +#pragma mark - hyp_dictionary + +- (NSDictionary *)userDictionaryWithNoRelationships { + NSDateFormatter *formatter = [NSDateFormatter new]; + formatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]; + formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ssZZZZZ"; + NSString *resultDateString = [formatter stringFromDate:self.testDate]; + + NSMutableDictionary *comparedDictionary = [NSMutableDictionary new]; + comparedDictionary[@"age_of_person"] = @25; + comparedDictionary[@"birth_date"] = resultDateString; + comparedDictionary[@"contract_id"] = @235; + comparedDictionary[@"created_at"] = resultDateString; + comparedDictionary[@"description"] = @"John Description"; + comparedDictionary[@"driver_identifier_str"] = @"ABC8283"; + comparedDictionary[@"expenses"] = [NSKeyedArchiver archivedDataWithRootObject:@{@"cake" : @12.50, + @"juice" : @0.50}]; + comparedDictionary[@"first_name"] = @"John"; + comparedDictionary[@"hobbies"] = [NSKeyedArchiver archivedDataWithRootObject:@[@"Football", + @"Soccer", + @"Code", + @"More code"]]; + comparedDictionary[@"id"] = @111; + comparedDictionary[@"ignored_parameter"] = [NSNull null]; + comparedDictionary[@"last_name"] = @"Hyperseed"; + comparedDictionary[@"number_of_attendes"] = @30; + comparedDictionary[@"type"] = @"Manager"; + comparedDictionary[@"updated_at"] = resultDateString; + comparedDictionary[@"signed"] = @"raw"; + + return [comparedDictionary copy]; +} + +- (void)testDictionaryNoRelationships { + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeNone]; + NSDictionary *comparedDictionary = [self userDictionaryWithNoRelationships]; + XCTAssertEqualObjects(dictionary, [comparedDictionary copy]); +} + +- (void)testDictionaryArrayRelationships { + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; + NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; + comparedDictionary[@"company"] = @{@"id" : @1, + @"name" : @"Facebook"}; + + NSArray *notes = dictionary[@"notes"]; + NSSortDescriptor *nameDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"id" ascending:YES]; + NSArray *sortedNotes = [notes sortedArrayUsingDescriptors:[NSArray arrayWithObject:nameDescriptor]]; + NSMutableDictionary *mutableDictionary = [dictionary mutableCopy]; + mutableDictionary[@"notes"] = sortedNotes; + dictionary = [mutableDictionary copy]; + + NSDictionary *note1 = @{@"destroy" : [NSNull null], + @"id" : @1, + @"text" : @"This is the text for the note 1"}; + NSDictionary *note2 = @{@"destroy" : [NSNull null], + @"id" : @7, + @"text" : @"This is the text for the note 7"}; + NSDictionary *note3 = @{@"destroy" : @1, + @"id" : @14, + @"text" : @"This is the text for the note 14"}; + comparedDictionary[@"notes"] = @[note1, note2, note3]; + + XCTAssertEqualObjects(dictionary, [comparedDictionary copy]); +} + +- (void)testDictionaryArrayRelationshipsOrdered { + DataStack *dataStack = [[DataStack alloc] initWithModelName:@"Ordered" + bundle:[NSBundle bundleForClass:[self class]] + storeType:DataStackStoreTypeInMemory]; + + NSManagedObject *user = [self entityNamed:@"OrderedUser" inContext:dataStack.mainContext]; + [user setValue:@"raw" forKey:@"rawSigned"]; + + [user setValue:@"raw" forKey:@"rawSigned"]; + [user setValue:@25 forKey:@"age"]; + [user setValue:self.testDate forKey:@"birthDate"]; + [user setValue:@235 forKey:@"contractID"]; + [user setValue:@"ABC8283" forKey:@"driverIdentifier"]; + [user setValue:@"John" forKey:@"firstName"]; + [user setValue:@"Hyperseed" forKey:@"lastName"]; + [user setValue:@"John Description" forKey:@"orderedUserDescription"]; + [user setValue:@111 forKey:@"remoteID"]; + [user setValue:@"Manager" forKey:@"orderedUserType"]; + [user setValue:self.testDate forKey:@"createdAt"]; + [user setValue:self.testDate forKey:@"updatedAt"]; + [user setValue:@30 forKey:@"numberOfAttendes"]; + + NSData *hobbies = [NSKeyedArchiver archivedDataWithRootObject:@[@"Football", + @"Soccer", + @"Code", + @"More code"]]; + [user setValue:hobbies forKey:@"hobbies"]; + + NSData *expenses = [NSKeyedArchiver archivedDataWithRootObject:@{@"cake" : @12.50, + @"juice" : @0.50}]; + [user setValue:expenses forKey:@"expenses"]; + + NSManagedObject *note = [self orderedNoteWithID:@1 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + + note = [self orderedNoteWithID:@14 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + [note setValue:@YES forKey:@"destroy"]; + + note = [self orderedNoteWithID:@7 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + + NSDictionary *dictionary = [user hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; + NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; + + NSArray *notes = dictionary[@"notes"]; + NSSortDescriptor *nameDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"id" ascending:YES]; + NSArray *sortedNotes = [notes sortedArrayUsingDescriptors:[NSArray arrayWithObject:nameDescriptor]]; + NSMutableDictionary *mutableDictionary = [dictionary mutableCopy]; + mutableDictionary[@"notes"] = sortedNotes; + dictionary = [mutableDictionary copy]; + + NSDictionary *note1 = @{@"destroy" : [NSNull null], + @"id" : @1, + @"text" : @"This is the text for the note 1"}; + NSDictionary *note2 = @{@"destroy" : [NSNull null], + @"id" : @7, + @"text" : @"This is the text for the note 7"}; + NSDictionary *note3 = @{@"destroy" : @1, + @"id" : @14, + @"text" : @"This is the text for the note 14"}; + comparedDictionary[@"notes"] = @[note1, note2, note3]; + + XCTAssertEqualObjects(dictionary, [comparedDictionary copy]); + + NSString *description = (NSString *)dictionary[@"description"]; + XCTAssertEqualObjects(description, @"John Description"); + + NSString *type = (NSString *)dictionary[@"type"]; + XCTAssertEqualObjects(type, @"Manager"); +} + +- (void)testDictionaryNestedRelationships { + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + NSDictionary *dictionary = [user hyp_dictionary]; + NSMutableDictionary *comparedDictionary = [[self userDictionaryWithNoRelationships] mutableCopy]; + comparedDictionary[@"company_attributes"] = @{@"id" : @1, + @"name" : @"Facebook"}; + + NSDictionary *notesDictionary = dictionary[@"notes_attributes"]; + NSArray *notes = notesDictionary.allValues; + NSSortDescriptor *nameDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"id" ascending:YES]; + NSArray *sortedNotes = [notes sortedArrayUsingDescriptors:[NSArray arrayWithObject:nameDescriptor]]; + NSMutableDictionary *mutableDictionary = [dictionary mutableCopy]; + mutableDictionary[@"notes_attributes"] = sortedNotes; + dictionary = [mutableDictionary copy]; + + NSDictionary *note1 = @{@"_destroy" : [NSNull null], + @"id" : @1, + @"text" : @"This is the text for the note 1"}; + NSDictionary *note2 = @{@"_destroy" : [NSNull null], + @"id" : @7, + @"text" : @"This is the text for the note 7"}; + NSDictionary *note3 = @{@"_destroy" : @1, + @"id" : @14, + @"text" : @"This is the text for the note 14"}; + comparedDictionary[@"notes_attributes"] = @[note1, note2, note3]; + + XCTAssertEqualObjects(dictionary, comparedDictionary); +} + +- (void)testDictionaryDeepRelationships { + DataStack *dataStack = [self dataStack]; + + NSManagedObject *building = [self entityNamed:@"Building" inContext:dataStack.mainContext]; + [building setValue:@1 forKey:@"remoteID"]; + + NSManagedObject *park = [self entityNamed:@"Park" inContext:dataStack.mainContext]; + [park setValue:@1 forKey:@"remoteID"]; + + NSMutableSet *parks = [building valueForKey:@"parks"]; + [parks addObject:park]; + [building setValue:parks forKey:@"parks"]; + + NSManagedObject *apartment = [self entityNamed:@"Apartment" inContext:dataStack.mainContext]; + [apartment setValue:@1 forKey:@"remoteID"]; + + NSManagedObject *room = [self entityNamed:@"Room" inContext:dataStack.mainContext]; + [room setValue:@1 forKey:@"remoteID"]; + + NSMutableSet *rooms = [apartment valueForKey:@"rooms"]; + [rooms addObject:room]; + [apartment setValue:rooms forKey:@"rooms"]; + + NSMutableSet *apartments = [building valueForKey:@"apartments"]; + [apartments addObject:apartment]; + [building setValue:apartments forKey:@"apartments"]; + + NSDictionary *buildingDictionary = [building hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; + NSMutableDictionary *compared = [NSMutableDictionary new]; + NSArray *roomsArray = @[@{@"id" : @1}]; + NSArray *apartmentsArray = @[@{@"id" : @1, + @"rooms" : roomsArray}]; + NSArray *parksArray = @[@{@"id" : @1}]; + compared[@"id"] = @1; + compared[@"apartments"] = apartmentsArray; + compared[@"parks"] = parksArray; + + XCTAssertEqualObjects(buildingDictionary, compared); +} + +- (void)testDictionaryValuesKindOfClass { + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + NSDictionary *dictionary = [user hyp_dictionary]; + + XCTAssertTrue([dictionary[@"age_of_person"] isKindOfClass:[NSNumber class]]); + + XCTAssertTrue([dictionary[@"birth_date"] isKindOfClass:[NSString class]]); + + XCTAssertTrue([dictionary[@"contract_id"] isKindOfClass:[NSNumber class]]); + + XCTAssertTrue([dictionary[@"created_at"] isKindOfClass:[NSString class]]); + + XCTAssertTrue([dictionary[@"description"] isKindOfClass:[NSString class]]); + + XCTAssertTrue([dictionary[@"driver_identifier_str"] isKindOfClass:[NSString class]]); + + XCTAssertTrue([dictionary[@"expenses"] isKindOfClass:[NSData class]]); + + XCTAssertTrue([dictionary[@"first_name"] isKindOfClass:[NSString class]]); + + XCTAssertTrue([dictionary[@"hobbies"] isKindOfClass:[NSData class]]); + + XCTAssertTrue([dictionary[@"id"] isKindOfClass:[NSNumber class]]); + + XCTAssertNil(dictionary[@"ignore_transformable"]); + + XCTAssertTrue([dictionary[@"ignored_parameter"] isKindOfClass:[NSNull class]]); + + XCTAssertTrue([dictionary[@"last_name"] isKindOfClass:[NSString class]]); + + XCTAssertTrue([dictionary[@"notes_attributes"] isKindOfClass:[NSDictionary class]]); + + XCTAssertTrue([dictionary[@"number_of_attendes"] isKindOfClass:[NSNumber class]]); + + XCTAssertTrue([dictionary[@"type"] isKindOfClass:[NSString class]]); + + XCTAssertTrue([dictionary[@"updated_at"] isKindOfClass:[NSString class]]); +} + +- (void)testRecursive { + DataStack *dataStack = [self dataStack]; + + NSManagedObject *megachild = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; + [megachild setValue:@"megachild" forKey:@"remoteID"]; + + NSManagedObject *grandchild = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; + [grandchild setValue:@"grandchild" forKey:@"remoteID"]; + + NSMutableSet *recursives = [grandchild valueForKey:@"recursives"]; + [recursives addObject:megachild]; + [grandchild setValue:recursives forKey:@"recursives"]; + [megachild setValue:grandchild forKey:@"recursive"]; + + NSManagedObject *child = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; + [child setValue:@"child" forKey:@"remoteID"]; + + recursives = [child valueForKey:@"recursives"]; + [recursives addObject:grandchild]; + [child setValue:recursives forKey:@"recursives"]; + [grandchild setValue:child forKey:@"recursive"]; + + NSManagedObject *parent = [self entityNamed:@"Recursive" inContext:dataStack.mainContext]; + [parent setValue:@"Parent" forKey:@"remoteID"]; + + recursives = [parent valueForKey:@"recursives"]; + [recursives addObject:child]; + [parent setValue:recursives forKey:@"recursives"]; + [child setValue:parent forKey:@"recursive"]; + + NSDictionary *dictionary = [parent hyp_dictionaryUsingRelationshipType:SyncPropertyMapperRelationshipTypeArray]; + NSArray *megachildArray = @[@{@"id" : @"megachild", @"recursives": @[]}]; + NSArray *grandchildArray = @[@{@"id" : @"grandchild", @"recursives": megachildArray}]; + NSArray *childArray = @[@{@"id" : @"child", @"recursives": grandchildArray}]; + NSDictionary *parentDictionary = @{@"id" : @"Parent", @"recursives" : childArray}; + XCTAssertEqualObjects(dictionary, parentDictionary); +} + +@end diff --git a/Tests/SyncPropertyMapper/SyncFillWithDictionaryTests.m b/Tests/SyncPropertyMapper/SyncFillWithDictionaryTests.m new file mode 100755 index 00000000..77f830f9 --- /dev/null +++ b/Tests/SyncPropertyMapper/SyncFillWithDictionaryTests.m @@ -0,0 +1,461 @@ +@import CoreData; +@import XCTest; +@import Sync; + +#import "SyncPropertyMapper.h" +#import "SyncTestValueTransformer.h" + +@interface SyncFillWithDictionaryTests : XCTestCase + +@property (nonatomic) NSDate *testDate; + +@end + +@implementation SyncFillWithDictionaryTests + +- (NSDate *)testDate { + if (!_testDate) { + _testDate = [NSDate date]; + } + + return _testDate; +} + +#pragma mark - Set up + +- (DataStack *)dataStack { + return [[DataStack alloc] initWithModelName:@"Model" + bundle:[NSBundle bundleForClass:[self class]] + storeType:DataStackStoreTypeInMemory]; +} + +- (id)entityNamed:(NSString *)entityName inContext:(NSManagedObjectContext *)context { + return [NSEntityDescription insertNewObjectForEntityForName:entityName + inManagedObjectContext:context]; +} + +- (NSManagedObject *)userUsingDataStack:(DataStack *)dataStack { + NSManagedObject *user = [self entityNamed:@"User" inContext:dataStack.mainContext]; + [user setValue:@25 forKey:@"age"]; + [user setValue:self.testDate forKey:@"birthDate"]; + [user setValue:@235 forKey:@"contractID"]; + [user setValue:@"ABC8283" forKey:@"driverIdentifier"]; + [user setValue:@"John" forKey:@"firstName"]; + [user setValue:@"Hyperseed" forKey:@"lastName"]; + [user setValue:@"John Description" forKey:@"userDescription"]; + [user setValue:@111 forKey:@"remoteID"]; + [user setValue:@"Manager" forKey:@"userType"]; + [user setValue:self.testDate forKey:@"createdAt"]; + [user setValue:self.testDate forKey:@"updatedAt"]; + [user setValue:@30 forKey:@"numberOfAttendes"]; + [user setValue:@"raw" forKey:@"rawSigned"]; + + NSData *hobbies = [NSKeyedArchiver archivedDataWithRootObject:@[@"Football", + @"Soccer", + @"Code", + @"More code"]]; + [user setValue:hobbies forKey:@"hobbies"]; + + NSData *expenses = [NSKeyedArchiver archivedDataWithRootObject:@{@"cake" : @12.50, + @"juice" : @0.50}]; + [user setValue:expenses forKey:@"expenses"]; + + NSManagedObject *note = [self noteWithID:@1 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + + note = [self noteWithID:@14 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + [note setValue:@YES forKey:@"destroy"]; + + note = [self noteWithID:@7 inContext:dataStack.mainContext]; + [note setValue:user forKey:@"user"]; + + NSManagedObject *company = [self companyWithID:@1 andName:@"Facebook" inContext:dataStack.mainContext]; + [company setValue:user forKey:@"user"]; + + return user; +} + +- (NSManagedObject *)noteWithID:(NSNumber *)remoteID + inContext:(NSManagedObjectContext *)context { + NSManagedObject *note = [self entityNamed:@"Note" inContext:context]; + [note setValue:remoteID forKey:@"remoteID"]; + [note setValue:[NSString stringWithFormat:@"This is the text for the note %@", remoteID] forKey:@"text"]; + + return note; +} + +- (NSManagedObject *)companyWithID:(NSNumber *)remoteID + andName:(NSString *)name + inContext:(NSManagedObjectContext *)context { + NSManagedObject *company = [self entityNamed:@"Company" inContext:context]; + [company setValue:remoteID forKey:@"remoteID"]; + [company setValue:name forKey:@"name"]; + + return company; +} + +#pragma mark - hyp_fillWithDictionary + +- (void)testAllAttributes { + NSDictionary *values = @{@"integer_string" : @"16", + @"integer16" : @16, + @"integer32" : @32, + @"integer64" : @64, + @"decimal_string" : @"12.2", + @"decimal" : @12.2, + @"double_value_string": @"12.2", + @"double_value": @12.2, + @"float_value_string" : @"12.2", + @"float_value" : @12.2, + @"string" : @"string", + @"boolean" : @YES, + @"binary_data" : @"Data", + @"transformable" : @"Ignore me, too", + @"custom_transformer_string" : @"Foo & bar"}; + + [NSValueTransformer setValueTransformer:[[SyncTestValueTransformer alloc] init] forName:@"SyncTestValueTransformer"]; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *attributes = [self entityNamed:@"Attribute" inContext:dataStack.mainContext]; + [attributes hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([attributes valueForKey:@"integerString"], @16); + XCTAssertEqualObjects([attributes valueForKey:@"integer16"], @16); + XCTAssertEqualObjects([attributes valueForKey:@"integer32"], @32); + XCTAssertEqualObjects([attributes valueForKey:@"integer64"], @64); + + XCTAssertEqualObjects([attributes valueForKey:@"decimalString"], [NSDecimalNumber decimalNumberWithString:@"12.2"]); + XCTAssertEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimalString"] class]), NSStringFromClass([NSDecimalNumber class])); + XCTAssertNotEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimalString"] class]), NSStringFromClass([NSNumber class])); + + XCTAssertEqualObjects([attributes valueForKey:@"decimal"], [NSDecimalNumber decimalNumberWithString:@"12.2"]); + XCTAssertEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimal"] class]), NSStringFromClass([NSDecimalNumber class])); + XCTAssertNotEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimal"] class]), NSStringFromClass([NSNumber class])); + + XCTAssertEqualObjects([attributes valueForKey:@"doubleValueString"], @12.2); + XCTAssertEqualObjects([attributes valueForKey:@"doubleValue"], @12.2); + XCTAssertEqualWithAccuracy([[attributes valueForKey:@"floatValueString"] longValue], [@12 longValue], 1.0); + XCTAssertEqualWithAccuracy([[attributes valueForKey:@"floatValue"] longValue], [@12 longValue], 1.0); + XCTAssertEqualObjects([attributes valueForKey:@"string"], @"string"); + XCTAssertEqualObjects([attributes valueForKey:@"boolean"], @YES); + XCTAssertEqualObjects([attributes valueForKey:@"binaryData"], [NSKeyedArchiver archivedDataWithRootObject:@"Data"]); + XCTAssertNil([attributes valueForKey:@"transformable"]); + XCTAssertEqualObjects([attributes valueForKey:@"customTransformerString"], @"Foo & bar"); +} + +- (void)testAllAttributesInCamelCase { + NSDictionary *values = @{@"integerString" : @"16", + @"integer16" : @16, + @"integer32" : @32, + @"integer64" : @64, + @"decimalString" : @"12.2", + @"decimal" : @12.2, + @"doubleValueString": @"12.2", + @"doubleValue": @12.2, + @"floatValueString" : @"12.2", + @"floatValue" : @12.2, + @"string" : @"string", + @"boolean" : @YES, + @"binaryData" : @"Data", + @"transformable" : @"Ignore me, too", + @"customTransformerString" : @"Foo & bar"}; + + [NSValueTransformer setValueTransformer:[[SyncTestValueTransformer alloc] init] forName:@"SyncTestValueTransformer"]; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *attributes = [self entityNamed:@"Attribute" inContext:dataStack.mainContext]; + [attributes hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([attributes valueForKey:@"integerString"], @16); + XCTAssertEqualObjects([attributes valueForKey:@"integer16"], @16); + XCTAssertEqualObjects([attributes valueForKey:@"integer32"], @32); + XCTAssertEqualObjects([attributes valueForKey:@"integer64"], @64); + + XCTAssertEqualObjects([attributes valueForKey:@"decimalString"], [NSDecimalNumber decimalNumberWithString:@"12.2"]); + XCTAssertEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimalString"] class]), NSStringFromClass([NSDecimalNumber class])); + XCTAssertNotEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimalString"] class]), NSStringFromClass([NSNumber class])); + + XCTAssertEqualObjects([attributes valueForKey:@"decimal"], [NSDecimalNumber decimalNumberWithString:@"12.2"]); + XCTAssertEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimal"] class]), NSStringFromClass([NSDecimalNumber class])); + XCTAssertNotEqualObjects(NSStringFromClass([[attributes valueForKey:@"decimal"] class]), NSStringFromClass([NSNumber class])); + + XCTAssertEqualObjects([attributes valueForKey:@"doubleValueString"], @12.2); + XCTAssertEqualObjects([attributes valueForKey:@"doubleValue"], @12.2); + XCTAssertEqualWithAccuracy([[attributes valueForKey:@"floatValueString"] longValue], [@12 longValue], 1.0); + XCTAssertEqualWithAccuracy([[attributes valueForKey:@"floatValue"] longValue], [@12 longValue], 1.0); + XCTAssertEqualObjects([attributes valueForKey:@"string"], @"string"); + XCTAssertEqualObjects([attributes valueForKey:@"boolean"], @YES); + XCTAssertEqualObjects([attributes valueForKey:@"binaryData"], [NSKeyedArchiver archivedDataWithRootObject:@"Data"]); + XCTAssertNil([attributes valueForKey:@"transformable"]); + XCTAssertEqualObjects([attributes valueForKey:@"customTransformerString"], @"Foo & bar"); +} + +- (void)testFillManagedObjectWithDictionary { + NSDictionary *values = @{@"first_name" : @"Jane", + @"last_name" : @"Hyperseed"}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([user valueForKey:@"firstName"], values[@"first_name"]); +} + +- (void)testUpdatingExistingValueWithNull { + NSDictionary *values = @{@"first_name" : @"Jane", + @"last_name" : @"Hyperseed"}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + NSDictionary *updatedValues = @{@"first_name" : [NSNull new], + @"last_name" : @"Hyperseed"}; + + [user hyp_fillWithDictionary:updatedValues]; + + XCTAssertNil([user valueForKey:@"firstName"]); +} + +- (void)testAgeNumber { + NSDictionary *values = @{@"age" : @24}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([user valueForKey:@"age"], values[@"age"]); +} + +- (void)testAgeString { + NSDictionary *values = @{@"age" : @"24"}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + NSNumberFormatter *formatter = [NSNumberFormatter new]; + NSNumber *age = [formatter numberFromString:values[@"age"]]; + + XCTAssertEqualObjects([user valueForKey:@"age"], age); +} + +- (void)testBornDate { + NSDictionary *values = @{@"birth_date" : @"1989-02-14T00:00:00+00:00"}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; + dateFormat.dateFormat = @"yyyy-MM-dd"; + dateFormat.timeZone = [NSTimeZone timeZoneWithName:@"GMT"]; + NSDate *date = [dateFormat dateFromString:@"1989-02-14"]; + + XCTAssertEqualObjects([user valueForKey:@"birthDate"], date); +} + +- (void)testUpdate { + NSDictionary *values = @{@"first_name" : @"Jane", + @"last_name" : @"Hyperseed", + @"age" : @30}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + NSDictionary *updatedValues = @{@"first_name" : @"Jeanet"}; + + [user hyp_fillWithDictionary:updatedValues]; + + XCTAssertEqualObjects([user valueForKey:@"firstName"], updatedValues[@"first_name"]); + + XCTAssertEqualObjects([user valueForKey:@"lastName"], values[@"last_name"]); +} + +- (void)testUpdateIgnoringEqualValues { + NSDictionary *values = @{@"first_name" : @"Jane", + @"last_name" : @"Hyperseed", + @"age" : @30}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + [user.managedObjectContext save:nil]; + + NSDictionary *updatedValues = @{@"first_name" : @"Jane", + @"last_name" : @"Hyperseed", + @"age" : @30}; + + [user hyp_fillWithDictionary:updatedValues]; + + XCTAssertFalse(user.hasChanges); +} + +- (void)testAcronyms { + NSDictionary *values = @{@"contract_id" : @100}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([user valueForKey:@"contractID"], @100); +} + +- (void)testArrayStorage { + NSDictionary *values = @{@"hobbies" : @[@"football", + @"soccer", + @"code"]}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"hobbies"]][0], @"football"); + + XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"hobbies"]][1], @"soccer"); + + XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"hobbies"]][2], @"code"); +} + +- (void)testDictionaryStorage { + NSDictionary *values = @{@"expenses" : @{@"cake" : @12.50, + @"juice" : @0.50}}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"expenses"]][@"cake"], @12.50); + + XCTAssertEqualObjects([NSKeyedUnarchiver unarchiveObjectWithData:[user valueForKey:@"expenses"]][@"juice"], @0.50); +} + +- (void)testReservedWords { + NSDictionary *values = @{@"id": @100, + @"description": @"This is the description?", + @"type": @"user type"}; + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([user valueForKey:@"remoteID"], @100); + XCTAssertEqualObjects([user valueForKey:@"userDescription"], @"This is the description?"); + XCTAssertEqualObjects([user valueForKey:@"userType"], @"user type"); +} + +- (void)testCreatedAt { + NSDictionary *values = @{@"created_at" : @"2014-01-01T00:00:00+00:00", + @"updated_at" : @"2014-01-02", + @"number_of_attendes": @20}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; + dateFormat.dateFormat = @"yyyy-MM-dd"; + dateFormat.timeZone = [NSTimeZone timeZoneWithName:@"GMT"]; + NSDate *createdAt = [dateFormat dateFromString:@"2014-01-01"]; + NSDate *updatedAt = [dateFormat dateFromString:@"2014-01-02"]; + + XCTAssertEqualObjects([user valueForKey:@"createdAt"], createdAt); + + XCTAssertEqualObjects([user valueForKey:@"updatedAt"], updatedAt); + + XCTAssertEqualObjects([user valueForKey:@"numberOfAttendes"], @20); +} + +- (void)testCustomRemoteKeys { + NSDictionary *values = @{@"age_of_person" : @20, + @"driver_identifier_str" : @"123", + @"signed" : @"salesman"}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([user valueForKey:@"age"], @20); + XCTAssertEqualObjects([user valueForKey:@"driverIdentifier"], @"123"); + XCTAssertEqualObjects([user valueForKey:@"rawSigned"], @"salesman"); +} + +- (void)testIgnoredTransformables { + NSDictionary *values = @{@"ignoreTransformable" : @"I'm going to be ignored"}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + XCTAssertNil([user valueForKey:@"ignoreTransformable"]); +} + +- (void)testRegisteredTransformables { + NSDictionary *values = @{@"registeredTransformable" : @"/Date(1451606400000)/"}; + + DataStack *dataStack = [self dataStack]; + NSManagedObject *user = [self userUsingDataStack:dataStack]; + [user hyp_fillWithDictionary:values]; + + NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; + dateFormat.dateFormat = @"yyyy-MM-dd"; + dateFormat.timeZone = [NSTimeZone timeZoneWithName:@"GMT"]; + NSDate *date = [dateFormat dateFromString:@"2016-01-01"]; + XCTAssertNotNil([user valueForKey:@"registeredTransformable"]); + XCTAssertEqualObjects([user valueForKey:@"registeredTransformable"], date); + XCTAssertTrue([[user valueForKey:@"registeredTransformable"] isKindOfClass:[NSDate class]]); +} + +- (void)testCustomKey { + DataStack *dataStack = [self dataStack]; + + NSDictionary *values = @{@"id": @"1", + @"other_attribute": @"Market 1"}; + + NSManagedObject *market = [self entityNamed:@"Market" inContext:dataStack.mainContext]; + + [market hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([market valueForKey:@"uniqueId"], @"1"); + XCTAssertEqualObjects([market valueForKey:@"otherAttribute"], @"Market 1"); +} + +- (void)testCustomKeyPathSnakeCase { + DataStack *dataStack = [self dataStack]; + + NSDictionary *values = @{@"snake_parent": @{ + @"value_one": @"Value 1", + @"depth_one": @{ + @"depth_two": @"Value 2" } + } + }; + + NSManagedObject *keyPaths = [self entityNamed:@"KeyPath" inContext:dataStack.mainContext]; + + [keyPaths hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([keyPaths valueForKey:@"snakeCaseDepthOne"], @"Value 1"); + XCTAssertEqualObjects([keyPaths valueForKey:@"snakeCaseDepthTwo"], @"Value 2"); +} + +- (void)testCustomKeyPathCamelCase { + DataStack *dataStack = [self dataStack]; + + NSDictionary *values = @{@"camelParent": @{ + @"valueOne": @"Value 1", + @"depthOne": @{ + @"depthTwo": @"Value 2" } + } + }; + + NSManagedObject *keyPaths = [self entityNamed:@"KeyPath" inContext:dataStack.mainContext]; + + [keyPaths hyp_fillWithDictionary:values]; + + XCTAssertEqualObjects([keyPaths valueForKey:@"camelCaseDepthOne"], @"Value 1"); + XCTAssertEqualObjects([keyPaths valueForKey:@"camelCaseDepthTwo"], @"Value 2"); +} + +@end diff --git a/Tests/SyncPropertyMapper/Transformers/BadAPIValueTransformer.swift b/Tests/SyncPropertyMapper/Transformers/BadAPIValueTransformer.swift new file mode 100755 index 00000000..ceaaa1b9 --- /dev/null +++ b/Tests/SyncPropertyMapper/Transformers/BadAPIValueTransformer.swift @@ -0,0 +1,27 @@ +import Foundation + +class BadAPIValueTransformer : ValueTransformer { + override class func transformedValueClass() -> AnyClass { + return String.self as! AnyClass + } + + override class func allowsReverseTransformation() -> Bool { + return true + } + + // Used to transform before inserting into Core Data using `hyp_fill(with:) + override func transformedValue(_ value: Any?) -> Any? { + guard let valueToTransform = value as? Array<String> else { + return value + } + + return valueToTransform.first! + } + + // Used to transform before exporting into JSON using `hyp_dictionary` + override func reverseTransformedValue(_ value: Any?) -> Any? { + guard let stringValue = value as? String else { return value } + + return [stringValue] + } +} diff --git a/Tests/SyncPropertyMapper/Transformers/DateStringTransformer.h b/Tests/SyncPropertyMapper/Transformers/DateStringTransformer.h new file mode 100755 index 00000000..7fd1227e --- /dev/null +++ b/Tests/SyncPropertyMapper/Transformers/DateStringTransformer.h @@ -0,0 +1,8 @@ +@import Foundation; + +/** + This class is transforming "/Date(1460537233000)/" string into an NSDate object that can be stored in Core Data + */ +@interface DateStringTransformer : NSValueTransformer + +@end diff --git a/Tests/SyncPropertyMapper/Transformers/DateStringTransformer.m b/Tests/SyncPropertyMapper/Transformers/DateStringTransformer.m new file mode 100755 index 00000000..40242457 --- /dev/null +++ b/Tests/SyncPropertyMapper/Transformers/DateStringTransformer.m @@ -0,0 +1,26 @@ +#import "DateStringTransformer.h" + +@implementation DateStringTransformer + ++ (Class) transformedValueClass { + return [NSDate class]; +} + ++ (BOOL)allowsReverseTransformation { + return NO; +} + +- (nullable id)transformedValue:(nullable id)value { + if ([value isKindOfClass:[NSString class]]) { + // in this example string should be of "/Date(1460537233000)/" format + NSString *intStr = [[(NSString*)value stringByReplacingOccurrencesOfString:@"/Date(" withString:@""] stringByReplacingOccurrencesOfString:@")/" withString:@""]; + NSInteger timestampMS = [intStr integerValue]; + float timestamp = timestampMS / 1000.0; + NSDate *date = [[NSDate alloc] initWithTimeIntervalSince1970:timestamp]; + return date; + } else { + return value; + } +} + +@end diff --git a/Tests/SyncPropertyMapper/Transformers/SyncTestValueTransformer.h b/Tests/SyncPropertyMapper/Transformers/SyncTestValueTransformer.h new file mode 100755 index 00000000..9ae32ca4 --- /dev/null +++ b/Tests/SyncPropertyMapper/Transformers/SyncTestValueTransformer.h @@ -0,0 +1,5 @@ +@import Foundation; + +@interface SyncTestValueTransformer : NSValueTransformer + +@end diff --git a/Tests/SyncPropertyMapper/Transformers/SyncTestValueTransformer.m b/Tests/SyncPropertyMapper/Transformers/SyncTestValueTransformer.m new file mode 100755 index 00000000..8c331fc4 --- /dev/null +++ b/Tests/SyncPropertyMapper/Transformers/SyncTestValueTransformer.m @@ -0,0 +1,43 @@ +#import "SyncTestValueTransformer.h" + +@implementation SyncTestValueTransformer + ++ (Class)transformedValueClass { + return [NSString class]; +} + ++ (BOOL)allowsReverseTransformation { + return YES; +} + +- (id)transformedValue:(id)value { + if (value == nil) return nil; + + NSString *stringValue = nil; + + if ([value isKindOfClass:[NSString class]]) { + stringValue = (NSString *)value; + } else { + [NSException raise:NSInternalInconsistencyException + format:@"Value (%@) is not of type NSString.", [value class]]; + } + + return [stringValue stringByReplacingOccurrencesOfString:@"&" withString:@"&"]; +} + +- (id)reverseTransformedValue:(id)value { + if (value == nil) return nil; + + NSString *stringValue = nil; + + if ([value isKindOfClass:[NSString class]]) { + stringValue = (NSString *)value; + } else { + [NSException raise:NSInternalInconsistencyException + format:@"Value (%@) is not of type NSString.", [value class]]; + } + + return [stringValue stringByReplacingOccurrencesOfString:@"&" withString:@"&"]; +} + +@end diff --git a/Tests/TestCheck/TestCheckTests.swift b/Tests/TestCheck/TestCheckTests.swift new file mode 100755 index 00000000..ee7e3ce6 --- /dev/null +++ b/Tests/TestCheck/TestCheckTests.swift @@ -0,0 +1,8 @@ +import XCTest +import Sync + +class TestCheckTests: XCTestCase { + func testIsRunning() { + XCTAssertTrue(TestCheck.isTesting) + } +} diff --git a/Tests/Vendor/JSON.swift b/Tests/Vendor/JSON.swift new file mode 100755 index 00000000..51d30dfc --- /dev/null +++ b/Tests/Vendor/JSON.swift @@ -0,0 +1,43 @@ +import Foundation + +/// The ParsingError codes generated by JSON. +public enum ParsingError: Error { + case notFound, failed +} + +public class JSON { + /** + Returns a JSON object from a file. + - parameter fileName: The name of the file, the expected extension is `.json`. + - parameter bundle: The NSBundle where the file is located, by default is the main bundle. + - returns: A JSON object, it can be either a Dictionary or an Array. + */ + public class func from(_ fileName: String, bundle: Bundle = Bundle.main) throws -> Any? { + var JSON: Any? + + guard let url = URL(string: fileName), let filePath = bundle.path(forResource: url.deletingPathExtension().absoluteString, ofType: url.pathExtension) else { throw ParsingError.notFound } + + guard let data = try? Data(contentsOf: URL(fileURLWithPath: filePath)) else { throw ParsingError.failed } + + JSON = try data.toJSON() + + return JSON + } +} + +public extension Data { + /** + Converts NSData to a JSON object. + - returns: A JSON object, it can be either a Dictionary or an Array. + */ + public func toJSON() throws -> Any? { + var JSON: Any? + do { + JSON = try JSONSerialization.jsonObject(with: self, options: []) as Any + } catch { + throw ParsingError.failed + } + + return JSON + } +}