Revision 45126
Added by Claudio Atzori over 7 years ago
NotificationTriggerImplTest.java | ||
---|---|---|
16 | 16 |
import org.junit.runner.RunWith; |
17 | 17 |
import org.mockito.ArgumentMatcher; |
18 | 18 |
import org.mockito.Mock; |
19 |
import org.mockito.runners.MockitoJUnit44Runner;
|
|
19 |
import org.mockito.junit.MockitoJUnitRunner;
|
|
20 | 20 |
import org.w3c.dom.Document; |
21 | 21 |
import org.xml.sax.InputSource; |
22 | 22 |
import org.xml.sax.SAXException; |
... | ... | |
30 | 30 |
* @author marko |
31 | 31 |
* |
32 | 32 |
*/ |
33 |
@RunWith(MockitoJUnit44Runner.class)
|
|
33 |
@RunWith(MockitoJUnitRunner.class) |
|
34 | 34 |
public class NotificationTriggerImplTest { |
35 | 35 |
|
36 | 36 |
/** |
... | ... | |
39 | 39 |
* @author marko |
40 | 40 |
* |
41 | 41 |
*/ |
42 |
private static final class MatchResource extends ArgumentMatcher<OpaqueResource> {
|
|
42 |
private static final class MatchResource implements ArgumentMatcher<OpaqueResource> {
|
|
43 | 43 |
/** |
44 | 44 |
* {@inheritDoc} |
45 | 45 |
* |
46 | 46 |
* @see org.mockito.ArgumentMatcher#matches(java.lang.Object) |
47 | 47 |
*/ |
48 | 48 |
@Override |
49 |
public boolean matches(final Object argument) { |
|
50 |
final OpaqueResource resource = (OpaqueResource) argument; |
|
51 |
return resource.getResourceId().equals("123") && resource.getResourceType().equals("type") && resource.getResourceKind().equals("kind"); |
|
49 |
public boolean matches(final OpaqueResource argument) { |
|
50 |
return argument.getResourceId().equals("123") && argument.getResourceType().equals("type") && argument.getResourceKind().equals("kind"); |
|
52 | 51 |
} |
53 | 52 |
} |
54 | 53 |
|
Also available in: Unified diff
migrated to dnet45, using updated mockito version in tests