Esempio n. 1
0
 public void testFailOnMissingSrcFailFileMissing() throws IOException {
   try {
     data.setSrc(missingFile);
     data.setMissingSrc("fail");
     data.produce(null);
     fail();
   } catch (FileNotFoundException expected) {
   }
 }
Esempio n. 2
0
 public void testFailOnUnknownValue() throws IOException {
   try {
     data.setSrc(missingFile);
     data.setMissingSrc("not a value value");
     data.produce(null);
     fail();
   } catch (IllegalArgumentException expected) {
   }
 }
Esempio n. 3
0
 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"));
 }
Esempio n. 4
0
 public void testFailOnMissingSrcIgnoreFileMissingVaryInput() throws IOException {
   data.setSrc(missingFile);
   data.setMissingSrc(" IGNORE ");
   data.produce(null);
 }
Esempio n. 5
0
 public void testFailOnMissingSrcIgnoreFileMissing() throws IOException {
   data.setSrc(missingFile);
   data.setMissingSrc("ignore");
   data.produce(null);
 }