Skip to content

Commit f556fd4

Browse files
committed
Fix test for on all JDK versions.
1 parent 51737c3 commit f556fd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/kotlin/io/github/nstdio/http/ext/EncryptedStreamFactoryTest.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class EncryptedStreamFactoryTest {
8181
}
8282

8383
@Test
84-
fun `Should close input when exception occures`() {
84+
fun `Should close input when exception occurs`() {
8585
//given
8686
val delegate = mock(StreamFactory::class.java)
8787
val mockIs = mock(InputStream::class.java)
@@ -93,6 +93,8 @@ class EncryptedStreamFactoryTest {
9393

9494
given(mockIs.read()).willThrow(expectedIO)
9595
given(mockOut.write(anyInt())).willThrow(expectedIO)
96+
given(mockOut.write(any(ByteArray::class.java))).willThrow(expectedIO)
97+
given(mockOut.write(any(), anyInt(), anyInt())).willThrow(expectedIO)
9698
given(delegate.input(any(), any())).willReturn(mockIs)
9799
given(delegate.output(any(), any())).willReturn(mockOut)
98100

0 commit comments

Comments
 (0)