You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2009/01/08 20:45:17 UTC
svn commit: r732806 [8/11] - in
/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test:
annotation/binding/ component/ component/binding/
component/decorator/broken/ component/decorator/clean/ component/dependent/
component/...
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/ProducerComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/ProducerComponentTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/ProducerComponentTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/ProducerComponentTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests;
@@ -42,97 +39,101 @@
public class ProducerComponentTest extends TestContext
{
- public ProducerComponentTest()
- {
- super(ProducerComponentTest.class.getSimpleName());
- }
-
- public void endTests(ServletContext ctx)
- {
-
- }
-
- @Before
- public void init()
- {
- super.init();
- }
-
- /**
- * From the container with servlet context
- */
- public void startTests(ServletContext ctx)
- {
- testProducerDeployment1();
- testProducerDeployment2();
- }
-
- @Test
- public void testProducerDeployment1()
- {
- clear();
- defineSimpleWebBean(Producer1.class);
- Assert.assertEquals(2, getDeployedComponents());
-
- }
-
- @Test
- public void testProducerDeployment2()
- {
- clear();
- defineSimpleWebBean(Producer2.class);
- Assert.assertEquals(3, getDeployedComponents());
- }
-
- @Test
- public void testProducerDeployment3()
- {
- clear();
- defineSimpleWebBean(Producer3.class);
-
- Assert.assertEquals(5, getDeployedComponents());
- }
-
- @Test
- public void testParametrizedProducer()
- {
- clear();
- defineSimpleWebBean(ParametrizedProducer.class);
-
- ContextFactory.initRequestContext(null);
- Assert.assertEquals(3, getDeployedComponents());
-
- TypeLiteral<List<ParametrizedModel1>> model1 = new TypeLiteral<List<ParametrizedModel1>>(){};
-
- List<ParametrizedModel1> instance = getManager().getInstanceByType(model1, new Annotation[0]);
- Assert.assertNull(instance);
- Assert.assertTrue(ParametrizedProducer.callModel1);
- Assert.assertTrue(!ParametrizedProducer.callModel2);
-
- TypeLiteral<List<ParametrizedModel2>> model2 = new TypeLiteral<List<ParametrizedModel2>>(){};
- List<ParametrizedModel2> instance2 = getManager().getInstanceByType(model2, new Annotation[0]);
-
- Assert.assertNull(instance2);
- Assert.assertTrue(ParametrizedProducer.callModel2);
-
- }
-
- @Test
- public void testProducer4()
- {
- defineSimpleWebBean(Producer4.class);
- AbstractComponent<Producer4ConsumerComponent> component = defineSimpleWebBean(Producer4ConsumerComponent.class);
-
- ContextFactory.initSessionContext(new MockHttpSession());
-
- Producer4ConsumerComponent instance = getManager().getInstance(component);
-
- Assert.assertNotNull(instance);
-
- int count = instance.count();
-
- Assert.assertEquals(1, count);
-
- }
+ public ProducerComponentTest()
+ {
+ super(ProducerComponentTest.class.getSimpleName());
+ }
+
+ public void endTests(ServletContext ctx)
+ {
+
+ }
+
+ @Before
+ public void init()
+ {
+ super.init();
+ }
+
+ /**
+ * From the container with servlet context
+ */
+ public void startTests(ServletContext ctx)
+ {
+ testProducerDeployment1();
+ testProducerDeployment2();
+ }
+
+ @Test
+ public void testProducerDeployment1()
+ {
+ clear();
+ defineSimpleWebBean(Producer1.class);
+ Assert.assertEquals(2, getDeployedComponents());
+
+ }
+
+ @Test
+ public void testProducerDeployment2()
+ {
+ clear();
+ defineSimpleWebBean(Producer2.class);
+ Assert.assertEquals(3, getDeployedComponents());
+ }
+
+ @Test
+ public void testProducerDeployment3()
+ {
+ clear();
+ defineSimpleWebBean(Producer3.class);
+
+ Assert.assertEquals(5, getDeployedComponents());
+ }
+
+ @Test
+ public void testParametrizedProducer()
+ {
+ clear();
+ defineSimpleWebBean(ParametrizedProducer.class);
+
+ ContextFactory.initRequestContext(null);
+ Assert.assertEquals(3, getDeployedComponents());
+
+ TypeLiteral<List<ParametrizedModel1>> model1 = new TypeLiteral<List<ParametrizedModel1>>()
+ {
+ };
+
+ List<ParametrizedModel1> instance = getManager().getInstanceByType(model1, new Annotation[0]);
+ Assert.assertNull(instance);
+ Assert.assertTrue(ParametrizedProducer.callModel1);
+ Assert.assertTrue(!ParametrizedProducer.callModel2);
+
+ TypeLiteral<List<ParametrizedModel2>> model2 = new TypeLiteral<List<ParametrizedModel2>>()
+ {
+ };
+ List<ParametrizedModel2> instance2 = getManager().getInstanceByType(model2, new Annotation[0]);
+
+ Assert.assertNull(instance2);
+ Assert.assertTrue(ParametrizedProducer.callModel2);
+
+ }
+
+ @Test
+ public void testProducer4()
+ {
+ defineSimpleWebBean(Producer4.class);
+ AbstractComponent<Producer4ConsumerComponent> component = defineSimpleWebBean(Producer4ConsumerComponent.class);
+
+ ContextFactory.initSessionContext(new MockHttpSession());
+
+ Producer4ConsumerComponent instance = getManager().getInstance(component);
+
+ Assert.assertNotNull(instance);
+
+ int count = instance.count();
+
+ Assert.assertEquals(1, count);
+
+ }
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/RunUnitTests.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/RunUnitTests.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/RunUnitTests.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/RunUnitTests.java Thu Jan 8 11:45:11 2009
@@ -1,65 +1,62 @@
/*
- * 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.
+ * 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.unittests;
-//import junit.framework.JUnit4TestAdapter;
-//import junit.framework.Test;
-//import junit.framework.TestSuite;
+// import junit.framework.JUnit4TestAdapter;
+// import junit.framework.Test;
+// import junit.framework.TestSuite;
public final class RunUnitTests
{
-// public static Test suite()
-// {
-// TestSuite suite = new TestSuite();
-//
-//
-// JUnit4TestAdapter test = new JUnit4TestAdapter(ProducerComponentTest.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(TypedComponentTest.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(InjectedComponentTest.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(InjectedComponentTestWithMember.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(TypedInjectedComponentTest.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(SingletonComponentTest.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(CurrentInjectedComponentTest.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(UserComponentTest.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(PaymentProcessorComponentTest.class);
-// suite.addTest(test);
-//
-// test = new JUnit4TestAdapter(Producer1ConsumerComponentTest.class);
-// suite.addTest(test);
-//
-//
-// return suite;
-// }
-
+ // public static Test suite()
+ // {
+ // TestSuite suite = new TestSuite();
+ //
+ //
+ // JUnit4TestAdapter test = new
+ // JUnit4TestAdapter(ProducerComponentTest.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(TypedComponentTest.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(InjectedComponentTest.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(InjectedComponentTestWithMember.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(TypedInjectedComponentTest.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(SingletonComponentTest.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(CurrentInjectedComponentTest.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(UserComponentTest.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(PaymentProcessorComponentTest.class);
+ // suite.addTest(test);
+ //
+ // test = new JUnit4TestAdapter(Producer1ConsumerComponentTest.class);
+ // suite.addTest(test);
+ //
+ //
+ // return suite;
+ // }
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/ScopeAdapterTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/ScopeAdapterTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/ScopeAdapterTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/ScopeAdapterTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests;
@@ -35,60 +32,59 @@
import org.junit.Before;
import org.junit.Test;
-
public class ScopeAdapterTest extends TestContext
{
- public ScopeAdapterTest()
- {
- super(ScopeAdapterTest.class.getName());
- }
-
- public void endTests(ServletContext ctx)
- {
- // TODO Auto-generated method stub
-
- }
-
- @Before
- public void init()
- {
- super.init();
-
- }
-
- public void startTests(ServletContext ctx)
- {
- // TODO Auto-generated method stub
-
- }
-
- @Test
- public void testDependent()
- {
- clear();
-
- defineSimpleWebBean(CheckWithCheckPayment.class);
- defineSimpleWebBean(ScopeAdaptorComponent.class);
- defineSimpleWebBean(ScopeAdaptorInjectorComponent.class);
-
- HttpSession session = getSession();
- ContextFactory.initRequestContext(null);
- ContextFactory.initSessionContext(session);
- ContextFactory.initApplicationContext(null);
-
- List<AbstractComponent<?>> comps = getComponents();
-
- Assert.assertEquals(4,getDeployedComponents());
-
- ManagerImpl.getManager().getContext(RequestScoped.class).get(comps.get(0), true);
- ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(1), true);
- getInstanceByName("scope");
- ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(2), true);
-
- ContextFactory.destroyApplicationContext(null);
- ContextFactory.destroySessionContext(session);
- ContextFactory.destroyRequestContext(null);
-
- }
+ public ScopeAdapterTest()
+ {
+ super(ScopeAdapterTest.class.getName());
+ }
+
+ public void endTests(ServletContext ctx)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Before
+ public void init()
+ {
+ super.init();
+
+ }
+
+ public void startTests(ServletContext ctx)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Test
+ public void testDependent()
+ {
+ clear();
+
+ defineSimpleWebBean(CheckWithCheckPayment.class);
+ defineSimpleWebBean(ScopeAdaptorComponent.class);
+ defineSimpleWebBean(ScopeAdaptorInjectorComponent.class);
+
+ HttpSession session = getSession();
+ ContextFactory.initRequestContext(null);
+ ContextFactory.initSessionContext(session);
+ ContextFactory.initApplicationContext(null);
+
+ List<AbstractComponent<?>> comps = getComponents();
+
+ Assert.assertEquals(4, getDeployedComponents());
+
+ ManagerImpl.getManager().getContext(RequestScoped.class).get(comps.get(0), true);
+ ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(1), true);
+ getInstanceByName("scope");
+ ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(2), true);
+
+ ContextFactory.destroyApplicationContext(null);
+ ContextFactory.destroySessionContext(session);
+ ContextFactory.destroyRequestContext(null);
+
+ }
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/SingletonComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/SingletonComponentTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/SingletonComponentTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/SingletonComponentTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests;
@@ -35,64 +32,63 @@
import org.junit.Before;
import org.junit.Test;
-
public class SingletonComponentTest extends TestContext
{
- Manager container = null;
+ Manager container = null;
+
+ public SingletonComponentTest()
+ {
+ super(SingletonComponentTest.class.getSimpleName());
+ }
+
+ public void endTests(ServletContext ctx)
+ {
+
+ }
+
+ @Before
+ public void init()
+ {
+ super.init();
+ this.container = ManagerImpl.getManager();
+ }
+
+ public void startTests(ServletContext ctx)
+ {
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void testTypedComponent() throws Throwable
+ {
+ clear();
+
+ defineSimpleWebBean(Typed2.class);
+ defineSimpleWebBean(Singleton.class);
+ List<AbstractComponent<?>> comps = getComponents();
+
+ HttpSession session = getSession();
+
+ ContextFactory.initSessionContext(session);
+
+ Assert.assertEquals(2, comps.size());
+
+ ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(0), true);
+ Object object = ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(1), true);
+
+ Assert.assertTrue(object instanceof Singleton);
+
+ Singleton single = (Singleton) object;
+
+ Assert.assertEquals("debug", single.logDebug());
+ Assert.assertEquals("info", single.logInfoo());
+
+ ITyped2 t = single.getType();
+
+ Assert.assertNotNull(t);
- public SingletonComponentTest()
- {
- super(SingletonComponentTest.class.getSimpleName());
- }
-
- public void endTests(ServletContext ctx)
- {
-
- }
-
- @Before
- public void init()
- {
- super.init();
- this.container = ManagerImpl.getManager();
- }
-
- public void startTests(ServletContext ctx)
- {
-
- }
-
- @SuppressWarnings("unchecked")
- @Test
- public void testTypedComponent() throws Throwable
- {
- clear();
-
- defineSimpleWebBean(Typed2.class);
- defineSimpleWebBean(Singleton.class);
- List<AbstractComponent<?>> comps = getComponents();
-
- HttpSession session = getSession();
-
- ContextFactory.initSessionContext(session);
-
- Assert.assertEquals(2, comps.size());
-
- ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(0), true);
- Object object = ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(1), true);
-
- Assert.assertTrue(object instanceof Singleton);
-
- Singleton single = (Singleton)object;
-
- Assert.assertEquals("debug", single.logDebug());
- Assert.assertEquals("info", single.logInfoo());
-
- ITyped2 t = single.getType();
-
- Assert.assertNotNull(t);
-
- ContextFactory.destroySessionContext(session);
- }
+ ContextFactory.destroySessionContext(session);
+ }
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedComponentTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests;
@@ -33,53 +30,52 @@
import org.junit.Before;
import org.junit.Test;
-
public class TypedComponentTest extends TestContext
{
- Manager container = null;
- ITyped<String> s = null;
+ Manager container = null;
+ ITyped<String> s = null;
+
+ public TypedComponentTest()
+ {
+ super(TypedComponentTest.class.getSimpleName());
+ }
+
+ public void endTests(ServletContext ctx)
+ {
+
+ }
+
+ @Before
+ public void init()
+ {
+ this.container = ManagerImpl.getManager();
+ }
+
+ public void startTests(ServletContext ctx)
+ {
+
+ }
+
+ @Test
+ public void testTypedComponent() throws Throwable
+ {
+ clear();
+ defineSimpleWebBean(TypedComponent.class);
+ List<AbstractComponent<?>> list = getComponents();
+
+ @SuppressWarnings("unused")
+ AbstractComponent<?> itype = (AbstractComponent<?>) container.resolveByType(TypedComponentTest.class.getDeclaredField("s").getType(), new Current()
+ {
+
+ public Class<? extends Annotation> annotationType()
+ {
+
+ return Current.class;
+ }
+
+ }).iterator().next();
- public TypedComponentTest()
- {
- super(TypedComponentTest.class.getSimpleName());
- }
-
- public void endTests(ServletContext ctx)
- {
-
- }
-
- @Before
- public void init()
- {
- this.container = ManagerImpl.getManager();
- }
-
- public void startTests(ServletContext ctx)
- {
-
- }
-
- @Test
- public void testTypedComponent() throws Throwable
- {
- clear();
- defineSimpleWebBean(TypedComponent.class);
- List<AbstractComponent<?>> list = getComponents();
-
-
- @SuppressWarnings("unused")
- AbstractComponent<?> itype = (AbstractComponent<?>) container.resolveByType(TypedComponentTest.class.getDeclaredField("s").getType(), new Current(){
-
- public Class<? extends Annotation> annotationType()
- {
-
- return Current.class;
- }
-
- }).iterator().next();
-
- Assert.assertTrue(list.size() > 0 ? true : false);
- }
+ Assert.assertTrue(list.size() > 0 ? true : false);
+ }
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedInjectedComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedInjectedComponentTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedInjectedComponentTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/TypedInjectedComponentTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests;
@@ -36,95 +33,93 @@
import org.junit.Before;
import org.junit.Test;
-
public class TypedInjectedComponentTest extends TestContext
{
- Manager container = null;
+ Manager container = null;
+
+ public TypedInjectedComponentTest()
+ {
+ super(TypedInjectedComponentTest.class.getSimpleName());
+ }
+
+ public void endTests(ServletContext ctx)
+ {
+
+ }
+
+ @Before
+ public void init()
+ {
+ super.init();
+ this.container = ManagerImpl.getManager();
+ }
+
+ public void startTests(ServletContext ctx)
+ {
+
+ }
+
+ @Test
+ public void testTypedComponent() throws Throwable
+ {
+ clear();
+
+ defineSimpleWebBean(Typed2.class);
+ defineSimpleWebBean(TypedInjection.class);
+ List<AbstractComponent<?>> comps = getComponents();
+
+ HttpSession session = getSession();
+
+ ContextFactory.initSessionContext(session);
+
+ Assert.assertEquals(2, comps.size());
+
+ getContext(SessionScoped.class).get(comps.get(0), true);
+
+ Object object = getContext(SessionScoped.class).get(comps.get(1), true);
+
+ Assert.assertTrue(object instanceof TypedInjection);
+
+ TypedInjection i = (TypedInjection) object;
+
+ Assert.assertTrue(i.getV() instanceof ITyped2);
+
+ Object obj2 = getContext(SessionScoped.class).get(comps.get(0), false);
+
+ Assert.assertEquals(i.getV(), obj2);
+
+ ContextFactory.destroySessionContext(session);
+ }
+
+ @Test
+ public void testTypedComponentWithoutArgument() throws Throwable
+ {
+ clear();
+
+ defineSimpleWebBean(Typed2.class);
+ defineSimpleWebBean(TypedInjectionWithoutArguments.class);
+ List<AbstractComponent<?>> comps = getComponents();
+
+ HttpSession session = getSession();
+
+ ContextFactory.initSessionContext(session);
+
+ Assert.assertEquals(2, comps.size());
+
+ getContext(SessionScoped.class).get(comps.get(0), true);
+ Object object = getContext(SessionScoped.class).get(comps.get(1), true);
+
+ Assert.assertTrue(object instanceof TypedInjectionWithoutArguments);
+
+ TypedInjectionWithoutArguments i = (TypedInjectionWithoutArguments) object;
+
+ Assert.assertTrue(i.getV() instanceof ITyped2);
+
+ Object obj2 = getContext(SessionScoped.class).get(comps.get(0), false);
+
+ Assert.assertEquals(i.getV(), obj2);
- public TypedInjectedComponentTest()
- {
- super(TypedInjectedComponentTest.class.getSimpleName());
- }
-
- public void endTests(ServletContext ctx)
- {
-
- }
-
- @Before
- public void init()
- {
- super.init();
- this.container = ManagerImpl.getManager();
- }
-
- public void startTests(ServletContext ctx)
- {
-
- }
-
- @Test
- public void testTypedComponent() throws Throwable
- {
- clear();
-
- defineSimpleWebBean(Typed2.class);
- defineSimpleWebBean(TypedInjection.class);
- List<AbstractComponent<?>> comps = getComponents();
-
- HttpSession session = getSession();
-
- ContextFactory.initSessionContext(session);
-
- Assert.assertEquals(2, comps.size());
-
- getContext(SessionScoped.class).get(comps.get(0), true);
-
- Object object = getContext(SessionScoped.class).get(comps.get(1), true);
-
- Assert.assertTrue(object instanceof TypedInjection);
-
- TypedInjection i = (TypedInjection)object;
-
- Assert.assertTrue(i.getV() instanceof ITyped2);
-
- Object obj2 = getContext(SessionScoped.class).get(comps.get(0), false);
-
- Assert.assertEquals(i.getV(), obj2);
-
- ContextFactory.destroySessionContext(session);
- }
-
- @Test
- public void testTypedComponentWithoutArgument() throws Throwable
- {
- clear();
-
- defineSimpleWebBean(Typed2.class);
- defineSimpleWebBean(TypedInjectionWithoutArguments.class);
- List<AbstractComponent<?>> comps = getComponents();
-
- HttpSession session = getSession();
-
- ContextFactory.initSessionContext(session);
-
- Assert.assertEquals(2, comps.size());
-
- getContext(SessionScoped.class).get(comps.get(0), true);
- Object object = getContext(SessionScoped.class).get(comps.get(1), true);
-
- Assert.assertTrue(object instanceof TypedInjectionWithoutArguments);
-
- TypedInjectionWithoutArguments i = (TypedInjectionWithoutArguments)object;
-
- Assert.assertTrue(i.getV() instanceof ITyped2);
-
- Object obj2 = getContext(SessionScoped.class).get(comps.get(0), false);
-
- Assert.assertEquals(i.getV(), obj2);
-
- ContextFactory.destroySessionContext(session);
- }
-
+ ContextFactory.destroySessionContext(session);
+ }
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/UserComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/UserComponentTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/UserComponentTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/UserComponentTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests;
@@ -34,64 +31,63 @@
import org.junit.Before;
import org.junit.Test;
-
public class UserComponentTest extends TestContext
{
- Manager container = null;
+ Manager container = null;
+
+ public UserComponentTest()
+ {
+ super(UserComponentTest.class.getSimpleName());
+ }
+
+ public void endTests(ServletContext ctx)
+ {
+
+ }
+
+ @Before
+ public void init()
+ {
+ this.container = ManagerImpl.getManager();
+ }
+
+ public void startTests(ServletContext ctx)
+ {
+
+ }
+
+ @Test
+ public void testTypedComponent() throws Throwable
+ {
+ clear();
+
+ defineSimpleWebBean(UserComponent.class);
+ defineSimpleWebBean(ContainUserComponent.class);
+ List<AbstractComponent<?>> comps = getComponents();
+
+ HttpSession session = getSession();
+ ContextFactory.initRequestContext(null);
+ ContextFactory.initSessionContext(session);
+
+ Assert.assertEquals(2, comps.size());
+
+ UserComponent userComponent = (UserComponent) ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(0), true);
+ userComponent.setName("Gurkan");
+ userComponent.setSurname("Erdogdu");
+
+ Assert.assertNotNull(userComponent);
+
+ Object object = ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(1), true);
+ Assert.assertNotNull(object);
+ Assert.assertTrue(object instanceof ContainUserComponent);
+
+ ContainUserComponent uc = (ContainUserComponent) object;
+
+ Assert.assertNotNull(uc.echo());
+ Assert.assertEquals(uc.echo(), userComponent.getName() + " " + userComponent.getSurname());
- public UserComponentTest()
- {
- super(UserComponentTest.class.getSimpleName());
- }
-
- public void endTests(ServletContext ctx)
- {
-
- }
-
- @Before
- public void init()
- {
- this.container = ManagerImpl.getManager();
- }
-
- public void startTests(ServletContext ctx)
- {
-
- }
-
- @Test
- public void testTypedComponent() throws Throwable
- {
- clear();
-
- defineSimpleWebBean(UserComponent.class);
- defineSimpleWebBean(ContainUserComponent.class);
- List<AbstractComponent<?>> comps = getComponents();
-
- HttpSession session = getSession();
- ContextFactory.initRequestContext(null);
- ContextFactory.initSessionContext(session);
-
- Assert.assertEquals(2, comps.size());
-
- UserComponent userComponent = (UserComponent) ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(0), true);
- userComponent.setName("Gurkan");
- userComponent.setSurname("Erdogdu");
-
- Assert.assertNotNull(userComponent);
-
- Object object = ManagerImpl.getManager().getContext(SessionScoped.class).get(comps.get(1), true);
- Assert.assertNotNull(object);
- Assert.assertTrue(object instanceof ContainUserComponent);
-
- ContainUserComponent uc = (ContainUserComponent)object;
-
- Assert.assertNotNull(uc.echo());
- Assert.assertEquals(uc.echo(), userComponent.getName()+ " " + userComponent.getSurname());
-
- ContextFactory.destroyRequestContext(null);
- ContextFactory.destroySessionContext(session);
- }
+ ContextFactory.destroyRequestContext(null);
+ ContextFactory.destroySessionContext(session);
+ }
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotatedClass.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotatedClass.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotatedClass.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/AnnotatedClass.java Thu Jan 8 11:45:11 2009
@@ -1,24 +1,21 @@
/*
- * 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.
+ * 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.unittests.annotation;
import org.apache.webbeans.test.annotation.binding.AnnotationWithBindingMember;
-@AnnotationWithBindingMember(value="Gurkan",number=5)
+@AnnotationWithBindingMember(value = "Gurkan", number = 5)
public class AnnotatedClass
{
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=732806&r1=732805&r2=732806&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 Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.annotation;
@@ -27,61 +24,59 @@
public class AnnotationTest extends TestContext
{
- public AnnotationTest()
- {
- super(AnnotationTest.class.getName());
- }
-
- @Test
- public void testAnnotationLiteral()
- {
- Annotation annotation = AnnotatedClass.class.getAnnotation(AnnotationWithBindingMember.class);
- WebBeansAnnotation webBeansAnnotation = new WebBeansAnnotation(AnnotationWithBindingMember.class);
-
- LiteralType al = new LiteralType()
- {
-
- public int number()
- {
- // TODO Auto-generated method stub
- return 5;
- }
-
- public String value()
- {
- return "Gurkan";
- }
-
- };
-
- webBeansAnnotation.setMemberValue("value", "Gurkan");
- webBeansAnnotation.setMemberValue("number", 5);
-
- Assert.assertTrue(annotation.equals(al));
-
-
- }
-
- @Test
- public void testAnnotationWebBeans()
- {
- Annotation annotation = AnnotatedClass.class.getAnnotation(AnnotationWithBindingMember.class);
- Annotation defAnnotation = DefaultAnnotatedClass.class.getAnnotation(AnnotationWithBindingMember.class);
- WebBeansAnnotation webBeansAnnotation = JavassistProxyFactory.createNewAnnotationProxy(AnnotationWithBindingMember.class);
-
-
- webBeansAnnotation.setMemberValue("value", "Gurkan");
- webBeansAnnotation.setMemberValue("number", 5);
-
- Assert.assertTrue(annotation.equals(webBeansAnnotation));
- Assert.assertTrue(webBeansAnnotation.equals(annotation));
-
- WebBeansAnnotation webBeansAnnotation2 = JavassistProxyFactory.createNewAnnotationProxy(AnnotationWithBindingMember.class);
-
- Assert.assertTrue(webBeansAnnotation2.equals(defAnnotation));
- Assert.assertTrue(defAnnotation.equals(webBeansAnnotation2));
- Assert.assertTrue(!webBeansAnnotation2.equals(annotation));
- Assert.assertTrue(!annotation.equals(webBeansAnnotation2));
- }
-
+ public AnnotationTest()
+ {
+ super(AnnotationTest.class.getName());
+ }
+
+ @Test
+ public void testAnnotationLiteral()
+ {
+ Annotation annotation = AnnotatedClass.class.getAnnotation(AnnotationWithBindingMember.class);
+ WebBeansAnnotation webBeansAnnotation = new WebBeansAnnotation(AnnotationWithBindingMember.class);
+
+ LiteralType al = new LiteralType()
+ {
+
+ public int number()
+ {
+ // TODO Auto-generated method stub
+ return 5;
+ }
+
+ public String value()
+ {
+ return "Gurkan";
+ }
+
+ };
+
+ webBeansAnnotation.setMemberValue("value", "Gurkan");
+ webBeansAnnotation.setMemberValue("number", 5);
+
+ Assert.assertTrue(annotation.equals(al));
+
+ }
+
+ @Test
+ public void testAnnotationWebBeans()
+ {
+ Annotation annotation = AnnotatedClass.class.getAnnotation(AnnotationWithBindingMember.class);
+ Annotation defAnnotation = DefaultAnnotatedClass.class.getAnnotation(AnnotationWithBindingMember.class);
+ WebBeansAnnotation webBeansAnnotation = JavassistProxyFactory.createNewAnnotationProxy(AnnotationWithBindingMember.class);
+
+ webBeansAnnotation.setMemberValue("value", "Gurkan");
+ webBeansAnnotation.setMemberValue("number", 5);
+
+ Assert.assertTrue(annotation.equals(webBeansAnnotation));
+ Assert.assertTrue(webBeansAnnotation.equals(annotation));
+
+ WebBeansAnnotation webBeansAnnotation2 = JavassistProxyFactory.createNewAnnotationProxy(AnnotationWithBindingMember.class);
+
+ Assert.assertTrue(webBeansAnnotation2.equals(defAnnotation));
+ Assert.assertTrue(defAnnotation.equals(webBeansAnnotation2));
+ Assert.assertTrue(!webBeansAnnotation2.equals(annotation));
+ Assert.assertTrue(!annotation.equals(webBeansAnnotation2));
+ }
+
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/DefaultAnnotatedClass.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/DefaultAnnotatedClass.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/DefaultAnnotatedClass.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/DefaultAnnotatedClass.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.annotation;
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/LiteralType.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/LiteralType.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/LiteralType.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/LiteralType.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.annotation;
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/binding/BrokenBindingComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/binding/BrokenBindingComponentTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/binding/BrokenBindingComponentTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/binding/BrokenBindingComponentTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.binding;
@@ -26,53 +23,53 @@
public class BrokenBindingComponentTest extends TestContext
{
- public BrokenBindingComponentTest()
- {
- super(BrokenBindingComponentTest.class.getName());
- }
-
- @Before
- public void init()
- {
- super.init();
- }
-
- @Test
- public void testNonBindingArrayType()
- {
- Exception exc = null;
-
- try
- {
- defineSimpleWebBean(BindingWithNonBindingArrayTypeComponent.class);
-
- }catch(Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
-
- Asserts.assertNotNull(exc);
-
- }
-
- @Test
- public void testNonBindingAnnotationType()
- {
- Exception exc = null;
-
- try
- {
- defineSimpleWebBean(BindingWithNonBindingAnnotationTypeComponent.class);
-
- }catch(Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
-
- Asserts.assertNotNull(exc);
-
- }
-
+ public BrokenBindingComponentTest()
+ {
+ super(BrokenBindingComponentTest.class.getName());
+ }
+
+ @Before
+ public void init()
+ {
+ super.init();
+ }
+
+ @Test
+ public void testNonBindingArrayType()
+ {
+ Exception exc = null;
+
+ try
+ {
+ defineSimpleWebBean(BindingWithNonBindingArrayTypeComponent.class);
+
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
+
+ Asserts.assertNotNull(exc);
+
+ }
+
+ @Test
+ public void testNonBindingAnnotationType()
+ {
+ Exception exc = null;
+
+ try
+ {
+ defineSimpleWebBean(BindingWithNonBindingAnnotationTypeComponent.class);
+
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
+
+ Asserts.assertNotNull(exc);
+
+ }
+
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/AbstractSchool.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/AbstractSchool.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/AbstractSchool.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/AbstractSchool.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.clazz;
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/AbstractSchool2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/AbstractSchool2.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/AbstractSchool2.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/AbstractSchool2.java Thu Jan 8 11:45:11 2009
@@ -1,22 +1,19 @@
/*
- * 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.
+ * 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.unittests.clazz;
-public abstract class AbstractSchool2<T,K>
+public abstract class AbstractSchool2<T, K>
{
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/ClazzTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.clazz;
@@ -26,25 +23,25 @@
public class ClazzTest
{
- @Test
- public void testStudent()
- {
- Set<Class<?>> set = new HashSet<Class<?>>();
- ClassUtil.setTypeHierarchy(set, Student.class);
-
- Assert.assertEquals(5, set.size());
-
- }
-
- @Test
- public void testSutdent2()
- {
- Set<Class<?>> set = new HashSet<Class<?>>();
-
- ClassUtil.setTypeHierarchy(set, Student2.class);
-
- Assert.assertEquals(4, set.size());
-
- }
+ @Test
+ public void testStudent()
+ {
+ Set<Class<?>> set = new HashSet<Class<?>>();
+ ClassUtil.setTypeHierarchy(set, Student.class);
+
+ Assert.assertEquals(5, set.size());
+
+ }
+
+ @Test
+ public void testSutdent2()
+ {
+ Set<Class<?>> set = new HashSet<Class<?>>();
+
+ ClassUtil.setTypeHierarchy(set, Student2.class);
+
+ Assert.assertEquals(4, set.size());
+
+ }
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/IBook.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/IBook.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/IBook.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/IBook.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.clazz;
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/IBook2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/IBook2.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/IBook2.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/IBook2.java Thu Jan 8 11:45:11 2009
@@ -1,22 +1,19 @@
/*
- * 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.
+ * 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.unittests.clazz;
-public interface IBook2<K,T>
+public interface IBook2<K, T>
{
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/Student.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/Student.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/Student.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/Student.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.clazz;
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/Student2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/Student2.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/Student2.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/clazz/Student2.java Thu Jan 8 11:45:11 2009
@@ -1,25 +1,22 @@
/*
- * 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.
+ * 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.unittests.clazz;
import java.util.List;
import java.util.Map;
-public class Student2 extends AbstractSchool2<List<String>, Map<String, String>> implements IBook2<Integer,String>
+public class Student2 extends AbstractSchool2<List<String>, Map<String, String>> implements IBook2<Integer, String>
{
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java?rev=732806&r1=732805&r2=732806&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorExceptionTest.java Thu Jan 8 11:45:11 2009
@@ -1,18 +1,15 @@
/*
- * 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.
+ * 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.unittests.decorator;
@@ -39,177 +36,176 @@
public class DecoratorExceptionTest extends TestContext
{
- public DecoratorExceptionTest()
- {
- super(DecoratorExceptionTest.class.getName());
- }
-
- @Before
- public void init()
- {
- super.init();
- }
-
- public void endTests(ServletContext ctx)
- {
-
- }
-
- public void startTests(ServletContext ctx)
- {
-
- }
-
- @Test
- public void testDelegateAttributeIsnotInterface()
- {
- Exception exc = null;
- try
- {
- defineSimpleWebBeansDecorators(DelegateAttributeIsnotInterface.class);
- } catch (Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
-
- Asserts.assertNotNull(exc);
- }
-
- @Test
- public void testMoreThanOneDelegateAttribute()
- {
- Exception exc = null;
- try
- {
- defineSimpleWebBeansDecorators(MoreThanOneDelegateAttribute.class);
- } catch (Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
-
- Asserts.assertNotNull(exc);
-
- }
-
- @Test
- public void testApplyToSimpleWebBeanFinal()
- {
- Exception excp = null;
-
- Assert.assertNull(excp);
-
- }
-
- @Test
- public void testApplyToSimpleWebBeanFinalMethodsDecoratorImplements()
- {
- Exception exc = null;
-
- try
- {
- defineSimpleWebBeansDecorators(PaymentDecorator.class);
- defineSimpleWebBean(CheckWithCheckPaymentDecoratorField.class);
-
- } catch (Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
-
- Assert.assertNotNull(exc);
-
- }
-
- @Test
- public void testDelegateAttributeMustImplementAllDecoratedTypes()
- {
- Exception exc = null;
- try
- {
- defineSimpleWebBeansDecorators(DelegateAttributeMustImplementAllDecoratedTypes.class);
- } catch (Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
-
- Asserts.assertNotNull(exc);
-
- }
-
- @Test
- public void testResolveDuplicateBindingParameterType()
- {
- Exception exc = null;
- try
- {
-
- Set<Class<?>> api = new HashSet<Class<?>>();
- api.add(IPayment.class);
-
- Annotation[] anns = new Annotation[2];
- anns[0] = new DummyAnnotationLiteral();
- anns[1] = new DummyAnnotationLiteral();
-
- getManager().resolveDecorators(api, anns);
- } catch (Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
-
- Asserts.assertNotNull(exc);
-
- }
-
- @Test
- public void testResolveNonBindingTypeAnnotation()
- {
- Exception exc = null;
- try
- {
-
- Set<Class<?>> api = new HashSet<Class<?>>();
- api.add(IPayment.class);
-
- Annotation[] anns = new Annotation[2];
- anns[0] = new RequestedScopeLiteral();
-
- getManager().resolveDecorators(api, anns);
- } catch (Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
-
- Asserts.assertNotNull(exc);
-
- }
-
- @Test
- public void testResolveApiTypesEmpty()
- {
- Exception exc = null;
- try
- {
-
- Set<Class<?>> api = new HashSet<Class<?>>();
-
- Annotation[] anns = new Annotation[2];
- anns[0] = new DummyAnnotationLiteral();
-
- getManager().resolveDecorators(api, anns);
- } catch (Exception e)
- {
- System.out.println(e.getMessage());
- exc = e;
- }
+ public DecoratorExceptionTest()
+ {
+ super(DecoratorExceptionTest.class.getName());
+ }
+
+ @Before
+ public void init()
+ {
+ super.init();
+ }
+
+ public void endTests(ServletContext ctx)
+ {
+
+ }
+
+ public void startTests(ServletContext ctx)
+ {
+
+ }
+
+ @Test
+ public void testDelegateAttributeIsnotInterface()
+ {
+ Exception exc = null;
+ try
+ {
+ defineSimpleWebBeansDecorators(DelegateAttributeIsnotInterface.class);
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
+
+ Asserts.assertNotNull(exc);
+ }
+
+ @Test
+ public void testMoreThanOneDelegateAttribute()
+ {
+ Exception exc = null;
+ try
+ {
+ defineSimpleWebBeansDecorators(MoreThanOneDelegateAttribute.class);
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
+
+ Asserts.assertNotNull(exc);
+
+ }
+
+ @Test
+ public void testApplyToSimpleWebBeanFinal()
+ {
+ Exception excp = null;
+
+ Assert.assertNull(excp);
+
+ }
+
+ @Test
+ public void testApplyToSimpleWebBeanFinalMethodsDecoratorImplements()
+ {
+ Exception exc = null;
+
+ try
+ {
+ defineSimpleWebBeansDecorators(PaymentDecorator.class);
+ defineSimpleWebBean(CheckWithCheckPaymentDecoratorField.class);
+
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
+
+ Assert.assertNotNull(exc);
+
+ }
+
+ @Test
+ public void testDelegateAttributeMustImplementAllDecoratedTypes()
+ {
+ Exception exc = null;
+ try
+ {
+ defineSimpleWebBeansDecorators(DelegateAttributeMustImplementAllDecoratedTypes.class);
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
+
+ Asserts.assertNotNull(exc);
+
+ }
+
+ @Test
+ public void testResolveDuplicateBindingParameterType()
+ {
+ Exception exc = null;
+ try
+ {
+
+ Set<Class<?>> api = new HashSet<Class<?>>();
+ api.add(IPayment.class);
+
+ Annotation[] anns = new Annotation[2];
+ anns[0] = new DummyAnnotationLiteral();
+ anns[1] = new DummyAnnotationLiteral();
+
+ getManager().resolveDecorators(api, anns);
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
+
+ Asserts.assertNotNull(exc);
+
+ }
+
+ @Test
+ public void testResolveNonBindingTypeAnnotation()
+ {
+ Exception exc = null;
+ try
+ {
+
+ Set<Class<?>> api = new HashSet<Class<?>>();
+ api.add(IPayment.class);
+
+ Annotation[] anns = new Annotation[2];
+ anns[0] = new RequestedScopeLiteral();
+
+ getManager().resolveDecorators(api, anns);
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
+
+ Asserts.assertNotNull(exc);
+
+ }
+
+ @Test
+ public void testResolveApiTypesEmpty()
+ {
+ Exception exc = null;
+ try
+ {
+
+ Set<Class<?>> api = new HashSet<Class<?>>();
+
+ Annotation[] anns = new Annotation[2];
+ anns[0] = new DummyAnnotationLiteral();
+
+ getManager().resolveDecorators(api, anns);
+ } catch (Exception e)
+ {
+ System.out.println(e.getMessage());
+ exc = e;
+ }
- Asserts.assertNotNull(exc);
+ Asserts.assertNotNull(exc);
-
- }
+ }
}