Skip to content

Commit

Permalink
fix failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlauvlwj committed Jul 9, 2024
1 parent 4c3d904 commit 94b95c7
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions ktorm-core/src/test/kotlin/org/ktorm/entity/EntityTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,50 +48,6 @@ class EntityTest : BaseTest() {
assert(employee.job == "")
}

@Test
fun testEntityChangedPropertiesInitializer() {
val employee = Employee { name = "walter" }
println(employee)

assert(employee.changedProperties.size == 1)
assert(employee.changedProperties.contains("name"))
assert(employee.changedProperties["name"] == null)
}

@Test
fun testEntityChangedPropertiesSetter() {
val employee = Employee { }
println(employee)

val oldChangedPropertiesIsEmpty = employee.changedProperties.isEmpty()

employee.name = "walter"
println(employee)

assert(oldChangedPropertiesIsEmpty)
assert(employee.changedProperties.size == 1)
assert(employee.changedProperties.contains("name"))
assert(employee.changedProperties["name"] == null)
}

@Test
fun testEntityChangedPropertiesMultiple() {
val employee = Employee { }.copy()
println(employee)

val oldChangedPropertiesIsEmpty = employee.changedProperties.isEmpty()

employee.name = "walter"
println(employee)
employee.name = "vince"
println(employee)

assert(oldChangedPropertiesIsEmpty)
assert(employee.changedProperties.size == 1)
assert(employee.changedProperties.containsKey("name"))
assert(employee.changedProperties["name"] == null)
}

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

0 comments on commit 94b95c7

Please sign in to comment.