Search in sources :

Example 1 with Publisher

use of org.icij.datashare.com.Publisher in project datashare by ICIJ.

the class ResumeNlpTaskTest method test_bug_size_of_search.

@Test
public void test_bug_size_of_search() throws Exception {
    for (int i = 0; i < 20; i++) {
        indexer.add(TEST_INDEX, createDoc("doc" + i).with(Pipeline.Type.CORENLP).build());
    }
    Publisher publisher = mock(Publisher.class);
    ResumeNlpTask resumeNlpTask = new ResumeNlpTask(publisher, indexer, new PropertiesProvider(new HashMap<String, String>() {

        {
            put("defaultProject", "test-datashare");
        }
    }), new User("test"), new HashSet<Pipeline.Type>() {

        {
            add(Pipeline.Type.OPENNLP);
        }
    });
    resumeNlpTask.call();
    verify(publisher, times(22)).publish(any(), any());
}
Also used : PropertiesProvider(org.icij.datashare.PropertiesProvider) User(org.icij.datashare.user.User) HashMap(java.util.HashMap) Publisher(org.icij.datashare.com.Publisher) Test(org.junit.Test)

Aggregations

HashMap (java.util.HashMap)1 PropertiesProvider (org.icij.datashare.PropertiesProvider)1 Publisher (org.icij.datashare.com.Publisher)1 User (org.icij.datashare.user.User)1 Test (org.junit.Test)1