File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
main/kotlin/com/ctrlhub/core
test/kotlin/com/ctrlhub/core/iam Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,6 @@ package com.ctrlhub.core.api
4
4
* An interface that represents any entity that can be assigned
5
5
* to something such as a vehicle or equipment
6
6
*/
7
- interface Assignable
7
+ interface Assignable {
8
+ var id: String?
9
+ }
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ import com.github.jasminb.jsonapi.annotations.Type
10
10
@Type(" users" )
11
11
class User : Assignable {
12
12
@Id(StringIdHandler ::class )
13
- lateinit var id: String
14
- lateinit var email: String
15
- lateinit var profile: Profile
16
- lateinit var identities: List <Identity >
13
+ override var id: String? = null
14
+ var email: String? = null
15
+ var profile: Profile ? = null
16
+ var identities: List <Identity > = emptyList()
17
17
}
18
18
19
19
class Identity {
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ class IamRouterTest {
34
34
assertIs<User >(response)
35
35
assertEquals(" 00000000-0000-0000-0000-000000000000" , response.id)
36
36
assertEquals(
" [email protected] " , response.email)
37
- assertEquals(" Test" , response.profile.personal?.firstName)
38
- assertEquals(" User" , response.profile.personal?.lastName)
37
+ assertEquals(" Test" , response.profile? .personal?.firstName)
38
+ assertEquals(" User" , response.profile? .personal?.lastName)
39
39
}
40
40
}
41
41
}
You can’t perform that action at this time.
0 commit comments