You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by am...@apache.org on 2007/12/14 06:41:18 UTC
svn commit: r604110 - in
/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util:
./ BeanExcludeInfoTest.java ExcludeInfoTest.java
Author: amilas
Date: Thu Dec 13 21:41:18 2007
New Revision: 604110
URL: http://svn.apache.org/viewvc?rev=604110&view=rev
Log:
added the test cases for ExcludeInfo and BeanExcludeInfo classes
Added:
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/BeanExcludeInfoTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/ExcludeInfoTest.java
Added: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/BeanExcludeInfoTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/BeanExcludeInfoTest.java?rev=604110&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/BeanExcludeInfoTest.java (added)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/BeanExcludeInfoTest.java Thu Dec 13 21:41:18 2007
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004,2005 The 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.
+ */
+package org.apache.axis2.deployment.util;
+
+import junit.framework.TestCase;
+
+
+public class BeanExcludeInfoTest extends TestCase {
+
+ public void testIsExcludedProperty(){
+ BeanExcludeInfo beanExcludeInfo = new BeanExcludeInfo("[A-z]*String|DayPhoneTTY","DayPhoneTTYString");
+ assertTrue(beanExcludeInfo.isExcluedProperty("DetailsString"));
+ assertFalse(beanExcludeInfo.isExcluedProperty("DayPhoneTTYString"));
+ assertFalse(beanExcludeInfo.isExcluedProperty("ElementDetils"));
+ }
+}
Added: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/ExcludeInfoTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/ExcludeInfoTest.java?rev=604110&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/ExcludeInfoTest.java (added)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/util/ExcludeInfoTest.java Thu Dec 13 21:41:18 2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The 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.
+ */
+package org.apache.axis2.deployment.util;
+
+import junit.framework.TestCase;
+
+
+public class ExcludeInfoTest extends TestCase {
+
+ public void testGetBeanExcludeInfoForClass(){
+ ExcludeInfo excludeInfo = new ExcludeInfo();
+ excludeInfo.putBeanInfo("org.kp.anuhak.cdr.test.[A-z]*",new BeanExcludeInfo("[A-z]*Bool","is[A-z]*"));
+ excludeInfo.putBeanInfo("org.kp.anuhak.cdr.types.[A-z]*",new BeanExcludeInfo("[A-z]*String",null));
+ excludeInfo.putBeanInfo("org.kp.anuhak.meta.[A-z]*",new BeanExcludeInfo("[A-z]*",null));
+
+ BeanExcludeInfo beanExcludeInfo = excludeInfo.getBeanExcludeInfoForClass("org.kp.anuhak.cdr.test.TestClass");
+ assertFalse(beanExcludeInfo.isExcluedProperty("TestProperty"));
+ assertTrue(beanExcludeInfo.isExcluedProperty("TestBool"));
+ assertFalse(beanExcludeInfo.isExcluedProperty("isTestBool"));
+
+ beanExcludeInfo = excludeInfo.getBeanExcludeInfoForClass("org.kp.anuhak.cdr.types.TestClass");
+ assertFalse(beanExcludeInfo.isExcluedProperty("TestProperty"));
+ assertTrue(beanExcludeInfo.isExcluedProperty("TestString"));
+ assertFalse(beanExcludeInfo.isExcluedProperty("isTestBool"));
+
+ beanExcludeInfo = excludeInfo.getBeanExcludeInfoForClass("org.kp.anuhak.meta.TestClass");
+ assertTrue(beanExcludeInfo.isExcluedProperty("TestProperty"));
+
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org