01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.jetspeed.components.portletregistry.direct;
18:
19: import junit.framework.Test;
20: import junit.framework.TestSuite;
21:
22: import org.apache.jetspeed.components.portletregistry.AbstractRegistryTest;
23: import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
24:
25: /**
26: *
27: * TestRegistry runs a suite updating PAs
28: *
29: * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
30: * @version $Id: TestRegistryDirectPart1b.java 516448 2007-03-09 16:25:47Z ate $
31: *
32: */
33: public class TestRegistryDirectPart1b extends AbstractRegistryTest {
34: /*
35: * (non-Javadoc)
36: *
37: * @see junit.framework.TestCase#setUp()
38: */
39: protected void setUp() throws Exception {
40: super .setUp();
41: }
42:
43: /*
44: * (non-Javadoc)
45: *
46: * @see junit.framework.TestCase#tearDown()
47: */
48: protected void tearDown() throws Exception {
49: // super.tearDown();
50: }
51:
52: public static Test suite() {
53: // All methods starting with "test" will be executed in the test suite.
54: return new TestSuite(TestRegistryDirectPart1b.class);
55: }
56:
57: public void testUpdates() throws Exception {
58:
59: PortletApplicationDefinitionImpl app = (PortletApplicationDefinitionImpl) registry
60: .getPortletApplication("App_1");
61: assertNotNull("PA App_1 is NULL", app);
62:
63: app.addUserAttribute("user.pets.doggie", "Busby");
64:
65: registry.updatePortletApplication(app);
66:
67: System.out.println("PA update test complete");
68: }
69:
70: }
|