Skip to content

Commit

Permalink
Merge pull request DSpace#9839 from kshepherd/small_import_typo_fixes
Browse files Browse the repository at this point in the history
Small spelling fixes to import tests and resource files.
  • Loading branch information
tdonohue authored Sep 19, 2024
2 parents 4f9c949 + 2e4bfe9 commit 2e5823b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* This contributor is able to concat multi value.
* Given a certain path, if it contains several nodes,
* the values of nodes will be concatenated into a single one.
* The concrete example we can see in the file wos-responce.xml in the <abstract_text> node,
* The concrete example we can see in the file wos-response.xml in the <abstract_text> node,
* which may contain several <p> paragraphs,
* this Contributor allows concatenating all <p> paragraphs. to obtain a single one.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void ciniiImportMetadataGetRecordsTest() throws Exception {
InputStream ciniiRefResp2 = null;
InputStream ciniiRefResp3 = null;
try {
ciniiRefResp = getClass().getResourceAsStream("cinii-responce-ids.xml");
ciniiRefResp = getClass().getResourceAsStream("cinii-response-ids.xml");
ciniiRefResp2 = getClass().getResourceAsStream("cinii-first.xml");
ciniiRefResp3 = getClass().getResourceAsStream("cinii-second.xml");

Expand Down Expand Up @@ -89,7 +89,7 @@ public void ciniiImportMetadataGetRecordsCountTest() throws Exception {
context.turnOffAuthorisationSystem();
CloseableHttpClient originalHttpClient = liveImportClientImpl.getHttpClient();
CloseableHttpClient httpClient = Mockito.mock(CloseableHttpClient.class);
try (InputStream file = getClass().getResourceAsStream("cinii-responce-ids.xml")) {
try (InputStream file = getClass().getResourceAsStream("cinii-response-ids.xml")) {
String ciniiXmlResp = IOUtils.toString(file, Charset.defaultCharset());

liveImportClientImpl.setHttpClient(httpClient);
Expand All @@ -107,31 +107,31 @@ public void ciniiImportMetadataGetRecordsCountTest() throws Exception {
private ArrayList<ImportRecord> getRecords() {
ArrayList<ImportRecord> records = new ArrayList<>();
//define first record
List<MetadatumDTO> metadatums = new ArrayList<MetadatumDTO>();
List<MetadatumDTO> metadata = new ArrayList<MetadatumDTO>();
MetadatumDTO title = createMetadatumDTO("dc", "title", null,
"Understanding the impact of mandatory accrual accounting on management practices:"
+ " Interpretation of Japanese local governments’ behavior");
MetadatumDTO identifier = createMetadatumDTO("dc", "identifier", "other", "1010572092222310146");

metadatums.add(title);
metadatums.add(identifier);
metadata.add(title);
metadata.add(identifier);

ImportRecord firstrRecord = new ImportRecord(metadatums);
ImportRecord firstRecord = new ImportRecord(metadata);

//define second record
List<MetadatumDTO> metadatums2 = new ArrayList<MetadatumDTO>();
List<MetadatumDTO> metadata2 = new ArrayList<MetadatumDTO>();
MetadatumDTO title2 = createMetadatumDTO("dc", "title", null,
"Band structures of passive films on titanium in simulated bioliquids determined"
+ " by photoelectrochemical response: principle governing the biocompatibility");
MetadatumDTO language = createMetadatumDTO("dc", "language", "iso", "en");
MetadatumDTO identifier2 = createMetadatumDTO("dc", "identifier", "other", "1050010687833449984");

metadatums2.add(title2);
metadatums2.add(language);
metadatums2.add(identifier2);
metadata2.add(title2);
metadata2.add(language);
metadata2.add(identifier2);

ImportRecord secondRecord = new ImportRecord(metadatums2);
records.add(firstrRecord);
ImportRecord secondRecord = new ImportRecord(metadata2);
records.add(firstRecord);
records.add(secondRecord);
return records;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3306,7 +3306,7 @@ public void findByItemsAndTypeUnprocessableEntityTest() throws Exception {
}

@Test
public void findByItemsAndTypeEmptyResponceTest() throws Exception {
public void findByItemsAndTypeEmptyResponseTest() throws Exception {

context.turnOffAuthorisationSystem();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void wosImportMetadataGetRecordsTest() throws Exception {
}
CloseableHttpClient originalHttpClient = liveImportClientImpl.getHttpClient();
CloseableHttpClient httpClient = Mockito.mock(CloseableHttpClient.class);
try (InputStream file = getClass().getResourceAsStream("wos-responce.xml")) {
try (InputStream file = getClass().getResourceAsStream("wos-response.xml")) {
String wosXmlResp = IOUtils.toString(file, Charset.defaultCharset());

liveImportClientImpl.setHttpClient(httpClient);
Expand Down Expand Up @@ -80,7 +80,7 @@ public void wosImportMetadataGetRecordsCountTest() throws Exception {
}
CloseableHttpClient originalHttpClient = liveImportClientImpl.getHttpClient();
CloseableHttpClient httpClient = Mockito.mock(CloseableHttpClient.class);
try (InputStream file = getClass().getResourceAsStream("wos-responce.xml")) {
try (InputStream file = getClass().getResourceAsStream("wos-response.xml")) {
String wosXmlResp = IOUtils.toString(file, Charset.defaultCharset());

liveImportClientImpl.setHttpClient(httpClient);
Expand Down

0 comments on commit 2e5823b

Please sign in to comment.