Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Property doesn't work per method in Kotlintest #117

Closed
alvarosanchez opened this issue Feb 10, 2020 · 0 comments · Fixed by #108
Closed

@Property doesn't work per method in Kotlintest #117

alvarosanchez opened this issue Feb 10, 2020 · 0 comments · Fixed by #108
Assignees
Labels
type: bug Something isn't working

Comments

@alvarosanchez
Copy link
Member

This was discovered while fixing #91.

Given this test:

@MicronautTest
@Property(name = "foo.bar", value = "stuff")
class PropertyValueTest(@Property(name = "foo.bar") val value: String): AnnotationSpec() {

    @Test
    fun testInitialValue() {
        value shouldBe "stuff"
    }

    @Property(name = "foo.bar", value = "changed")
    @Test
    fun testValueChanged() {
        value shouldBe "changed"
    }

    @Test
    fun testValueRestored() {
        value shouldBe "stuff"
    }
}

testValueChanged() fails with:

org.opentest4j.AssertionFailedError: expected: "changed" but was: "stuff"
Expected :"changed"
Actual   :"stuff"
alvarosanchez added a commit that referenced this issue Feb 10, 2020
@alvarosanchez alvarosanchez self-assigned this Feb 10, 2020
@alvarosanchez alvarosanchez linked a pull request Feb 10, 2020 that will close this issue
alvarosanchez added a commit that referenced this issue Feb 11, 2020
alvarosanchez added a commit that referenced this issue Feb 11, 2020
@alvarosanchez alvarosanchez added type: bug Something isn't working and removed bug labels Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant