Class LazyFileInputStreamTest
- java.lang.Object
-
- de.japrost.jabudget.serialization.LazyFileInputStreamTest
-
public class LazyFileInputStreamTest extends java.lang.Object
Test theLazyFileInputStream
.
-
-
Constructor Summary
Constructors Constructor Description LazyFileInputStreamTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeCut()
Be kind and close before exit.void
initCut()
Set cut with a file.void
testAvailable()
Test that available() opens the delegate and delegates.void
testAvailable_notOpening()
Test that available() not reopen the delegate and delegates.void
testClose()
Test that close() closes the delegate.void
testGetChannel()
Test that getChannel() opens the delegate and delegates.void
testGetChannel_notOpening()
Test that getChannel() not reopen the delegate and delegates.void
testGetFD()
Test that getFD() opens the delegate and delegates.void
testGetFD_notReopening()
Test that getFD() not reopen the delegate and delegates.void
testMulitClose()
Test that close() closes the delegate but next action reopens a new one.void
testRead()
Test that read() opens the delegate and delegates.void
testRead_twice()
Test that read() does not reopen the delegate and delegates.void
testReadAllBytes()
Test that readAllBytes() opens the delegate and delegates.void
testReadAllBytes_notOpening()
Test that readAllBytes() not reopen the delegate and delegates.void
testReadByteArray()
Test that read(byte[] b) opens the delegate and delegates.void
testReadByteArray_twice()
Test that read(byte[] b) not reopen the delegate and delegates.void
testReadByteArrayOffset()
Test that read(final byte[] b, final int off, final int len) opens the delegate and delegates.void
testReadByteArrayOffset_twice()
Test that read(final byte[] b, final int off, final int len) not reopen the delegate and delegates.void
testReadNBytes()
Test that readNBytes(final byte[] b, final int off, final int len) opens the delegate and delegates.void
testReadNBytes_notOpening()
Test that readNBytes(final byte[] b, final int off, final int len) not reopen the delegate and delegates.void
testSkip()
Test that skip() opens the delegate and delegates.void
testSkip_notOpening()
Test that skip() not reopen the delegate and delegates.void
testTransferTo()
Test that transferTo() opens the delegate and delegates.void
testTransferTo_notReopening()
Test that transferTo() not reopen the delegate and delegates.
-
-
-
Method Detail
-
initCut
public void initCut()
Set cut with a file.
-
closeCut
public void closeCut() throws java.lang.Exception
Be kind and close before exit.- Throws:
java.lang.Exception
- never.
-
testRead
public void testRead() throws java.lang.Exception
Test that read() opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testRead_twice
public void testRead_twice() throws java.lang.Exception
Test that read() does not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testReadByteArray
public void testReadByteArray() throws java.lang.Exception
Test that read(byte[] b) opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testReadByteArray_twice
public void testReadByteArray_twice() throws java.lang.Exception
Test that read(byte[] b) not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testReadByteArrayOffset
public void testReadByteArrayOffset() throws java.lang.Exception
Test that read(final byte[] b, final int off, final int len) opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testReadByteArrayOffset_twice
public void testReadByteArrayOffset_twice() throws java.lang.Exception
Test that read(final byte[] b, final int off, final int len) not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testReadNBytes
public void testReadNBytes() throws java.lang.Exception
Test that readNBytes(final byte[] b, final int off, final int len) opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testReadNBytes_notOpening
public void testReadNBytes_notOpening() throws java.lang.Exception
Test that readNBytes(final byte[] b, final int off, final int len) not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testReadAllBytes
public void testReadAllBytes() throws java.lang.Exception
Test that readAllBytes() opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testReadAllBytes_notOpening
public void testReadAllBytes_notOpening() throws java.lang.Exception
Test that readAllBytes() not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testSkip
public void testSkip() throws java.lang.Exception
Test that skip() opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testSkip_notOpening
public void testSkip_notOpening() throws java.lang.Exception
Test that skip() not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testAvailable
public void testAvailable() throws java.lang.Exception
Test that available() opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testAvailable_notOpening
public void testAvailable_notOpening() throws java.lang.Exception
Test that available() not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testClose
public void testClose() throws java.lang.Exception
Test that close() closes the delegate.- Throws:
java.lang.Exception
- never.
-
testGetChannel
public void testGetChannel() throws java.lang.Exception
Test that getChannel() opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testGetChannel_notOpening
public void testGetChannel_notOpening() throws java.lang.Exception
Test that getChannel() not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testGetFD
public void testGetFD() throws java.lang.Exception
Test that getFD() opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testGetFD_notReopening
public void testGetFD_notReopening() throws java.lang.Exception
Test that getFD() not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testTransferTo
public void testTransferTo() throws java.lang.Exception
Test that transferTo() opens the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testTransferTo_notReopening
public void testTransferTo_notReopening() throws java.lang.Exception
Test that transferTo() not reopen the delegate and delegates.- Throws:
java.lang.Exception
- never.
-
testMulitClose
public void testMulitClose() throws java.lang.Exception
Test that close() closes the delegate but next action reopens a new one.- Throws:
java.lang.Exception
- never.
-
-