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