@@ -64,9 +64,17 @@ void testWrongSchema(String fileName) {
6464
6565 private static Stream <Arguments > provideParameters () {
6666 Map <String , Object > petInput = Map .of ("petId" , 10 );
67+ Map <String , Object > starTrekInput = Map .of ("uid" , "MOMA0000092393" );
6768 Condition <Object > petCondition =
6869 new Condition <>(
6970 o -> ((Map <String , Object >) o ).containsKey ("photoUrls" ), "callHttpCondition" );
71+ Condition <Object > starTrekCondition =
72+ new Condition <>(
73+ o ->
74+ ((Map <String , Object >) ((Map <String , Object >) o ).get ("movie" ))
75+ .get ("title" )
76+ .equals ("Star Trek" ),
77+ "StartTrek" );
7078 return Stream .of (
7179 Arguments .of ("callGetHttp.yaml" , petInput , petCondition ),
7280 Arguments .of (
@@ -75,16 +83,9 @@ private static Stream<Arguments> provideParameters() {
7583 new Condition <>(
7684 o -> ((Map <String , Object >) o ).containsKey ("petId" ), "notFoundCondition" )),
7785 Arguments .of ("call-http-endpoint-interpolation.yaml" , petInput , petCondition ),
86+ Arguments .of ("call-http-query-parameters.yaml" , starTrekInput , starTrekCondition ),
7887 Arguments .of (
79- "call-http-query-parameters.yaml" ,
80- Map .of ("searchQuery" , "R2-D2" ),
81- new Condition <>(
82- o -> ((Map <String , Object >) o ).get ("count" ).equals (1 ), "R2D2Condition" )),
83- Arguments .of (
84- "call-http-query-parameters-external-schema.yaml" ,
85- Map .of ("searchQuery" , "Luke Skywalker" ),
86- new Condition <>(
87- o -> ((Map <String , Object >) o ).get ("count" ).equals (1 ), "TheRealJediCondition" )),
88+ "call-http-query-parameters-external-schema.yaml" , starTrekInput , starTrekCondition ),
8889 Arguments .of (
8990 "callPostHttp.yaml" ,
9091 Map .of ("name" , "Javierito" , "status" , "available" ),
0 commit comments