jcunit's blog

JCUnitの開発日誌(ログ)です。"その時点での"JCUnit作者の理解や考え、開発状況を日本語で書きます。

Theories runner


JUnitTheories runner使 使



JUnit JCUnitTheoriesJCUnit使

Theories0.5.6)
    @RunWith(TheoriesWithJCUnit.class)
    public class TheoriesExample1 {
      @DataPoints("posInt")
      public static int[] positiveIntegers() {
        return new int[] {
        1, 2, 3
        };
      }

      @Theory
      public void test1(
          int a,
          int b,
          int c,
          intd) throws Exception {
        System.out.printf("a=%s, b=%s, c=%d, d=%d%n", a, b, c, d);
      }
    }

JCUnit0.5.x-develop

github.com

343 x 3 x 3 x 3=81Theories TheoriesWithJCUnit9
    a=1, b=1, c=3, d=3
    a=1, b=2, c=2, d=1
    a=1, b=3, c=1, d=2
    a=2, b=1, c=1, d=1
    a=2, b=2, c=3, d=2
    a=2, b=3, c=2, d=3
    a=3, b=1, c=2, d=2
    a=3, b=2, c=1, d=3
    a=3, b=3, c=3, d=1

2

github.com

@TupleGenerationJCUnit使

0.6.0