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.updates;
04:
05: import fitnesse.wiki.*;
06:
07: public class FrontPageUpdateTest extends AbstractUpdateTestCase {
08: protected Update makeUpdate() throws Exception {
09: return new FrontPageUpdate(updater);
10: }
11:
12: public void testShouldUpdate() throws Exception {
13: assertTrue(update.shouldBeApplied());
14: updater.getRoot().addChildPage("FrontPage");
15: assertFalse(update.shouldBeApplied());
16: }
17:
18: public void testProperties() throws Exception {
19: update.doUpdate();
20: WikiPage page = updater.getRoot().getChildPage("FrontPage");
21: assertNotNull(page);
22:
23: PageData data = page.getData();
24: assertTrue(data.hasAttribute(WikiPage.ACTION_EDIT));
25: assertTrue(data.hasAttribute(WikiPage.ACTION_PROPERTIES));
26: }
27: }
|