@Test public void noLandscapeTest() { viewData.setLandscape(false); stubDataProvider(); printUtil.copyProviderDataToBuilder(builderMock, dataProviderMock); assertDimensions(); }
public void copyProviderDataToBuilder(TemplateBuilder builder, TemplateBuilderDataProvider templateBuilderDataProvider) { PageSize size = templateBuilderDataProvider.getPageSize(); if (templateBuilderDataProvider.isLandscape()) { builder.setPageHeight(size.getWidth()); builder.setPageWidth(size.getHeight()); } else { builder.setPageHeight(size.getHeight()); builder.setPageWidth(size.getWidth()); } builder.setTitleText(templateBuilderDataProvider.getTitle()); builder.setWithArrow(templateBuilderDataProvider.isWithArrow()); builder.setWithScaleBar(templateBuilderDataProvider.isWithScaleBar()); builder.setRasterDpi(templateBuilderDataProvider.getRasterDpi()); builder.setDpi(templateBuilderDataProvider.getDpi()); }
PrintUtilImpl implements PrintUtil { public void copyProviderDataToBuilder(TemplateBuilder builder, TemplateBuilderDataProvider templateBuilderDataProvider) { PageSize size = templateBuilderDataProvider.getPageSize(); if (templateBuilderDataProvider.isLandscape()) { builder.setPageHeight(size.getWidth()); builder.setPageWidth(size.getHeight()); } else { builder.setPageHeight(size.getHeight()); builder.setPageWidth(size.getWidth()); } builder.setTitleText(templateBuilderDataProvider.getTitle()); builder.setWithArrow(templateBuilderDataProvider.isWithArrow()); builder.setWithScaleBar(templateBuilderDataProvider.isWithScaleBar()); builder.setRasterDpi(templateBuilderDataProvider.getRasterDpi()); builder.setDpi(templateBuilderDataProvider.getDpi()); } }
PrintUtilImpl implements PrintUtil { public void copyProviderDataToBuilder(TemplateBuilder builder, TemplateBuilderDataProvider templateBuilderDataProvider) { PageSize size = templateBuilderDataProvider.getPageSize(); if (templateBuilderDataProvider.isLandscape()) { builder.setPageHeight(size.getWidth()); builder.setPageWidth(size.getHeight()); } else { builder.setPageHeight(size.getHeight()); builder.setPageWidth(size.getWidth()); } builder.setTitleText(templateBuilderDataProvider.getTitle()); builder.setWithArrow(templateBuilderDataProvider.isWithArrow()); builder.setWithScaleBar(templateBuilderDataProvider.isWithScaleBar()); builder.setRasterDpi(templateBuilderDataProvider.getRasterDpi()); builder.setDpi(templateBuilderDataProvider.getDpi()); }  }
PrintUtilImpl implements PrintUtil { public void copyProviderDataToBuilder(TemplateBuilder builder, TemplateBuilderDataProvider templateBuilderDataProvider) { PageSize size = templateBuilderDataProvider.getPageSize(); if (templateBuilderDataProvider.isLandscape()) { builder.setPageHeight(size.getWidth()); builder.setPageWidth(size.getHeight()); } else { builder.setPageHeight(size.getHeight()); builder.setPageWidth(size.getWidth()); } builder.setTitleText(templateBuilderDataProvider.getTitle()); builder.setWithArrow(templateBuilderDataProvider.isWithArrow()); builder.setWithScaleBar(templateBuilderDataProvider.isWithScaleBar()); builder.setRasterDpi(templateBuilderDataProvider.getRasterDpi()); builder.setDpi(templateBuilderDataProvider.getDpi()); }  void copyProviderDataToBuilder(TemplateBuilder builder,
										  TemplateBuilderDataProvider templateBuilderDataProvider); @Override String getPrintEncodeUrl(String documentId, String fileName, String userToken,
									PrintConfiguration.PostPrintAction postPrintAction); @Override String toString(PrintConfiguration.PostPrintAction postPrintAction); @Override PrintTemplateInfo createPrintTemplateInfo(MapPresenter mapPresenter,
													 String applicationId,
													 TemplateBuilder builder,
													 TemplateBuilderDataProvider templateBuilderDataProvider); }
PrintUtilImpl implements PrintUtil { public void copyProviderDataToBuilder(TemplateBuilder builder, TemplateBuilderDataProvider templateBuilderDataProvider) { PageSize size = templateBuilderDataProvider.getPageSize(); if (templateBuilderDataProvider.isLandscape()) { builder.setPageHeight(size.getWidth()); builder.setPageWidth(size.getHeight()); } else { builder.setPageHeight(size.getHeight()); builder.setPageWidth(size.getWidth()); } builder.setTitleText(templateBuilderDataProvider.getTitle()); builder.setWithArrow(templateBuilderDataProvider.isWithArrow()); builder.setWithScaleBar(templateBuilderDataProvider.isWithScaleBar()); builder.setRasterDpi(templateBuilderDataProvider.getRasterDpi()); builder.setDpi(templateBuilderDataProvider.getDpi()); }  void copyProviderDataToBuilder(TemplateBuilder builder,
										  TemplateBuilderDataProvider templateBuilderDataProvider); @Override String getPrintEncodeUrl(String documentId, String fileName, String userToken,
									PrintConfiguration.PostPrintAction postPrintAction); @Override String toString(PrintConfiguration.PostPrintAction postPrintAction); @Override PrintTemplateInfo createPrintTemplateInfo(MapPresenter mapPresenter,
													 String applicationId,
													 TemplateBuilder builder,
													 TemplateBuilderDataProvider templateBuilderDataProvider);  }