Strings
Fundamentals
public class phoneWords{ public static String phoneWords(String str){ return str; } }
- public class phoneWords{
- public static String phoneWords(String str){
return "";- return str;
- }
- }
import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; // TODO: Replace examples and use TDD by writing your own tests class SolutionTest { @Test void testSomething() { // assertEquals("expected", "actual"); } @Test void isEmpty(){ assertEquals("",phoneWords.phoneWords("")); } @Test void BasicTest(){ assertEquals("Hello how are you",phoneWords.phoneWords("Hello how are you")); } }
- import org.junit.jupiter.api.Test;
- import static org.junit.jupiter.api.Assertions.assertEquals;
- // TODO: Replace examples and use TDD by writing your own tests
- class SolutionTest {
- @Test
- void testSomething() {
- // assertEquals("expected", "actual");
- }
- @Test
- void isEmpty(){
- assertEquals("",phoneWords.phoneWords(""));
- }
- @Test
- void BasicTest(){
- assertEquals("Hello how are you",phoneWords.phoneWords("Hello how are you"));
- }
- }