Modify "then" by "should" in the Unit Tests as suggested from code review
Co-Authored-By: KevinGilmore <kpg102@gmail.com>
This commit is contained in:
parent
8ecc31f99e
commit
cffbc130ec
@ -24,13 +24,13 @@ public class CaseInsensitiveWorkaroundsUnitTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenString_whenCallingStringMatches_shouldReturnTrue() {
|
public void givenString_whenCallingStringMatches_thenReturnsTrue() {
|
||||||
// Use String Matches to avoid case insensitive issues
|
// Use String Matches to avoid case insensitive issues
|
||||||
Assert.assertTrue(src.matches("(?i).*" + dest + ".*"));
|
Assert.assertTrue(src.matches("(?i).*" + dest + ".*"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenString_whenCallingStringRegionMatches_shouldReturnTrue() {
|
public void givenString_whenCallingStringRegionMatches_thenReturnsTrue() {
|
||||||
// Use String Region Matches to avoid case insensitive issues
|
// Use String Region Matches to avoid case insensitive issues
|
||||||
CaseInsensitiveWorkarounds comparator = new CaseInsensitiveWorkarounds();
|
CaseInsensitiveWorkarounds comparator = new CaseInsensitiveWorkarounds();
|
||||||
Assert.assertTrue(comparator.processRegionMatches(src, dest));
|
Assert.assertTrue(comparator.processRegionMatches(src, dest));
|
||||||
@ -38,14 +38,14 @@ public class CaseInsensitiveWorkaroundsUnitTest {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenString_whenCallingPaternCompileMatcherFind_shouldReturnTrue() {
|
public void givenString_whenCallingPaternCompileMatcherFind_thenReturnsTrue() {
|
||||||
// Use Pattern Compile Matcher and Find to avoid case insensitive issues
|
// Use Pattern Compile Matcher and Find to avoid case insensitive issues
|
||||||
Assert.assertTrue(Pattern.compile(Pattern.quote(dest),
|
Assert.assertTrue(Pattern.compile(Pattern.quote(dest),
|
||||||
Pattern.CASE_INSENSITIVE) .matcher(src) .find());
|
Pattern.CASE_INSENSITIVE) .matcher(src) .find());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenString_whenCallingStringUtilsContainsIgnoreCase_shouldReturnTrue() {
|
public void givenString_whenCallingStringUtilsContainsIgnoreCase_thenReturnsTrue() {
|
||||||
// Use StringUtils containsIgnoreCase to avoid case insensitive issues
|
// Use StringUtils containsIgnoreCase to avoid case insensitive issues
|
||||||
Assert.assertTrue(StringUtils.containsIgnoreCase(src, dest));
|
Assert.assertTrue(StringUtils.containsIgnoreCase(src, dest));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user