use of uk.gov.justice.services.generators.commons.client.ActionMimeTypeDefinition in project microservice_framework by CJSCommonPlatform.
the class NamesTest method shouldGenerateCorrectResourceNameForPostWithRequestMimeType.
@Test
public void shouldGenerateCorrectResourceNameForPostWithRequestMimeType() {
final Action action = HttpActionBuilder.defaultPostAction().withResourceUri("/some/path/{recipeId}/").build();
final ActionMimeTypeDefinition actionMimeTypeDefinition = ActionMimeTypeDefinition.definitionWithRequest(new MimeType("application/vnd.command.create-user+json"));
assertThat(Names.buildResourceMethodNameFromVerbUriAndMimeType(action, actionMimeTypeDefinition), equalTo("postSomePathRecipeIdCommandCreateUser"));
}
use of uk.gov.justice.services.generators.commons.client.ActionMimeTypeDefinition in project microservice_framework by CJSCommonPlatform.
the class NamesTest method shouldGenerateCorrectResourceNameForGetWithResponseMimeType.
@Test
public void shouldGenerateCorrectResourceNameForGetWithResponseMimeType() {
final Action action = HttpActionBuilder.defaultGetAction().withResourceUri("/some/path/{recipeId}/").build();
final ActionMimeTypeDefinition actionMimeTypeDefinition = ActionMimeTypeDefinition.definitionWithResponse(new MimeType("application/vnd.command.create-user+json"));
assertThat(Names.buildResourceMethodNameFromVerbUriAndMimeType(action, actionMimeTypeDefinition), equalTo("getSomePathRecipeIdCommandCreateUser"));
}
Aggregations