Strings
Fundamentals
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("443355555566604466690277733099966688")); assertEquals("kata", phoneWords.phoneWords("55282")); assertEquals("im a tester", phoneWords.phoneWords("44460208337777833777")); assertEquals("codewars", phoneWords.phoneWords("22266631339277717777")); assertEquals("null", phoneWords.phoneWords("66885551555")); assertEquals("text", phoneWords.phoneWords("833998")); assertEquals("", phoneWords.phoneWords("0000000")); assertEquals("java", phoneWords.phoneWords("528882")); assertEquals("kumite", phoneWords.phoneWords("55886444833")); assertEquals("apple",phoneWords.phoneWords("271755533")); assertEquals("" , phoneWords.phoneWords("")); } }
- 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("443355555566604466690277733099966688"));assertEquals("kata",phoneWords.phoneWords("55282"));- assertEquals("hello how are you", phoneWords.phoneWords("443355555566604466690277733099966688"));
- assertEquals("kata", phoneWords.phoneWords("55282"));
- assertEquals("im a tester", phoneWords.phoneWords("44460208337777833777"));
- assertEquals("codewars", phoneWords.phoneWords("22266631339277717777"));
- assertEquals("null", phoneWords.phoneWords("66885551555"));
- assertEquals("text", phoneWords.phoneWords("833998"));
- assertEquals("", phoneWords.phoneWords("0000000"));
- assertEquals("java", phoneWords.phoneWords("528882"));
- assertEquals("kumite", phoneWords.phoneWords("55886444833"));
- assertEquals("apple",phoneWords.phoneWords("271755533"));
- assertEquals("" , phoneWords.phoneWords(""));
- }
- }
Strings
Fundamentals
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")); assertEquals("kata",phoneWords.phoneWords("kata")); } }
- 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"));
- assertEquals("kata",phoneWords.phoneWords("kata"));
- }
- }