// Path: src/main/java/com/michaelfotiadis/validator/annotated/processor/SearchPolicy.java
// public enum SearchPolicy {
//     SHALLOW,
//     DEEP
// }


import com.michaelfotiadis.validator.annotated.annotations.array.ArrayIsNotEmpty;
import com.michaelfotiadis.validator.annotated.annotations.collection.CollectionContainsNoNulls;
import com.michaelfotiadis.validator.annotated.annotations.collection.CollectionContainsValue;
import com.michaelfotiadis.validator.annotated.annotations.collection.CollectionIsNotEmpty;
import com.michaelfotiadis.validator.annotated.annotations.text.TextEmail;
import com.michaelfotiadis.validator.annotated.annotations.text.TextIsNumeric;
import com.michaelfotiadis.validator.annotated.annotations.text.TextMaxLength;
import com.michaelfotiadis.validator.annotated.annotations.text.TextNotNullOrEmpty;
import com.michaelfotiadis.validator.annotated.processor.SearchPolicy;
import org.junit.Test;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
package com.michaelfotiadis.validator.annotated.parser;





/**
 *
 */
public class FieldParserTest {

    @Test
    public void isWrapperType() throws Exception {

        assertTrue(FieldParser.isWrapperType(String.class));
        assertTrue(FieldParser.isWrapperType(Integer.class));
        assertTrue(FieldParser.isWrapperType(Float.class));
        assertTrue(FieldParser.isWrapperType(BigInteger.class));
        assertTrue(FieldParser.isWrapperType(Byte.class));

        assertFalse(FieldParser.isWrapperType(Collection.class));
        assertFalse(FieldParser.isWrapperType(Map.class));
        assertFalse(FieldParser.isWrapperType(Iterable.class));
        assertFalse(FieldParser.isWrapperType(TestItem1.class));
        assertFalse(FieldParser.isWrapperType(TestNestedItem1.class));

    }

    @Test
    public void getAllFieldsShallow() throws Exception {

        final TestItem1 item1 = new TestItem1();

// Path: src/main/java/com/michaelfotiadis/validator/annotated/processor/SearchPolicy.java
// public enum SearchPolicy {
//     SHALLOW,
//     DEEP
// }


// Path: src/test/com/michaelfotiadis/validator/annotated/parser/FieldParserTest.java
import com.michaelfotiadis.validator.annotated.annotations.array.ArrayIsNotEmpty;
import com.michaelfotiadis.validator.annotated.annotations.collection.CollectionContainsNoNulls;
import com.michaelfotiadis.validator.annotated.annotations.collection.CollectionContainsValue;
import com.michaelfotiadis.validator.annotated.annotations.collection.CollectionIsNotEmpty;
import com.michaelfotiadis.validator.annotated.annotations.text.TextEmail;
import com.michaelfotiadis.validator.annotated.annotations.text.TextIsNumeric;
import com.michaelfotiadis.validator.annotated.annotations.text.TextMaxLength;
import com.michaelfotiadis.validator.annotated.annotations.text.TextNotNullOrEmpty;
import com.michaelfotiadis.validator.annotated.processor.SearchPolicy;
import org.junit.Test;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

package com.michaelfotiadis.validator.annotated.parser;





/**
 *
 */
public class FieldParserTest {

    @Test
    public void isWrapperType() throws Exception {

        assertTrue(FieldParser.isWrapperType(String.class));
        assertTrue(FieldParser.isWrapperType(Integer.class));
        assertTrue(FieldParser.isWrapperType(Float.class));
        assertTrue(FieldParser.isWrapperType(BigInteger.class));
        assertTrue(FieldParser.isWrapperType(Byte.class));

        assertFalse(FieldParser.isWrapperType(Collection.class));
        assertFalse(FieldParser.isWrapperType(Map.class));
        assertFalse(FieldParser.isWrapperType(Iterable.class));
        assertFalse(FieldParser.isWrapperType(TestItem1.class));
        assertFalse(FieldParser.isWrapperType(TestNestedItem1.class));

    }

    @Test
    public void getAllFieldsShallow() throws Exception {

        final TestItem1 item1 = new TestItem1();

        final List<Field> fields = FieldParser.getAnnotatedFields(item1, SearchPolicy.SHALLOW);