Commit 595fada2 authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #8660 from dreis2211:cleanup-equals-exceptions

* pr/8660:
  Fix test assertions
parents 113279c1 1266642a
......@@ -55,7 +55,7 @@ public class LayoutsTests {
@Test
public void unknownFile() throws Exception {
this.thrown.equals(IllegalStateException.class);
this.thrown.expect(IllegalStateException.class);
this.thrown.expectMessage("Unable to deduce layout for 'test.txt'");
Layouts.forFile(new File("test.txt"));
}
......
......@@ -87,28 +87,28 @@ public class RandomAccessDataFileTests {
@Test
public void fileNotNull() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.equals("File must not be null");
this.thrown.expectMessage("File must not be null");
new RandomAccessDataFile(null);
}
@Test
public void fileExists() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.equals("File must exist");
this.thrown.expectMessage("File must exist");
new RandomAccessDataFile(new File("/does/not/exist"));
}
@Test
public void fileNotNullWithConcurrentReads() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.equals("File must not be null");
this.thrown.expectMessage("File must not be null");
new RandomAccessDataFile(null, 1);
}
@Test
public void fileExistsWithConcurrentReads() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.equals("File must exist");
this.thrown.expectMessage("File must exist");
new RandomAccessDataFile(new File("/does/not/exist"), 1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment