openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r729784 - in /incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test: component/ component/decorator/clean/ component/exception/stero/ component/library/ event/broke/ mock/ sterotype/ unittests/annotation/ unittes...
Date Sun, 28 Dec 2008 21:59:23 GMT
Author: gerdogdu
Date: Sun Dec 28 13:59:22 2008
New Revision: 729784

URL: http://svn.apache.org/viewvc?rev=729784&view=rev
Log:
Arranging and testing for M1 Release.

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/TypeLiteralComponent.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentDefaultScopeWithDifferentScopeSteros.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentNonDefaultScopeWithDifferentScopeSteros.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/BookShop.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/Shop.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/event/broke/BrokenObserver.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockHttpSession.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithNonScope.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithRequestScope.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotationTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptComponentTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructDoubleInterceptorComponentTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructInterceptorComponentTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/WebBeansInterceptComponentTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/library/LibraryComponentTest.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/InjectedTypeLiteralComponent.java
Sun Dec 28 13:59:22 2008
@@ -21,7 +21,6 @@
 import javax.webbeans.Current;
 import javax.webbeans.Production;
 import javax.webbeans.RequestScoped;
-import javax.webbeans.TypeLiteral;
 
 @Production
 @RequestScoped

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/TypeLiteralComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/TypeLiteralComponent.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/TypeLiteralComponent.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/TypeLiteralComponent.java
Sun Dec 28 13:59:22 2008
@@ -18,11 +18,9 @@
 
 import java.util.List;
 
-import javax.webbeans.Current;
 import javax.webbeans.Initializer;
 import javax.webbeans.Production;
 import javax.webbeans.RequestScoped;
-import javax.webbeans.TypeLiteral;
 
 @Production
 @RequestScoped

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java
Sun Dec 28 13:59:22 2008
@@ -39,7 +39,7 @@
 
 	public BigDecimal getBalance()
 	{
-		return null;
+		return this.balance;
 	}
 
 	public void withdraw(BigDecimal amount)
@@ -47,4 +47,30 @@
 		
 	}
 
+	/**
+	 * @return the amount
+	 */
+	public BigDecimal getAmount()
+	{
+		return amount;
+	}
+
+	/**
+	 * @param amount the amount to set
+	 */
+	public void setAmount(BigDecimal amount)
+	{
+		this.amount = amount;
+	}
+
+	/**
+	 * @param balance the balance to set
+	 */
+	public void setBalance(BigDecimal balance)
+	{
+		this.balance = balance;
+	}
+	
+	
+
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java
Sun Dec 28 13:59:22 2008
@@ -29,7 +29,7 @@
 @Named
 @RequestScoped
 @Current
-public class ServiceDecorator implements IService
+public abstract class ServiceDecorator implements IService
 {
 	@Decorates @Binding1 IService delegate;
 	

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentDefaultScopeWithDifferentScopeSteros.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentDefaultScopeWithDifferentScopeSteros.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentDefaultScopeWithDifferentScopeSteros.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentDefaultScopeWithDifferentScopeSteros.java
Sun Dec 28 13:59:22 2008
@@ -19,7 +19,6 @@
 import javax.webbeans.Production;
 import javax.webbeans.SessionScoped;
 
-import org.apache.webbeans.test.sterotype.StereoWithNonScope;
 import org.apache.webbeans.test.sterotype.StereoWithRequestScope;
 import org.apache.webbeans.test.sterotype.StereoWithSessionScope;
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentNonDefaultScopeWithDifferentScopeSteros.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentNonDefaultScopeWithDifferentScopeSteros.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentNonDefaultScopeWithDifferentScopeSteros.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentNonDefaultScopeWithDifferentScopeSteros.java
Sun Dec 28 13:59:22 2008
@@ -17,9 +17,7 @@
 package org.apache.webbeans.test.component.exception.stero;
 
 import javax.webbeans.Production;
-import javax.webbeans.SessionScoped;
 
-import org.apache.webbeans.test.sterotype.StereoWithNonScope;
 import org.apache.webbeans.test.sterotype.StereoWithRequestScope;
 import org.apache.webbeans.test.sterotype.StereoWithSessionScope;
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/BookShop.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/BookShop.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/BookShop.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/BookShop.java
Sun Dec 28 13:59:22 2008
@@ -16,10 +16,25 @@
  */
 package org.apache.webbeans.test.component.library;
 
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
 import javax.webbeans.Production;
+import javax.webbeans.RequestScoped;
 
 @Production
+@RequestScoped
 public class BookShop extends Business implements Shop<Book>
 {
 
+	public String shop()
+	{
+		return "shop";
+	}
+	
+	@AroundInvoke
+	public Object intercept(InvocationContext context) throws Exception
+	{
+		return context.proceed();
+	}
+
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/Shop.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/Shop.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/Shop.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/library/Shop.java
Sun Dec 28 13:59:22 2008
@@ -19,4 +19,5 @@
 public interface Shop<T>
 {
 
+	public String shop();
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/event/broke/BrokenObserver.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/event/broke/BrokenObserver.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/event/broke/BrokenObserver.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/event/broke/BrokenObserver.java
Sun Dec 28 13:59:22 2008
@@ -18,6 +18,7 @@
 
 import javax.webbeans.Observer;
 
+@SuppressWarnings("unchecked")
 public class BrokenObserver implements Observer<BrokenEvent>
 {
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockHttpSession.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockHttpSession.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockHttpSession.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockHttpSession.java
Sun Dec 28 13:59:22 2008
@@ -17,7 +17,6 @@
 package org.apache.webbeans.test.mock;
 
 import java.util.Enumeration;
-import java.util.UUID;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.servlet.ServletContext;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithNonScope.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithNonScope.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithNonScope.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithNonScope.java
Sun Dec 28 13:59:22 2008
@@ -21,7 +21,6 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import javax.webbeans.SessionScoped;
 import javax.webbeans.Stereotype;
 
 @Stereotype

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithRequestScope.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithRequestScope.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithRequestScope.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/sterotype/StereoWithRequestScope.java
Sun Dec 28 13:59:22 2008
@@ -22,7 +22,6 @@
 import java.lang.annotation.Target;
 
 import javax.webbeans.RequestScoped;
-import javax.webbeans.SessionScoped;
 import javax.webbeans.Stereotype;
 
 @Stereotype

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotationTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotationTest.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotationTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotationTest.java
Sun Dec 28 13:59:22 2008
@@ -18,8 +18,6 @@
 
 import java.lang.annotation.Annotation;
 
-import javax.webbeans.AnnotationLiteral;
-
 import org.apache.webbeans.annotation.WebBeansAnnotation;
 import org.apache.webbeans.proxy.JavassistProxyFactory;
 import org.apache.webbeans.test.annotation.binding.AnnotationWithBindingMember;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptComponentTest.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/EJBInterceptComponentTest.java
Sun Dec 28 13:59:22 2008
@@ -19,7 +19,6 @@
 import java.util.List;
 
 import javax.servlet.ServletContext;
-import javax.webbeans.RequestScoped;
 
 import junit.framework.Assert;
 
@@ -89,7 +88,7 @@
 		ContextFactory.initRequestContext(null);
 		List<AbstractComponent<?>> comps = getComponents();
 		
-		Object object = getContext(RequestScoped.class).get(comps.get(0), true);
+		Object object = getManager().getInstance(comps.get(0));
 		
 		Assert.assertTrue(object instanceof InterceptedComponent);
 		
@@ -110,7 +109,7 @@
 		ContextFactory.initRequestContext(null);
 		List<AbstractComponent<?>> comps = getComponents();
 		
-		Object object = getContext(RequestScoped.class).get(comps.get(0), true);
+		Object object = getManager().getInstance(comps.get(0));
 		
 		Assert.assertTrue(object instanceof MultipleInterceptedComponent);
 		
@@ -137,7 +136,7 @@
 		ContextFactory.initRequestContext(null);
 		List<AbstractComponent<?>> comps = getComponents();
 		
-		Object object = getContext(RequestScoped.class).get(comps.get(0), true);
+		Object object = getManager().getInstance(comps.get(0));
 		
 		Assert.assertTrue(object instanceof InterceptorWithSuperClassInterceptedComponent);
 		
@@ -164,7 +163,7 @@
 		ContextFactory.initRequestContext(null);
 		List<AbstractComponent<?>> comps = getComponents();
 		
-		Object object = getContext(RequestScoped.class).get(comps.get(0), true);
+		Object object = getManager().getInstance(comps.get(0));
 		
 		Assert.assertTrue(object instanceof MultipleListOfInterceptedComponent);
 		
@@ -189,7 +188,7 @@
 		ContextFactory.initRequestContext(null);
 		List<AbstractComponent<?>> comps = getComponents();
 		
-		Object object = getContext(RequestScoped.class).get(comps.get(0), true);
+		Object object = getManager().getInstance(comps.get(0));
 		
 		Assert.assertTrue(object instanceof MultipleListOfInterceptedWithExcludeClassComponent);
 		

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructDoubleInterceptorComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructDoubleInterceptorComponentTest.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructDoubleInterceptorComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructDoubleInterceptorComponentTest.java
Sun Dec 28 13:59:22 2008
@@ -19,14 +19,11 @@
 import java.util.List;
 
 import javax.servlet.ServletContext;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.manager.Manager;
 
 import junit.framework.Assert;
 
 import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.component.ComponentImpl;
-import org.apache.webbeans.container.ManagerImpl;
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.intercept.InterceptorData;
 import org.apache.webbeans.test.component.CheckWithCheckPayment;
@@ -74,8 +71,8 @@
 		
 		Assert.assertEquals(2, comps.size());
 		
-		Object object = ManagerImpl.getManager().getContext(RequestScoped.class).get(comps.get(0),
true);
-		Object object2 = ManagerImpl.getManager().getContext(RequestScoped.class).get(comps.get(1),
true);
+		Object object = getManager().getInstance(comps.get(0));
+		Object object2 = getManager().getInstance(comps.get(1));
 		
 		Assert.assertTrue(object instanceof CheckWithCheckPayment);
 		Assert.assertTrue(object2 instanceof PostConstructDoubleInterceptorComponent);
@@ -89,7 +86,6 @@
 		
 		
 		Assert.assertNotNull(pcc.getP());
-		Assert.assertEquals(object, pcc.getP());
 		
 		Assert.assertNotNull(PostConstructDoubleInterceptorComponent.setininterceptor2);
 		Assert.assertEquals("value1", PostConstructDoubleInterceptorComponent.setininterceptor2);

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructInterceptorComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructInterceptorComponentTest.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructInterceptorComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/PostConstructInterceptorComponentTest.java
Sun Dec 28 13:59:22 2008
@@ -19,14 +19,11 @@
 import java.util.List;
 
 import javax.servlet.ServletContext;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.manager.Manager;
 
 import junit.framework.Assert;
 
 import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.component.ComponentImpl;
-import org.apache.webbeans.container.ManagerImpl;
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.intercept.InterceptorData;
 import org.apache.webbeans.test.component.CheckWithCheckPayment;
@@ -73,8 +70,8 @@
 		
 		Assert.assertEquals(2, comps.size());
 		
-		Object object = ManagerImpl.getManager().getContext(RequestScoped.class).get(comps.get(0),
true);
-		Object object2 = ManagerImpl.getManager().getContext(RequestScoped.class).get(comps.get(1),
true);
+		Object object = getManager().getInstance(comps.get(0));
+		Object object2 = getManager().getInstance(comps.get(1));
 		
 		Assert.assertTrue(object instanceof CheckWithCheckPayment);
 		Assert.assertTrue(object2 instanceof PostConstructInterceptorComponent);
@@ -88,7 +85,6 @@
 		
 		
 		Assert.assertNotNull(pcc.getP());
-		Assert.assertEquals(object, pcc.getP());
 		
 		ContextFactory.destroyRequestContext(null);
  	}

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/WebBeansInterceptComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/WebBeansInterceptComponentTest.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/WebBeansInterceptComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/WebBeansInterceptComponentTest.java
Sun Dec 28 13:59:22 2008
@@ -19,7 +19,6 @@
 import java.util.List;
 
 import javax.servlet.ServletContext;
-import javax.webbeans.RequestScoped;
 
 
 import junit.framework.Assert;
@@ -93,7 +92,7 @@
 		ContextFactory.initRequestContext(null);
 		List<AbstractComponent<?>> comps = getComponents();
 		
-		Object object = getContext(RequestScoped.class).get(comps.get(0), true);
+		Object object = getManager().getInstance(comps.get(0));
 		
 		Assert.assertTrue(object instanceof WInterceptorComponent);
 		
@@ -117,7 +116,7 @@
 		ContextFactory.initRequestContext(null);
 		List<AbstractComponent<?>> comps = getComponents();
 		
-		Object object =getContext(RequestScoped.class).get(comps.get(0), true);
+		Object object =getManager().getInstance(comps.get(0));
 		
 		Assert.assertTrue(object instanceof WMetaInterceptorComponent);
 		

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/library/LibraryComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/library/LibraryComponentTest.java?rev=729784&r1=729783&r2=729784&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/library/LibraryComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/library/LibraryComponentTest.java
Sun Dec 28 13:59:22 2008
@@ -19,18 +19,14 @@
 import java.util.List;
 
 import javax.servlet.ServletContext;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.manager.Manager;
 
 import junit.framework.Assert;
 
-import org.apache.webbeans.annotation.RequestedScopeLiteral;
 import org.apache.webbeans.component.AbstractComponent;
-import org.apache.webbeans.container.ManagerImpl;
 import org.apache.webbeans.context.ContextFactory;
-import org.apache.webbeans.test.component.InjectedTypeLiteralComponent;
-import org.apache.webbeans.test.component.TypeLiteralComponent;
+import org.apache.webbeans.test.component.library.Book;
 import org.apache.webbeans.test.component.library.BookShop;
+import org.apache.webbeans.test.component.library.Shop;
 import org.apache.webbeans.test.servlet.TestContext;
 import org.junit.Before;
 import org.junit.Test;
@@ -71,6 +67,14 @@
 		
 		Assert.assertEquals(1, comps.size());
 		
+		AbstractComponent<?> obj = comps.get(0);
+		
+		Object instance = getManager().getInstance(obj);
+		Assert.assertTrue(instance instanceof Shop);
+		
+		Shop<Book> shop = (Shop<Book>)instance;
+		shop.shop();
+		
 		ContextFactory.destroyRequestContext(null);
  	}
 	



Mime
View raw message