-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #533 from exadel-inc/release-2.5.2
[Tech] Merged release-2.5.2 branch to master
- Loading branch information
Showing
77 changed files
with
2,747 additions
and
1,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
core/src/test/java/com/exadel/aem/toolkit/api/annotations/meta/StringTransformationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.exadel.aem.toolkit.api.annotations.meta; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class StringTransformationTest { | ||
|
||
private static final String SAMPLE0 = "LoReM"; | ||
private static final String SAMPLE1 = "L0rem IPSum! Do1or Sit Amet"; | ||
private static final String SAMPLE2 = "Lorem IPSum dolor-sit-Amet"; | ||
private static final String SAMPLE3 = "Lorem_IPSum__dolor_Sit_Amet"; | ||
|
||
@Test | ||
public void shouldConvertToLowerCase() { | ||
Assert.assertEquals("l0rem ipsum! do1or sit amet", StringTransformation.LOWERCASE.apply(SAMPLE1)); | ||
} | ||
|
||
@Test | ||
public void shouldConvertToUpperCase() { | ||
Assert.assertEquals("L0REM IPSUM! DO1OR SIT AMET", StringTransformation.UPPERCASE.apply(SAMPLE1)); | ||
} | ||
|
||
@Test | ||
public void shouldConvertToCamelCase() { | ||
Assert.assertEquals(StringUtils.EMPTY, StringTransformation.CAMELCASE.apply(StringUtils.EMPTY)); | ||
Assert.assertEquals("lorem", StringTransformation.CAMELCASE.apply(SAMPLE0)); | ||
Assert.assertEquals("l0remIpsum!Do1orSitAmet", StringTransformation.CAMELCASE.apply(SAMPLE1)); | ||
Assert.assertEquals("loremIpsumDolorSitAmet", StringTransformation.CAMELCASE.apply(SAMPLE2)); | ||
Assert.assertEquals("loremIpsumDolorSitAmet", StringTransformation.CAMELCASE.apply(SAMPLE3)); | ||
} | ||
|
||
@Test | ||
public void shouldCapitalize() { | ||
Assert.assertEquals(StringUtils.EMPTY, StringTransformation.CAPITALIZE.apply(StringUtils.EMPTY)); | ||
Assert.assertEquals("Lorem", StringTransformation.CAPITALIZE.apply(SAMPLE0)); | ||
Assert.assertEquals("L0rem Ipsum! Do1or Sit Amet", StringTransformation.CAPITALIZE.apply(SAMPLE1)); | ||
Assert.assertEquals("Lorem Ipsum Dolor Sit Amet", StringTransformation.CAPITALIZE.apply(SAMPLE2)); | ||
Assert.assertEquals("Lorem Ipsum Dolor Sit Amet", StringTransformation.CAPITALIZE.apply(SAMPLE3)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.