File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
main/java/com/google/api/client/util/escape
test/java/com/google/api/client/util/escape Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1616
1717import java .io .UnsupportedEncodingException ;
1818import java .net .URLDecoder ;
19- import java .nio .ByteBuffer ;
2019import java .nio .charset .StandardCharsets ;
2120
2221/**
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2020 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+ * in compliance with the License. You may obtain a copy of the License at
6+ *
7+ * http://www.apache.org/licenses/LICENSE-2.0
8+ *
9+ * Unless required by applicable law or agreed to in writing, software distributed under the License
10+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+ * or implied. See the License for the specific language governing permissions and limitations under
12+ * the License.
13+ */
14+
15+ package com .google .api .client .util .escape ;
16+
17+ import org .junit .Assert ;
18+ import org .junit .Test ;
19+
20+ public class PercentEscaperTest {
21+
22+ @ Test
23+ public void testEscapeSpace () {
24+ PercentEscaper escaper =
25+ new PercentEscaper (PercentEscaper .SAFE_PLUS_RESERVED_CHARS_URLENCODER , false );
26+ String actual = escaper .escape ("Hello there" );
27+ Assert .assertEquals ("Hello%20there" , actual );
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments