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

Method parse_rootless

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

Source from the content-addressed store, hash-verified

134 }
135
136 @Test
137 public void parse_rootless() throws URISyntaxException {
138 Uri uri = Uri.parse("mailto:ceo@company.com?subject=raise");
139 assertThat(uri.getScheme()).isEqualTo("mailto");
140 assertThat(uri.getAuthority()).isNull();
141 assertThat(uri.getPath()).isEqualTo("ceo@company.com");
142 assertThat(uri.getRawQuery()).isEqualTo("subject=raise");
143 assertThat(uri.getFragment()).isNull();
144 assertThat(uri.toString()).isEqualTo("mailto:ceo@company.com?subject=raise");
145 assertThat(uri.isAbsolute()).isTrue();
146 assertThat(uri.isPathAbsolute()).isFalse();
147 assertThat(uri.isPathRootless()).isTrue();
148 }
149
150 @Test
151 public void parse_emptyPath() throws URISyntaxException {

Callers

nothing calls this directly

Calls 10

parseMethod · 0.95
getSchemeMethod · 0.95
getAuthorityMethod · 0.95
getPathMethod · 0.95
getRawQueryMethod · 0.95
getFragmentMethod · 0.95
toStringMethod · 0.95
isAbsoluteMethod · 0.95
isPathAbsoluteMethod · 0.95
isPathRootlessMethod · 0.95

Tested by

no test coverage detected