Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public class HelloWorld {
public String getHelloWorld() {
return "Fix this string to pass tests";
return "Hello, World!";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ public class Palindrome {
* 4. "abA" is not a palindrome.
* @throws IllegalArgumentException if str is `null`
*/
public static boolean isPalindrome(String str) {
throw new RuntimeException("Not implemented");
public static boolean isPalindrome(final String str) {
if (str == null) {
throw new IllegalArgumentException();
}

return str.equals((new StringBuilder(str)).reverse().toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;


@Disabled
//@Disabled
class HelloWorldTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import static org.junit.jupiter.api.Assertions.*;

@Disabled
//@Disabled
class PalindromeTest {
@Test
void nullIsAnIlligalArgument() {
Expand Down