Revision 45126
Added by Claudio Atzori over 7 years ago
ResourceStateSubscriptionRegistryTest.java | ||
---|---|---|
10 | 10 |
import org.junit.runner.RunWith; |
11 | 11 |
import org.mockito.ArgumentMatcher; |
12 | 12 |
import org.mockito.Mock; |
13 |
import org.mockito.runners.MockitoJUnit44Runner;
|
|
13 |
import org.mockito.junit.MockitoJUnitRunner;
|
|
14 | 14 |
|
15 | 15 |
import eu.dnetlib.enabling.is.sn.SubscriptionRequest; |
16 | 16 |
import eu.dnetlib.enabling.is.sn.rmi.SubscriptionRequestRejectedException; |
... | ... | |
21 | 21 |
* @author marko |
22 | 22 |
* |
23 | 23 |
*/ |
24 |
@RunWith(MockitoJUnit44Runner.class)
|
|
24 |
@RunWith(MockitoJUnitRunner.class) |
|
25 | 25 |
public class ResourceStateSubscriptionRegistryTest { |
26 | 26 |
|
27 | 27 |
/** |
... | ... | |
30 | 30 |
* @author marko |
31 | 31 |
* |
32 | 32 |
*/ |
33 |
public static class MatchSubscription extends ArgumentMatcher<ResourceStateSubscription> {
|
|
33 |
public static class MatchSubscription implements ArgumentMatcher<ResourceStateSubscription> {
|
|
34 | 34 |
|
35 | 35 |
/** |
36 | 36 |
* prefix. |
... | ... | |
70 | 70 |
* @see org.mockito.ArgumentMatcher#matches(java.lang.Object) |
71 | 71 |
*/ |
72 | 72 |
@Override |
73 |
public boolean matches(final Object argument) { |
|
74 |
final ResourceStateSubscription sub = (ResourceStateSubscription) argument; |
|
73 |
public boolean matches(final ResourceStateSubscription sub) { |
|
75 | 74 |
return sub.getPrefix().equals(this.prefix) && sub.getType().equals(this.type) && sub.getResourceId().equals(this.resId); |
76 | 75 |
} |
77 | 76 |
|
Also available in: Unified diff
migrated to dnet45, using updated mockito version in tests