Improve test

This commit is contained in:
dotasek 2022-08-24 15:24:45 -04:00
parent 5b1ac27b12
commit cc2ec05afe
3 changed files with 9 additions and 6 deletions

View File

@ -9,7 +9,7 @@ public class DateTimeTypeFieldTests {
@Test
public void testFieldSet() {
final int YEAR = 1979;
final int MONTH = 1;
final int MONTH = 0; // January
final int DAY = 23;
final DateTimeType dateTimeYearFirst = new DateTimeType();
dateTimeYearFirst.setPrecision(TemporalPrecisionEnum.DAY);
@ -23,6 +23,7 @@ public class DateTimeTypeFieldTests {
dateTimeDayFirst.setYear(YEAR);
dateTimeDayFirst.setMonth(MONTH);
assertEquals(dateTimeYearFirst.asStringValue(), dateTimeDayFirst.asStringValue());
assertEquals("1979-01-23",dateTimeDayFirst.asStringValue());
assertEquals("1979-01-23",dateTimeYearFirst.asStringValue());
}
}

View File

@ -9,7 +9,7 @@ public class DateTimeTypeFieldTests {
@Test
public void testFieldSet() {
final int YEAR = 1979;
final int MONTH = 1;
final int MONTH = 0; // January
final int DAY = 23;
final DateTimeType dateTimeYearFirst = new DateTimeType();
dateTimeYearFirst.setPrecision(TemporalPrecisionEnum.DAY);
@ -23,6 +23,7 @@ public class DateTimeTypeFieldTests {
dateTimeDayFirst.setYear(YEAR);
dateTimeDayFirst.setMonth(MONTH);
assertEquals(dateTimeYearFirst.asStringValue(), dateTimeDayFirst.asStringValue());
assertEquals("1979-01-23",dateTimeDayFirst.asStringValue());
assertEquals("1979-01-23",dateTimeYearFirst.asStringValue());
}
}

View File

@ -9,7 +9,7 @@ public class DateTimeTypeFieldTests {
@Test
public void testFieldSet() {
final int YEAR = 1979;
final int MONTH = 1;
final int MONTH = 0; // January
final int DAY = 23;
final DateTimeType dateTimeYearFirst = new DateTimeType();
dateTimeYearFirst.setPrecision(TemporalPrecisionEnum.DAY);
@ -23,6 +23,7 @@ public class DateTimeTypeFieldTests {
dateTimeDayFirst.setYear(YEAR);
dateTimeDayFirst.setMonth(MONTH);
assertEquals(dateTimeYearFirst.asStringValue(), dateTimeDayFirst.asStringValue());
assertEquals("1979-01-23",dateTimeDayFirst.asStringValue());
assertEquals("1979-01-23",dateTimeYearFirst.asStringValue());
}
}