Package org.codinjutsu.tools.mongo

Examples of org.codinjutsu.tools.mongo.ServerConfiguration


        thrown.expect(ConfigurationException.class);
        thrown.expectMessage("Port in the URL 'host:port' is incorrect. It should be a number");

        frameFixture.textBox("serverUrlsField").setText("host:port");

        configurationPanel.applyConfigurationData(new ServerConfiguration());
    }
View Full Code Here


    @Test
    public void validateFormWithReplicatSet() throws Exception {

        frameFixture.textBox("serverUrlsField").setText(" localhost:25, localhost:26 ");

        ServerConfiguration configuration = new ServerConfiguration();

        configurationPanel.applyConfigurationData(configuration);

        assertEquals(Arrays.asList("localhost:25", "localhost:26"), configuration.getServerUrls());
    }
View Full Code Here

        assertEquals(Arrays.asList("localhost:25", "localhost:26"), configuration.getServerUrls());
    }

    @Test
    public void loadFormWithReplicatSet() throws Exception {
        ServerConfiguration configuration = new ServerConfiguration();
        configuration.setServerUrls(Arrays.asList("localhost:25", "localhost:26"));

        configurationPanel.loadConfigurationData(configuration);

        frameFixture.textBox("serverUrlsField").requireText("localhost:25,localhost:26");
    }
View Full Code Here

        frameFixture.textBox("serverUrlsField").requireText("localhost:25,localhost:26");
    }

    @Test
    public void connectionWithSuccess() {
        ServerConfiguration configuration = new ServerConfiguration();
        configuration.setServerUrls(Arrays.asList("localhost:27017"));

        configurationPanel.loadConfigurationData(configuration);

        frameFixture.button("testConnection").click();
View Full Code Here

        Mockito.verify(mongoManager, Mockito.times(1)).connect(Arrays.asList("localhost:27017"), null, null, null);
    }

    @Test
    public void connectionWithFailure() {
        ServerConfiguration configuration = new ServerConfiguration();
        configuration.setServerUrls(Arrays.asList("myserver:25"));

        configurationPanel.loadConfigurationData(configuration);

        frameFixture.button("testConnection").click();
        assertTrue(frameFixture.label("feedbackLabel").text().contains("Timed out while waiting to connect after"));
View Full Code Here

TOP

Related Classes of org.codinjutsu.tools.mongo.ServerConfiguration

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.