package jalview.gui; import static org.junit.Assert.assertTrue; import jalview.gui.Help.HelpId; import java.net.URL; import javax.help.HelpSet; import javax.help.HelpSetException; import javax.help.Map; import org.junit.Test; public class HelpTest { @Test public void checkHelpTargets() throws HelpSetException { ClassLoader cl = Desktop.class.getClassLoader(); URL url = HelpSet.findHelpSet(cl, "help/help"); // $NON-NLS-$ HelpSet hs = new HelpSet(cl, url); Map targets = hs.getLocalMap(); for (HelpId id : HelpId.values()) { String target = id.toString(); assertTrue("Unmatched target enum: " + target, targets.isValidID(target, hs)); } } }