[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-sound-dev
Subject:    Integrated: 8294156: Allow PassFailJFrame.Builder to create test UI
From:       Alexey Ivanov <aivanov () openjdk ! org>
Date:       2023-10-25 11:34:44
Message-ID: wIzFbyxiUg596qiiOJuJ7XCBvgXqUm2R5NpLjpHqP5w=.4e5fa026-8a1d-4baf-8843-5b1f2c8ac450 () github ! com
[Download RAW message or body]

On Mon, 11 Sep 2023 15:36:56 GMT, Alexey Ivanov <aivanov@openjdk.org> wrote:

> This enhances the `Builder` pattern added in \
> [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method \
> `testUI` which allows passing a lambda expression or a method reference to create \
> *the test UI window*. 
> The `PassFailJFrame` will automatically call the method on the EDT to create the \
> UI, add it to the internal list of windows, install the window closing listener and \
> finally position and show both the instructions and test UI. 
> Alternatively, you can pass an already created window.
> 
> The `main` method of a manual test could look as simple as a sequence of calls:
> 
> 
> public static void main(String[] args) throws Exception {
> PassFailJFrame.builder()
> .instructions(INSTRUCTIONS)
> .testUI(() -> createTestUI())
> .build()
> .awaitAndCheck();
> }
> 
> where `createTestUI` returns a test UI window.

This pull request has now been integrated.

Changeset: 42b9ac8a
Author:    Alexey Ivanov <aivanov@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/42b9ac8a07b540f4d7955a778923d24a876451cc
                
Stats:     442 lines in 1 file changed: 365 ins; 38 del; 39 mod

8294156: Allow PassFailJFrame.Builder to create test UI

Reviewed-by: azvegint, prr

-------------

PR: https://git.openjdk.org/jdk/pull/15665


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic