Skip to content

Commit

Permalink
#2 Extend test on case of element without annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubbitus committed Feb 24, 2020
1 parent 119baa9 commit 1d7543f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ class XJCPluginDescriptionAnnotationTest extends Specification {
<sequence>
<element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
<element name="age" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
<element name="address" type="{http://www.w3.org/2001/XMLSchema}string"/>
</sequence>
</restriction>
</complexContent>
</complexType>'''

cls.getDeclaredFields().size() == 2
cls.getDeclaredFields().size() == 3
cls.getDeclaredFields().find{ 'name' == it.name }.getAnnotation(XsdInfo).name() == 'Фамилия и имя'
cls.getDeclaredFields().find{ 'age' == it.name }.getAnnotation(XsdInfo).name() == 'Возраст'
}
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/Example.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<xs:documentation>Возраст</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="address" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

0 comments on commit 1d7543f

Please sign in to comment.