#10 effective java: item 5

This commit is contained in:
haerong22
2022-05-18 01:57:22 +09:00
parent 57fcca02d9
commit c6cf9334e2
7 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package com.example.effectivejava.chapter01.item05.dependencyinjection;
import com.example.effectivejava.chapter01.item05.DefaultDictionary;
import org.junit.jupiter.api.Test;
class SpellCheckerTest {
@Test
void isValid() {
SpellChecker spellChecker = new SpellChecker(new DefaultDictionary());
spellChecker.isValid("test");
}
}

View File

@@ -0,0 +1,14 @@
package com.example.effectivejava.chapter01.item05.staticutils;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class SpellCheckerTest {
@Test
void isValid() {
assertTrue(SpellChecker.isValid("test"));
}
}