-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,14 +38,14 @@ | |
/** | ||
* @author Russ Poetker ([email protected]) | ||
*/ | ||
@SpringBootTest(classes = NihmsHarvesterCLI.class, args = {"--harvestDays=30"}) | ||
@SpringBootTest(classes = NihmsHarvesterCLI.class, args = {"--harvestMonths=3"}) | ||
@TestPropertySource( | ||
locations = "classpath:test-application.properties", | ||
properties = { | ||
"nihmsetl.api.url.param.pdf=", | ||
"nihmsetl.api.url.param.pdt=" | ||
}) | ||
public class NihmsHarvesterCLIHarvestDaysTest { | ||
public class NihmsHarvesterCLIHarvestMonthsTest { | ||
|
||
@SpyBean NihmsHarvester nihmsHarvester; | ||
@MockBean NihmsHarvesterDownloader nihmsHarvesterDownloader; | ||
|
@@ -55,7 +55,7 @@ public void testHarvesterCLI_WithHarvestRange() throws IOException, InterruptedE | |
// GIVEN/WHEN | ||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/uuuu"); | ||
// 30 days passed in args up top in @SpringBootTest | ||
String expectedPdf = LocalDate.now().minus(Period.ofDays(30)).format(formatter) | ||
String expectedPdf = LocalDate.now().minus(Period.ofMonths(3)).format(formatter) | ||
.replace("/", "%2F"); | ||
// THEN | ||
verify(nihmsHarvester).harvest(eq(EnumSet.allOf(NihmsStatus.class)), anyInt()); | ||
|