Skip to content

Commit 4efed5a

Browse files
committed
tests: fix tests
1 parent 2e56cee commit 4efed5a

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

sdk-platform-java/api-common-java/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -895,14 +895,6 @@ void testTemplateWithMultipleSimpleBindings() {
895895
Truth.assertThat(url).isEqualTo("v1/shelves/s1/books/b1");
896896
}
897897

898-
@Test
899-
void name() {
900-
PathTemplate pathTemplate =
901-
PathTemplate.create("projects/{project}/zones/{zone}/{parent_name}");
902-
System.out.println(
903-
pathTemplate.instantiate("project", "project1", "zone", "zone1", "parent_name", "name1"));
904-
}
905-
906898
@Test
907899
void testGetResourceLiterals_simplePath() {
908900
PathTemplate template =
@@ -919,7 +911,7 @@ void testGetResourceLiterals_regexPath() {
919911
}
920912

921913
@Test
922-
void testGetResourceSegments_onlyNonResourceLiterals() {
914+
void testGetResourceLiterals_onlyNonResourceLiterals() {
923915
PathTemplate template = PathTemplate.create("compute/v1/projects");
924916
Truth.assertThat(template.getResourceLiterals()).isEmpty();
925917
}
@@ -931,7 +923,7 @@ void testGetResourceLiterals_nameBinding() {
931923
}
932924

933925
@Test
934-
void testGetResourceSegments_complexResourceId() {
926+
void testGetResourceLiterals_complexResourceId() {
935927
PathTemplate template = PathTemplate.create("projects/{project}/zones/{zone_a}~{zone_b}");
936928
Truth.assertThat(template.getResourceLiterals()).containsExactly("projects", "zones");
937929
}
@@ -951,28 +943,6 @@ void testGetResourceLiterals_multipleVersions() {
951943
.containsExactly("projects", "locations", "widgets");
952944
}
953945

954-
@Test
955-
void testGetResourceLiterals_namedBindings() {
956-
PathTemplate template =
957-
PathTemplate.create(
958-
"/compute/v1/projects/{project}/zones/{zone}/{parent_name=reservations/*/reservationBlocks/*/reservationSubBlocks/*}");
959-
Truth.assertThat(template.getResourceLiterals())
960-
.containsExactly(
961-
"projects", "zones", "reservations", "reservationBlocks", "reservationSubBlocks");
962-
}
963-
964-
@Test
965-
void testGetCanonicalResourceName_namedBindings() {
966-
PathTemplate template =
967-
PathTemplate.create(
968-
"/v1/projects/{project}/locations/{location}/{parent_name=reservations/*/reservationBlocks/*/reservationSubBlocks/*}/heuristics/{heuristic}");
969-
970-
Set<String> resourceLiterals = ImmutableSet.of("projects", "locations", "heuristics");
971-
Truth.assertThat(template.getCanonicalResourceName(resourceLiterals))
972-
.isEqualTo(
973-
"projects/{project}/locations/{location}/{parent_name=reservations/*/reservationBlocks/*/reservationSubBlocks/*}/heuristics/{heuristic}");
974-
}
975-
976946
@Test
977947
void testGetCanonicalResourceName_namedBindingsSimple() {
978948
Set<String> moreKnownResources = ImmutableSet.of("projects", "locations", "bars");

0 commit comments

Comments
 (0)