use of com.evolveum.midpoint.repo.sqale.qmodel.report.MReportData in project midpoint by Evolveum.
the class SqaleRepoAddDeleteObjectTest method test816ReportData.
@Test
public void test816ReportData() throws Exception {
OperationResult result = createOperationResult();
given("report data");
String objectName = "report-data" + getTestNumber();
UUID reportOid = UUID.randomUUID();
QName reportRelation = QName.valueOf("{https://random.org/ns}report-rel");
ReportDataType report = new ReportDataType(prismContext).name(objectName).reportRef(reportOid.toString(), ReportType.COMPLEX_TYPE, reportRelation);
when("adding it to the repository");
repositoryService.addObject(report.asPrismObject(), null, result);
then("it is stored and relevant attributes are in columns");
assertThatOperationResult(result).isSuccess();
MReportData row = selectObjectByOid(QReportData.class, report.getOid());
assertThat(row.reportRefTargetOid).isEqualTo(reportOid);
assertThat(row.reportRefTargetType).isEqualTo(MObjectType.REPORT);
assertCachedUri(row.reportRefRelationId, reportRelation);
}
Aggregations