Skip to content

Commit

Permalink
Add a test for attributeValueClassName
Browse files Browse the repository at this point in the history
CoreData itself sets this to the Foundation type.
Which then later fails on loads?
  • Loading branch information
helje5 committed Oct 7, 2023
1 parent a971db3 commit 86720f5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Tests/ManagedModelTests/CoreDataAssumptionsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,20 @@ final class CoreDataAssumptionsTests: XCTestCase {
XCTAssertEqual(relationship.isOrdered, copiedRelationship.isOrdered)
XCTAssertEqual(relationship.maxCount, copiedRelationship.maxCount)
}


func testAttributeValueClassIsNotEmpty() throws {
do {
let attribute = NSAttributeDescription()
attribute.name = "Hello"
attribute.attributeType = .stringAttributeType
XCTAssertEqual(attribute.attributeValueClassName, "NSString")
}
do {
let attribute = NSAttributeDescription()
attribute.name = "Hello"
attribute.attributeType = .integer16AttributeType
XCTAssertEqual(attribute.attributeValueClassName, "NSNumber")
}
}
}

0 comments on commit 86720f5

Please sign in to comment.