|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2018 the original author or authors. |
| 2 | + * Copyright 2012-2019 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -150,26 +150,26 @@ public void testSlashOfContextPathIsDefaultValue() {
|
150 | 150 | }
|
151 | 151 |
|
152 | 152 | @Test
|
153 |
| - public void makeSureTrailingAndLeadingWhitespacesRemoved_case1() { |
| 153 | + public void testContextPathWithLeadingWhitespace() { |
154 | 154 | bind("server.servlet.context-path", " /assets");
|
155 | 155 | assertThat(this.properties.getServlet().getContextPath()).isEqualTo("/assets");
|
156 | 156 | }
|
157 | 157 |
|
158 | 158 | @Test
|
159 |
| - public void makeSureTrailingAndLeadingWhitespacesRemoved_case2() { |
160 |
| - bind("server.servlet.context-path", " /assets "); |
161 |
| - assertThat(this.properties.getServlet().getContextPath()).isEqualTo("/assets"); |
162 |
| - } |
163 |
| - |
164 |
| - @Test |
165 |
| - public void makeSureTrailingAndLeadingWhitespacesRemoved_case3() { |
| 159 | + public void testContextPathWithTrailingWhitespace() { |
166 | 160 | bind("server.servlet.context-path", "/assets/copy/ ");
|
167 | 161 | assertThat(this.properties.getServlet().getContextPath())
|
168 | 162 | .isEqualTo("/assets/copy");
|
169 | 163 | }
|
170 | 164 |
|
171 | 165 | @Test
|
172 |
| - public void makeSureTrailingAndLeadingWhitespacesRemoved_case4() { |
| 166 | + public void testContextPathWithLeadingAndTrailingWhitespace() { |
| 167 | + bind("server.servlet.context-path", " /assets "); |
| 168 | + assertThat(this.properties.getServlet().getContextPath()).isEqualTo("/assets"); |
| 169 | + } |
| 170 | + |
| 171 | + @Test |
| 172 | + public void testContextPathWithLeadingAndTrailingWhitespaceAndContextWithSpace() { |
173 | 173 | bind("server.servlet.context-path", " /assets /copy/ ");
|
174 | 174 | assertThat(this.properties.getServlet().getContextPath())
|
175 | 175 | .isEqualTo("/assets /copy");
|
|
0 commit comments