Search in sources :

Example 1 with RestResourceBaseUri

use of uk.gov.justice.services.generators.commons.helper.RestResourceBaseUri in project microservice_framework by CJSCommonPlatform.

the class GeneratorsTest method shouldReturnInterfaceNamePrefixedWithBaseUriPath.

@Test
public void shouldReturnInterfaceNamePrefixedWithBaseUriPath() throws Exception {
    final Resource resource = resource("/bcd").withDefaultPostAction().build();
    final String interfaceName = resourceInterfaceNameOf(resource, new RestResourceBaseUri("http://localhost:8080/warname/base/path"));
    assertThat(interfaceName, is("BasePathBcdResource"));
}
Also used : Resource(org.raml.model.Resource) RestResourceBaseUri(uk.gov.justice.services.generators.commons.helper.RestResourceBaseUri) Test(org.junit.Test)

Example 2 with RestResourceBaseUri

use of uk.gov.justice.services.generators.commons.helper.RestResourceBaseUri in project microservice_framework by CJSCommonPlatform.

the class GeneratorsTest method shouldReturnInterfaceNamePrefixedWithComponentName.

@Test
public void shouldReturnInterfaceNamePrefixedWithComponentName() throws Exception {
    final Resource resource = resource("/abc").withDefaultPostAction().build();
    final String interfaceName = resourceInterfaceNameOf(resource, new RestResourceBaseUri("http://localhost:8080/warname/command/api/rest/service"));
    assertThat(interfaceName, is("CommandApiAbcResource"));
}
Also used : Resource(org.raml.model.Resource) RestResourceBaseUri(uk.gov.justice.services.generators.commons.helper.RestResourceBaseUri) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 Resource (org.raml.model.Resource)2 RestResourceBaseUri (uk.gov.justice.services.generators.commons.helper.RestResourceBaseUri)2