mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-06 11:29:30 +00:00
add support for table.rows in TestDataFactory
This commit is contained in:
parent
6ab2bb518d
commit
46e2d251d3
@ -82,6 +82,17 @@ public class TestDataFactory {
|
||||
return FhirPublication.R5;
|
||||
}
|
||||
|
||||
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
|
||||
if (rows != null && "rows".equals(name)) {
|
||||
Base[] l = new Base[rows.size()];
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
l[i] = BaseTableWrapper.forRow(columns, rows.get(i));
|
||||
}
|
||||
return l;
|
||||
}
|
||||
return super.getProperty(hash, name, checkValid);
|
||||
}
|
||||
|
||||
public String cell(int row, String col) {
|
||||
if (row >= 0 && row < rows.size()) {
|
||||
List<String> r = rows.get(row);
|
||||
|
Loading…
x
Reference in New Issue
Block a user