Package org.geotools.swing.dialog.JTextReporter

Examples of org.geotools.swing.dialog.JTextReporter.Connection


        assertEquals(text, conn.getText());
    }
   
    @Test
    public void getTextWhenNoneIsDisplayedReturnsEmptyString() throws Exception {
        Connection conn = showDialog(TITLE).get();
        String text = conn.getText();
        assertNotNull(text);
        assertTrue(text.length() == 0);
    }
View Full Code Here


        assertTrue(text.length() == 0);
    }
   
    @Test
    public void listenerInformedWhenTextIsUpdated() throws Exception {
        Connection conn = showDialog(TITLE).get();

        final CountDownLatch latch = new CountDownLatch(1);
        conn.addListener(new TextReporterListener() {
            @Override
            public void onReporterClosed() {}

            @Override
            public void onReporterUpdated() {
                latch.countDown();
            }
        });
       
        conn.append(TEXT[0]);
        assertTrue( latch.await(LISTENER_TIMEOUT, TimeUnit.MILLISECONDS) );
    }
View Full Code Here

        assertTrue( latch.await(LISTENER_TIMEOUT, TimeUnit.MILLISECONDS) );
    }
   
    @Test
    public void listenerInformedWhenDialogIsClosedViaSystemButton() throws Exception {
        Connection conn = showDialog(TITLE).get();

        final CountDownLatch latch = new CountDownLatch(1);
        conn.addListener(new TextReporterListener() {
            @Override
            public void onReporterClosed() {
                latch.countDown();
            }
View Full Code Here

        assertTrue( latch.await(LISTENER_TIMEOUT, TimeUnit.MILLISECONDS) );
    }
   
    @Test
    public void listenerInformedWhenDialogIsClosedViaCloseButton() throws Exception {
        Connection conn = showDialog(TITLE).get();

        final CountDownLatch latch = new CountDownLatch(1);
        conn.addListener(new TextReporterListener() {
            @Override
            public void onReporterClosed() {
                latch.countDown();
            }
View Full Code Here

        assertEquals(text, clipText);
    }
   
    @Test
    public void closeDialogViaConnection() throws Exception {
        Connection conn = showDialog(TITLE).get();
        conn.closeDialog();
       
        windowFixture.robot.waitForIdle();
        windowFixture.requireNotVisible();
        assertFalse(conn.isOpen());
    }
View Full Code Here

        assertFalse(conn.isOpen());
    }

    @Test
    public void callingCloseDialogTwiceRaisesLogMessage() throws Exception {
        Connection conn = showDialog(TITLE).get();
        conn.closeDialog();
        windowFixture.robot.waitForIdle();
        captureLogger();
       
        conn.closeDialog();
        assertLogMessage("INFO");
        assertLogMessage("connection has expired");
       
        releaseLogger();
    }
View Full Code Here

        releaseLogger();
    }
   
    @Test
    public void callingCloseDialogAfterGUICloseRaisesLogMessage() throws Exception {
        Connection conn = showDialog(TITLE).get();
        getButton("Close").click();
        windowFixture.robot.waitForIdle();
        captureLogger();
       
        conn.closeDialog();
        assertLogMessage("INFO");
        assertLogMessage("connection has expired");
       
        releaseLogger();
    }
View Full Code Here

TOP

Related Classes of org.geotools.swing.dialog.JTextReporter.Connection

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.