package de.tblsoft.solr.pipeline.test;

import de.tblsoft.solr.pipeline.bean.Filter;
import org.junit.Assert;
import org.junit.Test;

/**
 * Created by tblsoft on 29.04.16.
 */
public class BeanTest {

    @Test
    public void testFilterBean() {
        testBean(new Filter());
    }

    void testBean(Object bean) {
        Assert.assertFalse(bean.toString().contains("@"));
    }
}

@@ -33,16 +33,117 @@
 .test;%0A%0A
+import de.tblsoft.solr.pipeline.bean.Document;%0Aimport de.tblsoft.solr.pipeline.bean.DocumentBuilder;%0A
 import d
@@ -380,16 +380,514 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testDocumentBean() %7B%0A        testBean(DocumentBuilder.document().create());%0A    %7D%0A%0A%0A    @Test%0A    public void testDeleteFieldInDocument() %7B%0A        Document document = DocumentBuilder.document().field(%22foo%22,%22bar%22).field(%22john%22, %22doe%22).create();%0A        document.deleteField(%22foo%22);%0A        Assert.assertNull(document.getField(%22foo%22));%0A        Assert.assertEquals(%22doe%22, document.getFieldValue(%22john%22));%0A        Assert.assertEquals(1, document.getFields().size());%0A%0A    %7D%0A%0A
     void

add bean tests for Document