Re: [TFUI] Temporary Interactive Tests

Timothy Wall <[email protected]>
Newsgroups gmane.comp.programming.test-first-user-interfaces
Message-ID <[email protected]>
I think you forgot to actually show the frame...

On Aug 7, 2004, at 3:33 PM, Phlip wrote:

>
> public class HelloWorldTestUI
>     extends TestCase
> {
>
>
>     class Flag {  boolean flag;  }
>     final Flag flag = new Flag();
>
>     public void reveal(final JFrameOperator frame)
>             throws InterruptedException
>     {
>
> frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
>
>         frame.addWindowListener(new WindowAdapter() {
>             public void windowClosing(WindowEvent e) {
>                 flag.flag = true;
>                 frame.removeWindowListener(this);
>             }
>         });

Like maybe here?


>
>         while (!flag.flag)
>             Thread.sleep(100);
>
>     } //  by Timothy Wall
>
>     public void testIt() throws InterruptedException
>     {
>
>
>         // Start the application under test.
>         HelloWorld.main(new String[0]);
>         final JFrameOperator frame = new
> JFrameOperator("Hello, World!");
>
>         // Find 1st (0th) JTextField in frame.
>         JTextFieldOperator textfield = new
> JTextFieldOperator(frame, 0);
>         assertTrue("textfield is enabled",
> textfield.isEnabled());
>         assertTrue("textfield is editable",
> textfield.isEditable());
>     //    reveal(frame);
>
>
>     }
>
>
> }
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

To unsubscribe, email:
TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/TestFirstUserInterfaces/

<*> To unsubscribe from this group, send an email to:
    TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.