use of com.google.api.generator.gapic.model.RoutingHeaderRule in project gapic-generator-java by googleapis.
the class RoutingRuleParserTest method parse_shouldSetPathTemplateToWildcardIfNotDefined.
@Test
public void parse_shouldSetPathTemplateToWildcardIfNotDefined() {
RoutingHeaderRule actual = getRoutingHeaders(1);
RoutingHeaderParam expected = RoutingHeaderParam.create("name", "name", String.format("{%s=**}", "name"));
assertThat(actual.routingHeaderParams()).containsExactly(expected);
}
use of com.google.api.generator.gapic.model.RoutingHeaderRule in project gapic-generator-java by googleapis.
the class RoutingRuleParserTest method parse_shouldParseRoutingRulesWithMultipleParameter.
@Test
public void parse_shouldParseRoutingRulesWithMultipleParameter() {
RoutingHeaderRule actual = getRoutingHeaders(5);
RoutingHeaderParam expectedHeader1 = RoutingHeaderParam.create("name", "rename", "/v1beta1/{rename=tests/*}");
RoutingHeaderParam expectedHeader2 = RoutingHeaderParam.create("routing_id", "id", "/v1beta1/{id=projects/*}/tables/*");
assertThat(actual.routingHeaderParams()).containsExactly(expectedHeader1, expectedHeader2).inOrder();
}
Aggregations