public void testFailOnMissingSrcFailFileMissing() throws IOException { try { data.setSrc(missingFile); data.setMissingSrc("fail"); data.produce(null); fail(); } catch (FileNotFoundException expected) { } }
public void testFailOnUnknownValue() throws IOException { try { data.setSrc(missingFile); data.setMissingSrc("not a value value"); data.produce(null); fail(); } catch (IllegalArgumentException expected) { } }
public void testFailOnMissingSrcIgnoreFileExists() throws IOException { IOException unknownTypeException = null; try { data.setSrc(file); data.setMissingSrc("ignore"); data.produce(null); } catch (IOException expected) { unknownTypeException = expected; } assertTrue(unknownTypeException.getMessage().startsWith("Unknown type")); }
public void testFailOnMissingSrcIgnoreFileMissingVaryInput() throws IOException { data.setSrc(missingFile); data.setMissingSrc(" IGNORE "); data.produce(null); }
public void testFailOnMissingSrcIgnoreFileMissing() throws IOException { data.setSrc(missingFile); data.setMissingSrc("ignore"); data.produce(null); }