@Test
public void dataType() throws IOException {
final Resource resource = fromClasspath("/includes/data-type-fragment.raml");
final ObjectType objectType = getRootObject(resource);
assertThat(objectType.getName())
.as("Name of a typed fragment")
.isNull();
assertThat(objectType.getDisplayName()).isEqualTo("Person");
final EList<Property> properties = objectType.getProperties();
assertThat(properties)
.hasSize(1);
final Property nameProperty = properties.get(0);
assertThat(nameProperty.getName())
.isEqualTo("age");
assertThat(nameProperty.getType().getName())
.isEqualTo("integer");
}
TypedFragmentTest.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:rest-modeling-framework
作者:
评论列表
文章目录