X-Git-Url: http://jaekl.net/gitweb/?p=frank.git;a=blobdiff_plain;f=test%2Fnet%2Fjaekl%2Ffrank%2FViewScheduleTest.java;h=673b34303f6e9edf508bbfb3bdc132c3f97cfd07;hp=eec671f55829ac0156ee573152ab12b67f3a8606;hb=60dc53edca9ae2bcd6703e02b26acd47ef3d61a8;hpb=418e4d229a8b607b022cfb867bb702bec1765d13 diff --git a/test/net/jaekl/frank/ViewScheduleTest.java b/test/net/jaekl/frank/ViewScheduleTest.java index eec671f..673b343 100644 --- a/test/net/jaekl/frank/ViewScheduleTest.java +++ b/test/net/jaekl/frank/ViewScheduleTest.java @@ -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("Frank: Error Page")); - Assert.assertTrue(actual.contains(t.toString())); - } - } - }