#10 effective java: item 5

This commit is contained in:
haerong22
2022-05-19 01:03:43 +09:00
parent c6cf9334e2
commit 69ddddd1ce
12 changed files with 165 additions and 3 deletions

View File

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