Package org.sentinel.client

Examples of org.sentinel.client.Client


   
    @Test
    public void testBlankConfiguration() throws Exception
    {
        try {
            Client client = launchServerWithConfiguration(badXmlPackage + "/blank.xml");
            fail("Server should not have launched.");
        }
        catch(ConfigurationException ex) {
            assertEquals("Configuration XML file is invalid: Premature end of file.",
                ex.getMessage());
View Full Code Here


   
    @Test
    public void testIncorrectRootConfiguration() throws Exception
    {
        try {
            Client client = launchServerWithConfiguration(badXmlPackage + "/incorrect-root.xml");
            fail("Server should not have launched.");
        }
        catch(ConfigurationException ex) {
            assertEquals("Root node of configuration file must be 'sentinel'.", ex.getMessage());
        }
View Full Code Here

   
    @Test
    public void testMissingServerConfiguration() throws Exception
    {
        try {
            Client client = launchServerWithConfiguration(badXmlPackage + "/missing-server.xml");
            fail("Server should not have launched.");
        }
        catch(ConfigurationException ex) {
            assertEquals("No such configuration server 'helloWorldServer'", ex.getMessage());
        }
View Full Code Here

   
    @Test
    public void testMissingClassConfiguration() throws Exception
    {
        try {
            Client client = launchServerWithConfiguration(badXmlPackage + "/missing-class.xml");
            fail("Server should not have launched.");
        }
        catch(ConfigurationException ex) {
            assertEquals("No such class 'no.such.protocol'", ex.getMessage());
        }
View Full Code Here

   
    @Test
    public void testMissingConfiguration() throws Exception
    {
        try {
            Client client = launchServerWithConfiguration(badXmlPackage + "/no-such-file.xml");
            fail("Server should not have launched.");
        }
        catch(ConfigurationException ex) {
            assertEquals("Could not find configuration file /org/sentinel/configuration/test/no-such-file.xml", ex.getMessage());
        }
View Full Code Here

   
    @Test
    public void testNoListeners() throws Exception
    {
        try {
            Client client = launchServerWithConfiguration(badXmlPackage + "/no-listeners.xml");
            fail("Server should not have launched.");
        }
        catch(ConfigurationException ex) {
            assertEquals("There are no listeners configured.", ex.getMessage());
        }
View Full Code Here

   
    @Test
    public void testMissingRequiredNode() throws Exception
    {
        try {
            Client client = launchServerWithConfiguration(badXmlPackage + "/missing-required-node.xml");
            fail("Server should not have launched.");
        }
        catch(ConfigurationException ex) {
            assertEquals("Child element <listeners> is required for <sentinel>", ex.getMessage());
        }
View Full Code Here

   
    @Test
    public void testInvalidAttribute() throws Exception
    {
        try {
            Client client = launchServerWithConfiguration(badXmlPackage + "/invalid-attribute.xml");
            fail("Server should not have launched.");
        }
        catch(ConfigurationException ex) {
            assertEquals("Bad attribute 'foo'", ex.getMessage());
        }
View Full Code Here

TOP

Related Classes of org.sentinel.client.Client

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.