Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Read File and Resource in JUnit Test into Stream

    @Test
    public void testReadAsStream2() throws IOException{
        InputStream is = this.getClass().getResourceAsStream("/data01/users.csv");
        assertNotNull(is);
    }
Source by howtoprogram.xyz #
 
PREVIOUS NEXT
Tagged: #Read #File #Resource #JUnit #Test #Stream
ADD COMMENT
Topic
Name
6+1 =