Commit 17f02000 authored by R.W.Majeed's avatar R.W.Majeed

tests for i2b2 visit processing

parent cafea1d6
package de.sekmi.histream.i2b2;
import java.text.ParseException;
import java.time.temporal.ChronoUnit;
import static org.junit.Assert.*;
import org.junit.Test;
import de.sekmi.histream.DateTimeAccuracy;
public class TestI2b2Visit {
private DateTimeAccuracy createAccurateTimestamp(){
try {
return DateTimeAccuracy.parsePartialIso8601("20010203T04:05:06");
} catch (ParseException e) {
throw new AssertionError();
}
}
@Test
public void verifyAccurateTimestampParsing(){
assertEquals(ChronoUnit.SECONDS, createAccurateTimestamp().getAccuracy());
}
public void verifyVisitTimestampSerialisation() throws ParseException{
I2b2Visit v = new I2b2Visit(0, 0);
v.setStartTime(createAccurateTimestamp());
v.setEndTime(createAccurateTimestamp());
v.setActiveStatusCd(null);
// TODO check if the timestamps are both accurate to day
// TODO more tests
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment