src/test/java/my/company/tests/ArithmeticTestCase.java
@Attachment(value = "Sample fixture attachment", type = "text/plain")
    static public byte[] saveTxtAttachment() throws Exception {
        URL resource = ClassLoader.getSystemResource(FIXTURES_NAME);
        if (resource == null) {
            fail(String.format("Couldn't find resource %s", FIXTURES_NAME));
        }
        return Files.readAllBytes(Paths.get(resource.toURI()));
    }
/**
     * Saves text attachment for current test.
     * @return Attachment file containment.
     * @throws Exception
     */
Saves text attachment for current test.
@return Attachment file containment.
@throws Exception
Saves text attachment for current test . @return Attachment file containment . @throws Exception
@Attachment(value = "Sample fixture attachment", type = "text/plain")
    static public byte[] saveTxtAttachment() throws Exception {
        URL resource = ClassLoader.getSystemResource(FIXTURES_NAME);
        if (resource == null) {
            fail(String.format("Couldn't find resource %s", FIXTURES_NAME));
        }
        return Files.readAllBytes(Paths.get(resource.toURI()));
    }
@ Attachment ( value = "Sample fixture attachment" , type = "text/plain" ) static public byte [ ] saveTxtAttachment ( ) throws Exception { URL resource = ClassLoader . getSystemResource ( FIXTURES_NAME ) ; if ( resource == null ) { fail ( String . format ( "Couldn't find resource %s" , FIXTURES_NAME ) ) ; } return Files . readAllBytes ( Paths . get ( resource . toURI ( ) ) ) ; }
Saves text attachment for current test.
Saves text attachment for current test .