Failing tests

This commit is contained in:
dotasek 2022-08-24 14:53:56 -04:00
parent 59a9700181
commit f8d7aa755e
3 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,28 @@
package org.hl7.fhir.r4.model;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class DateTimeTypeFieldTests {
@Test
public void testFieldSet() {
final int YEAR = 1979;
final int MONTH = 1;
final int DAY = 23;
final DateTimeType dateTimeYearFirst = new DateTimeType();
dateTimeYearFirst.setPrecision(TemporalPrecisionEnum.DAY);
dateTimeYearFirst.setYear(YEAR);
dateTimeYearFirst.setDay(DAY);
dateTimeYearFirst.setMonth(MONTH);
final DateTimeType dateTimeDayFirst = new DateTimeType();
dateTimeDayFirst.setPrecision(TemporalPrecisionEnum.DAY);
dateTimeDayFirst.setDay(DAY);
dateTimeDayFirst.setYear(YEAR);
dateTimeDayFirst.setMonth(MONTH);
assertEquals(dateTimeYearFirst.asStringValue(), dateTimeDayFirst.asStringValue());
}
}

View File

@ -0,0 +1,28 @@
package org.hl7.fhir.r4b.model;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class DateTimeTypeFieldTests {
@Test
public void testFieldSet() {
final int YEAR = 1979;
final int MONTH = 1;
final int DAY = 23;
final DateTimeType dateTimeYearFirst = new DateTimeType();
dateTimeYearFirst.setPrecision(TemporalPrecisionEnum.DAY);
dateTimeYearFirst.setYear(YEAR);
dateTimeYearFirst.setDay(DAY);
dateTimeYearFirst.setMonth(MONTH);
final DateTimeType dateTimeDayFirst = new DateTimeType();
dateTimeDayFirst.setPrecision(TemporalPrecisionEnum.DAY);
dateTimeDayFirst.setDay(DAY);
dateTimeDayFirst.setYear(YEAR);
dateTimeDayFirst.setMonth(MONTH);
assertEquals(dateTimeYearFirst.asStringValue(), dateTimeDayFirst.asStringValue());
}
}

View File

@ -0,0 +1,28 @@
package org.hl7.fhir.r5.model;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class DateTimeTypeFieldTests {
@Test
public void testFieldSet() {
final int YEAR = 1979;
final int MONTH = 1;
final int DAY = 23;
final DateTimeType dateTimeYearFirst = new DateTimeType();
dateTimeYearFirst.setPrecision(TemporalPrecisionEnum.DAY);
dateTimeYearFirst.setYear(YEAR);
dateTimeYearFirst.setDay(DAY);
dateTimeYearFirst.setMonth(MONTH);
final DateTimeType dateTimeDayFirst = new DateTimeType();
dateTimeDayFirst.setPrecision(TemporalPrecisionEnum.DAY);
dateTimeDayFirst.setDay(DAY);
dateTimeDayFirst.setYear(YEAR);
dateTimeDayFirst.setMonth(MONTH);
assertEquals(dateTimeYearFirst.asStringValue(), dateTimeDayFirst.asStringValue());
}
}