public void testShouldGetCorrectMeaningForAvailableKannadaWord() { KannadaMeaningFinder kannadaMeaningFinder = new KannadaMeaningFinder("Enri"); try { assertEquals("hello", kannadaMeaningFinder.getKannadaMeaning()); } catch (IOException e) { fail("This should have gotten the correct meaning"); } }
public void testShouldFailIfKannadaWordDoesntExist() { KannadaMeaningFinder kannadaMeaningFinder = new KannadaMeaningFinder("boss"); try { kannadaMeaningFinder.getKannadaMeaning(); fail("Should have thrown Exception"); } catch (Exception e) { } }