Package org.jboss.jopr.jsfunit

Examples of org.jboss.jopr.jsfunit.JMXUtils


    ContentTable table;
    ContentInfoTable infoTable;
    String headerText;
    Properties properties;

    JMXUtils jmxUtils = JMXUtils.getInstanceForLocalJBoss();


    /*
     * General Properties
        Name:JBoss AS 5 (default)
        Version:5.1.0.CR1
        Description:JBoss Application Server
     */
    headerText = "General Properties";
    assertTrue("Page doesn't contain the header: "+headerText, pageText.contains(headerText));
    table = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader(headerText);
    infoTable = ejtt.getContentInfoTable(table.getElement());
    properties = infoTable.getProperties();

    assertEquals("General Properties / Name", pageHeaderText, properties.getProperty("Name") );

    String versionPrefix = "5.1";
    String jmxMBeanName = "jboss.system:type=Server";
    versionPrefix = (String) jmxUtils.getMBeanAttribute(jmxMBeanName, "VersionNumber");

    assertTrue("General Properties / Version startsWith('"+versionPrefix+"')",
            properties.getProperty("Version","~not found~").startsWith(versionPrefix) );
    assertEquals("General Properties / Description", AS_NODE_DESCRIPTION, properties.get("Description") );

View Full Code Here

TOP

Related Classes of org.jboss.jopr.jsfunit.JMXUtils

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.