0

I read from Jmock's homepage about matchers, and at the very top there was an example about string matchers. I didn't understand because, according to the example, matching a string would be as easy as writing import static org.hamcrest.Matchers.*; and then using the stringContains function, but that doesn't work on my implementation.

All I want to do is

new Expectations() {{
  mockedType.someFunction(with(   **match string here**    ) );
}};
Adam Miller
  • 1,756
  • 1
  • 25
  • 44

1 Answers1

0
new Expectations() {{
    allowing(mockedType).someFunction("My String"); when  ... ; will ... ; then ...
}};

Must be working

Baptiste Gousset
  • 251
  • 2
  • 16