/** * Returns whether it has the value. * * @return whether it has the value */ public boolean hasValue() { return getValue() != null; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } FullName other = (FullName) obj; return eq(value, other.value) && eq(yomi, other.yomi); }
/** * Returns whether it has the pronunciation help. * * @return whether it has the pronunciation help */ public boolean hasYomi() { return getYomi() != null; }
/** * Immutable constructor. * * @param value value. * @param yomi pronunciation help. */ public FullName(String value, String yomi) { super(); setValue(value); setYomi(yomi); setImmutable(true); }
/** * Sets the pronunciation help. * * @param yomi pronunciation help or <code>null</code> to reset */ public void setYomi(String yomi) { throwExceptionIfImmutable(); this.yomi = yomi; }
/** * Immutable constructor. * * @param value value. * @param yomi pronunciation help. */ public FullName(String value, String yomi) { super(); setValue(value); setYomi(yomi); setImmutable(true); }
/** * Sets the value. * * @param value value or <code>null</code> to reset */ public void setValue(String value) { throwExceptionIfImmutable(); this.value = value; }
/** * Immutable constructor. * * @param value value. * @param yomi pronunciation help. */ public FullName(String value, String yomi) { super(); setValue(value); setYomi(yomi); setImmutable(true); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } FullName other = (FullName) obj; return eq(value, other.value) && eq(yomi, other.yomi); }
/** * Returns whether it has the value. * * @return whether it has the value */ public boolean hasValue() { return getValue() != null; }
/** * Sets the pronunciation help. * * @param yomi pronunciation help or <code>null</code> to reset */ public void setYomi(String yomi) { throwExceptionIfImmutable(); this.yomi = yomi; }
/** * Returns whether it has the pronunciation help. * * @return whether it has the pronunciation help */ public boolean hasYomi() { return getYomi() != null; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } FullName other = (FullName) obj; return eq(value, other.value) && eq(yomi, other.yomi); }
/** * Returns whether it has the value. * * @return whether it has the value */ public boolean hasValue() { return getValue() != null; }
/** * Sets the value. * * @param value value or <code>null</code> to reset */ public void setValue(String value) { throwExceptionIfImmutable(); this.value = value; }
/** * Returns whether it has the pronunciation help. * * @return whether it has the pronunciation help */ public boolean hasYomi() { return getYomi() != null; }
/** * Positive test case for createContact method with mandatory parameters. */ @Test(priority = 1, groups = { "wso2.esb" }, description = "Google Contacts {createContact} integration test with mandatory parameters.") public void testCreateContactWithMandatoryParameters() throws Exception { SOAPEnvelope esbSoapResponse = sendSOAPRequest(proxyUrl, "esb_createContact_mandatory.xml"); Assert.assertTrue(esbSoapResponse.getBody().toString().contains("atom:id")); String xPathExp = "string(//atom:id/text())"; String idUrl = (String) xPathEvaluate(esbSoapResponse, xPathExp, nameSpaceMap); batchDeleteContactId = idUrl.substring(idUrl.lastIndexOf("/") + 1, idUrl.length()); ContactEntry directResponseObject = directInvoker.retrieveSingleContact(batchDeleteContactId); Assert.assertEquals(idUrl, directResponseObject.getId()); Assert.assertEquals((String) xPathEvaluate(esbSoapResponse, "string(//gd:fullName/text())", nameSpaceMap), directResponseObject .getName().getFullName().getValue()); }
/** * Sets the pronunciation help. * * @param yomi pronunciation help or <code>null</code> to reset */ public void setYomi(String yomi) { throwExceptionIfImmutable(); this.yomi = yomi; }
/** * Positive test case for createContact method with mandatory parameters. */ @Test(priority = 2, groups = { "wso2.esb" }, dependsOnMethods = { "testCreateContactWithOptionalParameters" }, description = "Google Contacts {updateContact} integration test with mandatory parameters.") public void testUpdateContactWithMandatoryParameters() throws Exception { Map<String, String> parametersMap = new HashMap<String, String>(); parametersMap.put("contactId", contactId); SOAPEnvelope esbSoapResponse = sendSOAPRequest(proxyUrl, "esb_updateContact_mandatory.xml", parametersMap); String xPathExp = "string(//atom:id/text())"; String idUrl = (String) xPathEvaluate(esbSoapResponse, xPathExp, nameSpaceMap); String updatedContactId = idUrl.substring(idUrl.lastIndexOf("/") + 1, idUrl.length()); // Adding a sleep timer to buffer time taken to apply changes on backend. Thread.sleep(Long.parseLong(connectorProperties.getProperty("timeDelay"))); ContactEntry directResponseObject = directInvoker.retrieveSingleContact(updatedContactId); Assert.assertEquals(idUrl, directResponseObject.getId()); Assert.assertEquals((String) xPathEvaluate(esbSoapResponse, "string(//gd:fullName/text())", nameSpaceMap), directResponseObject .getName().getFullName().getValue()); }
/** * Sets the value. * * @param value value or <code>null</code> to reset */ public void setValue(String value) { throwExceptionIfImmutable(); this.value = value; }