Created
November 12, 2012 17:41
-
-
Save kevinpet/4060766 to your computer and use it in GitHub Desktop.
Test to update the market
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
@Test | |
public void testNeedToUpdateHolidaysBeforeNextYear() throws Exception { | |
DateTime now = new DateTime(ET); | |
DateTime warningDate = new DateTime(2012, 12, 15, 0, 0, 0, 0, ET); | |
LocalDate newYearsDate = new LocalDate(warningDate.getYear()+1, 1, 1); | |
/** | |
* Once you update the holidays in Market.java, increment the year in this test | |
* so it passes until next year. | |
*/ | |
LocalDate lastHoliday = Ordering.natural().max(HOLIDAYS); | |
if (!lastHoliday.isAfter(newYearsDate)) { | |
assertTrue(now.compareTo(warningDate) < 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment