/** * Builds a {@link JsResponse} object with the provided data. */ public JsResponse build() { return new JsResponse(jsCode, statusCode, cacheTtlSecs, proxyCacheable, errors, rawExterns + buildExternString()); }
private JsResponseBuilder newBuilder(JsContent... contents) { response = new JsResponse(Lists.newArrayList(contents), -1, -1, false, ERRORS, null); return new JsResponseBuilder(response); }
private JsResponseBuilder newBuilder(JsContent... contents) { response = new JsResponse(Lists.newArrayList(contents), -1, -1, false, ERRORS, null); return new JsResponseBuilder(response); }
@Before public void setUp() { control = createControl(); contents = Lists.newArrayList(); contents.add(JsContent.fromFeature(NORMAL_CONTENT_JS, SOURCE, null, null)); contents.add(JsContent.fromFeature(NORMAL_CONTENT_JS, SOURCE, null, mockFeatureResource(null))); contents.add(JsContent.fromFeature(NORMAL_CONTENT_JS, SOURCE, null, mockFeatureResource(ImmutableMap.of(UriCommon.Param.CAJOLE.getKey(), "blah")))); contents.add(JsContent.fromFeature(CAJA_CONTENT_JS, SOURCE, null, mockFeatureResource(ImmutableMap.of(UriCommon.Param.CAJOLE.getKey(), ATTRIB_VALUE)))); response = new JsResponse(contents, -1, -1, false, ERRORS, null); builder = new JsResponseBuilder(response); processor = new CajaJsSubtractingProcessor(); }
@Before public void setUp() { control = createControl(); contents = Lists.newArrayList(); contents.add(JsContent.fromFeature(NORMAL_CONTENT_JS, SOURCE, null, null)); contents.add(JsContent.fromFeature(NORMAL_CONTENT_JS, SOURCE, null, mockFeatureResource(null))); contents.add(JsContent.fromFeature(NORMAL_CONTENT_JS, SOURCE, null, mockFeatureResource(ImmutableMap.of(UriCommon.Param.CAJOLE.getKey(), "blah")))); contents.add(JsContent.fromFeature(CAJA_CONTENT_JS, SOURCE, null, mockFeatureResource(ImmutableMap.of(UriCommon.Param.CAJOLE.getKey(), ATTRIB_VALUE)))); response = new JsResponse(contents, -1, -1, false, ERRORS, null); builder = new JsResponseBuilder(response); processor = new CajaJsSubtractingProcessor(); }