Search in sources :

Example 11 with VmPayload

use of org.ovirt.engine.core.common.businessentities.VmPayload in project ovirt-engine by oVirt.

the class VmMapperTest method testPayloadMapToVmPaylod.

@Test
public void testPayloadMapToVmPaylod() {
    Payload payload = new Payload();
    payload.setType(VmDeviceType.CDROM);
    payload.setVolumeId("CD-VOL");
    VmPayload vmPayload = VmMapper.map(payload, null);
    assertEquals(payload.getType().name(), vmPayload.getDeviceType().name());
    assertEquals(payload.getVolumeId(), vmPayload.getVolumeId());
}
Also used : VmPayload(org.ovirt.engine.core.common.businessentities.VmPayload) VmPayload(org.ovirt.engine.core.common.businessentities.VmPayload) Payload(org.ovirt.engine.api.model.Payload) Test(org.junit.Test)

Example 12 with VmPayload

use of org.ovirt.engine.core.common.businessentities.VmPayload in project ovirt-engine by oVirt.

the class VmMapperTest method testVmPayloadMapToPaylod.

@Test
public void testVmPayloadMapToPaylod() {
    VmPayload vmPayload = new VmPayload();
    vmPayload.setDeviceType(org.ovirt.engine.core.common.utils.VmDeviceType.CDROM);
    vmPayload.setVolumeId("CD-VOL");
    Payload payload = VmMapper.map(vmPayload, null);
    assertEquals(vmPayload.getDeviceType().name(), payload.getType().name());
    assertEquals(vmPayload.getVolumeId(), payload.getVolumeId());
}
Also used : VmPayload(org.ovirt.engine.core.common.businessentities.VmPayload) VmPayload(org.ovirt.engine.core.common.businessentities.VmPayload) Payload(org.ovirt.engine.api.model.Payload) Test(org.junit.Test)

Aggregations

VmPayload (org.ovirt.engine.core.common.businessentities.VmPayload)12 VmDevice (org.ovirt.engine.core.common.businessentities.VmDevice)6 Payload (org.ovirt.engine.api.model.Payload)4 VmDeviceId (org.ovirt.engine.core.common.businessentities.VmDeviceId)4 Map (java.util.Map)3 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 GraphicsType (org.ovirt.engine.core.common.businessentities.GraphicsType)2 Guid (org.ovirt.engine.core.compat.Guid)2 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Comparator (java.util.Comparator)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Entry (java.util.Map.Entry)1 Objects (java.util.Objects)1 Optional (java.util.Optional)1 Set (java.util.Set)1