Exemplo n.º 1
0
 @Test
 public void main_shouldWriteToSpecifiedFileWhenPassedTwoInputs() throws Exception {
   BankOcr.main(new String[] {"src/test/java/.test", "test.output"});
   assertThat(readFile("test.output"), is(testFileLines()));
 }
Exemplo n.º 2
0
 @Test(expected = IllegalArgumentException.class)
 public void main_shouldFailWhenPassedAnEmptyArray() throws Exception {
   BankOcr.main(new String[0]);
 }
Exemplo n.º 3
0
 @Test
 public void main_shouldWriteToDefaultFileWhenPassedOneInput() throws Exception {
   BankOcr.main(new String[] {"src/test/java/.test"});
   assertThat(readFile("output.txt"), is(testFileLines()));
 }
Exemplo n.º 4
0
 @Test(expected = IllegalArgumentException.class)
 public void main_shouldFailWhenPassedNull() throws Exception {
   BankOcr.main(null);
 }