Skip to content

isDataClassEqualTo on different data objects does not fail #581

Description

@robmeeuwisse

AssertK version 0.28.1

When asserting different data objects with isDataClassEqualTo the test should fail, but instead it passes.
See demonstation below:

class IsDataClassEqualToTest {

    data object Foo
    data object Bar

    @Test
    fun `Asserting different data objects should fail`() {
        runCatching {
            assertThat(Foo).isDataClassEqualTo(Bar)
        }.onSuccess { fail("Different data objects should not be data class equal") }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions