View Javadoc
1   /**
2    * 
3    */
4   package org.melati.admin.test;
5   
6   import org.melati.JettyWebTestCase;
7   
8   
9   /**
10   * @author timp
11   * @since 2008/01/10
12   */
13  public class DisplayJettyWebTest extends JettyWebTestCase {
14    /**
15     * Constructor for AdminUtilsTest.
16     * @param name
17     */
18    public DisplayJettyWebTest(String name) {
19      super(name);
20    }
21  
22    /**
23     * {@inheritDoc}
24     * @see org.melati.JettyWebTestCase#setUp()
25     */
26    protected void setUp() throws Exception {
27      super.setUp();
28    }
29  
30    /**
31     * {@inheritDoc}
32     * @see org.melati.JettyWebTestCase#tearDown()
33     */
34    protected void tearDown() throws Exception {
35      super.tearDown();    
36    }
37  
38    /**
39     * Test Display using default template.
40     */
41    public void testDisplay() {
42      beginAt("/Display/melatijunit/User/0/");
43      assertTextPresent("Melati guest user");
44    }
45  
46    /**
47     * Test Display using default template.
48     */
49    public void testDisplayMethod() {
50      beginAt("/Display/melatijunit/User/0/org/melati/admin/Display");
51      assertTextPresent("Melati guest user");
52    }
53    /**
54     * Test Display using default template.
55     */
56    public void testDisplayMethodDots() {
57      beginAt("/Display/melatijunit/User/0/org.melati.admin.Display");
58      assertTextPresent("Melati guest user");
59    }
60  
61    /**
62     * Test Display using default template.
63     */
64    public void testDisplayParameter() {
65      beginAt("/Display/melatijunit/User/0/?template=org/melati/admin/Display");
66      assertTextPresent("Melati guest user");
67    }
68    /**
69     * Test Display using default template.
70     */
71    public void testDisplayParameterDots() {
72      beginAt("/Display/melatijunit/User/0/?template=org.melati.admin.Display");
73      assertTextPresent("Melati guest user");
74    }
75  
76    /**
77     * Test Display using default template.
78     */
79    public void testDisplayParameterDotsNoObject() {
80      beginAt("/Display/melatijunit/User/?template=org.melati.admin.Display");
81      assertTextPresent("null");
82    }
83  
84  }