Package net.jsunit.configuration

Examples of net.jsunit.configuration.DummyConfigurationSource


public class RemoteConfigurationFetcherTest extends TestCase {

    public void testSimple() throws Exception {
        String remoteMachineURL = "http://www.example.com/jsunit";
        MockRemoteServerHitter hitter = new MockRemoteServerHitter();
        ServerConfiguration configuration = new ServerConfiguration(new DummyConfigurationSource());
        Document configurationDocument = new Document(configuration.asXml());
        hitter.urlToDocument.put(remoteMachineURL + "/config", configurationDocument);
        RemoteConfigurationFetcher fetcher = new RemoteConfigurationFetcher(hitter, new URL(remoteMachineURL));
        fetcher.start();
        fetcher.join();
View Full Code Here


    private ServerConfiguration configuration;

    public void setUp() throws Exception {
        super.setUp();
        configuration = new ServerConfiguration(new DummyConfigurationSource());
    }
View Full Code Here

        assertEquals(DummyConfigurationSource.REMOTE_URL_2, testRunResults.get(1).getUrl());
        assertEquals(ResultType.UNRESPONSIVE, testRunResults.get(1)._getResultType());
    }

    public void testRemoteURLBlowsUpButIgnored() throws MalformedURLException {
        configuration = new ServerConfiguration(new DummyConfigurationSource() {
            public String ignoreUnresponsiveRemoteMachines() {
                return "true";
            }
        });
        assertTrue(configuration.shouldIgnoreUnresponsiveRemoteMachines());
View Full Code Here

        assertTrue(hitter.urlsPassed.contains(url1));
        assertTrue(hitter.urlsPassed.contains(url2));
    }

    public void testNoURL() throws Exception {
        configuration = new ServerConfiguration(new DummyConfigurationSource() {
            public String url() {
                return null;
            }
        });
        String url1 = DummyConfigurationSource.REMOTE_URL_1 + "/runner";
View Full Code Here

            server.dispose();
        super.tearDown();
    }

    public void testStartTestRun() throws Exception {
        server = new JsUnitAggregateServer(new AggregateConfiguration(new DummyConfigurationSource()));
        assertEquals(ServerType.AGGREGATE, server.serverType());
    }
View Full Code Here

        super.setUp();
        baseURL = "http://www.example.com:1234/jsunit";
    }

    public void testSimple() throws Exception {
        ServerConfiguration configuration = new ServerConfiguration(new DummyConfigurationSource());
        MockRemoteServerHitter mockHitter = new MockRemoteServerHitter();
        mockHitter.urlToDocument.put(baseURL + "/config", new Document(configuration.asXml()));

        RemoteConfigurationSource remoteSource = new RemoteConfigurationSource(mockHitter, baseURL);
        assertTrue(remoteSource.isInitialized());
View Full Code Here

        assertEquals(browser0, retrieved.get(0));
        assertEquals(browser1, retrieved.get(1));
    }

    public void testBuildURLNoBrowsers() throws Exception {
        URL url = spec.buildFullURL(new ServerConfiguration(new DummyConfigurationSource()), overrideURL);
        assertEquals("http://www.example.com/runner?url=" + URLEncoder.encode(overrideURL, "UTF-8"), url.toString());
    }
View Full Code Here

    public void testBuildURLWithBrowsers() throws Exception {
        spec.addBrowser(new Browser("browser8.exe", 8));
        spec.addBrowser(new Browser("browser4.exe", 4));
        URL url = spec.buildFullURL(
                new ServerConfiguration(new DummyConfigurationSource()),
                overrideURL
        );
        assertEquals(
                "http://www.example.com/runner?url=" + URLEncoder.encode(overrideURL, "UTF-8") + "&browserId=8&browserId=4",
                url.toString()
View Full Code Here

TOP

Related Classes of net.jsunit.configuration.DummyConfigurationSource

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.