Fix unit test setup which has probably been broken since the ExceptionHandler was refactored to a static object stored in the Applicaiton.

This commit is contained in:
Kevin Ruland 2012-01-15 02:29:34 +00:00
parent e5d891765e
commit 8d90a540e8

View 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;