Skip to content

ArgCaptor results in NullPointerException when trying to access value #60

@michael-camacho

Description

@michael-camacho

My code is of the form:

val thingsCaptor = ArgCaptor[Seq[Thing]]
verify(someMock).doStuff(thingsCaptor)

When I try to access the value in any way, even by doing a toSeq, I get a NullPointerException. I know that something should be captured, since I can get a valid value if I use the standard Mockito ArgumentCaptor.forClass approach.

It's a shame, because I really like the new syntax. :)

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