Package net.sourceforge.marathon

Examples of net.sourceforge.marathon.DialogForTesting.dispose()


            assertEquals("dialog1 should have been shown", toSet(new Object[] { dialog1 }), hashWindows);
            dialog2.show();
            // new Snooze(500);
            assertEquals("dialog2 should have been shown", toSet(new Object[] { dialog1, dialog2 }), hashWindows);
            dialog1.dispose();
            dialog2.dispose();
            AWTSync.sync();
            assertNull("windows 1 should be closed", WindowMonitor.getInstance().getWindow(dialog1.getTitle()));
            assertNull("windows 2 should be closed", WindowMonitor.getInstance().getWindow(dialog2.getTitle()));
            if (hashWindows.size() != 0) {
                Thread.sleep(100); // doesn't matter, we know this is a race
View Full Code Here


                                   // condition, but who cares
                assertEquals("should have disposed both", toSet(new Object[] {}), hashWindows);
            }
        } finally {
            dialog1.dispose();
            dialog2.dispose();
            WindowMonitor.getInstance().removeTopLevelWindowListener(listener);
        }
    }

    private HashSet<Object> toSet(Object[] a) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.