/** * Returns whether it has the URI of the group. * * @return whether it has the URI of the group */ public boolean hasHref() { return getHref() != null; }
/** * Returns whether it has the URI of the group. * * @return whether it has the URI of the group */ public boolean hasHref() { return getHref() != null; }
/** * Returns whether it has the URI of the group. * * @return whether it has the URI of the group */ public boolean hasHref() { return getHref() != null; }
String groupHref = group.getHref(); System.out.println(" Id: " + groupHref);
/** * Positive test case for changeGroupMembership method with mandatory parameters. * * @throws Exception the exception */ @Test(priority = 2, groups = { "wso2.esb" }, dependsOnMethods = { "testCreateContactWithOptionalParameters" }, description = "Google Contacts {changeGroupMembers} integration test with mandatory parameters.") public void testChangeGroupMembershipWithMandatoryParameters() throws Exception { final Map<String, String> parametersMap = new HashMap<String, String>(); parametersMap.put("contactId", contactId); final SOAPEnvelope esbSoapResponse = sendSOAPRequest(proxyUrl, "esb_changeGroupMembership_mandatory.xml", parametersMap); // Adding a sleep timer to buffer time taken to apply changes on backend. Thread.sleep(Long.parseLong(connectorProperties.getProperty("timeDelay"))); ContactEntry directResponse = directInvoker.retrieveSingleContact(contactId); final int apiResponseSize = directResponse.getGroupMembershipInfos().size(); final String directApiResponseHref = directResponse.getGroupMembershipInfos().get(apiResponseSize - 1).getHref(); final int esbResponseSize = Integer.parseInt((String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(count(//atom:groupMembershipInfo))", nameSpaceMap)); final String directEsbResponseHref = (String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:groupMembershipInfo[" + esbResponseSize + "]/@href)", nameSpaceMap); // Assert title Assert.assertEquals(directResponse.getTitle().getPlainText(), (String) xPathEvaluate(esbSoapResponse.getBody().getFirstElement(), "string(//atom:title/text())", nameSpaceMap)); // Assert Checking whether both responses href are identical Assert.assertEquals(directApiResponseHref, directEsbResponseHref); }