Skip to content

Commit

Permalink
Add more mappings to test
Browse files Browse the repository at this point in the history
  • Loading branch information
3lvis committed Apr 9, 2016
1 parent c47c744 commit 7964f41
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Tests/JSONs/camelcase.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{
"id": "1",
"numberOfChildren": 1,
"fullName": "Elvis"
"fullName": "Elvis Nuñez",
"first_name": "Elvis",
"last_name": "Nuñez"
}
]
Original file line number Diff line number Diff line change
@@ -1,11 +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="90"/>
<element name="NormalUser" positionX="234" positionY="164" width="128" height="120"/>
</elements>
</model>
4 changes: 4 additions & 0 deletions Tests/SyncTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class SyncTests: XCTestCase {
XCTAssertEqual(result.count, 1)

let first = result.first!
XCTAssertEqual(first.valueForKey("etternavn") as? String, "Nuñez")
XCTAssertEqual(first.valueForKey("firstName") as? String, "Elvis")
XCTAssertEqual(first.valueForKey("fullName") as? String, "Elvis Nuñez")
XCTAssertEqual(first.valueForKey("numberOfChildren") as? Int, 1)
XCTAssertEqual(first.valueForKey("remoteID") as? String, "1")

dataStack.drop()
Expand Down

0 comments on commit 7964f41

Please sign in to comment.