vlsi commented on a change in pull request #660: URL: https://github.com/apache/jmeter/pull/660#discussion_r757512302
########## File path: src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/util/TestGraphQLRequestParamUtils.java ########## @@ -97,9 +102,24 @@ void testInvalidGraphQLContentType(String contentType) { assertFalse(GraphQLRequestParamUtils.isGraphQLContentType(contentType)); } - @Test - void testToPostBodyString() throws Exception { - assertEquals(EXPECTED_POST_BODY, GraphQLRequestParamUtils.toPostBodyString(params)); + static Stream<Triple<String, JsonNode, JsonNode>> postBodyFieldNameAndJsonNodes() throws Exception { + final JsonNode expectedPostBodyJson = objectMapper.readTree(EXPECTED_POST_BODY); + final JsonNode actualPostBodyJson = objectMapper.readTree( + GraphQLRequestParamUtils.toPostBodyString(new GraphQLRequestParams(OPERATION_NAME, QUERY, VARIABLES))); + return Stream.of( + Triple.of(GraphQLRequestParamUtils.OPERATION_NAME_FIELD, expectedPostBodyJson, actualPostBodyJson), + Triple.of(GraphQLRequestParamUtils.VARIABLES_FIELD, expectedPostBodyJson, actualPostBodyJson), + Triple.of(GraphQLRequestParamUtils.QUERY_FIELD, expectedPostBodyJson, actualPostBodyJson)); Review comment: Please use `Arguments.arguments` as suggested in JUnit5 documentation: https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests-sources-MethodSource -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org