Skip to content

Commit

Permalink
Extra test for automatic property mapping with key cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
evermeer committed Dec 11, 2015
1 parent 20b083d commit 474851a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions EVReflection/EVReflectionTests/EVReflectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ class EVReflectionTests: XCTestCase {
let x = TestObject2c(dictionary: ["objectValue": "tst", "default":"default"])
XCTAssertEqual(x.objectValue, "tst", "objectValue should have been set")
XCTAssertEqual(x._default, "default", "default should have been set")
let json = x.toJsonString(true)
XCTAssertTrue(!json.containsString("_default"), "Key should have been cleaned up")

let y = EVReflection.fromDictionary(["a":"b"], anyobjectTypeString: "NotExistingClassName")
XCTAssertNil(y, "Class is unknow, so we should not have an instance")
Expand Down

0 comments on commit 474851a

Please sign in to comment.