DownloadImpl implements Download { @Override public String getTitleType() { return titleType; }  @Nonnull @Override String getExportedType(); @Override String getUrl(); @Override String getTitle(); @Override String getDescription(); @Override String getActionText(); @Override String getTitleType(); @Override String getFilename(); @Override String getFormat(); @Override String getSize(); @Override boolean displaySize(); @Override boolean displayFormat(); @Override boolean displayFilename(); @Override String getExtension(); final static String RESOURCE_TYPE; }
@Test void testDownloadWithTitleType() { Download download = getDownloadUnderTest(DOWNLOAD_1, Download.PN_TITLE_TYPE, "h5"); assertEquals("h5", download.getTitleType(), "Expected title type is not correct"); Utils.testJSONExport(download, Utils.getTestExporterJSONPath(TEST_BASE, DOWNLOAD_WITH_TITLE_TYPE)); }
@Test void testDownloadWithDefaultTitleType() { Resource mockResource = mock(Resource.class); Style mockStyle = new MockStyle(mockResource, new MockValueMap(mockResource)); Download download = getDownloadUnderTest(DOWNLOAD_1, mockStyle); assertNull(download.getTitleType(), "Expected title type is not correct"); Utils.testJSONExport(download, Utils.getTestExporterJSONPath(TEST_BASE, DOWNLOAD_FULLY_CONFIGURED)); }