public void testFailOnMissingSrcDefaultFileMissing() throws IOException { try { data.setSrc(missingFile); 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 testFailOnMissingSrcDefaultFileExists() throws IOException { IOException unknownTypeException = null; try { data.setSrc(file); 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); }