[Schmitzm-commits] r1430 - trunk/schmitzm-core/src/test/java/de/schmitzm/swing
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jan 27 13:08:07 CET 2011
Author: alfonx
Date: 2011-01-27 13:08:06 +0100 (Thu, 27 Jan 2011)
New Revision: 1430
Added:
trunk/schmitzm-core/src/test/java/de/schmitzm/swing/ExceptionDialogTest.java
Log:
Added: trunk/schmitzm-core/src/test/java/de/schmitzm/swing/ExceptionDialogTest.java
===================================================================
--- trunk/schmitzm-core/src/test/java/de/schmitzm/swing/ExceptionDialogTest.java 2011-01-27 12:04:21 UTC (rev 1429)
+++ trunk/schmitzm-core/src/test/java/de/schmitzm/swing/ExceptionDialogTest.java 2011-01-27 12:08:06 UTC (rev 1430)
@@ -0,0 +1,60 @@
+package de.schmitzm.swing;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.SwingUtilities;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import de.schmitzm.testing.TestingClass;
+public class ExceptionDialogTest extends TestingClass {
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testShowThrowable() throws InterruptedException,
+ InvocationTargetException {
+ ExceptionDialog
+ .show(new RuntimeException("Test on Application Thread"));
+
+ SwingUtilities.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ ExceptionDialog
+ .show(new RuntimeException("Test on EDT Thread"));
+ }
+ });
+ }
+
+ @Test
+ public void testShowThrowableWithMailAndHTMLInEception()
+ throws InterruptedException, InvocationTargetException {
+ ExceptionDialog.setMailDestinationAddress("tzeggai at wikisquare.de");
+ ExceptionDialog
+ .addAdditionalAppInfo("more <html><i>Samolellen</i></html> information\nand more information");
+ // TODO automatisch schliessen
+ ExceptionDialog.show(new RuntimeException(
+ "Test <html><i>Samolellen</i></html>more info"));
+ }
+
+ @Test
+ public void testShowThrowableWithMail() throws InterruptedException,
+ InvocationTargetException {
+ ExceptionDialog.setMailDestinationAddress("tzeggai at wikisquare.de");
+ ExceptionDialog
+ .addAdditionalAppInfo("more information\nand more information");
+ // TODO automatisch schliessen
+ ExceptionDialog.show(new RuntimeException(
+ "Test with mail that conatins more info"));
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/schmitzm-core/src/test/java/de/schmitzm/swing/ExceptionDialogTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id URL
Name: svn:eol-style
+ native
More information about the Schmitzm-commits
mailing list