test/jdk/tools/jpackage/windows/WinShortcutTest.java
branchJDK-8200758-branch
changeset 58648 3bf53ffa9ae7
parent 58416 f09bf58c1f17
child 58761 88e2753a2334
equal deleted inserted replaced
58647:2c43b89b1679 58648:3bf53ffa9ae7
    22  */
    22  */
    23 
    23 
    24 import jdk.jpackage.test.TKit;
    24 import jdk.jpackage.test.TKit;
    25 import jdk.jpackage.test.PackageTest;
    25 import jdk.jpackage.test.PackageTest;
    26 import jdk.jpackage.test.PackageType;
    26 import jdk.jpackage.test.PackageType;
       
    27 import jdk.jpackage.test.Annotations.Test;
    27 
    28 
    28 /**
    29 /**
    29  * Test --win-shortcut parameter. Output of the test should be
    30  * Test --win-shortcut parameter. Output of the test should be
    30  * WinShortcutTest-1.0.exe installer. The output installer should provide the
    31  * WinShortcutTest-1.0.exe installer. The output installer should provide the
    31  * same functionality as the default installer (see description of the default
    32  * same functionality as the default installer (see description of the default
    38  * @summary jpackage with --win-shortcut
    39  * @summary jpackage with --win-shortcut
    39  * @library ../helpers
    40  * @library ../helpers
    40  * @build jdk.jpackage.test.*
    41  * @build jdk.jpackage.test.*
    41  * @requires (os.family == "windows")
    42  * @requires (os.family == "windows")
    42  * @modules jdk.jpackage/jdk.jpackage.internal
    43  * @modules jdk.jpackage/jdk.jpackage.internal
    43  * @run main/othervm/timeout=360 -Xmx512m WinShortcutTest
    44  * @compile WinShortcutTest.java
       
    45  * @run main/othervm/timeout=360 -Xmx512m jdk.jpackage.test.Main
       
    46  *  --jpt-run=WinShortcutTest
    44  */
    47  */
    45 
    48 
    46 public class WinShortcutTest {
    49 public class WinShortcutTest {
    47     public static void main(String[] args) {
    50     @Test
    48         TKit.run(args, () -> {
    51     public static void test() {
    49             new PackageTest()
    52         new PackageTest()
    50             .forTypes(PackageType.WINDOWS)
    53         .forTypes(PackageType.WINDOWS)
    51             .configureHelloApp()
    54         .configureHelloApp()
    52             .addInitializer(cmd -> cmd.addArgument("--win-shortcut"))
    55         .addInitializer(cmd -> cmd.addArgument("--win-shortcut"))
    53             .run();
    56         .run();
    54         });
       
    55     }
    57     }
    56 }
    58 }