LinkingMorphemes { public List<String> getAll() { return morphemes; } LinkingMorphemes(String... aMorphemes);  LinkingMorphemes(List<String> aMorphemes);  LinkingMorphemes(InputStream aStream);  LinkingMorphemes(File aMorphemesTextFile);  LinkingMorphemes(BufferedReader aReader); List<String> getAll(); int startsWith(String aWord);  }
@Test public void testStringConstructor() { LinkingMorphemes l = new LinkingMorphemes("s", "ens"); assertEquals(2, l.getAll().size()); assertEquals("s", l.getAll().get(0)); }
@Test public void testListConstructor() { List<String> list = new ArrayList<String>(); list.add("s"); list.add("ens"); LinkingMorphemes l = new LinkingMorphemes(list); assertEquals(2, l.getAll().size()); assertEquals("s", l.getAll().get(0)); }
@Test public void testFileConstructor() throws Exception { LinkingMorphemes l = new LinkingMorphemes(new File("src/test/resources/dic/morphemes.txt")); assertEquals(2, l.getAll().size()); assertEquals("s", l.getAll().get(0)); }