/** * Returns a list of business object data attributes created using hard coded test values. * * @return the newly created list of business object data attributes */ protected List<Attribute> getTestAttributes() { List<Attribute> attributes = new ArrayList<>(); Attribute attribute1 = new Attribute(); attributes.add(attribute1); attribute1.setName(ATTRIBUTE_NAME_1_MIXED_CASE); attribute1.setValue(ATTRIBUTE_VALUE_1); Attribute attribute2 = new Attribute(); attributes.add(attribute2); attribute2.setName(ATTRIBUTE_NAME_2_MIXED_CASE); attribute2.setValue(ATTRIBUTE_VALUE_2); return attributes; }
attributes.add(attribute); attribute.setName(entry.getKey()); attribute.setValue(entry.getValue());
attributes.add(attribute); attribute.setName(entry.getKey()); attribute.setValue(entry.getValue());
@Test(expected = PersistenceException.class) public void testCreateBusinessObjectDataAttributeValueTooLarge() throws Exception { final BusinessObjectDataCreateRequest businessObjectDataCreateRequest = businessObjectDataServiceTestHelper.getNewBusinessObjectDataCreateRequest(); // Create and add a duplicate attribute which is not allowed. Attribute newAttribute = new Attribute(); newAttribute.setName("Valid Name"); newAttribute.setValue(new String(new char[4001]).replace('\0', 'A')); // Test value greater than 4000 byte limit. businessObjectDataCreateRequest.getAttributes().add(newAttribute); executeWithoutLogging(SqlExceptionHelper.class, new Command() { @Override public void execute() { // Create the business object data which is invalid. businessObjectDataService.createBusinessObjectData(businessObjectDataCreateRequest); } }); }
storageAttributes.add(attribute); attribute.setName(storageAttributeEntity.getName()); attribute.setValue(storageAttributeEntity.getValue());
storageAttributes.add(attribute); attribute.setName(storageAttributeEntity.getName()); attribute.setValue(storageAttributeEntity.getValue());
sourceValue = this.getValue(); String copyValue = ((String) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue, (this.value!= null))); copy.setValue(copyValue); } else { if (valueShouldBeCopiedAndSet == Boolean.FALSE) {
sourceValue = this.getValue(); String copyValue = ((String) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue, (this.value!= null))); copy.setValue(copyValue); } else { if (valueShouldBeCopiedAndSet == Boolean.FALSE) {
sourceValue = this.getValue(); String copyValue = ((String) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue, (this.value!= null))); copy.setValue(copyValue); } else { if (valueShouldBeCopiedAndSet == Boolean.FALSE) {
attributes.add(attribute); attribute.setName(attributeEntity.getName()); attribute.setValue(attributeEntity.getValue());
attributes.add(attribute); attribute.setName(attributeEntity.getName()); attribute.setValue(attributeEntity.getValue());
attributes.add(attribute); attribute.setName(attributeEntity.getName()); attribute.setValue(attributeEntity.getValue());
attributes.add(attribute); attribute.setName(attributeEntity.getName()); attribute.setValue(attributeEntity.getValue());