diff --git a/pmd-swingui/project.xml b/pmd-swingui/project.xml
index fde5c0ff85..15383822d4 100755
--- a/pmd-swingui/project.xml
+++ b/pmd-swingui/project.xml
@@ -91,6 +91,7 @@
-->
src/java/
+ src/test/
src/java/
@@ -104,8 +105,9 @@
maven-changes-plugin
maven-changelog-plugin
- maven-checkstyle-plugin
maven-javadoc-plugin
+ maven-junit-report-plugin
+ maven-checkstyle-plugin
maven-pmd-plugin
maven-tasklist-plugin
maven-jxr-plugin
diff --git a/pmd-swingui/src/test/net/sourceforge/pmd/swingui/PMDViewerTester.java b/pmd-swingui/src/test/net/sourceforge/pmd/swingui/PMDViewerTester.java
new file mode 100755
index 0000000000..0a92781347
--- /dev/null
+++ b/pmd-swingui/src/test/net/sourceforge/pmd/swingui/PMDViewerTester.java
@@ -0,0 +1,55 @@
+package net.sourceforge.pmd.swingui;
+
+import java.awt.event.KeyEvent;
+import java.util.Enumeration;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import junit.framework.TestCase;
+
+/**
+ * This is a tester for the PMD Viewer.
+ *
+ * @author Brant Gurganus
+ * @version 0.1
+ * @since 0.1
+ */
+public class PMDViewerTester extends TestCase {
+ /**
+ * Creates the tester.
+ */
+ public PMDViewerTester() {
+ super("PMD Viewer Test");
+ disableLogging();
+ }
+
+ /**
+ * Creates the tester with the given name.
+ */
+ public PMDViewerTester(String name) {
+ super(name);
+ disableLogging();
+ }
+
+ /**
+ * Disables logging so that confusion does not happen.
+ */
+ private void disableLogging() {
+ final LogManager manager = LogManager.getLogManager();
+ final Enumeration loggers = manager.getLoggerNames();
+ while (loggers.hasMoreElements()) {
+ final String logName = (String) loggers.nextElement();
+ Logger log = manager.getLogger(logName);
+ log.setLevel(Level.OFF);
+ }
+ }
+
+ /**
+ * Ensures that {@link net.sourceforge.pmd.swingui.PMDViewer#translateKey}
+ * works properly.
+ */
+ public void testTranslateKey() {
+ assertTrue(PMDViewer.translateKey("A") == KeyEvent.VK_A);
+ assertTrue(PMDViewer.translateKey(null) == -1);
+ }
+}
\ No newline at end of file