0 points

Load binary with JUnit 4 extension


dashboard

Thu Aug 27 2020 11:17:58 GMT+0000 (UTC)

Posted by @hosuaby #java

class MyTestClass {

    @Rule
    public BinaryResource fibonacci = givenResource()
            .binary("/com/adelean/junit/jupiter/fibonacci.bin");

    @Test
    public void testWithBinaryResource() {
        assertThat(fibonacci.get())
                .contains(1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89);
    }
}
content_copy Copy