Improve error reporting. New error page that gives a bit more of an explanation...
[frank.git] / test / net / jaekl / frank / ViewScheduleTest.java
index eec671f55829ac0156ee573152ab12b67f3a8606..673b34303f6e9edf508bbfb3bdc132c3f97cfd07 100644 (file)
@@ -1,12 +1,7 @@
 package net.jaekl.frank;
 
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
-import java.sql.SQLException;
 import java.util.HashMap;
-import java.util.Locale;
 
-import net.jaekl.qd.QDException;
 import net.jaekl.qd.http.HttpServletRequestMock;
 
 import org.junit.Assert;
@@ -72,29 +67,4 @@ public class ViewScheduleTest {
                value = vs.getParamString(reqMock, "notPresent");
                Assert.assertEquals(null, value);
        }
-
-       @Test
-       public void testWriteErrorPage() {
-               ByteArrayOutputStream baos = new ByteArrayOutputStream();
-               PrintWriter pw = new PrintWriter(baos);
-               
-               ViewSchedule vs = new ViewSchedule();
-               
-               Throwable[] throwables = { 
-                               new NullPointerException(),
-                               new QDException(),
-                               new SQLException()
-               };
-               
-               for (Throwable t : throwables) {
-                       baos.reset();
-                       vs.writeErrorPage(pw, t, Locale.CANADA);        // TODO:  test translations
-                       pw.flush();
-                       
-                       String actual = baos.toString();
-                       Assert.assertTrue(actual.contains("<TITLE>Frank: Error Page</TITLE>"));
-                       Assert.assertTrue(actual.contains(t.toString()));
-               }
-       }
-
 }