BAEL-227 - Renaming test to follow BDD convention
This commit is contained in:
parent
4e1a0d478d
commit
2225509d83
|
@ -8,21 +8,26 @@ import org.junit.Test;
|
||||||
import com.baeldung.testing.mutation.Palindrome;
|
import com.baeldung.testing.mutation.Palindrome;
|
||||||
|
|
||||||
public class TestPalindrome {
|
public class TestPalindrome {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void acceptsPalindrome() {
|
public void whenEmptyString_thanAccept() {
|
||||||
Palindrome palindromeTester = new Palindrome();
|
Palindrome palindromeTester = new Palindrome();
|
||||||
assertTrue(palindromeTester.isPalindrome("noon"));
|
assertTrue(palindromeTester.isPalindrome("noon"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void rejectsNonPalindrome(){
|
public void whenPalindrom_thanAccept() {
|
||||||
|
Palindrome palindromeTester = new Palindrome();
|
||||||
|
assertTrue(palindromeTester.isPalindrome("noon"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void whenNotPalindrom_thanReject(){
|
||||||
Palindrome palindromeTester = new Palindrome();
|
Palindrome palindromeTester = new Palindrome();
|
||||||
assertFalse(palindromeTester.isPalindrome("box"));
|
assertFalse(palindromeTester.isPalindrome("box"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void rejectsNearPalindrome(){
|
public void whenNearPalindrom_thanReject(){
|
||||||
Palindrome palindromeTester = new Palindrome();
|
Palindrome palindromeTester = new Palindrome();
|
||||||
assertFalse(palindromeTester.isPalindrome("neon"));
|
assertFalse(palindromeTester.isPalindrome("neon"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue