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

Method parse_emptyPort

api/src/test/java/io/grpc/UriTest.java:188–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186 }
187
188 @Test
189 public void parse_emptyPort() {
190 Uri uri = Uri.create("scheme://host:");
191 assertThat(uri.getScheme()).isEqualTo("scheme");
192 assertThat(uri.getAuthority()).isEqualTo("host:");
193 assertThat(uri.getRawAuthority()).isEqualTo("host:");
194 assertThat(uri.getHost()).isEqualTo("host");
195 assertThat(uri.getPort()).isEqualTo(-1);
196 assertThat(uri.getRawPort()).isEqualTo("");
197 assertThat(uri.toString()).isEqualTo("scheme://host:");
198 }
199
200 @Test
201 public void parse_invalidScheme_throws() {

Callers

nothing calls this directly

Calls 8

createMethod · 0.95
getSchemeMethod · 0.95
getAuthorityMethod · 0.95
getRawAuthorityMethod · 0.95
getHostMethod · 0.95
getPortMethod · 0.95
getRawPortMethod · 0.95
toStringMethod · 0.95

Tested by

no test coverage detected