@@ -64,9 +64,17 @@ void testWrongSchema(String fileName) {
64
64
65
65
private static Stream <Arguments > provideParameters () {
66
66
Map <String , Object > petInput = Map .of ("petId" , 10 );
67
+ Map <String , Object > starTrekInput = Map .of ("uid" , "MOMA0000092393" );
67
68
Condition <Object > petCondition =
68
69
new Condition <>(
69
70
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" );
70
78
return Stream .of (
71
79
Arguments .of ("callGetHttp.yaml" , petInput , petCondition ),
72
80
Arguments .of (
@@ -75,16 +83,9 @@ private static Stream<Arguments> provideParameters() {
75
83
new Condition <>(
76
84
o -> ((Map <String , Object >) o ).containsKey ("petId" ), "notFoundCondition" )),
77
85
Arguments .of ("call-http-endpoint-interpolation.yaml" , petInput , petCondition ),
86
+ Arguments .of ("call-http-query-parameters.yaml" , starTrekInput , starTrekCondition ),
78
87
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 ),
88
89
Arguments .of (
89
90
"callPostHttp.yaml" ,
90
91
Map .of ("name" , "Javierito" , "status" , "available" ),
0 commit comments