Urobil som junit test takto:
@Test
public void testGetCommand() {
List<String> listCommands = Arrays.asList("SEVER", "juh",
" VYCHOD", "zapad ", "rozhliadni SA", "inVENtar", "KONIEC",
"VEZMI", "POLOZ", "POUZI", "PRESKUMAJ", "PRIKAZY", "NACITAJ",
"ULOZ", "VERZIA", "RESTART" );
ParserImpl instance = new ParserImpl();
Command expResult = null;
for(String key: listCommands){
assertNotNull(instance.getCommand(key));
}
}
ale vzdy mi hadze chybu:
No test passed, 1 test failed
adventure.ParserImplTest FALED
testGetCommand Failed:junit.framework.AssertionFailedError
kto by mi vedel pomoct?