Skip to content

Commit

Permalink
test equals
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlauvlwj committed Jan 16, 2023
1 parent cdbb6ce commit 55ebee0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ktorm-core/src/test/kotlin/org/ktorm/entity/EntityTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ class EntityTest : BaseTest() {
assert(employee.job == "")
}

@Test
fun testEquals() {
val e1 = Employee {
id = 1
name = "vince"
}

val e2 = Employee {
id = 1
name = "vince"
manager = null
}

println(e1)
println(e2)
assert(e1 == e2)
}

@Test
fun testDefaultMethod() {
for (method in Employee::class.java.methods) {
Expand Down

0 comments on commit 55ebee0

Please sign in to comment.