Skip to content

Simplified argument captor API (originally #242)#254

Merged
nhaarman merged 1 commit into
2.xfrom
igorwojda-1.x
May 10, 2018
Merged

Simplified argument captor API (originally #242)#254
nhaarman merged 1 commit into
2.xfrom
igorwojda-1.x

Conversation

@nhaarman

Copy link
Copy Markdown
Contributor

This will simplify ArgumentCaptor code

        //old (still working)
        argumentCaptor<String>().apply {
            verify(mailRepository).sendEmail(capture())
            firstValue shouldEqual "A"
        }

        nullableArgumentCaptor<String>().apply {
            firstValue shouldEqual null
        }

        // new simplified overload usage
       argumentCaptor<String> {
            verify(mailRepository).sendEmail(capture())
            firstValue shouldEqual "A"
        }

        nullableArgumentCaptor<String> {
            firstValue shouldEqual null
        }

This is a fixed version of #242, rebased onto 2.x.

@nhaarman nhaarman merged commit bbbcef9 into 2.x May 10, 2018
@nhaarman nhaarman deleted the igorwojda-1.x branch May 10, 2018 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants