--- old/test/javax/xml/jaxp/functional/test/auctionportal/AuctionController.java 2014-12-31 11:40:23.911061637 -0800
+++ new/test/javax/xml/jaxp/functional/test/auctionportal/AuctionController.java 2014-12-31 11:40:23.834061518 -0800
@@ -30,6 +30,7 @@
import java.io.File;
import java.io.FileInputStream;
+import java.io.FilePermission;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
@@ -51,8 +52,10 @@
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
+import jaxp.library.JAXPBaseTest;
import static jaxp.library.JAXPTestUtilities.bomStream;
-import static jaxp.library.JAXPTestUtilities.failUnexpected;
+import org.testng.annotations.AfterGroups;
+import org.testng.annotations.BeforeGroups;
import org.testng.annotations.Test;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMConfiguration;
@@ -70,166 +73,218 @@
/**
* This is the user controller class for the Auction portal HiBid.com.
*/
-public class AuctionController {
+public class AuctionController extends JAXPBaseTest {
+ /**
+ * Save system property for restoring.
+ */
+ @BeforeGroups (groups = {"readLocalFiles"})
+ public void setFilePermissions() {
+ setPermissions(new FilePermission(XML_DIR + "/-", "read"));
+ }
+
+ /**
+ * Restore the system property.
+ */
+ @AfterGroups (groups = {"readLocalFiles"})
+ public void restoreFilePermissions() {
+ setPermissions();
+ }
+
/**
* Check for DOMErrorHandler handling DOMError. Before fix of bug 4890927
* DOMConfiguration.setParameter("well-formed",true) throws an exception.
+ *
+ * @throws ClassNotFoundException If any specified class does not implement.
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws InstantiationException If any specified class is an interface or
+ * abstract class.
+ * @throws IllegalAccessException If the default constructor of a specified
+ * class is not accessible.
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
*/
- @Test
- public void testCreateNewItem2Sell() {
+ @Test(groups = {"readLocalFiles"})
+ public void testCreateNewItem2Sell() throws ClassNotFoundException,
+ ParserConfigurationException, InstantiationException,
+ IllegalAccessException, SAXException, IOException {
String xmlFile = XML_DIR + "novelsInvalid.xml";
- try {
- Document document = DocumentBuilderFactory.newInstance()
- .newDocumentBuilder().parse(xmlFile);
-
- document.getDomConfig().setParameter("well-formed", true);
-
- DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
- DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation("LS");
- MyDOMOutput domOutput = new MyDOMOutput();
- domOutput.setByteStream(System.out);
- LSSerializer writer = impl.createLSSerializer();
- writer.write(document, domOutput);
- } catch (ParserConfigurationException | SAXException | IOException
- | ClassNotFoundException | InstantiationException
- | IllegalAccessException | ClassCastException e) {
- failUnexpected(e);
- }
+ Document document = DocumentBuilderFactory.newInstance()
+ .newDocumentBuilder().parse(xmlFile);
+
+ document.getDomConfig().setParameter("well-formed", true);
+
+ DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
+ DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation("LS");
+ MyDOMOutput domOutput = new MyDOMOutput();
+ domOutput.setByteStream(System.out);
+ LSSerializer writer = impl.createLSSerializer();
+ writer.write(document, domOutput);
}
/**
* Check for DOMErrorHandler handling DOMError. Before fix of bug 4896132
* test throws DOM Level 1 node error.
+ *
+ * @throws ClassNotFoundException If any specified class does not implement.
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws InstantiationException If any specified class is an interface or
+ * abstract class.
+ * @throws IllegalAccessException If the default constructor of a specified
+ * class is not accessible.
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
*/
- @Test
- public void testCreateNewItem2SellRetry() {
+ @Test(groups = {"readLocalFiles"})
+ public void testCreateNewItem2SellRetry() throws ClassNotFoundException,
+ ParserConfigurationException, InstantiationException,
+ IllegalAccessException, SAXException, IOException {
String xmlFile = XML_DIR + "accountInfo.xml";
- try {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- Document document = dbf.newDocumentBuilder().parse(xmlFile);
-
- DOMConfiguration domConfig = document.getDomConfig();
- MyDOMErrorHandler errHandler = new MyDOMErrorHandler();
- domConfig.setParameter("error-handler", errHandler);
-
- DOMImplementationLS impl =
- (DOMImplementationLS) DOMImplementationRegistry.newInstance()
- .getDOMImplementation("LS");
- LSSerializer writer = impl.createLSSerializer();
- MyDOMOutput domoutput = new MyDOMOutput();
-
- domoutput.setByteStream(System.out);
- writer.write(document, domoutput);
-
- document.normalizeDocument();
- writer.write(document, domoutput);
- assertFalse(errHandler.isError());
- } catch (ParserConfigurationException | SAXException | IOException
- | ClassNotFoundException | InstantiationException
- | IllegalAccessException | ClassCastException e) {
- failUnexpected(e);
- }
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ Document document = dbf.newDocumentBuilder().parse(xmlFile);
+
+ DOMConfiguration domConfig = document.getDomConfig();
+ MyDOMErrorHandler errHandler = new MyDOMErrorHandler();
+ domConfig.setParameter("error-handler", errHandler);
+
+ DOMImplementationLS impl =
+ (DOMImplementationLS) DOMImplementationRegistry.newInstance()
+ .getDOMImplementation("LS");
+ LSSerializer writer = impl.createLSSerializer();
+ MyDOMOutput domoutput = new MyDOMOutput();
+
+ domoutput.setByteStream(System.out);
+ writer.write(document, domoutput);
+
+ document.normalizeDocument();
+ writer.write(document, domoutput);
+ assertFalse(errHandler.isError());
}
/**
* Check if setting the attribute to be of type ID works. This will affect
* the Attr.isID method according to the spec.
+ *
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
*/
- @Test
- public void testCreateID() {
+ @Test(groups = {"readLocalFiles"})
+ public void testCreateID() throws ParserConfigurationException,
+ SAXException, IOException {
String xmlFile = XML_DIR + "accountInfo.xml";
- try {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
- Document document = dbf.newDocumentBuilder().parse(xmlFile);
- Element account = (Element)document
- .getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "Account").item(0);
-
- account.setIdAttributeNS(PORTAL_ACCOUNT_NS, "accountID", true);
- Attr aID = account.getAttributeNodeNS(PORTAL_ACCOUNT_NS, "accountID");
- assertTrue(aID.isId());
- } catch (ParserConfigurationException | SAXException | IOException e) {
- failUnexpected(e);
- }
+ Document document = dbf.newDocumentBuilder().parse(xmlFile);
+ Element account = (Element)document
+ .getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "Account").item(0);
+
+ account.setIdAttributeNS(PORTAL_ACCOUNT_NS, "accountID", true);
+ Attr aID = account.getAttributeNodeNS(PORTAL_ACCOUNT_NS, "accountID");
+ assertTrue(aID.isId());
}
/**
* Check the user data on the node.
+ *
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
*/
- @Test
- public void testCheckingUserData() {
+ @Test(groups = {"readLocalFiles"})
+ public void testCheckingUserData() throws ParserConfigurationException,
+ SAXException, IOException {
String xmlFile = XML_DIR + "accountInfo.xml";
- try {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
- DocumentBuilder docBuilder = dbf.newDocumentBuilder();
- Document document = docBuilder.parse(xmlFile);
+ DocumentBuilder docBuilder = dbf.newDocumentBuilder();
+ Document document = docBuilder.parse(xmlFile);
- Element account = (Element)document.getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "Account").item(0);
- assertEquals(account.getNodeName(), "acc:Account");
- Element firstName = (Element) document.getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "FirstName").item(0);
- assertEquals(firstName.getNodeName(), "FirstName");
-
- Document doc1 = docBuilder.newDocument();
- Element someName = doc1.createElement("newelem");
-
- someName.setUserData("mykey", "dd",
- (operation, key, data, src, dst) -> {
- System.err.println("In UserDataHandler" + key);
- System.out.println("In UserDataHandler");
- });
- Element impAccount = (Element)document.importNode(someName, true);
- assertEquals(impAccount.getNodeName(), "newelem");
- document.normalizeDocument();
- String data = (someName.getUserData("mykey")).toString();
- assertEquals(data, "dd");
- } catch (ParserConfigurationException | SAXException | IOException e) {
- failUnexpected(e);
- }
+ Element account = (Element)document.getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "Account").item(0);
+ assertEquals(account.getNodeName(), "acc:Account");
+ Element firstName = (Element) document.getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "FirstName").item(0);
+ assertEquals(firstName.getNodeName(), "FirstName");
+
+ Document doc1 = docBuilder.newDocument();
+ Element someName = doc1.createElement("newelem");
+
+ someName.setUserData("mykey", "dd",
+ (operation, key, data, src, dst) -> {
+ System.err.println("In UserDataHandler" + key);
+ System.out.println("In UserDataHandler");
+ });
+ Element impAccount = (Element)document.importNode(someName, true);
+ assertEquals(impAccount.getNodeName(), "newelem");
+ document.normalizeDocument();
+ String data = (someName.getUserData("mykey")).toString();
+ assertEquals(data, "dd");
}
/**
* Check the UTF-16 XMLEncoding xml file.
+ *
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
* @see movies.xml
*/
- @Test
- public void testCheckingEncoding() {
+ @Test(groups = {"readLocalFiles"})
+ public void testCheckingEncoding() throws ParserConfigurationException,
+ IOException, SAXException {
// Note since movies.xml is UTF-16 encoding. We're not using stanard XML
// file suffix.
String xmlFile = XML_DIR + "movies.xml.data";
- //try (FileInputStream is = new FileInputStream(xmlFile)) {
- try {
+ try (InputStream source = bomStream("UTF-16", xmlFile)) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
- InputStream source = bomStream("UTF-16", xmlFile);
Document document = dbf.newDocumentBuilder().parse(source);
assertEquals(document.getXmlEncoding(), "UTF-16");
assertEquals(document.getXmlStandalone(), true);
- } catch (ParserConfigurationException | SAXException | IOException e) {
- failUnexpected(e);
}
}
/**
* Check validation API features. A schema which is including in Bug 4909119
* used to be testing for the functionalities.
+ *
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
* @see userDetails.xsd
*/
- @Test
- public void testGetOwnerInfo() {
+ @Test(groups = {"readLocalFiles"})
+ public void testGetOwnerInfo() throws ParserConfigurationException,
+ SAXException, IOException {
String schemaFile = XML_DIR + "userDetails.xsd";
String xmlFile = XML_DIR + "userDetails.xml";
-
- try {
+
+ try(FileInputStream fis = new FileInputStream(xmlFile)) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
@@ -244,27 +299,33 @@
DocumentBuilder docBuilder = dbf.newDocumentBuilder();
docBuilder.setErrorHandler(eh);
- Document document = docBuilder.parse(new FileInputStream(xmlFile));
+ Document document = docBuilder.parse(fis);
DOMResult dResult = new DOMResult();
DOMSource domSource = new DOMSource(document);
validator.validate(domSource, dResult);
assertFalse(eh.isAnyError());
- } catch (SAXException | ParserConfigurationException | IOException e) {
- failUnexpected(e);
}
}
/**
* Check grammar caching with imported schemas.
+ *
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
* @see coins.xsd
* @see coinsImportMe.xsd
*/
- @Test
- public void testGetOwnerItemList() {
+ @Test(groups = {"readLocalFiles"})
+ public void testGetOwnerItemList() throws ParserConfigurationException,
+ IOException, SAXException {
String xsdFile = XML_DIR + "coins.xsd";
String xmlFile = XML_DIR + "coins.xml";
- try {
+ try(FileInputStream fis = new FileInputStream(xmlFile)) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
@@ -278,11 +339,9 @@
validator.setErrorHandler(eh);
DocumentBuilder docBuilder = dbf.newDocumentBuilder();
- Document document = docBuilder.parse(new FileInputStream(xmlFile));
+ Document document = docBuilder.parse(fis);
validator.validate(new DOMSource(document), new DOMResult());
assertFalse(eh.isAnyError());
- } catch (SAXException | ParserConfigurationException | IOException e) {
- failUnexpected(e);
}
}
@@ -291,96 +350,108 @@
* Check for the same imported schemas but will use SAXParserFactory and try
* parsing using the SAXParser. SCHEMA_SOURCE attribute is using for this
* test.
+ *
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
* @see coins.xsd
* @see coinsImportMe.xsd
*/
- @Test
- public void testGetOwnerItemList1() {
+ @Test(groups = {"readLocalFiles"})
+ public void testGetOwnerItemList1() throws SAXException, IOException,
+ ParserConfigurationException {
String xsdFile = XML_DIR + "coins.xsd";
String xmlFile = XML_DIR + "coins.xml";
-
- try {
- SAXParserFactory spf = SAXParserFactory.newInstance();
- spf.setNamespaceAware(true);
- spf.setValidating(true);
-
- SAXParser sp = spf.newSAXParser();
- sp.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
- sp.setProperty(JAXP_SCHEMA_SOURCE, xsdFile);
-
- MyErrorHandler eh = new MyErrorHandler();
- sp.parse(new File(xmlFile), eh);
- assertFalse(eh.isAnyError());
- } catch (ParserConfigurationException | SAXException | IOException e) {
- failUnexpected(e);
- }
+ SAXParserFactory spf = SAXParserFactory.newInstance();
+ spf.setNamespaceAware(true);
+ spf.setValidating(true);
+
+ SAXParser sp = spf.newSAXParser();
+ sp.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
+ sp.setProperty(JAXP_SCHEMA_SOURCE, xsdFile);
+
+ MyErrorHandler eh = new MyErrorHandler();
+ sp.parse(new File(xmlFile), eh);
+ assertFalse(eh.isAnyError());
}
/**
* Check usage of javax.xml.datatype.Duration class.
+ *
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws DatatypeConfigurationException If the implementation is not
+ * available or cannot be instantiated.
*/
- @Test
- public void testGetItemDuration() {
+ @Test(groups = {"readLocalFiles"})
+ public void testGetItemDuration() throws ParserConfigurationException,
+ SAXException, DatatypeConfigurationException, IOException {
String xmlFile = XML_DIR + "itemsDuration.xml";
- try {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- Document document = dbf.newDocumentBuilder().parse(xmlFile);
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ Document document = dbf.newDocumentBuilder().parse(xmlFile);
- Element durationElement = (Element) document.getElementsByTagName("sellDuration").item(0);
+ Element durationElement = (Element) document.getElementsByTagName("sellDuration").item(0);
- NodeList childList = durationElement.getChildNodes();
+ NodeList childList = durationElement.getChildNodes();
- for (int i = 0; i < childList.getLength(); i++) {
- System.out.println("child " + i + childList.item(i));
- }
-
- Duration duration = DatatypeFactory.newInstance().newDuration("P365D");
- Duration sellDuration = DatatypeFactory.newInstance().newDuration(childList.item(0).getNodeValue());
- assertFalse(sellDuration.isShorterThan(duration));
- assertFalse(sellDuration.isLongerThan(duration));
- assertEquals(sellDuration.getField(DatatypeConstants.DAYS), BigInteger.valueOf(365));
- assertEquals(sellDuration.normalizeWith(new GregorianCalendar(1999, 2, 22)), duration);
-
- Duration myDuration = sellDuration.add(duration);
- assertEquals(myDuration.normalizeWith(new GregorianCalendar(2003, 2, 22)),
- DatatypeFactory.newInstance().newDuration("P730D"));
- } catch (ParserConfigurationException | DatatypeConfigurationException
- | SAXException | IOException e) {
- failUnexpected(e);
+ for (int i = 0; i < childList.getLength(); i++) {
+ System.out.println("child " + i + childList.item(i));
}
+
+ Duration duration = DatatypeFactory.newInstance().newDuration("P365D");
+ Duration sellDuration = DatatypeFactory.newInstance().newDuration(childList.item(0).getNodeValue());
+ assertFalse(sellDuration.isShorterThan(duration));
+ assertFalse(sellDuration.isLongerThan(duration));
+ assertEquals(sellDuration.getField(DatatypeConstants.DAYS), BigInteger.valueOf(365));
+ assertEquals(sellDuration.normalizeWith(new GregorianCalendar(1999, 2, 22)), duration);
+
+ Duration myDuration = sellDuration.add(duration);
+ assertEquals(myDuration.normalizeWith(new GregorianCalendar(2003, 2, 22)),
+ DatatypeFactory.newInstance().newDuration("P730D"));
}
/**
* Check usage of TypeInfo interface introduced in DOM L3.
+ *
+ * @throws ParserConfigurationException if a DocumentBuilder cannot be
+ * created which satisfies the configuration requested.
+ * @throws SAXException If any parse errors occur.
+ * @throws IOException if the file exists but is a directory rather than
+ * a regular file, does not exist but cannot be created, or cannot
+ * be opened for any other reason.
*/
- @Test
- public void testGetTypeInfo() {
+ @Test(groups = {"readLocalFiles"})
+ public void testGetTypeInfo() throws ParserConfigurationException,
+ SAXException, IOException {
String xmlFile = XML_DIR + "accountInfo.xml";
- try {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- dbf.setValidating(true);
- dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
-
- DocumentBuilder docBuilder = dbf.newDocumentBuilder();
- docBuilder.setErrorHandler(new MyErrorHandler());
-
- Document document = docBuilder.parse(xmlFile);
- Element userId = (Element)document.getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "UserID").item(0);
- TypeInfo typeInfo = userId.getSchemaTypeInfo();
- assertTrue(typeInfo.getTypeName().equals("nonNegativeInteger"));
- assertTrue(typeInfo.getTypeNamespace().equals(W3C_XML_SCHEMA_NS_URI));
-
- Element role = (Element)document.getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "Role").item(0);
- TypeInfo roletypeInfo = role.getSchemaTypeInfo();
- assertTrue(roletypeInfo.getTypeName().equals("BuyOrSell"));
- assertTrue(roletypeInfo.getTypeNamespace().equals(PORTAL_ACCOUNT_NS));
- } catch (ParserConfigurationException | SAXException | IOException e) {
- failUnexpected(e);
- }
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ dbf.setValidating(true);
+ dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
+
+ DocumentBuilder docBuilder = dbf.newDocumentBuilder();
+ docBuilder.setErrorHandler(new MyErrorHandler());
+
+ Document document = docBuilder.parse(xmlFile);
+ Element userId = (Element)document.getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "UserID").item(0);
+ TypeInfo typeInfo = userId.getSchemaTypeInfo();
+ assertTrue(typeInfo.getTypeName().equals("nonNegativeInteger"));
+ assertTrue(typeInfo.getTypeNamespace().equals(W3C_XML_SCHEMA_NS_URI));
+
+ Element role = (Element)document.getElementsByTagNameNS(PORTAL_ACCOUNT_NS, "Role").item(0);
+ TypeInfo roletypeInfo = role.getSchemaTypeInfo();
+ assertTrue(roletypeInfo.getTypeName().equals("BuyOrSell"));
+ assertTrue(roletypeInfo.getTypeNamespace().equals(PORTAL_ACCOUNT_NS));
}
}