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:
Carlos Cavero 2020-02-04 10:20:14 +01:00 committed by GitHub
parent 8ecc31f99e
commit cffbc130ec

View File

@ -24,13 +24,13 @@ public class CaseInsensitiveWorkaroundsUnitTest {
}
@Test
public void givenString_whenCallingStringMatches_shouldReturnTrue() {
public void givenString_whenCallingStringMatches_thenReturnsTrue() {
// Use String Matches to avoid case insensitive issues
Assert.assertTrue(src.matches("(?i).*" + dest + ".*"));
}
@Test
public void givenString_whenCallingStringRegionMatches_shouldReturnTrue() {
public void givenString_whenCallingStringRegionMatches_thenReturnsTrue() {
// Use String Region Matches to avoid case insensitive issues
CaseInsensitiveWorkarounds comparator = new CaseInsensitiveWorkarounds();
Assert.assertTrue(comparator.processRegionMatches(src, dest));
@ -38,16 +38,16 @@ public class CaseInsensitiveWorkaroundsUnitTest {
@Test
public void givenString_whenCallingPaternCompileMatcherFind_shouldReturnTrue() {
public void givenString_whenCallingPaternCompileMatcherFind_thenReturnsTrue() {
// Use Pattern Compile Matcher and Find to avoid case insensitive issues
Assert.assertTrue(Pattern.compile(Pattern.quote(dest),
Pattern.CASE_INSENSITIVE) .matcher(src) .find());
}
@Test
public void givenString_whenCallingStringUtilsContainsIgnoreCase_shouldReturnTrue() {
public void givenString_whenCallingStringUtilsContainsIgnoreCase_thenReturnsTrue() {
// Use StringUtils containsIgnoreCase to avoid case insensitive issues
Assert.assertTrue(StringUtils.containsIgnoreCase(src, dest));
}
}
}