@@ -44,8 +44,8 @@ public void testBoundedStream() throws IOException {
44
44
45
45
// Write to the stream, get the data back and check for contents
46
46
stream .write (INPUT , 0 , SIZE );
47
- assertTrue (
48
- Arrays . equals ( INPUT , stream . getBuffer ()), "Array Contents Mismatch" );
47
+ assertTrue (Arrays . equals ( INPUT , stream . getBuffer ()),
48
+ "Array Contents Mismatch" );
49
49
50
50
// Try writing beyond end of buffer. Should throw an exception
51
51
boolean caughtException = false ;
@@ -56,16 +56,16 @@ public void testBoundedStream() throws IOException {
56
56
caughtException = true ;
57
57
}
58
58
59
- assertTrue (
60
- caughtException , "Writing beyond limit did not throw an exception" );
59
+ assertTrue (caughtException ,
60
+ "Writing beyond limit did not throw an exception" );
61
61
62
62
//Reset the stream and try, should succeed
63
63
stream .reset ();
64
- assertTrue (
65
- ( stream . getLimit () == SIZE ), "Limit did not get reset correctly" );
64
+ assertTrue (( stream . getLimit () == SIZE ),
65
+ "Limit did not get reset correctly" );
66
66
stream .write (INPUT , 0 , SIZE );
67
- assertTrue (
68
- Arrays . equals ( INPUT , stream . getBuffer ()), "Array Contents Mismatch" );
67
+ assertTrue (Arrays . equals ( INPUT , stream . getBuffer ()),
68
+ "Array Contents Mismatch" );
69
69
70
70
// Try writing one more byte, should fail
71
71
caughtException = false ;
@@ -78,8 +78,8 @@ public void testBoundedStream() throws IOException {
78
78
// Reset the stream, but set a lower limit. Writing beyond
79
79
// the limit should throw an exception
80
80
stream .reset (SIZE - 1 );
81
- assertTrue (
82
- ( stream . getLimit () == SIZE - 1 ), "Limit did not get reset correctly" );
81
+ assertTrue (( stream . getLimit () == SIZE - 1 ),
82
+ "Limit did not get reset correctly" );
83
83
caughtException = false ;
84
84
85
85
try {
@@ -88,8 +88,8 @@ public void testBoundedStream() throws IOException {
88
88
caughtException = true ;
89
89
}
90
90
91
- assertTrue (
92
- caughtException , "Writing beyond limit did not throw an exception" );
91
+ assertTrue (caughtException ,
92
+ "Writing beyond limit did not throw an exception" );
93
93
}
94
94
95
95
@@ -114,8 +114,8 @@ public void testResetBuffer() throws IOException {
114
114
115
115
// Write to the stream, get the data back and check for contents
116
116
stream .write (INPUT , 0 , SIZE );
117
- assertTrue (
118
- Arrays . equals ( INPUT , stream . getBuffer ()), "Array Contents Mismatch" );
117
+ assertTrue (Arrays . equals ( INPUT , stream . getBuffer ()),
118
+ "Array Contents Mismatch" );
119
119
120
120
// Try writing beyond end of buffer. Should throw an exception
121
121
boolean caughtException = false ;
@@ -126,17 +126,17 @@ public void testResetBuffer() throws IOException {
126
126
caughtException = true ;
127
127
}
128
128
129
- assertTrue (
130
- caughtException , "Writing beyond limit did not throw an exception" );
129
+ assertTrue (caughtException ,
130
+ "Writing beyond limit did not throw an exception" );
131
131
132
132
//Reset the stream and try, should succeed
133
133
byte [] newBuf = new byte [SIZE ];
134
134
stream .resetBuffer (newBuf , 0 , newBuf .length );
135
- assertTrue (
136
- ( stream . getLimit () == SIZE ), "Limit did not get reset correctly" );
135
+ assertTrue (( stream . getLimit () == SIZE ),
136
+ "Limit did not get reset correctly" );
137
137
stream .write (INPUT , 0 , SIZE );
138
- assertTrue (
139
- Arrays . equals ( INPUT , stream . getBuffer ()), "Array Contents Mismatch" );
138
+ assertTrue (Arrays . equals ( INPUT , stream . getBuffer ()),
139
+ "Array Contents Mismatch" );
140
140
141
141
// Try writing one more byte, should fail
142
142
caughtException = false ;
@@ -145,8 +145,8 @@ public void testResetBuffer() throws IOException {
145
145
} catch (Exception e ) {
146
146
caughtException = true ;
147
147
}
148
- assertTrue (
149
- caughtException , "Writing beyond limit did not throw an exception" );
148
+ assertTrue (caughtException ,
149
+ "Writing beyond limit did not throw an exception" );
150
150
}
151
151
152
152
}
0 commit comments