Ignore deprecations in test code

This commit is contained in:
Sebb 2015-11-03 10:20:28 +00:00
parent 47c1862989
commit 94184ce383
5 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,7 @@ import org.junit.Test;
/**
* TestCase for DateFormatUtils.
*/
@SuppressWarnings("deprecation") // tests lots of deprecated items
public class DateFormatUtilsTest {
@Rule

View File

@ -51,6 +51,7 @@ public class DateUtilsRoundingTest {
Date targetMilliSecondDate;
Calendar januaryOneCalendar;
@SuppressWarnings("deprecation")
FastDateFormat fdf = DateFormatUtils.ISO_DATETIME_FORMAT;

View File

@ -1203,6 +1203,7 @@ public class DateUtilsTest {
}
// http://issues.apache.org/jira/browse/LANG-530
@SuppressWarnings("deprecation")
@Test
public void testLang530() throws ParseException {
final Date d = new Date();

View File

@ -253,6 +253,7 @@ public class DurationFormatUtilsTest {
DurationFormatUtils.formatDuration(-5000, "S", true);
}
@SuppressWarnings("deprecation")
@Test
public void testFormatPeriodISO() {
final TimeZone timeZone = TimeZone.getTimeZone("GMT-3");

View File

@ -382,6 +382,7 @@ public class FastDatePrinterTest {
assertEquals("11 23 23 11", printer.format(calendar));
}
@SuppressWarnings("deprecation")
@Test
public void testStringBufferOptions() {
final DatePrinter format = getInstance("yyyy-MM-dd HH:mm:ss.SSS Z", TimeZone.getTimeZone("GMT"));