Search in sources :

Example 1 with ConfigurationType

use of org.ovirt.engine.api.model.ConfigurationType in project ovirt-engine by oVirt.

the class VmMapperTest method ovfConfigurationMap.

@Test
public void ovfConfigurationMap() {
    String ovfConfig = "config";
    ConfigurationType configurationType = ConfigurationType.OVF;
    Vm model = new Vm();
    VmMapper.map(ovfConfig, ConfigurationType.OVF, model);
    assertNotNull(model.getInitialization());
    assertNotNull(model.getInitialization().getConfiguration());
    assertEquals(ovfConfig, model.getInitialization().getConfiguration().getData());
    assertEquals(model.getInitialization().getConfiguration().getType(), configurationType);
}
Also used : ConfigurationType(org.ovirt.engine.api.model.ConfigurationType) Vm(org.ovirt.engine.api.model.Vm) Test(org.junit.Test)

Example 2 with ConfigurationType

use of org.ovirt.engine.api.model.ConfigurationType in project ovirt-engine by oVirt.

the class VmMapperTest method testMapConfigurationType.

@Test
public void testMapConfigurationType() {
    org.ovirt.engine.core.common.businessentities.ConfigurationType configurationTypeBll = VmMapper.map(ConfigurationType.OVF, null);
    assertEquals(org.ovirt.engine.core.common.businessentities.ConfigurationType.OVF, configurationTypeBll);
    ConfigurationType configurationTypeApi = VmMapper.map(org.ovirt.engine.core.common.businessentities.ConfigurationType.OVF, null);
    assertEquals(ConfigurationType.OVF, configurationTypeApi);
}
Also used : ConfigurationType(org.ovirt.engine.api.model.ConfigurationType) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 ConfigurationType (org.ovirt.engine.api.model.ConfigurationType)2 Vm (org.ovirt.engine.api.model.Vm)1