All test frameworks come with at least simple matching capabilities, though the syntax, usage and breadth of coverage may differ. Most frameworks also provide a mechanism to create and use "custom" matchers.
Questions tagged [argument-matcher]
19 questions
0
votes
1 answer
How can I mock this argument matchers?
I'm trying to mock a reponse from a protected method and I'm getting this error:
Invalid use of argument matchers!
1 matchers expected, 2 recorded:
This is the code:
@Test
public void updateClientSettings() {
String clientId =…

Francisco Noguera
- 17
- 1
- 3
0
votes
1 answer
Map is not getting populated for ArgumentMatcher object
I am trying to mock an external call along with an ArgumentMatcher to match the input values to the request. But when I trying to fetch the map from the ArgumentMatcher object, it gives me a null value.
Mockito.when(
…

mshikher
- 174
- 3
- 20
0
votes
2 answers
Rspec Matcher for "any_one_of"?
A Ruby spec defines 3 instance_doubles:
let(:doub1) { instance_double(Foo) }
let(:doub2) { instance_double(Foo) }
let(:doub3) { instance_double(Foo) }
A shared_example seeks to ensure a collaborator is used with any of the…

Todd R
- 18,236
- 8
- 31
- 39
0
votes
2 answers
mockito - how to check an instance inside a method
I am new to Mockito, I am trying to verify the attributes of an object which gets created inside a method.
pseudo code below:
class A{
...
public String methodToTest(){
Parameter params = new Parameter(); //param is basically like a…

user3808203
- 153
- 2
- 12