taylor 2004/11/18 13:43:12
Modified: components/sso/src/test/org/apache/jetspeed/sso
TestSSOComponent.java
Log:
must use proxied interface, not implementation
Revision Changes Path
1.2 +82 -102
jakarta-jetspeed-2/components/sso/src/test/org/apache/jetspeed/sso/TestSSOComponent.java
Index: TestSSOComponent.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/sso/src/test/org/apache/jetspeed/sso/TestSSOComponent.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestSSOComponent.java 16 Nov 2004 19:08:47 -0000 1.1
+++ TestSSOComponent.java 18 Nov 2004 21:43:12 -0000 1.2
@@ -1,28 +1,21 @@
/* Copyright 2004 Apache Software Foundation
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.jetspeed.sso;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.jetspeed.sso.impl.PersistenceBrokerSSOProvider;
import org.apache.jetspeed.sso.SSOProvider;
-import org.apache.jetspeed.sso.impl.SSOSiteImpl;
-
-import javax.security.auth.Subject;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -30,91 +23,78 @@
import org.apache.jetspeed.components.util.DatasourceEnabledSpringTestCase;
/**
-* <p>
-* Unit testing for [EMAIL PROTECTED] Preferences}.
-* </p>
-*
-* @author <a href="[EMAIL PROTECTED]">Roger Ruttimann</a>
-*/
+ * <p>
+ * Unit testing for [EMAIL PROTECTED] Preferences}.
+ * </p>
+ *
+ * @author <a href="[EMAIL PROTECTED]">Roger Ruttimann </a>
+ */
public class TestSSOComponent extends DatasourceEnabledSpringTestCase
{
- /** The property manager. */
- private static PersistenceBrokerSSOProvider ssoBroker = null;
+ /** The property manager. */
+ private static SSOProvider ssoBroker = null;
-
- /**
- * @see junit.framework.TestCase#setUp()
- */
- public void setUp() throws Exception
- {
- super.setUp();
-
- try
- {
- //ssoBroker = (PersistenceBrokerSSOProvider)
ctx.getBean("ssoProvider");
- Object o = (Object) ctx.getBean("ssoProvider");
- if (o == null)
- System.out.println("Returned bean is null!!");
- else
- System.out.println("Bean is instance of:" +
o.toString());
- }
- catch(Exception ex)
- {
- ex.printStackTrace();
- throw new Exception("Exception while setup SSO TEST");
- }
- }
-
- /**
- * @see junit.framework.TestCase#tearDown()
- */
- public void tearDown() throws Exception
- {
- clean();
- // super.tearDown();
- }
-
- public static Test suite()
- {
- // All methods starting with "test" will be executed in the test
suite.
- return new TestSuite(TestSSOComponent.class);
- }
-
- /**
- * <p>
- * Test user root.
- * </p>
- */
- public void testSSO()
- {
- // TODO: Test cases
- }
-
-
-
- /**
- * <p>
- * Clean properties.
- * </p>
- */
- protected void clean() throws Exception
- {
- // Cleanup any credentails added during the test
- /*
- try
- {
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ try
+ {
+ ssoBroker = (SSOProvider) ctx.getBean("ssoProvider");
}
- catch (SSOException ex)
- {
- System.out.println("SSOException" + ex);
- }
- */
- }
-
-
- protected String[] getConfigurations()
- {
- return new String[]{"META-INF/sso-dao.xml",
"META-INF/transaction.xml"};
- }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ throw new Exception("Exception while setup SSO TEST");
+ }
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ */
+ public void tearDown() throws Exception
+ {
+ clean();
+ // super.tearDown();
+ }
+
+ public static Test suite()
+ {
+ // All methods starting with "test" will be executed in the test
suite.
+ return new TestSuite(TestSSOComponent.class);
+ }
+
+ /**
+ * <p>
+ * Test user root.
+ * </p>
+ */
+ public void testSSO()
+ {
+ // TODO: Test cases
+ }
+
+ /**
+ * <p>
+ * Clean properties.
+ * </p>
+ */
+ protected void clean() throws Exception
+ {
+ // Cleanup any credentails added during the test
+ /*
+ * try { } catch (SSOException ex) {
System.out.println("SSOException" +
+ * ex); }
+ */
+ }
+
+ protected String[] getConfigurations()
+ {
+ return new String[]
+ { "META-INF/sso-dao.xml", "META-INF/transaction.xml"};
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]