use of org.ovirt.engine.api.model.Usb in project ovirt-engine by oVirt.
the class VmMapperTest method getUsbPolicyOnUpdateCurrentlyDisabledGotNullUsb.
@Test
public void getUsbPolicyOnUpdateCurrentlyDisabledGotNullUsb() {
Usb usb = null;
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 getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNativePolicyUsb.
@Test
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNativePolicyUsb() {
Usb usb = new Usb();
usb.setEnabled(true);
usb.setType(UsbType.NATIVE);
assertEquals(UsbPolicy.ENABLED_NATIVE, VmMapper.getUsbPolicyOnUpdate(usb, UsbPolicy.ENABLED_NATIVE));
}
use of org.ovirt.engine.api.model.Usb in project ovirt-engine by oVirt.
the class VmMapperTest method getUsbPolicySetDisabled.
@Test
public void getUsbPolicySetDisabled() {
Usb usb = new Usb();
usb.setEnabled(false);
assertEquals(UsbPolicy.DISABLED, VmMapper.getUsbPolicyOnCreate(usb));
}
use of org.ovirt.engine.api.model.Usb in project ovirt-engine by oVirt.
the class VmMapperTest method getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNotSetNativePolicyUsb.
@Test
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNotSetNativePolicyUsb() {
Usb usb = new Usb();
usb.setType(UsbType.NATIVE);
assertEquals(UsbPolicy.ENABLED_NATIVE, VmMapper.getUsbPolicyOnUpdate(usb, UsbPolicy.ENABLED_NATIVE));
}
use of org.ovirt.engine.api.model.Usb in project ovirt-engine by oVirt.
the class VmMapperTest method getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNotSetPolicyNotSetUsb.
@Test
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNotSetPolicyNotSetUsb() {
Usb usb = new Usb();
UsbPolicy currentPolicy = UsbPolicy.ENABLED_NATIVE;
assertEquals(VmMapper.getUsbPolicyOnUpdate(usb, currentPolicy), currentPolicy);
}
Aggregations