]> git.gag.com Git - debian/openrocket/commitdiff
Fix unit test setup which has probably been broken since the ExceptionHandler was...
authorkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Sun, 15 Jan 2012 02:29:34 +0000 (02:29 +0000)
committerkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Sun, 15 Jan 2012 02:29:34 +0000 (02:29 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@355 180e2498-e6e9-4542-8430-84ac67f01cd8

core/test/net/sf/openrocket/l10n/TestExceptionSuppressingTranslator.java

index 153b921fbb8f0e94a45ed01cacc1e76d26490ee4..3296c83452f553c24cb8096bbc88b722babab336 100644 (file)
@@ -1,14 +1,20 @@
 package net.sf.openrocket.l10n;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.util.MissingResourceException;
 
+import net.sf.openrocket.gui.main.SwingExceptionHandler;
+import net.sf.openrocket.startup.Application;
+
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.auto.Mock;
 import org.jmock.integration.junit4.JMock;
 import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -16,6 +22,10 @@ import org.junit.runner.RunWith;
 public class TestExceptionSuppressingTranslator {
        Mockery context = new JUnit4Mockery();
        
+       @Before
+       public void setupExceptionHandler() {
+               Application.setExceptionHandler( new SwingExceptionHandler() );
+       }
        @Mock
        Translator translator;