@Test public void all_fields() throws JSONException { FlexBoxComponent boxComponent = FlexBoxComponent.newBuilder( FlexMessageComponent.Layout.HORIZONTAL, Arrays.asList(new FlexMessageComponent[]{textComponent, imageComponent}) ).build(); givenFlexBubbleContainer( FlexBubbleContainer.newBuilder() .setStyles(new FlexBubbleContainer.Style()) .setDirection(FlexBubbleContainer.Direction.LEFT_TO_RIGHT) .setHeader(boxComponent) .setBody(boxComponent) .setHero(imageComponent) .setFooter(boxComponent) ); messageShouldBe("{" + " \"type\": \"bubble\"," + " \"direction\": \"ltr\"," + " \"header\": {" + " \"type\": \"box\"," + " \"layout\": \"horizontal\"," + " \"contents\": [" + " {" + " \"type\": \"text\"," + " \"text\": \"Hello !\"" + " }," + " {" + " \"type\": \"image\"," + " \"url\": \"https: " }" + " ]" + " }," + " \"hero\": {" + " \"type\": \"image\"," + " \"url\": \"https: " }," + " \"body\": {" + " \"type\": \"box\"," + " \"layout\": \"horizontal\"," + " \"contents\": [" + " {" + " \"type\": \"text\"," + " \"text\": \"Hello !\"" + " }," + " {" + " \"type\": \"image\"," + " \"url\": \"https: " }" + " ]" + " }," + " \"footer\": {" + " \"type\": \"box\"," + " \"layout\": \"horizontal\"," + " \"contents\": [" + " {" + " \"type\": \"text\"," + " \"text\": \"Hello !\"" + " }," + " {" + " \"type\": \"image\"," + " \"url\": \"https: " }" + " ]" + " }," + " \"styles\": {}" + "}"); }
public static Builder newBuilder() { return new Builder(); }
FlexBubbleContainer extends FlexMessageContainer { public static Builder newBuilder() { return new Builder(); } }
FlexBubbleContainer extends FlexMessageContainer { public static Builder newBuilder() { return new Builder(); } private  FlexBubbleContainer(); private  FlexBubbleContainer(Builder builder); }
FlexBubbleContainer extends FlexMessageContainer { public static Builder newBuilder() { return new Builder(); } private  FlexBubbleContainer(); private  FlexBubbleContainer(Builder builder); static Builder newBuilder(); @NonNull @Override JSONObject toJsonObject(); }
FlexBubbleContainer extends FlexMessageContainer { public static Builder newBuilder() { return new Builder(); } private  FlexBubbleContainer(); private  FlexBubbleContainer(Builder builder); static Builder newBuilder(); @NonNull @Override JSONObject toJsonObject();  }