3636import java .util .Set ;
3737import java .util .stream .Stream ;
3838import org .junit .jupiter .api .Assertions ;
39- import org .junit .jupiter .api .Disabled ;
4039import org .junit .jupiter .api .Test ;
4140import org .junit .jupiter .params .ParameterizedTest ;
4241import org .junit .jupiter .params .provider .MethodSource ;
@@ -302,7 +301,6 @@ void complexResourceIdEqualsWildcard() {
302301 }
303302
304303 @ Test
305- @ Disabled ("https://github.com/googleapis/sdk-platform-java/issues/2778" )
306304 void complexResourceIdEqualsPathWildcard () {
307305 Exception exception =
308306 Assertions .assertThrows (
@@ -312,15 +310,6 @@ void complexResourceIdEqualsPathWildcard() {
312310 String .format (
313311 "parse error: wildcard path not allowed in complex ID resource '%s'" , "zone_a" ),
314312 exception .getMessage ());
315-
316- exception =
317- Assertions .assertThrows (
318- ValidationException .class ,
319- () -> PathTemplate .create ("projects/{project=*}/zones/{zone_a}.{zone_b=**}" ));
320- Assertions .assertEquals (
321- String .format (
322- "parse error: wildcard path not allowed in complex ID resource '%s'" , "zone_b" ),
323- exception .getMessage ());
324313 }
325314
326315 @ Test
@@ -360,9 +349,18 @@ void complexResourceIdNoSeparator() {
360349 "parse error: missing or 2+ consecutive delimiter characters in '%s'" ,
361350 "{zone_a}_{zone_b}{zone_c}" ),
362351 exception .getMessage ());
352+
353+ exception =
354+ Assertions .assertThrows (
355+ ValidationException .class ,
356+ () -> PathTemplate .create ("projects/{project=*}/zones/{zone_a}{{zone_b}" ));
357+ Assertions .assertEquals (
358+ String .format (
359+ "parse error: missing or 2+ consecutive delimiter characters in '%s'" ,
360+ "{zone_a}{{zone_b}" ),
361+ exception .getMessage ());
363362 }
364363
365- @ Disabled ("https://github.com/googleapis/sdk-platform-java/issues/2776" )
366364 @ ParameterizedTest
367365 @ MethodSource ("invalidDelimiters" )
368366 void complexResourceIdInvalidDelimiter (String invalidDelimiter ) {
@@ -381,7 +379,7 @@ void complexResourceIdInvalidDelimiter(String invalidDelimiter) {
381379 }
382380
383381 static Stream <String > invalidDelimiters () {
384- return Stream .of ("|" , "!" , "@" , "a" , "1" , "," , "{" , " )" );
382+ return Stream .of ("|" , "!" , "@" , "a" , "1" , "," , ")" );
385383 }
386384
387385 @ Test
0 commit comments