blob: fa7a39eea7d0c8c32a9fdb82b7f9af0e1a46295c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package com.yahoo.vespa.test.samples;
import com.yahoo.vespa.testrunner.Expect;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestFactory;
import java.util.stream.IntStream;
import java.util.stream.Stream;
@Expect(skipped = 1, status = 5)
public class FailingTestFactoryTest {
@BeforeAll
static void fail() { throw new RuntimeException(); }
@TestFactory
Stream<DynamicTest> tests() {
return IntStream.range(0, 3).mapToObj(i -> DynamicTest.dynamicTest("test-" + i, () -> { throw new RuntimeException("error"); }));
}
@Test
void fest() { }
}
|