@Test public void with_all_fields() throws JSONException { givenImageComponent(FlexImageComponent.newBuilder("https: .setFlex(0) .setMargin(FlexMessageComponent.Margin.XXL) .setAlign(FlexMessageComponent.Alignment.START) .setGravity(FlexMessageComponent.Gravity.BOTTOM) .setSize(FlexMessageComponent.Size.XL3) .setAspectRatio(FlexMessageComponent.AspectRatio.RATIO_16x9) .setAspectMode(FlexMessageComponent.AspectMode.COVER) .setBackgroundColor("#FFFFFF") .setAction(new UriAction("http: messageShouldBe("{" + " \"type\": \"image\"," + " \"url\": \"https: " \"flex\": 0," + " \"margin\": \"xxl\"," + " \"align\": \"start\"," + " \"gravity\": \"bottom\"," + " \"size\": \"3xl\"," + " \"aspectRatio\": \"16:9\"," + " \"aspectMode\": \"cover\"," + " \"backgroundColor\": \"#FFFFFF\"," + " \"action\": {" + " \"type\": \"uri\"," + " \"label\": \"View details\"," + " \"uri\": \"http: " }" + "}"); }
public static Builder newBuilder(@NonNull String url) { return new Builder(url); }
FlexImageComponent extends FlexMessageComponent { public static Builder newBuilder(@NonNull String url) { return new Builder(url); } }
FlexImageComponent extends FlexMessageComponent { public static Builder newBuilder(@NonNull String url) { return new Builder(url); } private  FlexImageComponent(); private  FlexImageComponent(@NonNull Builder builder); }
FlexImageComponent extends FlexMessageComponent { public static Builder newBuilder(@NonNull String url) { return new Builder(url); } private  FlexImageComponent(); private  FlexImageComponent(@NonNull Builder builder); static Builder newBuilder(@NonNull String url); @NonNull @Override JSONObject toJsonObject(); }
FlexImageComponent extends FlexMessageComponent { public static Builder newBuilder(@NonNull String url) { return new Builder(url); } private  FlexImageComponent(); private  FlexImageComponent(@NonNull Builder builder); static Builder newBuilder(@NonNull String url); @NonNull @Override JSONObject toJsonObject();  }