package com.exmertec.dummie;

import org.junit.Test;

import static com.exmertec.dummie.Dummie.create;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;

public class EnumTest {

    @Test
    public void should_create_object_with_enum_field() {
        EnumData enumData = create(EnumData.class);

        assertThat(enumData, not(nullValue()));
        assertEquals(DataType.STRING, enumData.getDataType());
    }

    public static enum DataType {
        STRING, INTEGER
    }
    public static class EnumData {
        private DataType dataType;

        public DataType getDataType() {
            return dataType;
        }

        public void setDataType(DataType dataType) {
            this.dataType = dataType;
        }
    }
}

@@ -562,251 +562,833 @@
     
-public static enum DataType %7B%0A        STRING, INTEGER%0A    %7D%0A    public static class EnumData %7B%0A        private DataType dataType;%0A%0A        public DataType getDataType() %7B%0A            return dataType;%0A        %7D%0A%0A        public void setDataType(
+@Test%0A    public void should_create_object_without_any_constant() %7B%0A        EmptyEnumData emptyEnumData = create(EmptyEnumData.class);%0A%0A        assertThat(emptyEnumData, not(nullValue()));%0A        assertEquals(null, emptyEnumData.getDataType());%0A    %7D%0A%0A    public static enum DataType %7B%0A        STRING, INTEGER%0A    %7D%0A    public static class EnumData %7B%0A        private DataType dataType;%0A%0A        public DataType getDataType() %7B%0A            return dataType;%0A        %7D%0A%0A        public void setDataType(DataType dataType) %7B%0A            this.dataType = dataType;%0A        %7D%0A    %7D%0A%0A    public static enum EmptyDataType %7B%0A    %7D%0A%0A    public static class EmptyEnumData %7B%0A        private EmptyDataType dataType;%0A%0A        public EmptyDataType getDataType() %7B%0A            return dataType;%0A        %7D%0A%0A        public void setDataType(Empty
 Data

add enum object test which enum without constant