Java 类org.apache.commons.io.input.NullReader 实例源码

项目:artifactory    文件:TrafficStreamParserTest.java   
/**
 * Supply the parser with invalid dates
 *
 * @throws IOException
 */
@Test(expectedExceptions = IllegalArgumentException.class)
public void testInvalidDates() throws IOException {
    long currentTime = System.currentTimeMillis();
    Date startDate = new Date(currentTime + 1000);
    Date endDate = new Date(currentTime);
    TrafficStreamParser.parse(new NullReader(0), startDate, endDate);
}
项目:sosiefier    文件:IOUtilsCopyTestCase.java   
/** 
     * Test Copying file > 2GB  - see issue# IO-84
     */
@Test(timeout = 1000)
    public void testCopy_readerToWriter_IO84_add1800() throws Exception {
        fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testCopy_readerToWriter_IO84_add1800");
        long size = ((long)(Integer.MAX_VALUE)) + ((long)(1));
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5400,-1);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5402,null,5401,org.apache.commons.io.IOUtils.copy(reader, writer));
        reader.close();
        reader.close();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5403,size);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5405,null,5404,org.apache.commons.io.IOUtils.copyLarge(reader, writer));
        fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
    }
项目:sosiefier    文件:IOUtilsCopyTestCase.java   
/** 
     * Test Copying file > 2GB  - see issue# IO-84
     */
public void testCopy_readerToWriter_IO84() throws Exception {
        fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testCopy_readerToWriter_IO84");
        long size = ((long)(Integer.MAX_VALUE)) + ((long)(2));
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5400,-1);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5402,null,5401,org.apache.commons.io.IOUtils.copy(reader, writer));
        reader.close();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5403,size);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5405,null,5404,org.apache.commons.io.IOUtils.copyLarge(reader, writer));
        fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
    }
项目:sosiefier    文件:IOUtilsCopyTestCase.java   
/** 
     * Test Copying file > 2GB  - see issue# IO-84
     */
public void testCopy_readerToWriter_IO84_literalMutation6310() throws Exception {
        fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testCopy_readerToWriter_IO84_literalMutation6310");
        long size = ((long)(Integer.MAX_VALUE)) + ((long)(0));
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5400,-1);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5402,null,5401,org.apache.commons.io.IOUtils.copy(reader, writer));
        reader.close();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5403,size);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5405,null,5404,org.apache.commons.io.IOUtils.copyLarge(reader, writer));
        fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
    }
项目:sosiefier    文件:IOUtilsCopyTestCase.java   
/** 
     * Test Copying file > 2GB  - see issue# IO-84
     */
public void testCopy_readerToWriter_IO84_literalMutation6311() throws Exception {
        fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testCopy_readerToWriter_IO84_literalMutation6311");
        long size = ((long)(Integer.MAX_VALUE)) + ((long)(0));
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5400,-1);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5402,null,5401,org.apache.commons.io.IOUtils.copy(reader, writer));
        reader.close();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5403,size);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5405,null,5404,org.apache.commons.io.IOUtils.copyLarge(reader, writer));
        fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
    }
项目:sosiefier    文件:IOUtilsCopyTestCase.java   
/** 
     * Test Copying file > 2GB  - see issue# IO-84
     */
@Test(timeout = 1000)
    public void testCopy_readerToWriter_IO84_remove1357() throws Exception {
        fr.inria.diversify.testamplification.logger.Logger.writeTestStart(Thread.currentThread(),this, "testCopy_readerToWriter_IO84_remove1357");
        long size = ((long)(Integer.MAX_VALUE)) + ((long)(1));
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5400,-1);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5402,null,5401,org.apache.commons.io.IOUtils.copy(reader, writer));
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5403,size);
        fr.inria.diversify.testamplification.logger.Logger.logAssertArgument(Thread.currentThread(),5405,null,5404,org.apache.commons.io.IOUtils.copyLarge(reader, writer));
        fr.inria.diversify.testamplification.logger.Logger.writeTestFinish(Thread.currentThread());
    }
项目:fuwesta    文件:RecursivePropertiesPersisterTest.java   
/**
 * Test method for
 * {@link de.ppi.fuwesta.spring.mvc.util.RecursivePropertiesPersister#load(java.util.Properties, java.io.Reader)}
 * .
 * 
 * @throws Exception if something goes wrong.
 */
@Test
public void testLoadPropertiesReader() throws Exception {
    // Arrange
    final Properties inputProps = getInputProps();
    final Reader is = new NullReader(10);
    // Act
    testee.load(inputProps, is);
    // Assert
    verify(propertiesPersister).load(inputProps, is);
    assertThat(inputProps).containsOnly(getOutputProps());
}
项目:artifactory    文件:TrafficStreamParserTest.java   
/**
 * Supply the parser with null objects instead of dates
 *
 * @throws IOException
 */
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNullDates() throws IOException {
    TrafficStreamParser.parse(new NullReader(0), null, null);
}