static org.ovirt.engine.core.common.businessentities.profiles.CpuProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getClusterId()).thenReturn(GUIDS[index]); return entity; } }
static org.ovirt.engine.core.common.businessentities.profiles.CpuProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getClusterId()).thenReturn(GUIDS[index]); return entity; } }
static org.ovirt.engine.core.common.businessentities.profiles.CpuProfile setUpEntityExpectations(org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getName()).thenReturn(NAMES[index]); when(entity.getDescription()).thenReturn(DESCRIPTIONS[index]); when(entity.getClusterId()).thenReturn(GUIDS[index]); return entity; } }
public EditCpuProfileModel(IModel sourceModel, CpuProfile profile, Guid dataCenterId) { super(sourceModel, dataCenterId, profile.getQosId(), ActionType.UpdateCpuProfile); setTitle(ConstantsManager.getInstance().getConstants().cpuProfileTitle()); setHelpTag(HelpTag.edit_cpu_profile); setHashName("edit_cpu_profile"); //$NON-NLS-1$ setProfile(profile); getName().setEntity(profile.getName()); getDescription().setEntity(profile.getDescription()); }
@Mapping(from = org.ovirt.engine.core.common.businessentities.profiles.CpuProfile.class, to = CpuProfile.class) public static CpuProfile map(org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity, CpuProfile template) { CpuProfile model = template != null ? template : new CpuProfile(); 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.getClusterId() != null) { model.setCluster(new Cluster()); model.getCluster().setId(entity.getClusterId().toString()); } if (entity.getQosId() != null) { model.setQos(new Qos()); model.getQos().setId(entity.getQosId().toString()); } return model; } }