BAEL-2328: Using isTrue() and isFalse() for assertions
This commit is contained in:
parent
72574f554a
commit
8f5f12519f
|
@ -13,54 +13,54 @@ public class MatchWordsUnitTest {
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingStringContains_shouldMatchWords() {
|
public void givenText_whenCallingStringContains_shouldMatchWords() {
|
||||||
final boolean result = MatchWords.containsWords(inputString, words);
|
final boolean result = MatchWords.containsWords(inputString, words);
|
||||||
assertThat(result).isEqualTo(true);
|
assertThat(result).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingJava8_shouldMatchWords() {
|
public void givenText_whenCallingJava8_shouldMatchWords() {
|
||||||
final boolean result = MatchWords.containsWordsJava8(inputString, words);
|
final boolean result = MatchWords.containsWordsJava8(inputString, words);
|
||||||
assertThat(result).isEqualTo(true);
|
assertThat(result).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingJava8_shouldNotMatchWords() {
|
public void givenText_whenCallingJava8_shouldNotMatchWords() {
|
||||||
final boolean result = MatchWords.containsWordsJava8(wholeInput, words);
|
final boolean result = MatchWords.containsWordsJava8(wholeInput, words);
|
||||||
assertThat(result).isEqualTo(false);
|
assertThat(result).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingPattern_shouldMatchWords() {
|
public void givenText_whenCallingPattern_shouldMatchWords() {
|
||||||
final boolean result = MatchWords.containsWordsPatternMatch(inputString, words);
|
final boolean result = MatchWords.containsWordsPatternMatch(inputString, words);
|
||||||
assertThat(result).isEqualTo(true);
|
assertThat(result).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingAhoCorasick_shouldMatchWords() {
|
public void givenText_whenCallingAhoCorasick_shouldMatchWords() {
|
||||||
final boolean result = MatchWords.containsWordsAhoCorasick(inputString, words);
|
final boolean result = MatchWords.containsWordsAhoCorasick(inputString, words);
|
||||||
assertThat(result).isEqualTo(true);
|
assertThat(result).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingAhoCorasick_shouldNotMatchWords() {
|
public void givenText_whenCallingAhoCorasick_shouldNotMatchWords() {
|
||||||
final boolean result = MatchWords.containsWordsAhoCorasick(wholeInput, words);
|
final boolean result = MatchWords.containsWordsAhoCorasick(wholeInput, words);
|
||||||
assertThat(result).isEqualTo(false);
|
assertThat(result).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingIndexOf_shouldMatchWords() {
|
public void givenText_whenCallingIndexOf_shouldMatchWords() {
|
||||||
final boolean result = MatchWords.containsWordsIndexOf(inputString, words);
|
final boolean result = MatchWords.containsWordsIndexOf(inputString, words);
|
||||||
assertThat(result).isEqualTo(true);
|
assertThat(result).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingArrayList_shouldMatchWords() {
|
public void givenText_whenCallingArrayList_shouldMatchWords() {
|
||||||
final boolean result = MatchWords.containsWordsArray(inputString, words);
|
final boolean result = MatchWords.containsWordsArray(inputString, words);
|
||||||
assertThat(result).isEqualTo(true);
|
assertThat(result).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenText_whenCallingArrayList_shouldNotMatchWords() {
|
public void givenText_whenCallingArrayList_shouldNotMatchWords() {
|
||||||
final boolean result = MatchWords.containsWordsArray(wholeInput, words);
|
final boolean result = MatchWords.containsWordsArray(wholeInput, words);
|
||||||
assertThat(result).isEqualTo(false);
|
assertThat(result).isFalse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue