title: iterative testing using junit
body: <p>I have a bunch of test inputs that I would like to run and compare the output with expected:</p>
  
  <pre><code>@Test
  void test () throws IOExeption {
    for (File i : readDir()) {
      File out = foo(i);
      assertEquals(FileUtils.readLines(expected), FileUtils.readLines(out));
    }
  }
  </code></pre>
  
  <p>I would like to run the tests using JUnit. But if I do it like the above then JUnit will stop after encountering the first test failure. Is there a better way to do this other than making each file its own test case like below?</p>
  
  <pre><code>@Test
  void test1 () throws IOExeption {
    File i = readFile("1.txt");
    File out = foo(i);
    assertEquals(FileUtils.readLines(expected), FileUtils.readLines(out));      
  }
  
  @Test
  void test2 () throws IOExeption {
    File i = readFile("2.txt");
    File out = foo(i);
    assertEquals(FileUtils.readLines(expected), FileUtils.readLines(out));      
  }
  </code></pre>