essobedo commented on code in PR #8936: URL: https://github.com/apache/camel/pull/8936#discussion_r1054262062
########## components/camel-bean/src/test/java/org/apache/camel/component/bean/BeanInfoTest.java: ########## @@ -108,6 +111,28 @@ public String myMethod() { assertTrue(info.hasAnyMethodHandlerAnnotation()); } + @Test + public void testSplitSafeQuotesUnremoveQuoteAfterValidParameterTypeCheck() { + String[] out = StringQuoteHelper.splitSafeQuote("'Hello,Camel','Bye,World'", ',', true, true); + Iterator<?> it = ObjectHelper.createIterator(out, ",", true); + Object parameterValue = it != null && it.hasNext() ? it.next() : null; + while (parameterValue != null) { + assertTrue(BeanHelper.isValidParameterValue(parameterValue.toString())); + parameterValue = it != null && it.hasNext() ? it.next() : null; + } + } + + @Test + public void testSplitSafeQuoteRemoveQuoteAfterValidParameterTypeCheck() { + String[] out = StringQuoteHelper.splitSafeQuote("'\"Hello,Camel\"','\"Bye,World\"'", ','); + Iterator<?> it = ObjectHelper.createIterator(out, ",", true); + Object parameterValue = it != null && it.hasNext() ? it.next() : null; + while (parameterValue != null) { + assertTrue(BeanHelper.isValidParameterValue(parameterValue.toString())); + parameterValue = it != null && it.hasNext() ? it.next() : null; + } + } Review Comment: The tests for `StringQuoteHelper` are [here](https://github.com/apache/camel/blob/main/core/camel-core/src/test/java/org/apache/camel/util/StingQuoteHelperTest.java) -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org