A library to compare classes
Example
data class User(
val name: String,
val birthdate: Instant
)
val birthdate = Instant.now()
val user1 = UserTest("stefano", Instant.now())
val user2 = UserTest("stefano", Instant.now())
// Define the fields to exclude in the compare
val compareLogicConfig = CompareLogicConfig()
.addMemberToIgnore("birthdate")
// Create che compare
val compareLogic = CompareLogic(compareLogicConfig)
// compare the 2 elements
val result = compareLogic.compare(user1, user2)
assertTrue(result.result())