|
1 | 1 | /*
|
2 |
| - * Copyright 2014-2019 the original author or authors. |
| 2 | + * Copyright 2014-2020 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.
|
@@ -38,12 +38,48 @@ public void kebabCaseMethodName() throws Exception {
|
38 | 38 | .isEqualTo("dash-separated-method-name");
|
39 | 39 | }
|
40 | 40 |
|
| 41 | + @Test |
| 42 | + public void kebabCaseMethodNameWithUpperCaseOpeningSection() throws Exception { |
| 43 | + assertThat(createResolver("URIDashSeparatedMethodName").resolvePlaceholder("method-name")) |
| 44 | + .isEqualTo("uri-dash-separated-method-name"); |
| 45 | + } |
| 46 | + |
| 47 | + @Test |
| 48 | + public void kebabCaseMethodNameWithUpperCaseMidSection() throws Exception { |
| 49 | + assertThat(createResolver("dashSeparatedMethodNameWithURIInIt").resolvePlaceholder("method-name")) |
| 50 | + .isEqualTo("dash-separated-method-name-with-uri-in-it"); |
| 51 | + } |
| 52 | + |
| 53 | + @Test |
| 54 | + public void kebabCaseMethodNameWithUpperCaseEndSection() throws Exception { |
| 55 | + assertThat(createResolver("dashSeparatedMethodNameWithURI").resolvePlaceholder("method-name")) |
| 56 | + .isEqualTo("dash-separated-method-name-with-uri"); |
| 57 | + } |
| 58 | + |
41 | 59 | @Test
|
42 | 60 | public void snakeCaseMethodName() throws Exception {
|
43 | 61 | assertThat(createResolver("underscoreSeparatedMethodName").resolvePlaceholder("method_name"))
|
44 | 62 | .isEqualTo("underscore_separated_method_name");
|
45 | 63 | }
|
46 | 64 |
|
| 65 | + @Test |
| 66 | + public void snakeCaseMethodNameWithUpperCaseOpeningSection() throws Exception { |
| 67 | + assertThat(createResolver("URIUnderscoreSeparatedMethodName").resolvePlaceholder("method_name")) |
| 68 | + .isEqualTo("uri_underscore_separated_method_name"); |
| 69 | + } |
| 70 | + |
| 71 | + @Test |
| 72 | + public void snakeCaseMethodNameWithUpperCaseMidSection() throws Exception { |
| 73 | + assertThat(createResolver("underscoreSeparatedMethodNameWithURIInIt").resolvePlaceholder("method_name")) |
| 74 | + .isEqualTo("underscore_separated_method_name_with_uri_in_it"); |
| 75 | + } |
| 76 | + |
| 77 | + @Test |
| 78 | + public void snakeCaseMethodNameWithUpperCaseEndSection() throws Exception { |
| 79 | + assertThat(createResolver("underscoreSeparatedMethodNameWithURI").resolvePlaceholder("method_name")) |
| 80 | + .isEqualTo("underscore_separated_method_name_with_uri"); |
| 81 | + } |
| 82 | + |
47 | 83 | @Test
|
48 | 84 | public void camelCaseMethodName() throws Exception {
|
49 | 85 | assertThat(createResolver("camelCaseMethodName").resolvePlaceholder("methodName"))
|
|
0 commit comments