use of org.ovirt.engine.core.common.job.StepSubjectEntity in project ovirt-engine by oVirt.
the class StepMapperTest method testSubjectEntities.
@Test
public void testSubjectEntities() {
org.ovirt.engine.core.common.job.Step bllStep = createBLLStep();
Guid executionHostId = Guid.newGuid();
bllStep.setSubjectEntities(Arrays.asList(new StepSubjectEntity(bllStep.getId(), VdcObjectType.EXECUTION_HOST, executionHostId), new StepSubjectEntity(bllStep.getId(), VdcObjectType.Disk, Guid.Empty)));
Step model = StepMapper.map(bllStep, null);
assertNotNull(model.getExecutionHost());
assertEquals(executionHostId.toString(), model.getExecutionHost().getId());
bllStep = StepMapper.map(model, null);
assertNull("subject entities shouldn't be mapped back to the model", bllStep.getSubjectEntities());
}
Aggregations