package de.tblsoft.solr.pipeline.filter;

import de.tblsoft.solr.pipeline.test.AbstractFilterTest;
import org.junit.Test;

/**
 * Created by tblsoft on 21.10.17.
 */
public class TokenizerFilterTest extends AbstractFilterTest {

    @Override
    public void configure() {
        setClazz(TokenizerFilter.class);
    }

    @Test
    public void testEmptyDocument() {
        configure();
        runTest();
        assertNumberOfDocuments(0);
    }


    @Test
    public void testPassthrough() {
        // for a tokenizer we don't pass through documents
    }

    @Test
    public void testDateFilter() {
        configure();
        createField("text", "today is a nice day");
        createField("text2", "because the sun is shining");
        runTest();
        assertNumberOfDocuments(10);
        assertFiled("token", "today");
    }
}

@@ -438,22 +438,89 @@
 nts(0);%0A
+        assertInitWasDelegated();%0A        assertEndWasDelegated();%0A
     %7D%0A
-
 %0A%0A    @T
@@ -659,12 +659,17 @@
 test
-Date
+Tokenizer
 Filt
@@ -860,24 +860,24 @@
 uments(10);%0A
-
         asse
@@ -898,21 +898,89 @@
 %22, %22today%22);
+%0A%0A        assertInitWasDelegated();%0A        assertEndWasDelegated();
 %0A    %7D%0A%7D%0A

improve tokenizer filter test