use of org.raml.jaxrs.generator.CurrentBuild in project raml-for-jax-rs by mulesoft-labs.
the class V10GResourceTest method extendingResponse.
@Test
public void extendingResponse() throws Exception {
Api api = RamlV10.buildApiV10(this, "resource-response-extending.raml");
GAbstractionFactory fac = new GAbstractionFactory();
V10GResource gr = new V10GResource(new CurrentBuild(api, null), fac, api.resources().get(0));
GResponseType req = gr.methods().get(0).responses().get(0).body().get(0);
assertEquals("application/json", req.mediaType());
assertEquals("ObjectBase", req.type().type());
assertEquals("FunPut200ApplicationJson", req.type().name());
assertEquals("model.FunPut200ApplicationJson", req.type().defaultJavaTypeName("").toString());
}
Aggregations