X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fjalview%2Fgui%2FHelpTest.java;h=1e26c4987e7d9af8a3670b82cee94509bf3927a2;hb=e9a1c2c372f4bbf6cf658de3dba73ef326b20c20;hp=e4068d769bde5e96f57769dd53c572325c533238;hpb=dcd9345f78d1aaee19fc20ddce0ed29d2eb8b587;p=jalview.git diff --git a/test/jalview/gui/HelpTest.java b/test/jalview/gui/HelpTest.java index e4068d7..1e26c49 100644 --- a/test/jalview/gui/HelpTest.java +++ b/test/jalview/gui/HelpTest.java @@ -1,6 +1,27 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.gui; -import static org.junit.Assert.assertTrue; +import static org.testng.AssertJUnit.assertTrue; + import jalview.gui.Help.HelpId; import java.net.URL; @@ -9,11 +30,20 @@ import javax.help.HelpSet; import javax.help.HelpSetException; import javax.help.Map; -import org.junit.Test; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; public class HelpTest { - @Test + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + + @Test(groups = { "Functional" }) public void checkHelpTargets() throws HelpSetException { ClassLoader cl = Desktop.class.getClassLoader(); @@ -23,7 +53,7 @@ public class HelpTest for (HelpId id : HelpId.values()) { - String target = id.toString(); + String target = id.getId(); assertTrue("Unmatched target enum: " + target, targets.isValidID(target, hs)); }