Skip to content

Commit fe30a02

Browse files
committed
Updated unit tests
1 parent 1a6d322 commit fe30a02

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

Tests/CoreModelTests/TestModel.swift

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,6 @@ extension Person: Entity {
9494
self.age = try container.decode(UInt.self, forKey: Person.CodingKeys.age)
9595
self.events = try container.decodeRelationship([Event.ID].self, forKey: Person.CodingKeys.events)
9696
}
97-
98-
func encode() -> ModelData {
99-
100-
var container = ModelData(
101-
entity: Self.entityName,
102-
id: ObjectID(rawValue: self.id.description)
103-
)
104-
container.encode(self.name, forKey: Person.CodingKeys.name)
105-
container.encode(self.created, forKey: Person.CodingKeys.created)
106-
container.encode(self.age, forKey: Person.CodingKeys.age)
107-
container.encodeRelationship(self.events, forKey: Person.CodingKeys.events)
108-
return container
109-
}
11097
}
11198

11299
struct Event: Equatable, Hashable, Codable, Identifiable {
@@ -190,16 +177,4 @@ extension Event: Entity {
190177
self.date = try container.decode(Date.self, forKey: Event.CodingKeys.date)
191178
self.people = try container.decodeRelationship([Person.ID].self, forKey: Event.CodingKeys.people)
192179
}
193-
194-
func encode() -> ModelData {
195-
196-
var container = ModelData(
197-
entity: Self.entityName,
198-
id: ObjectID(rawValue: self.id.description)
199-
)
200-
container.encode(self.name, forKey: Event.CodingKeys.name)
201-
container.encode(self.date, forKey: Event.CodingKeys.date)
202-
container.encodeRelationship(self.people, forKey: Event.CodingKeys.people)
203-
return container
204-
}
205180
}

0 commit comments

Comments
 (0)