static org.ovirt.engine.core.common.businessentities.profiles.DiskProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.DiskProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getStorageDomainId()).thenReturn(GUIDS[index]); return entity; } }
static org.ovirt.engine.core.common.businessentities.profiles.DiskProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.DiskProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getStorageDomainId()).thenReturn(GUIDS[index]); return entity; } }
static org.ovirt.engine.core.common.businessentities.profiles.DiskProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.DiskProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getStorageDomainId()).thenReturn(GUIDS[index]); return entity; } }
public EditDiskProfileModel(IModel sourceModel, DiskProfile profile, Guid dataCenterId) { super(sourceModel, dataCenterId, profile.getQosId(), ActionType.UpdateDiskProfile); setTitle(ConstantsManager.getInstance().getConstants().diskProfileTitle()); setHelpTag(HelpTag.edit_disk_profile); setHashName("edit_disk_profile"); //$NON-NLS-1$ setProfile(profile); getName().setEntity(profile.getName()); getDescription().setEntity(profile.getDescription()); }
@Mapping(from = org.ovirt.engine.core.common.businessentities.profiles.DiskProfile.class, to = DiskProfile.class) public static DiskProfile map(org.ovirt.engine.core.common.businessentities.profiles.DiskProfile entity, DiskProfile template) { DiskProfile model = template != null ? template : new DiskProfile(); if (entity.getId() != null) { model.setId(entity.getId().toString()); } if (entity.getName() != null) { model.setName(entity.getName()); } if (entity.getDescription() != null) { model.setDescription(entity.getDescription()); } if (entity.getStorageDomainId() != null) { model.setStorageDomain(new StorageDomain()); model.getStorageDomain().setId(entity.getStorageDomainId().toString()); } if (entity.getQosId() != null) { model.setQos(new Qos()); model.getQos().setId(entity.getQosId().toString()); } return model; } }