Revision 45488
Added by Claudio Atzori over 7 years ago
ISStoreServiceImplTest.java | ||
---|---|---|
3 | 3 |
import java.util.ArrayList; |
4 | 4 |
import java.util.List; |
5 | 5 |
|
6 |
|
|
7 | 6 |
import eu.dnetlib.xml.database.XMLDatabase; |
8 | 7 |
import org.junit.Before; |
9 | 8 |
import org.junit.Test; |
10 | 9 |
import org.junit.runner.RunWith; |
11 | 10 |
import org.mockito.Mock; |
12 |
import org.mockito.runners.MockitoJUnitRunner;
|
|
11 |
import org.mockito.junit.MockitoJUnitRunner;
|
|
13 | 12 |
import org.xmldb.api.base.XMLDBException; |
14 | 13 |
|
15 | 14 |
import static org.junit.Assert.assertNotNull; |
16 | 15 |
import static org.junit.Assert.assertTrue; |
17 | 16 |
import static org.mockito.Matchers.anyString; |
18 |
import static org.mockito.Mockito.mock; |
|
19 | 17 |
import static org.mockito.Mockito.when; |
20 | 18 |
|
21 | 19 |
/** |
... | ... | |
50 | 48 |
/** |
51 | 49 |
* test that quick search profile returns null instead of an empty list. |
52 | 50 |
* |
51 |
* @throws ISStoreException shouldn't happen |
|
53 | 52 |
* @throws XMLDBException shouldn't happen |
54 |
* @throws ISStoreException shouldn't happen |
|
55 | 53 |
*/ |
56 | 54 |
@Test |
57 |
public void testQuickSearchXML() throws XMLDBException, ISStoreException {
|
|
55 |
public void testQuickSearchXML() throws ISStoreException, XMLDBException {
|
|
58 | 56 |
|
59 | 57 |
when(xmlDatabase.xquery(anyString())).thenReturn(new ArrayList<String>().iterator()); |
60 | 58 |
final List<String> res = storeService.quickSearchXML("someQuery"); |
Also available in: Unified diff
using updated mockito version