use of org.ovirt.engine.api.model.Usb in project ovirt-engine by oVirt.
the class VmMapperTest method getUsbPolicyOnUpdateCurrentlyNativeGotNullUsb.
@Test
public void getUsbPolicyOnUpdateCurrentlyNativeGotNullUsb() {
Usb usb = null;
UsbPolicy currentPolicy = UsbPolicy.ENABLED_NATIVE;
assertEquals(VmMapper.getUsbPolicyOnUpdate(usb, currentPolicy), currentPolicy);
}
use of org.ovirt.engine.api.model.Usb in project ovirt-engine by oVirt.
the class VmMapperTest method getUsbPolicyNullUsb.
@Test
public void getUsbPolicyNullUsb() {
Usb usb = null;
assertEquals(UsbPolicy.DISABLED, VmMapper.getUsbPolicyOnCreate(usb));
}
use of org.ovirt.engine.api.model.Usb in project ovirt-engine by oVirt.
the class VmMapperTest method getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNotSetPolicyNotSetUsb.
@Test
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNotSetPolicyNotSetUsb() {
Usb usb = new Usb();
UsbPolicy currentPolicy = UsbPolicy.DISABLED;
assertEquals(VmMapper.getUsbPolicyOnUpdate(usb, currentPolicy), currentPolicy);
}
use of org.ovirt.engine.api.model.Usb in project ovirt-engine by oVirt.
the class VmMapperTest method getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNotSetNativePolicyUsb.
@Test
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNotSetNativePolicyUsb() {
Usb usb = new Usb();
usb.setType(UsbType.NATIVE);
assertEquals(UsbPolicy.DISABLED, VmMapper.getUsbPolicyOnUpdate(usb, UsbPolicy.DISABLED));
}
Aggregations