Skip to content

Commit

Permalink
#575 fixed 2 style issues and exception type in tests from CR
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Mar 1, 2016
1 parent 79a8d7c commit 41af769
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/test/java/org/takes/rq/CapInputStreamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,31 +58,25 @@ public void putsCapOnStream() throws IOException {

/**
* CapInputStream can close a stream.
* @throws IOException If some problem inside
* @throws Exception If some problem inside
*/
@Test
public void closesStream() throws IOException {
public void closesStream() throws Exception {
final InputStream stream = Mockito.mock(InputStream.class);
final CapInputStream wrapper = new CapInputStream(
stream,
0L
);
final CapInputStream wrapper = new CapInputStream(stream, 0L);
wrapper.close();
Mockito.verify(stream, Mockito.times(1)).close();
}

/**
* CapInputStream can skip on a stream.
* @throws IOException If some problem inside
* @throws Exception If some problem inside
*/
@Test
public void skipsOnStream() throws IOException {
public void skipsOnStream() throws Exception {
final long skip = 25L;
final InputStream stream = Mockito.mock(InputStream.class);
final CapInputStream wrapper = new CapInputStream(
stream,
50L
);
final CapInputStream wrapper = new CapInputStream(stream, 50L);
wrapper.skip(skip);
Mockito.verify(stream, Mockito.times(1)).skip(skip);
}
Expand Down

0 comments on commit 41af769

Please sign in to comment.