Search in sources :

Example 16 with JavaField

use of com.thoughtworks.qdox.model.JavaField in project jsonschema2pojo by joelittlejohn.

the class RequiredArrayIT method requiredAppearsInFieldJavadoc.

@Test
public void requiredAppearsInFieldJavadoc() {
    JavaField javaField = classWithRequired.getFieldByName("requiredProperty");
    String javaDocComment = javaField.getComment();
    assertThat(javaDocComment, containsString("(Required)"));
}
Also used : JavaField(com.thoughtworks.qdox.model.JavaField) Test(org.junit.Test)

Example 17 with JavaField

use of com.thoughtworks.qdox.model.JavaField in project jsonschema2pojo by joelittlejohn.

the class RequiredArrayIT method nonRequiredFiedHasNoRequiredText.

@Test
public void nonRequiredFiedHasNoRequiredText() {
    JavaField javaField = classWithRequired.getFieldByName("nonRequiredProperty");
    String javaDocComment = javaField.getComment();
    assertThat(javaDocComment, not(containsString("(Required)")));
}
Also used : JavaField(com.thoughtworks.qdox.model.JavaField) Test(org.junit.Test)

Aggregations

JavaField (com.thoughtworks.qdox.model.JavaField)17 Test (org.junit.Test)15 File (java.io.File)5 JavaDocBuilder (com.thoughtworks.qdox.JavaDocBuilder)3 JavaClass (com.thoughtworks.qdox.model.JavaClass)3 JavaMethod (com.thoughtworks.qdox.model.JavaMethod)2 BufferedReader (java.io.BufferedReader)2 StringReader (java.io.StringReader)2 StringWriter (java.io.StringWriter)2 JavaConstructor (com.thoughtworks.qdox.model.JavaConstructor)1