MCPcopy Create free account
hub / github.com/grpc/grpc-java / asListMethod

Method asListMethod

api/src/test/java/io/grpc/QueryParamsTest.java:118–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116 }
117
118 @Test
119 public void asListMethod() {
120 QueryParams params = new QueryParams();
121 params.asList().add(QueryParams.Entry.forKeyValue("a b", "c d"));
122 params.asList().add(QueryParams.Entry.forLoneKey("e f"));
123
124 // URLEncoder encodes spaces as +
125 assertThat(params.toRawQuery()).isEqualTo("a+b=c+d&e+f");
126 }
127
128 @Test
129 public void parseInvalidPercentEncodingThrows() {

Callers

nothing calls this directly

Calls 5

asListMethod · 0.95
toRawQueryMethod · 0.95
forKeyValueMethod · 0.80
forLoneKeyMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected