Skip to content

Commit

Permalink
Fixed a handful of unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
csrster committed Oct 17, 2016
1 parent 2f054e8 commit 613f81f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ National Library.
<organization>netarkivet.dk</organization>
<tempDir>./tests/commontempdir</tempDir>
<metadata>
<fileregexsuffix>-metadata-[0-9]+.(w)?arc(\\.gz)?</fileregexsuffix>
<fileregexsuffix>-metadata-[0-9]+.(w)?arc(.gz)?</fileregexsuffix>
</metadata>
<remoteFile>
<class>dk.netarkivet.common.distribute.HTTPRemoteFile</class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ public void tearDown() {
@Test
public void testExecuteCommand() throws Exception {
String urlPrefix = "http://" + "netarchivesuite.viewerproxy.invalid";
URIResolver res = new GetDataResolver(new URIResolver() {
URIResolver res = new GetDataResolver(
new URIResolver() {
public int lookup(Request request, Response response) {
return 201;
}

}, arcrep);
Response response = makeNewResponse();
File testFile = new File(TestInfo.WORKING_DIR, "fyensdk.arc");
Expand Down Expand Up @@ -159,6 +161,10 @@ public int lookup(Request request, Response response) {

private Response makeNewResponse() {
return new Response() {
@Override public int hashCode() {
throw new RuntimeException("Not yet implemented");
}

int status = 500;
private String reason = "Never set";
ByteArrayOutputStream out = new ByteArrayOutputStream();
Expand All @@ -178,7 +184,7 @@ public void setStatus(int statusCode, String reason) {

public void addHeaderField(String name, String value) {
// TODO: implement method
throw new NotImplementedException("Not implemented");
// throw new NotImplementedException("Not implemented");
}

public int getStatus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
*/
public class DeduplicationCDXExtractionBatchJobTester {

public static final String METADATA_FILENAME = "duplicate.metadata.arc";
public static final String METADATA_FILENAME = "12345-metadata-4.arc";
/** The two next files doesn't exist, therefore renamed from REAL to UNREAL */
public static final String METADATA_FILENAME_UNREAL_1 = "124412-metadata-1.arc";
public static final String METADATA_FILENAME_UNREAL_2 = "124399-metadata-1.arc";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void testIndexerArc() {
@Test
public void testIndexerMetadata() {
ArchiveFile file = new ArchiveFile();
file.setFilename("duplicate.metadata.arc");
file.setFilename("12345-metadata-4.arc");
(new ArchiveFileDAO()).create(file);
file.index();
File outputFile = new File(destDir, file.getOriginalIndexFileName());
Expand Down

0 comments on commit 613f81f

Please sign in to comment.