01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.runner;
04:
05: import junit.framework.TestCase;
06: import fit.Counts;
07:
08: public class PageResultTest extends TestCase {
09: public void testToString() throws Exception {
10: PageResult result = new PageResult("PageTitle", new Counts(1,
11: 2, 3, 4), "content");
12: assertEquals(
13: "PageTitle\n1 right, 2 wrong, 3 ignored, 4 exceptions\ncontent",
14: result.toString());
15: }
16:
17: public void testParse() throws Exception {
18: Counts counts = new Counts(1, 2, 3, 4);
19: PageResult result = new PageResult("PageTitle", counts,
20: "content");
21: PageResult parsedResult = PageResult.parse(result.toString());
22: assertEquals("PageTitle", parsedResult.title());
23: assertEquals(counts, parsedResult.counts());
24: assertEquals("content", parsedResult.content());
25: }
26: }
|