openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r728542 - in /incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test: servlet/TestContext.java unittests/xml/definition/XMLDefinitionTest.java xml/definition/Definition2.java
Date Sun, 21 Dec 2008 22:41:35 GMT
Author: gerdogdu
Date: Sun Dec 21 14:41:34 2008
New Revision: 728542

URL: http://svn.apache.org/viewvc?rev=728542&view=rev
Log:
XML configuration tests are updated and added.

Added:
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/xml/definition/Definition2.java
  (with props)
Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java?rev=728542&r1=728541&r2=728542&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestContext.java
Sun Dec 21 14:41:34 2008
@@ -215,7 +215,7 @@
 			{
 				InterceptorUtil.checkInterceptorConditions(clazz);
 				component = SimpleWebBeansConfigurator.define(clazz, WebBeansType.INTERCEPTOR);
-				WebBeansInterceptorConfig.configureInterceptorClass((ComponentImpl<Object>)component);
+				WebBeansInterceptorConfig.configureInterceptorClass((ComponentImpl<Object>)component,
clazz.getDeclaredAnnotations());
 			}
 			
 		}

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java?rev=728542&r1=728541&r2=728542&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java
Sun Dec 21 14:41:34 2008
@@ -85,4 +85,35 @@
 		
 		
 	}
+	
+	@Test
+	public void testDefinition2()
+	{
+		Throwable e = null;
+		try
+		{
+			InputStream stream = XMLTest.class.getClassLoader().getResourceAsStream("org/apache/webbeans/test/xml/definition/definition2.xml");
		
+			Assert.assertNotNull(stream);
+			
+			clear();
+			
+			Element rootElement = XMLUtil.getRootElement(stream);
+			Element beanElement = (Element)rootElement.elements().get(0);
+			
+			Class<?> clazz = XMLUtil.getElementJavaType(beanElement);
+			
+			defineXMLSimpleWebBeans(clazz, beanElement);
+			
+			
+		}catch(Throwable e1)
+		{
+			e1.printStackTrace();
+			e = e1;
+		}
+		
+		Assert.assertNull(e);
+		
+		
+	}
+	
 }

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/xml/definition/Definition2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/xml/definition/Definition2.java?rev=728542&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/xml/definition/Definition2.java
(added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/xml/definition/Definition2.java
Sun Dec 21 14:41:34 2008
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.webbeans.test.xml.definition;
+
+import javax.webbeans.Named;
+
+import org.apache.webbeans.test.annotation.binding.Binding1;
+import org.apache.webbeans.test.component.IPayment;
+
+@Named
+@Binding1
+public class Definition2
+{
+	public Definition2()
+	{
+		
+	}
+	
+	
+	public Object[] produce(IPayment payment)
+	{
+		return null;
+	}
+	
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/xml/definition/Definition2.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message