Skip to content

IllegalArgumentException in withCapture(List) #307

@krororo

Description

@krororo

Please provide the following information:

  • Version of JMockit that was used:
    1.25
  • Description of the problem or enhancement request:

example code

    public class Hoge {
        public void foo(List<String> arg) {
            return;
        }
    }

    @Test
    public void testSample(@Mocked final Hoge mock) {
        mock.foo(Arrays.asList("a", "b", "c"));
        mock.foo(Arrays.asList("d", "e", "f"));

        new Verifications() { {
            List<List<String>> actual = new ArrayList<>();

            mock.foo(withCapture(actual));

            assertThat(actual.get(0), contains("a", "b", "c"));
            assertThat(actual.get(1), contains("d", "e", "f"));
        } };
    }

It works on 1.24. But on 1.25, java.lang.IllegalArgumentException: No class with name "java.util.List<Ljava.lang.String" found occurred.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions