chan-dx commented on code in PR #4628:
URL: https://github.com/apache/solr/pull/4628#discussion_r3637097675
##########
solr/solrj/src/test/org/apache/solr/common/params/SolrParamTest.java:
##########
@@ -352,6 +354,44 @@ public void testGetParams() {
assertNull(defaults.get("asagdsaga"));
}
+ @Test
+ public void testFirstParamHasQuestionMark() {
+
+ final ModifiableSolrParams in = getDummySolrParams();
+ String queryString = in.toQueryString();
+ assertEquals('?', queryString.charAt(0));
+
+ MultiMapSolrParams out =
SolrRequestParsers.parseQueryString(queryString.substring(1));
+ assertEquals(in, out);
+ }
+
+ @Test
+ public void testIfToStringCanBeParsed() {
+
+ final ModifiableSolrParams in = getDummySolrParams();
+ String queryString = in.toString();
+
+ assertEquals("first=1st&second=2nd&third=3rd", queryString);
+ MultiMapSolrParams out = SolrRequestParsers.parseQueryString(queryString);
+ assertEquals(in, out);
+ }
+
Review Comment:
```suggestion
@Test
```
Adding `@Test` to un-skip the unit test on
`testToStringWithEmptySolrParams()`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]