Project

General

Profile

1
package eu.dnetlib.data.search;
2

    
3
/**
4
 * Created by kiatrop on 2/12/2016.
5
 */
6
public class SSTest {
7

    
8
/*    SearchServiceImpl ss = new SearchServiceImpl();
9
    ServiceLocator<IndexService> mockIndexServiceServiceLocator = mock(ServiceLocator.class);
10
    SolrIndexClient mockIndexService = mock(SolrIndexClient.class);
11

    
12
    @Before
13
    public void setup() {
14
        BasicConfigurator.configure();
15

    
16
        System.out.println(ss.getIndexLocator());
17
        //when(ss.getIndexLocator()).thenReturn(mockIndexServiceServiceLocator);
18
        when(mockIndexServiceServiceLocator.getService()).thenReturn(mockIndexService);
19
        ss.setIndexLocator(mockIndexServiceServiceLocator);
20
        //doNothing().when(((SearchServiceImpl) ss).getIndexLocator().getService());
21

    
22
    }
23

    
24
    @Test
25
    public void test() throws SearchServiceException {
26
        ss.search("oaftype=result", null, "", 1,1);
27
    }
28
*/
29
}
    (1-1/1)