/** * Adds a new extended property. * * @param extendedProperty extended property */ public void addExtendedProperty(ExtendedProperty extendedProperty) { getExtendedProperties().add(extendedProperty); }
/** * Adds a new contact extended property. * * @param extendedProperty contact extended property */ public void addExtendedProperty(ExtendedProperty extendedProperty) { getExtendedProperties().add(extendedProperty); }
/** * Adds a new extended property. * * @param extendedProperty extended property */ public void addExtendedProperty(ExtendedProperty extendedProperty) { getExtendedProperties().add(extendedProperty); }
updateGroup.getExtendedProperties().clear(); final OMElement extendedProps = entryElement.getFirstChildWithName(new QName(Constants.EXTENDED_PROPERTIES));
/** * Positive test case for updateContactGroup method with optional parameters. * * @throws Exception the exception */ @Test(priority = 2, groups = { "wso2.esb" }, dependsOnMethods = { "testCreateContactGroupWithMandatoryParameters" }, description = "Google Contacts {updateContactGroup} integration test with optional parameters.") public void testUpdateContactGroupWithOptionalParameters() throws Exception { Map<String, String> parametersMap = new HashMap<String, String>(); parametersMap.put("groupId", groupId); SOAPEnvelope esbSoapResponse = sendSOAPRequest(proxyUrl, "esb_updateContactGroup_optional.xml", parametersMap); // Adding a sleep timer to buffer time taken to apply changes on backend. Thread.sleep(Long.parseLong(connectorProperties.getProperty("timeDelay"))); final ContactGroupEntry directResponse = directInvoker.retrieveSingleContactGroupByUrl((String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:link/@href)", nameSpaceMap)); // Assert the group title. Assert.assertEquals((String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:content/text())", nameSpaceMap), directResponse.getPlainTextContent()); // Assert the value of the extended property. Assert.assertEquals( (String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//gd:extendedProperty/@value)", nameSpaceMap), directResponse.getExtendedProperties().get(0).getValue()); }
/** * Positive test case for createContactGroup method with optional parameters. * * @throws Exception the exception */ @Test(priority = 1, groups = { "wso2.esb" }, description = "Google Contacts {createContactGroup} integration test with optional parameters.") public void testCreateContactGroupWithOptionalParameters() throws Exception { SOAPEnvelope esbSoapResponse = sendSOAPRequest(proxyUrl, "esb_createContactGroup_optional.xml"); // Adding a sleep timer to buffer time taken to apply changes on backend. Thread.sleep(Long.parseLong(connectorProperties.getProperty("timeDelay"))); String xPathExp = "string(//atom:id/text())"; String idUrl = (String) xPathEvaluate(esbSoapResponse, xPathExp, nameSpaceMap); batchDeleteGroupId = idUrl.substring(idUrl.lastIndexOf("/") + 1, idUrl.length()); final ContactGroupEntry directResponse = directInvoker.retrieveSingleContactGroupByUrl((String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:link/@href)", nameSpaceMap)); // Assert the group title. Assert.assertEquals((String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:title/text())", nameSpaceMap), directResponse.getTitle().getPlainText()); // Assert the value of the extended property. Assert.assertEquals( (String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//gd:extendedProperty/@value)", nameSpaceMap), directResponse.getExtendedProperties().get(0).getValue()); }
group.getExtendedProperties().clear(); final String extendedProps = (String) getParameter(messageContext, Constants.EXTENDED_PROPERTIES);