コード例 #1
0
  @Test
  public void testImplicitPackage() {
    Descriptor descriptor =
        Flapi.builder()
            .setPackage("some.thing")
            .setDescriptorName("Something")
            .addMethod("method(Map variable)")
            .last()
            .build();

    descriptor.writeToFolder(getTemporaryFolder());
    testCompile();
  }
コード例 #2
0
  @Test
  public void testArrayType() {
    Descriptor descriptor =
        Flapi.builder()
            .setPackage("some.thing")
            .setDescriptorName("Something")
            .addMethod("method(byte[] variable)")
            .last()
            .build();

    descriptor.writeToFolder(getTemporaryFolder());

    addTestClassMethod(
        "Test",
        "some.thing.Something.SomethingGenerator.create(null)"
            + "  .method(new byte[]{'a', 'b'})"
            + ";");

    testCompile();
  }