@Override public DatagramChannel get() { return IOTestTools.getDatagramChannel(); }
@Override public SeekableByteChannel get() { return IOTestTools.getInputFileChannel(); } };
@Override public GatheringByteChannel get() { return IOTestTools.getOutputFileChannel(); } };
@Override protected InputStream newInputStream() throws IOException { return new FileInputStream(IOTestTools.getTempFile()); }
public static FileChannel getInputFileChannel() { return getTempFileInputStream().getChannel(); }
@Test(expected = NetworkReactiveAuditException.class) public void connect() throws IOException { Assume.assumeTrue(IOTestTools.isNetworkConnected()); try (SocketChannel r = IOTestTools.getSocketChannel()) { TestTools.strict.commit(); r.connect(null); } }
public static FileChannel getOutputFileChannel() { return getTempFileOutputStream().getChannel(); }
@Test(expected = FileReactiveAuditException.class) public void marshal_Writer() throws JAXBException { TestTools.strict.commit(); x.marshal(null, IOTestTools.getTempFileWriter()); }
@Test(expected = FileReactiveAuditException.class) public void unmarshal_Reader() throws JAXBException { TestTools.strict.commit(); x.unmarshal(IOTestTools.getTempFileReader()); }
@Override public Object get() { return IOTestTools.getSocketChannel(); } }
@Test(expected = FileReactiveAuditException.class) public void open() throws IOException { TestTools.strict.commit(); FileChannel.open(IOTestTools.getTempPath()); }
@Override protected OutputStream newOutputStream() throws IOException { return new FileOutputStream(IOTestTools.getTempFile()); }
@Test(expected = FileReactiveAuditException.class) public void parse_InputStream_DefaultHandler() throws IOException, SAXException { TestTools.strict.commit(); x.parse(IOTestTools.getTempFileInputStream(), (DefaultHandler) null); }
@Test(expected = NetworkReactiveAuditException.class) public void finishConnect() throws IOException { Assume.assumeTrue(IOTestTools.isNetworkConnected()); try (SocketChannel r = IOTestTools.getSocketChannel()) { TestTools.strict.commit(); r.finishConnect(); } }
@Test(expected = FileReactiveAuditException.class) public void marshal_OutputStream() throws JAXBException { TestTools.strict.commit(); x.marshal(null, IOTestTools.getTempFileOutputStream()); }
@Test(expected = FileReactiveAuditException.class) public void marshal_Writer() { TestTools.strict.commit(); JAXB.marshal(null, IOTestTools.getTempFileWriter()); }
@Test(expected = FileReactiveAuditException.class) public void unmarshal_Reader() { TestTools.strict.commit(); JAXB.unmarshal(IOTestTools.getTempFileReader(), null); }
@Override public Object get() { return IOTestTools.getSocketChannel(); } }
private RandomAccessFile newRandomAccessFile() throws IOException { return new RandomAccessFile(IOTestTools.getTempFile(), "rw"); }
@Test(expected = FileReactiveAuditException.class) @SuppressWarnings("deprecation") public void parse_InputStream_HandlerBase() throws IOException, SAXException { TestTools.strict.commit(); x.parse(IOTestTools.getTempFileInputStream(), (HandlerBase) null); }