@Test public void should_parse_only_input_controls_from_dashboard_components() throws Exception { Gson gson = GsonFactory.create(); DashboardComponentCollection components = gson.fromJson(mComponents.asString(), DashboardComponentCollection.class); assertThat(components.getInputControlComponents() , is(not(empty()))); }
public static Gson create() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.excludeFieldsWithoutExposeAnnotation(); gsonBuilder.disableHtmlEscaping(); gsonBuilder.registerTypeAdapterFactory(new ReportLookupTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new InputControlTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ReportExecutionRequestOptionsFactory()); gsonBuilder.registerTypeAdapterFactory(new DashboardComponentTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new JobSourceParamsWrapperTypeAdapterFactory()); return gsonBuilder.create(); }
GsonFactory { public static Gson create() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.excludeFieldsWithoutExposeAnnotation(); gsonBuilder.disableHtmlEscaping(); gsonBuilder.registerTypeAdapterFactory(new ReportLookupTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new InputControlTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ReportExecutionRequestOptionsFactory()); gsonBuilder.registerTypeAdapterFactory(new DashboardComponentTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new JobSourceParamsWrapperTypeAdapterFactory()); return gsonBuilder.create(); } }
GsonFactory { public static Gson create() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.excludeFieldsWithoutExposeAnnotation(); gsonBuilder.disableHtmlEscaping(); gsonBuilder.registerTypeAdapterFactory(new ReportLookupTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new InputControlTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ReportExecutionRequestOptionsFactory()); gsonBuilder.registerTypeAdapterFactory(new DashboardComponentTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new JobSourceParamsWrapperTypeAdapterFactory()); return gsonBuilder.create(); }  }
GsonFactory { public static Gson create() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.excludeFieldsWithoutExposeAnnotation(); gsonBuilder.disableHtmlEscaping(); gsonBuilder.registerTypeAdapterFactory(new ReportLookupTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new InputControlTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ReportExecutionRequestOptionsFactory()); gsonBuilder.registerTypeAdapterFactory(new DashboardComponentTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new JobSourceParamsWrapperTypeAdapterFactory()); return gsonBuilder.create(); }  static Gson create(); }
GsonFactory { public static Gson create() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.excludeFieldsWithoutExposeAnnotation(); gsonBuilder.disableHtmlEscaping(); gsonBuilder.registerTypeAdapterFactory(new ReportLookupTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new InputControlTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ReportExecutionRequestOptionsFactory()); gsonBuilder.registerTypeAdapterFactory(new DashboardComponentTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new JobSourceParamsWrapperTypeAdapterFactory()); return gsonBuilder.create(); }  static Gson create();  }