Author: aslak
Date: 2010-07-28 19:44:31 -0400 (Wed, 28 Jul 2010)
New Revision: 6833
Removed:
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/ActivitiesTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Cow.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Dummy.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Field.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Fox.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/NightTime.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Tame.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/child/
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/current/
core/trunk/tests/src/test/java/org/jboss/weld/tests/alternatives/
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Bean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Child.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/DeclaringTypeTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/ExampleTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Parent.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/decoration/
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanDeployment/managed/multiple/
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanDeployment/managed/single/
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanDeployment/mixed/
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanDeployment/producers/singleProducerMethod/
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanDeployment/session/multiple/
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanDeployment/session/single/
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/BeanManagerTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/annotation/
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/serializability/
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/BuiltInBeanPassivationCapableTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Checker.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/ConstructorInjectionPointConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Consumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Cow.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/CowEventObserver.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Dog.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/FieldInjectionPointConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/MethodInjectionPointConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Produced.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/ee/
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/weld471/
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ApplicationScopedObject.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ApplicationScopedTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ContextTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ParameterizedTypeScoped.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ParameterizedTypeScopedTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/PassivatingContextTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/StringHolder.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBeanImpl.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecorator1.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecorator2.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecoratorTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/AbstractDecoratorTestHelper.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegate.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegateAndAbstractMethod.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegate.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndAbstractMethod.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegate.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithCallToItselfTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithConstructorTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithInitializerMethodTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/Window.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/WindowImpl.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/broken/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/custom/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/decoratedTypes/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/Decorated.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/GenericBean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/NotDecorated.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/PartialDecorator.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/PartialDecoratorTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/StringPartialDecorator.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/TestBean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/extend/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/interceptor/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/resolution/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/stackoverflow/
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/AbstractDAO.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/AbstractDAOImpl.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Animal.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Bird.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/BowlerHatException.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Capercaillie.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Castle.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Cat.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/CatLocal.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/DAO.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Dog.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/DogBean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EjbDescriptorLookupTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanDefinitionTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Fedora.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/FedoraImpl.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Feed.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Hat.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HatRemote.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HelloAction.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HelloBean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/IHelloBean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Result.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultClient.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultDAO.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultDAOImpl.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Scottish.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/lifecycle/
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/proxyability/
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Bar.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/EventQualifierTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/NormalScopedBean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/SimpleEventTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Updated.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/examples/
core/trunk/tests/src/test/java/org/jboss/weld/tests/exceptions/
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Capercaillie.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Cow.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/CowLocal.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/ExtensionObserver.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Horse.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/OtherObserver.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Rat.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/SimpleExtension.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Special.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Stable.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Woodland.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/WoodlandExtension.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/AnnotatedTypeExtension.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/AnnotatedTypeExtensionTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Clothes.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Coins.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/EcoFriendlyWashingMachine.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/FastWashingMachine.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/HotAir.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/InjectLiteral.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Laundry.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Original.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Plug.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/RunningTime.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/SerialNumber.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Special.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/SpecialLiteral.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/TumbleDryer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/WashingMachine.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/ejb/
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/invalidParameters/
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/injectionTarget/
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/interceptors/
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/multipleBeans/
core/trunk/tests/src/test/java/org/jboss/weld/tests/generic/
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Cow.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/CowShed.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/DoubleConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/DoubleGenerator.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/ExtraSpecial.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/ExtraSpecialLiteral.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Field.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/GrassyField.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/InjectionPointTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/IntConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/IntGenerator.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Pig.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/PigSty.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Special.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/StringConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/StringGenerator.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/TimerManager.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/other/
core/trunk/tests/src/test/java/org/jboss/weld/tests/managed/newBean/
core/trunk/tests/src/test/java/org/jboss/weld/tests/nonContextual/
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Baz.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/IntegerCollectionInjection.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ListInstance.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ListStringInstance.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedCollectionInjection.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedListInjection.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedProducerTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ProducerBeanInvocationTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Qux.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/QuxProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Target.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Baz.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Car.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/CarFactory.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/FooDisposer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/FooProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Government.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Important.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/IntInjection.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/JmsTemplate.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/JmsTemplateConfigurationProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Long.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ManagerProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ManagerProducerTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerWithBinding.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerWithBindingTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NullProducerTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ProducerBeanInvocationTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Qux.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/QuxProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Short.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/circular/
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/parameterized/
core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/ProxyTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/enterprise/
core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/observer/
core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/
core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld56/
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Bar.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Baz.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/FooBase.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/FooProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/LookupFoo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/LookupInstanceTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Special.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Weld256Test.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Bar.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/CircularDependencyTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentLooping.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentLoopingProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentSelfConsumingDependentProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Farm.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Fish.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/NormalLooping.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/NormalLoopingProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/SelfConsumingDependent.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Violation.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Water.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/resource/
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/named/
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/wbri279/
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/wbri293/
core/trunk/tests/src/test/java/org/jboss/weld/tests/resources/
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Bar.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/ScopeTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Special.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Temp.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/TempConsumer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/TempProducer.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Useless.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/serialization/
core/trunk/tests/src/test/java/org/jboss/weld/tests/session/newBean/
core/trunk/tests/src/test/java/org/jboss/weld/tests/specialization/
core/trunk/tests/src/test/java/org/jboss/weld/tests/stereotypes/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/Bar.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/CheckableInjectionServices.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/ContainerStatusTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/DiscoverFailsBootstrapTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/Foo.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/InjectionServicesTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/PreinstantiateBeanManagerTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/WeldBean.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/WeldStartupTest.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/xml/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/deployment/structure/extensions/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/deployment/structure/nonTransitiveResolution/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/deployment/structure/resolution/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/environments/servlet/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/jsf/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/clazz/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/method/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/security/
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/util/
core/trunk/tests/src/test/java/org/jboss/weld/tests/util/annotated/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/alternatives/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/builtinBeans/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/enterprise/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/extensions/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/proxy/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/resolution/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/unit/
Modified:
core/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletContext.java
Log:
WELD-493 Tests converted and moved to tests-arquillian
Modified: core/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletContext.java
===================================================================
--- core/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletContext.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletContext.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -25,17 +25,25 @@
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
+import java.util.EventListener;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+import javax.servlet.Filter;
+import javax.servlet.FilterRegistration;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
+import javax.servlet.SessionCookieConfig;
+import javax.servlet.SessionTrackingMode;
+import javax.servlet.FilterRegistration.Dynamic;
+import javax.servlet.descriptor.JspConfigDescriptor;
/**
* Mock implementation of the servlet context for testing purposes. This implementation
supports all
@@ -555,4 +563,142 @@
{
return "";
}
-}
+
+ public Dynamic addFilter(String arg0, String arg1) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Dynamic addFilter(String arg0, Filter arg1) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Dynamic addFilter(String arg0, Class<? extends Filter> arg1) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void addListener(String arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public <T extends EventListener> void addListener(T arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addListener(Class<? extends EventListener> arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0,
+ String arg1) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0,
+ Servlet arg1) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0,
+ Class<? extends Servlet> arg1) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T extends Filter> T createFilter(Class<T> arg0)
+ throws ServletException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T extends EventListener> T createListener(Class<T> arg0)
+ throws ServletException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T extends Servlet> T createServlet(Class<T> arg0)
+ throws ServletException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void declareRoles(String... arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ClassLoader getClassLoader() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<SessionTrackingMode> getDefaultSessionTrackingModes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getEffectiveMajorVersion() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int getEffectiveMinorVersion() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Set<SessionTrackingMode> getEffectiveSessionTrackingModes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public FilterRegistration getFilterRegistration(String arg0) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Map<String, ? extends FilterRegistration> getFilterRegistrations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public JspConfigDescriptor getJspConfigDescriptor() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ServletRegistration getServletRegistration(String arg0) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Map<String, ? extends ServletRegistration> getServletRegistrations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SessionCookieConfig getSessionCookieConfig() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean setInitParameter(String arg0, String arg1) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setSessionTrackingModes(Set<SessionTrackingMode> arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/ActivitiesTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/ActivitiesTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/ActivitiesTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,347 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.activities;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.context.Dependent;
-import javax.enterprise.context.spi.Context;
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Reception;
-import javax.enterprise.event.TransactionPhase;
-import javax.enterprise.inject.UnsatisfiedResolutionException;
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.enterprise.inject.spi.ObserverMethod;
-import javax.enterprise.util.AnnotationLiteral;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.bean.ForwardingBean;
-import org.jboss.weld.literal.AnyLiteral;
-import org.jboss.weld.literal.DefaultLiteral;
-import org.jboss.weld.manager.BeanManagerImpl;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.jboss.weld.util.collections.Arrays2;
-import org.testng.annotations.Test;
-
-/**
- *
- * Spec version: 20090519
- *
- */
-@Artifact
-public class ActivitiesTest extends AbstractWeldTest
-{
-
- private static final Set<Annotation> DEFAULT_QUALIFIERS =
Collections.<Annotation> singleton(DefaultLiteral.INSTANCE);
-
- private Bean<?> createDummyBean(BeanManager beanManager, final Type
injectionPointType)
- {
- final Set<InjectionPoint> injectionPoints = new
HashSet<InjectionPoint>();
- final Set<Type> types = new HashSet<Type>();
- final Set<Annotation> bindings = new HashSet<Annotation>();
- bindings.add(new AnnotationLiteral<Tame>()
- {
- });
- types.add(Object.class);
- final Bean<?> bean = new Bean<Object>()
- {
-
- public Set<Annotation> getQualifiers()
- {
- return bindings;
- }
-
- public Set<InjectionPoint> getInjectionPoints()
- {
- return injectionPoints;
- }
-
- public String getName()
- {
- return null;
- }
-
- public Class<? extends Annotation> getScope()
- {
- return Dependent.class;
- }
-
- public Set<Type> getTypes()
- {
- return types;
- }
-
- public boolean isNullable()
- {
- return false;
- }
-
- public Object create(CreationalContext<Object> creationalContext)
- {
- return null;
- }
-
- public void destroy(Object instance, CreationalContext<Object>
creationalContext)
- {
-
- }
-
- public Class<?> getBeanClass()
- {
- return Object.class;
- }
-
- public boolean isAlternative()
- {
- return false;
- }
-
- public Set<Class<? extends Annotation>> getStereotypes()
- {
- return Collections.emptySet();
- }
-
- };
- InjectionPoint injectionPoint = new InjectionPoint()
- {
-
- public Bean<?> getBean()
- {
- return bean;
- }
-
- public Set<Annotation> getQualifiers()
- {
- return DEFAULT_QUALIFIERS;
- }
-
- public Member getMember()
- {
- return null;
- }
-
- public Type getType()
- {
- return injectionPointType;
- }
-
- public Annotated getAnnotated()
- {
- return null;
- }
-
- public boolean isDelegate()
- {
- return false;
- }
-
- public boolean isTransient()
- {
- return false;
- }
-
- };
- injectionPoints.add(injectionPoint);
- return bean;
- }
-
- private static class DummyContext implements Context
- {
-
- public <T> T get(Contextual<T> contextual)
- {
- return null;
- }
-
- public <T> T get(Contextual<T> contextual, CreationalContext<T>
creationalContext)
- {
- return null;
- }
-
- public Class<? extends Annotation> getScope()
- {
- return Dummy.class;
- }
-
- public boolean isActive()
- {
- return false;
- }
-
- }
-
- @Test
- public void testBeanBelongingToParentActivityBelongsToChildActivity()
- {
- assert getBeans(Cow.class).size() == 1;
- Contextual<?> bean = getBeans(Cow.class).iterator().next();
- BeanManager childActivity = getCurrentManager().createActivity();
- assert childActivity.getBeans(Cow.class).size() == 1;
- assert childActivity.getBeans(Cow.class).iterator().next().equals(bean);
- }
-
- @Test
- public void testBeanBelongingToParentActivityCanBeInjectedIntoChildActivityBean()
- {
- assert getBeans(Cow.class).size() == 1;
- Contextual<?> bean = getBeans(Cow.class).iterator().next();
- BeanManagerImpl childActivity = getCurrentManager().createActivity();
- Bean<?> dummyBean = createDummyBean(childActivity, Cow.class);
- childActivity.addBean(dummyBean);
- assert
childActivity.getInjectableReference(dummyBean.getInjectionPoints().iterator().next(),
childActivity.createCreationalContext(dummyBean)) != null;
- }
-
- @Test
- public void testObserverBelongingToParentActivityBelongsToChildActivity()
- {
- assert getCurrentManager().resolveObserverMethods(new NightTime()).size() == 1;
- ObserverMethod<?> observer = getCurrentManager().resolveObserverMethods(new
NightTime()).iterator().next();
- BeanManager childActivity = getCurrentManager().createActivity();
- assert childActivity.resolveObserverMethods(new NightTime()).size() == 1;
- assert childActivity.resolveObserverMethods(new
NightTime()).iterator().next().equals(observer);
- }
-
- @Test
- public void testObserverBelongingToParentFiresForChildActivity()
- {
- Fox.setObserved(false);
- BeanManager childActivity = getCurrentManager().createActivity();
- childActivity.fireEvent(new NightTime());
- assert Fox.isObserved();
- }
-
- @Test
- public void testContextObjectBelongingToParentBelongsToChild()
- {
- Context context = new DummyContext()
- {
-
- @Override
- public boolean isActive()
- {
- return true;
- }
-
- };
- getCurrentManager().addContext(context);
- BeanManager childActivity = getCurrentManager().createActivity();
- assert childActivity.getContext(Dummy.class) != null;
- }
-
- @Test
- public void testBeanBelongingToChildActivityCannotBeInjectedIntoParentActivityBean()
- {
- assert getBeans(Cow.class).size() == 1;
- BeanManagerImpl childActivity = getCurrentManager().createActivity();
- Bean<?> dummyBean = createDummyBean(childActivity, Cow.class);
- childActivity.addBean(dummyBean);
- assert getBeans(Object.class, new AnnotationLiteral<Tame>()
- {
- }).size() == 0;
- }
-
- @Test(expectedExceptions = UnsatisfiedResolutionException.class)
- public void testInstanceProcessedByParentActivity()
- {
- Context dummyContext = new DummyContext();
- getCurrentManager().addContext(dummyContext);
- assert getBeans(Cow.class).size() == 1;
- final Bean<Cow> bean = getBeans(Cow.class).iterator().next();
- BeanManagerImpl childActivity = getCurrentManager().createActivity();
- final Set<Annotation> bindingTypes = new HashSet<Annotation>();
- bindingTypes.add(new AnnotationLiteral<Tame>()
- {
- });
- childActivity.addBean(new ForwardingBean<Cow>()
- {
-
- @Override
- protected Bean<Cow> delegate()
- {
- return bean;
- }
-
- @Override
- public Set<Annotation> getQualifiers()
- {
- return bindingTypes;
- }
-
- @Override
- public Set<Class<? extends Annotation>> getStereotypes()
- {
- return Collections.emptySet();
- }
-
- });
- getReference(Field.class).get();
- }
-
- @Test
- public void testObserverBelongingToChildDoesNotFireForParentActivity()
- {
-
- BeanManagerImpl childActivity = getCurrentManager().createActivity();
- ObserverMethod<NightTime> observer = new ObserverMethod<NightTime>()
- {
-
- public void notify(NightTime event)
- {
- assert false;
- }
-
- public Class<?> getBeanClass()
- {
- return NightTime.class;
- }
-
- public Set<Annotation> getObservedQualifiers()
- {
- return Arrays2.asSet(AnyLiteral.INSTANCE, DefaultLiteral.INSTANCE);
- }
-
- public Type getObservedType()
- {
- return NightTime.class;
- }
-
- public Reception getReception()
- {
- return Reception.ALWAYS;
- }
-
- public TransactionPhase getTransactionPhase()
- {
- return TransactionPhase.IN_PROGRESS;
- }
-
- };
- // TODO Fix this test to use an observer method in a child activity
- childActivity.addObserver(observer);
- getCurrentManager().fireEvent(new NightTime());
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Cow.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Cow.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Cow.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.activities;
-
-class Cow
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Dummy.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Dummy.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Dummy.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.activities;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Scope;
-
-@Target( { TYPE, METHOD, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Scope
-@Inherited
-@interface Dummy {}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Field.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Field.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Field.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.activities;
-
-import javax.enterprise.inject.Instance;
-import javax.inject.Inject;
-
-class Field
-{
-
- @Inject @Tame Instance<Cow> instance;
-
- public Cow get()
- {
- return instance.get();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Fox.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Fox.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Fox.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.activities;
-
-import javax.enterprise.event.Observes;
-
-class Fox
-{
-
- private static boolean observed = false;
-
- public void observe(@Observes NightTime nighttime)
- {
- observed = true;
- }
-
- public static boolean isObserved()
- {
- return observed;
- }
-
- public static void setObserved(boolean observed)
- {
- Fox.observed = observed;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/NightTime.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/NightTime.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/NightTime.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.activities;
-
-class NightTime
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Tame.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Tame.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/activities/Tame.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.activities;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@interface Tame
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Bean.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Bean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Bean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.annotatedType;
-
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class Bean
-{
- int field;
-
- public Bean(int i)
- {
-
- }
-
- public void method(int i)
- {
-
- }
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Child.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Child.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Child.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.annotatedType;
-
-
-public class Child extends Parent
- {
- }
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/DeclaringTypeTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/DeclaringTypeTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/DeclaringTypeTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.annotatedType;
-
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.AnnotatedMethod;
-import javax.enterprise.inject.spi.AnnotatedType;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-/**
- * @author kkahn
- *
- */
-@Artifact
-public class DeclaringTypeTest extends AbstractWeldTest
-{
-
- @Test
- public void testInheritance()
- {
- AnnotatedType<Child> type =
getCurrentManager().createAnnotatedType(Child.class);
- assert type.getConstructors().size() == 1;
- assert type.getFields().size() == 1;
- for (AnnotatedField<? super Child> field : type.getFields())
- {
- if (field.getJavaMember().getName().equals("parent"))
- {
- Assert.assertEquals(Parent.class, field.getJavaMember().getDeclaringClass());
// OK
-
// -
-
// Returns
-
// Parent
- Assert.assertEquals(Parent.class, field.getDeclaringType().getJavaClass());
// FAIL
-
// -
-
// Returns
-
// Child
- }
- else
- {
- Assert.fail("Unknown field " + field.getJavaMember());
- }
- }
-
- assert type.getMethods().size() == 1;
- for (AnnotatedMethod<? super Child> method : type.getMethods())
- {
- if (method.getJavaMember().getName().equals("parentMethod"))
- {
- Assert.assertEquals(Parent.class,
method.getJavaMember().getDeclaringClass()); // OK
-
// -
-
// /Returns
-
// Parent
- Assert.assertEquals(Parent.class, method.getDeclaringType().getJavaClass());
// FAIL
-
// -
-
// Returns
-
// Child
- }
- else
- {
- Assert.fail("Unknown method " + method.getJavaMember());
- }
- }
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/ExampleTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/ExampleTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/ExampleTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.annotatedType;
-
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.spi.AnnotatedConstructor;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.AnnotatedMethod;
-import javax.enterprise.inject.spi.AnnotatedParameter;
-import javax.enterprise.inject.spi.AnnotatedType;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-@Artifact
-public class ExampleTest extends AbstractWeldTest
-{
- @Test
- public void testAnnotatedCallableGetParameters() throws Exception
- {
- AnnotatedType<Bean> type =
getCurrentManager().createAnnotatedType(Bean.class);
-
- assertNoAnnotations(type);
-
- Assert.assertEquals(1, type.getConstructors().size());
- for (AnnotatedConstructor<Bean> ctor : type.getConstructors())
- {
- assertNoAnnotations(ctor);
-
- for (AnnotatedParameter<Bean> param : ctor.getParameters())
- {
- assertNoAnnotations(param);
- }
- }
-
- Assert.assertEquals(1, type.getMethods().size());
- for (AnnotatedMethod<? super Bean> method : type.getMethods())
- {
- assertNoAnnotations(method);
-
- for (AnnotatedParameter<? super Bean> param : method.getParameters())
- {
- assertNoAnnotations(param);
- }
- }
-
- Assert.assertEquals(1, type.getFields().size());
- for (AnnotatedField<? super Bean> field : type.getFields())
- {
- assertNoAnnotations(field);
- }
- }
-
- private void assertNoAnnotations(Annotated annotated)
- {
- Assert.assertEquals(0, annotated.getAnnotations().size());
- }
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Parent.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Parent.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/annotatedType/Parent.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.annotatedType;
-public class Parent
-{
- int parent;
-
- void parentMethod()
- {
-
- }
-}
-
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/BeanManagerTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/BeanManagerTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/BeanManagerTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-package org.jboss.weld.tests.beanManager;
-
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class BeanManagerTest extends AbstractWeldTest
-{
-
- @Test(expectedExceptions=IllegalArgumentException.class)
- public void testNullBeanArgumentToGetReference()
- {
- Bean<Foo> bean = getBean(Foo.class);
- CreationalContext<Foo> cc =
getCurrentManager().createCreationalContext(bean);
- getCurrentManager().getReference(null, Foo.class, cc);
- }
-
- @Test(expectedExceptions=IllegalArgumentException.class)
- public void testNullBeanTypeArgumentToGetReference()
- {
- Bean<Foo> bean = getBean(Foo.class);
- CreationalContext<Foo> cc =
getCurrentManager().createCreationalContext(bean);
- getCurrentManager().getReference(bean, null, cc);
- }
-
- @Test(expectedExceptions=IllegalArgumentException.class)
- public void testNullCreationalContextArgumentToGetReference()
- {
- Bean<Foo> bean = getBean(Foo.class);
- CreationalContext<Foo> cc =
getCurrentManager().createCreationalContext(bean);
- getCurrentManager().getReference(bean, Foo.class, null);
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/Foo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/Foo.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/beanManager/Foo.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,6 +0,0 @@
-package org.jboss.weld.tests.beanManager;
-
-public class Foo
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/BuiltInBeanPassivationCapableTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/BuiltInBeanPassivationCapableTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/BuiltInBeanPassivationCapableTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,150 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import static org.jboss.weld.tests.builtinBeans.Checker.checkBeanManager;
-import static org.jboss.weld.tests.builtinBeans.Checker.checkEquality;
-import static org.jboss.weld.tests.builtinBeans.Checker.checkEvent;
-import static org.jboss.weld.tests.builtinBeans.Checker.checkInjectionPoint;
-import static org.jboss.weld.tests.builtinBeans.Checker.checkInstance;
-import static org.jboss.weld.tests.builtinBeans.Checker.checkPrincipal;
-import static org.jboss.weld.tests.builtinBeans.Checker.checkUserTransaction;
-import static org.jboss.weld.tests.builtinBeans.Checker.checkValidator;
-import static org.jboss.weld.tests.builtinBeans.Checker.checkValidatorFactory;
-
-import java.security.Principal;
-
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.transaction.UserTransaction;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.jboss.weld.test.Utils;
-import org.testng.annotations.Test;
-
-@Artifact
-public class BuiltInBeanPassivationCapableTest extends AbstractWeldTest
-{
-
- @Test
- public void testDefaultValidatorBean() throws Throwable
- {
- Validator validator = getReference(Validator.class);
- Validator validator1 = Utils.deserialize(Utils.serialize(validator));
- assert checkValidator(validator1);
- }
-
- @Test
- public void testDefaultValidatorFactoryBean() throws Throwable
- {
- ValidatorFactory validatorFactory = getReference(ValidatorFactory.class);
- ValidatorFactory validatorFactory1 =
Utils.deserialize(Utils.serialize(validatorFactory));
- assert checkValidatorFactory(validatorFactory1);
- }
-
- @Test(groups="incontainer-broken")
- public void testPrincipal() throws Throwable
- {
- Principal principal = getReference(Principal.class);
- Principal principal1 = Utils.deserialize(Utils.serialize(principal));
- assert checkPrincipal(principal1);
- }
-
- @Test
- public void testUserTransactionBean() throws Throwable
- {
- UserTransaction userTransaction = getReference(UserTransaction.class);
- UserTransaction userTransaction1 =
Utils.deserialize(Utils.serialize(userTransaction));
- assert checkUserTransaction(userTransaction1);
- }
-
- @Test
- public void testBeanManagerBean() throws Throwable
- {
- BeanManager beanManager = getReference(BeanManager.class);
- BeanManager beanManager1 = Utils.deserialize(Utils.serialize(beanManager));
- assert checkBeanManager(beanManager1);
- assert checkEquality(beanManager, beanManager1);
- }
-
- @Test
- public void testInstance() throws Throwable
- {
- Instance<Cow> instance = getReference(Consumer.class).getCow();
- Instance<Cow> instance1 = Utils.deserialize(Utils.serialize(instance));
- assert checkInstance(instance1);
- assert checkEquality(instance, instance1);
- }
-
- @Test
- public void testEvent() throws Throwable
- {
- Event<Cow> event = getReference(Consumer.class).getEvent();
- CowEventObserver observer = getReference(CowEventObserver.class);
- Event<Cow> event1 = Utils.deserialize(Utils.serialize(event));
- assert checkEvent(event1, observer);
- assert checkEquality(event, event1);
- }
-
- @Test
- public void testFieldInjectionPoint() throws Throwable
- {
- Dog.reset();
- getReference(FieldInjectionPointConsumer.class).ping();
- InjectionPoint injectionPoint = Dog.getInjectionPoint();
- InjectionPoint injectionPoint1 =
Utils.deserialize(Utils.serialize(injectionPoint));
- assert checkInjectionPoint(injectionPoint1, FieldInjectionPointConsumer.class);
- assert checkEquality(injectionPoint, injectionPoint1);
- }
-
- @Test
- public void testConstructorInjectionPoint() throws Throwable
- {
- Dog.reset();
- getReference(ConstructorInjectionPointConsumer.class).ping();
- InjectionPoint injectionPoint = Dog.getInjectionPoint();
- InjectionPoint injectionPoint1 =
Utils.deserialize(Utils.serialize(injectionPoint));
- assert checkInjectionPoint(injectionPoint1,
ConstructorInjectionPointConsumer.class);
- assert checkEquality(injectionPoint, injectionPoint1);
- }
-
- @Test
- public void testMethodInjectionPoint() throws Throwable
- {
- Dog.reset();
- getReference(MethodInjectionPointConsumer.class).ping();
- InjectionPoint injectionPoint = Dog.getInjectionPoint();
- InjectionPoint injectionPoint1 =
Utils.deserialize(Utils.serialize(injectionPoint));
- assert checkInjectionPoint(injectionPoint1, MethodInjectionPointConsumer.class);
- assert checkEquality(injectionPoint, injectionPoint1);
- }
-
- @Test
- public void testAllOnBean() throws Throwable
- {
- Consumer consumer = getReference(Consumer.class);
- consumer.check();
- Consumer consumer1 = Utils.deserialize(Utils.serialize(consumer));
- consumer1.check();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Checker.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Checker.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Checker.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,138 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import java.security.Principal;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
-import javax.validation.ValidationException;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-public class Checker
-{
-
- public static boolean checkPrincipal(Principal principal)
- {
- principal.getName();
- return true;
- }
-
- public static boolean checkBeanManager(BeanManager beanManager)
- {
- return beanManager != null &&
beanManager.isScope(ApplicationScoped.class);
- }
-
- public static boolean checkUserTransaction(UserTransaction userTransaction)
- {
- try
- {
- if (userTransaction != null)
- {
- userTransaction.getStatus();
- return true;
- }
- }
- catch (SystemException e)
- {
- throw new RuntimeException(e);
- }
- return false;
- }
-
- public static boolean checkValidator(Validator validator)
- {
- try
- {
- if (validator != null)
- {
- validator.unwrap(String.class);
- }
- }
- catch (ValidationException e)
- {
- return true;
- }
- return false;
- }
-
- public static boolean checkValidatorFactory(ValidatorFactory validatorFactory)
- {
- try
- {
- if (validatorFactory != null)
- {
- validatorFactory.unwrap(String.class);
- }
- }
- catch (ValidationException e)
- {
- return true;
- }
- return false;
- }
-
- public static boolean checkInstance(Instance<Cow> cow)
- {
- if (cow != null && cow.get() != null)
- {
- return cow.get().getName().equals("Daisy");
- }
- else
- {
- return false;
- }
- }
-
- public static boolean checkEvent(Event<Cow> cowEvent, CowEventObserver
observer)
- {
- observer.reset();
- if (cowEvent != null)
- {
- cowEvent.fire(new Cow());
- return observer.isObserved();
- }
- else
- {
- return false;
- }
- }
-
- public static boolean checkInjectionPoint(InjectionPoint injectionPoint,
Class<?> injectedClass)
- {
- if (injectionPoint != null)
- {
- return injectedClass.equals(injectionPoint.getBean().getBeanClass());
- }
- else
- {
- return false;
- }
- }
-
- public static boolean checkEquality(Object object1, Object object2)
- {
- return object1.equals(object2) && object1.hashCode() ==
object2.hashCode();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/ConstructorInjectionPointConsumer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/ConstructorInjectionPointConsumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/ConstructorInjectionPointConsumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-import javax.inject.Inject;
-
-@SessionScoped
-public class ConstructorInjectionPointConsumer implements Serializable
-{
-
- public ConstructorInjectionPointConsumer() {}
-
- @Inject
- public ConstructorInjectionPointConsumer(Dog dog) {}
-
- public void ping() {}
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Consumer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Consumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Consumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.inject.Inject;
-import javax.transaction.UserTransaction;
-import javax.validation.Validator;
-import javax.validation.ValidatorFactory;
-
-@SessionScoped
-public class Consumer implements Serializable
-{
-
- @Inject Validator validator;
- @Inject ValidatorFactory validatorFactory;
- // Not working incontainer as there is no principal
- //@Inject Principal principal;
- @Inject UserTransaction userTransaction;
- @Inject BeanManager beanManager;
- @Inject Instance<Cow> cow;
- @Inject Event<Cow> event;
- @Inject CowEventObserver observer;
-
- @PostConstruct
- public void postConstruct()
- {
- cow.get().setName("Daisy");
- }
-
- public Instance<Cow> getCow()
- {
- return cow;
- }
-
- public Event<Cow> getEvent()
- {
- return event;
- }
-
- public void check()
- {
- assert Checker.checkBeanManager(beanManager);
-
- // Not working incontainer as there is no principal
- //assert Checker.checkPrincipal(principal);
- assert Checker.checkUserTransaction(userTransaction);
- assert Checker.checkValidator(validator);
- assert Checker.checkValidatorFactory(validatorFactory);
- assert Checker.checkInstance(cow);
- assert Checker.checkEvent(event, observer);
- }
-
-
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Cow.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Cow.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Cow.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import javax.enterprise.context.RequestScoped;
-
-@RequestScoped
-public class Cow
-{
-
- private String name;
-
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/CowEventObserver.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/CowEventObserver.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/CowEventObserver.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-
-@ApplicationScoped
-public class CowEventObserver implements Serializable
-{
-
- private boolean observed;
-
- public void observeEvent(@Observes Cow cow)
- {
- this.observed = true;
- }
-
- public boolean isObserved()
- {
- return observed;
- }
-
- public void reset()
- {
- this.observed = false;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Dog.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Dog.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Dog.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import java.io.Serializable;
-
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.inject.Inject;
-
-public class Dog implements Serializable
-{
-
- private static InjectionPoint injectionPoint;
-
- @Inject
- public Dog(InjectionPoint injectionPoint)
- {
- Dog.injectionPoint = injectionPoint;
- }
-
- public static void reset()
- {
- Dog.injectionPoint = null;
- }
-
- public static InjectionPoint getInjectionPoint()
- {
- return injectionPoint;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/FieldInjectionPointConsumer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/FieldInjectionPointConsumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/FieldInjectionPointConsumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-import javax.inject.Inject;
-
-@SessionScoped
-public class FieldInjectionPointConsumer implements Serializable
-{
-
- @Inject Dog dogField;
-
- public void ping() {}
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/MethodInjectionPointConsumer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/MethodInjectionPointConsumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/MethodInjectionPointConsumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-import javax.inject.Inject;
-
-@SessionScoped
-public class MethodInjectionPointConsumer implements Serializable
-{
-
- @Inject
- public void setDog(Dog dog) {}
-
- public void ping() {}
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Produced.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Produced.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/builtinBeans/Produced.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.builtinBeans;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-@Retention(RUNTIME)
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@interface Produced
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ApplicationScopedObject.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ApplicationScopedObject.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ApplicationScopedObject.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.contexts;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.enterprise.context.ApplicationScoped;
-
-@ApplicationScoped
-public class ApplicationScopedObject
-{
- private AtomicInteger counter = new AtomicInteger();
-
- public void increment()
- {
- counter.incrementAndGet();
- }
- public int getValue()
- {
- return counter.get();
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ApplicationScopedTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ApplicationScopedTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ApplicationScopedTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.contexts;
-
-import java.util.concurrent.CountDownLatch;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ApplicationScopedTest extends AbstractWeldTest
-{
-
- @Test
- public void testConcurrentInitilized() throws InterruptedException
- {
- final CountDownLatch latch = new CountDownLatch(10);
- final ApplicationScopedObject applictionScopedObject =
getReference(ApplicationScopedObject.class);
- for (int i = 0; i < 10; i++)
- {
- new Thread(new Runnable()
- {
- public void run()
- {
- try
- {
- applictionScopedObject.increment();
- }
- finally
- {
- latch.countDown();
- }
- }
- }).start();
- }
- latch.await();
- int value = applictionScopedObject.getValue();
- assert value == 10;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ContextTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ContextTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ContextTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,147 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.contexts;
-
-import javax.enterprise.context.ContextNotActiveException;
-import javax.enterprise.context.Conversation;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.Container;
-import org.jboss.weld.context.ContextLifecycle;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ContextTest extends AbstractWeldTest
-{
-
- @Test(description = "WELD-348")
- public void testCallToConversationWithContextNotActive()
- {
- boolean alreadyActive = false;
- try
- {
- alreadyActive =
Container.instance().services().get(ContextLifecycle.class).isConversationActive();
- if (alreadyActive)
- {
-
Container.instance().services().get(ContextLifecycle.class).getConversationContext().setActive(false);
- }
- try
- {
- getReference(Conversation.class).getId();
- assert false;
- }
- catch (ContextNotActiveException e)
- {
- // Expected
- }
- catch (Exception e)
- {
- assert false;
- }
- try
- {
- getReference(Conversation.class).getTimeout();
- assert false;
- }
- catch (ContextNotActiveException e)
- {
- // Expected
- }
- catch (Exception e)
- {
- assert false;
- }
- try
- {
- getReference(Conversation.class).begin();
- assert false;
- }
- catch (ContextNotActiveException e)
- {
- // Expected
- }
- catch (Exception e)
- {
- assert false;
- }
- try
- {
- getReference(Conversation.class).begin("foo");
- assert false;
- }
- catch (ContextNotActiveException e)
- {
- // Expected
- }
- catch (Exception e)
- {
- assert false;
- }
- try
- {
- getReference(Conversation.class).end();
- assert false;
- }
- catch (ContextNotActiveException e)
- {
- // Expected
- }
- catch (Exception e)
- {
- assert false;
- }
- try
- {
- getReference(Conversation.class).isTransient();
- assert false;
- }
- catch (ContextNotActiveException e)
- {
- // Expected
- }
- catch (Exception e)
- {
- assert false;
- }
- try
- {
- getReference(Conversation.class).setTimeout(0);
- assert false;
- }
- catch (ContextNotActiveException e)
- {
- // Expected
- }
- catch (Exception e)
- {
- assert false;
- }
- }
- finally
- {
- if (alreadyActive)
- {
-
Container.instance().services().get(ContextLifecycle.class).getConversationContext().setActive(true);
- }
- }
-
- }
-
-
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ParameterizedTypeScoped.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ParameterizedTypeScoped.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ParameterizedTypeScoped.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.contexts;
-
-import java.util.Arrays;
-import java.util.List;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Produces;
-
-public class ParameterizedTypeScoped
-{
-
- @RequestScoped
- @Produces
- public List<String> create()
- {
- return Arrays.asList("iemon", "houjitya");
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ParameterizedTypeScopedTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ParameterizedTypeScopedTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/ParameterizedTypeScopedTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.contexts;
-
-import java.util.List;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ParameterizedTypeScopedTest extends AbstractWeldTest
-{
-
- @Test
- public void testStringList()
- {
- List<String> str = getReference(StringHolder.class).getStrings();
- assert str.size() == 2;
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/PassivatingContextTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/PassivatingContextTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/PassivatingContextTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.contexts;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.context.ConversationScoped;
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.context.SessionScoped;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.metadata.cache.MetaAnnotationStore;
-import org.testng.annotations.Test;
-
-@Artifact
-public class PassivatingContextTest extends org.jboss.weld.test.AbstractWeldTest
-{
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- public void testIsSessionScopePassivating()
- {
- assert
getCurrentManager().getServices().get(MetaAnnotationStore.class).getScopeModel(SessionScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- public void testIsConversationScopePassivating()
- {
- assert
getCurrentManager().getServices().get(MetaAnnotationStore.class).getScopeModel(ConversationScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- public void testIsApplicationScopeNonPassivating()
- {
- assert
!getCurrentManager().getServices().get(MetaAnnotationStore.class).getScopeModel(ApplicationScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- public void testIsRequestScopeNonPassivating()
- {
- assert
!getCurrentManager().getServices().get(MetaAnnotationStore.class).getScopeModel(RequestScoped.class).isPassivating();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/StringHolder.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/StringHolder.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/StringHolder.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.contexts;
-
-import java.util.List;
-
-import javax.inject.Inject;
-
-
-public class StringHolder
-{
-
- @Inject
- private List<String> strings;
-
- public List<String> getStrings()
- {
- return strings;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBean.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.decorators;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public interface SimpleBean
-{
- int echo1(int i);
-
- int echo2(int i);
-
- int echo3(int i);
-
- int echo4(int i);
-
- boolean isInvoked();
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBeanImpl.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBeanImpl.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBeanImpl.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.decorators;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class SimpleBeanImpl implements SimpleBean
-{
-
- private boolean invoked = false;
-
- public int echo1(int i)
- {
- invoked = true;
- return i;
- }
-
- public int echo2(int i)
- {
- invoked = true;
- return i;
- }
-
- public int echo3(int i)
- {
- invoked = true;
- return i;
- }
-
- public int echo4(int i)
- {
- invoked = true;
- return i;
- }
-
- public boolean isInvoked()
- {
- return invoked;
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecorator1.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecorator1.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecorator1.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.decorators;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-@Decorator
-public abstract class SimpleDecorator1 implements SimpleBean
-{
- @Inject @Delegate
- SimpleBean delegate;
-
- public static boolean echo1;
- public static boolean echo3;
-
- public static void reset()
- {
- echo1 = false;
- echo3 = false;
- }
-
- public int echo1(int i)
- {
- echo1 = true;
- return delegate.echo1(i);
- }
-
- public int echo3(int i)
- {
- echo3 = true;
- return delegate.echo3(i);
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecorator2.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecorator2.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecorator2.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.decorators;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-@Decorator
-public abstract class SimpleDecorator2 implements SimpleBean
-{
- @Inject @Delegate
- SimpleBean delegate;
-
- public static boolean echo2;
- public static boolean echo3;
-
- public static void reset()
- {
- echo2 = false;
- echo3 = false;
- }
-
- public int echo2(int i)
- {
- echo2 = true;
- return delegate.echo2(i);
- }
-
- public int echo3(int i)
- {
- echo3 = true;
- return delegate.echo3(i);
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecoratorTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecoratorTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecoratorTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.decorators;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-@Artifact
-(a)BeansXml("beans.xml")
-public class SimpleDecoratorTest extends AbstractWeldTest
-{
- @Test
- public void testSimpleDecorator()
- {
- SimpleBean simpleBean = getReference(SimpleBean.class);
-
- resetDecorators();
- assert simpleBean.echo1(1) == 1;
- assertDecorators(true, false, false);
- assert simpleBean.isInvoked();
-
- resetDecorators();
- assert simpleBean.echo2(2) == 2;
- assertDecorators(false, true, false);
- assert simpleBean.isInvoked();
-
- //Only SimpleDecorator1 gets invoked, although I think SimpleDecorator2 should get
invoked too
- resetDecorators();
- assert simpleBean.echo3(3) == 3;
- assertDecorators(false, false, true);
-
- assert simpleBean.isInvoked();
-
- resetDecorators();
- assert simpleBean.echo4(4) == 4;
- assertDecorators(false, false, false);
-
- assert simpleBean.isInvoked();
- }
-
- private void resetDecorators()
- {
- SimpleDecorator1.reset();
- SimpleDecorator2.reset();
- }
-
- private void assertDecorators(boolean echo1, boolean echo2, boolean echo3)
- {
- assert SimpleDecorator1.echo1 == echo1;
- assert SimpleDecorator1.echo3 == echo3;
- assert SimpleDecorator2.echo2 == echo2;
- assert SimpleDecorator2.echo3 == echo3;
- }
-}
-
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/AbstractDecoratorTestHelper.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/AbstractDecoratorTestHelper.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/AbstractDecoratorTestHelper.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-public class AbstractDecoratorTestHelper
-{
- static void resetAll()
- {
- WindowImpl.drawn = false;
- WindowImpl.moved = false;
- FrameWithFieldInjectedDelegate.drawn = false;
- FrameWithFieldInjectedDelegateAndAbstractMethod.moved = false;
- FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.moved = false;
- FrameWithConstructorInjectedDelegate.drawn = false;
- FrameWithConstructorInjectedDelegateAndAbstractMethod.moved = false;
- FrameWithInitializerMethodInjectedDelegate.drawn = false;
- FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.moved = false;
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegate.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegate.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegate.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Decorator
-public abstract class FrameWithConstructorInjectedDelegate implements Window
-{
-
- static boolean drawn;
-
- Window window;
-
- @Inject
- FrameWithConstructorInjectedDelegate(@Delegate Window window)
- {
- this.window = window;
- }
-
- public void draw()
- {
- drawn = true;
- window.draw();
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegateAndAbstractMethod.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegateAndAbstractMethod.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithConstructorInjectedDelegateAndAbstractMethod.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Decorator
-public abstract class FrameWithConstructorInjectedDelegateAndAbstractMethod implements
Window
-{
-
- Window window;
-
- static boolean moved = false;
-
- @Inject
- FrameWithConstructorInjectedDelegateAndAbstractMethod(@Delegate Window window)
- {
- this.window = window;
- }
-
- public abstract void draw();
-
- public void move()
- {
- moved = true;
- draw();
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegate.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegate.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegate.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Decorator
-public abstract class FrameWithFieldInjectedDelegate implements Window
-{
-
- static boolean drawn;
-
- @Inject @Delegate
- Window window;
-
- public void draw()
- {
- drawn = true;
- window.draw();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndAbstractMethod.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndAbstractMethod.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndAbstractMethod.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Decorator
-public abstract class FrameWithFieldInjectedDelegateAndAbstractMethod implements Window
-{
-
- static boolean moved;
-
- @Inject @Delegate
- Window window;
-
- public abstract void draw();
-
- public void move()
- {
- moved = true;
- window.move();
- }
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Decorator
-public abstract class FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod
implements Window
-{
-
- static boolean moved;
-
- @Inject @Delegate
- Window window;
-
- public abstract void draw();
-
- public void move()
- {
- moved = true;
- draw();
- }
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegate.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegate.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegate.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Decorator
-public abstract class FrameWithInitializerMethodInjectedDelegate implements Window
-{
-
- static boolean drawn;
-
- private Window window;
-
- @Inject
- void initWindow(@Delegate Window window){
- this.window = window;
- }
-
- public void draw() {
- drawn = true;
- window.draw();
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Decorator
-public abstract class FrameWithInitializerMethodInjectedDelegateAndAbstractMethod
implements Window
-{
-
- static boolean moved;
-
- private Window window;
-
- @Inject
- void initWindow(@Delegate Window window)
- {
- this.window = window;
- }
-
- public abstract void draw();
-
- public void move()
- {
- moved = true;
- window.move();
- }
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import static
org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Artifact
-(a)BeansXml("beans-simple.xml")
-public class SimpleAbstractDecoratorTest extends AbstractWeldTest
-{
- @Test
- public void testAbstractDecoratorApplied()
- {
-
- resetAll();
-
- Window window = getReference(WindowImpl.class);
- window.draw();
- assert WindowImpl.drawn;
- assert FrameWithFieldInjectedDelegate.drawn;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import static
org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Artifact
-(a)BeansXml("beans-withAbstractMethodAndInitializerMethod.xml")
-public class SimpleAbstractDecoratorWithAbstractMethodAndInitializerMethodTest extends
AbstractWeldTest
-{
- @Test
- public void testAbstractDecoratorApplied()
- {
-
- Window window = getReference(WindowImpl.class);
-
- resetAll();
- window.draw();
- assert WindowImpl.drawn;
- assert FrameWithFieldInjectedDelegate.drawn;
- assert !FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.moved;
-
- resetAll();
- window.move();
- assert WindowImpl.moved;
- assert !FrameWithFieldInjectedDelegate.drawn;
- assert FrameWithInitializerMethodInjectedDelegateAndAbstractMethod.moved;
-
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithAbstractMethodTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import static
org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Artifact
-(a)BeansXml("beans-withAbstractMethod.xml")
-public class SimpleAbstractDecoratorWithAbstractMethodTest extends AbstractWeldTest
-{
- @Test
- public void testAbstractDecoratorApplied()
- {
-
- Window window = getReference(WindowImpl.class);
-
- resetAll();
- window.draw();
- assert WindowImpl.drawn;
- assert FrameWithFieldInjectedDelegate.drawn;
- assert !FrameWithFieldInjectedDelegateAndAbstractMethod.moved;
-
- resetAll();
- window.move();
- assert WindowImpl.moved;
- assert !FrameWithFieldInjectedDelegate.drawn;
- assert FrameWithFieldInjectedDelegateAndAbstractMethod.moved;
-
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithCallToItselfTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithCallToItselfTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithCallToItselfTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import static
org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Artifact
-(a)BeansXml("beans-withCallToItself.xml")
-public class SimpleAbstractDecoratorWithCallToItselfTest extends AbstractWeldTest
-{
- @Test
- public void testAbstractDecoratorApplied()
- {
-
- Window window = getReference(WindowImpl.class);
-
- resetAll();
- window.move();
- assert WindowImpl.drawn;
- assert FrameWithFieldInjectedDelegate.drawn;
- assert FrameWithFieldInjectedDelegateAndSelfInvokedAbstractMethod.moved;
-
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithConstructorTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithConstructorTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithConstructorTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import static
org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.*;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Artifact
-(a)BeansXml("beans-withConstructor.xml")
-public class SimpleAbstractDecoratorWithConstructorTest extends AbstractWeldTest
-{
- @Test
- public void testAbstractDecoratorApplied()
- {
-
- resetAll();
-
- Window window = getReference(WindowImpl.class);
- window.draw();
- assert WindowImpl.drawn;
- assert FrameWithConstructorInjectedDelegate.drawn;
-
- resetAll();
- window.move();
- assert !WindowImpl.moved;
- assert WindowImpl.drawn;
- assert FrameWithConstructorInjectedDelegate.drawn;
- assert FrameWithConstructorInjectedDelegateAndAbstractMethod.moved;
-
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithInitializerMethodTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithInitializerMethodTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/SimpleAbstractDecoratorWithInitializerMethodTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-import static
org.jboss.weld.tests.decorators.abstractDecorator.AbstractDecoratorTestHelper.resetAll;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
- */
-@Artifact
-(a)BeansXml("beans-withInitializerMethod.xml")
-public class SimpleAbstractDecoratorWithInitializerMethodTest extends AbstractWeldTest
-{
- @Test
- public void testAbstractDecoratorApplied()
- {
-
- resetAll();
-
- Window window = getReference(WindowImpl.class);
- window.draw();
- assert WindowImpl.drawn;
- assert FrameWithInitializerMethodInjectedDelegate.drawn;
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/Window.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/Window.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/Window.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-/**
- * @author Marius Bogoevici
- */
-public interface Window
-{
- void draw();
-
- void move();
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/WindowImpl.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/WindowImpl.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/abstractDecorator/WindowImpl.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.decorators.abstractDecorator;
-
-/**
- *
- * @author Marius Bogoevici
- */
-public class WindowImpl implements Window
-{
- static boolean drawn;
-
- static boolean moved;
-
- public void draw()
- {
- drawn = true;
- }
-
- public void move()
- {
- moved = true;
- }
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/Decorated.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/Decorated.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/Decorated.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,26 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.generic;
-
-/**
- * @author Marius Bogoevici
- */
-public interface Decorated<T>
-{
- T decoratedEcho(T parameter);
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/GenericBean.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/GenericBean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/GenericBean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.generic;
-
-/**
- * @author Marius Bogoevici
- */
-public class GenericBean<T> implements Decorated<T>, NotDecorated<T>
-{
- static boolean decoratedInvoked;
- static boolean notDecoratedInvoked;
-
- public T notDecoratedEcho(T parameter)
- {
- notDecoratedInvoked = true;
- return parameter;
- }
-
- public T decoratedEcho(T parameter)
- {
- decoratedInvoked = true;
- return parameter;
- }
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/NotDecorated.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/NotDecorated.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/NotDecorated.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,26 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.generic;
-
-/**
- * @author Marius Bogoevici
- */
-public interface NotDecorated<T>
-{
- T notDecoratedEcho(T parameter);
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/PartialDecorator.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/PartialDecorator.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/PartialDecorator.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.generic;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author Marius Bogoevici
- */
-@Decorator
-public class PartialDecorator<T> implements Decorated<T>
-{
-
- @Inject @Delegate GenericBean<T> delegate;
-
- static boolean decoratedInvoked = false;
-
- static boolean notDecoratedInvoked = false;
-
- public T decoratedEcho(T parameter)
- {
- decoratedInvoked = true;
- return delegate.decoratedEcho(parameter);
- }
-
- /**
- * Should not be invoked
- */
- public T notDecoratedEcho(T parameter)
- {
- notDecoratedInvoked = true;
- return delegate.notDecoratedEcho(parameter);
- }
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/PartialDecoratorTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/PartialDecoratorTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/PartialDecoratorTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.generic;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Marius Bogoevici
- */
-@Artifact
-(a)BeansXml("beans.xml")
-public class PartialDecoratorTest extends AbstractWeldTest
-{
-
- @Test
- public void testDecoratorDoesNotDecorateOutsideDecoratedTypes()
- {
- TestBean testBean = getReference(TestBean.class);
- testBean.invoke();
-
- assert PartialDecorator.decoratedInvoked;
- assert !PartialDecorator.notDecoratedInvoked;
- assert StringPartialDecorator.invoked;
- assert GenericBean.decoratedInvoked;
- assert GenericBean.notDecoratedInvoked;
- }
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/StringPartialDecorator.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/StringPartialDecorator.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/StringPartialDecorator.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.generic;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-/**
- * @author Marius Bogoevici
- */
-@Decorator
-public class StringPartialDecorator implements Decorated<String>
-{
- @Inject
- @Delegate
- GenericBean<String> delegate;
-
- static boolean invoked = false;
-
- public String decoratedEcho(String parameter)
- {
- invoked = true;
- return delegate.decoratedEcho(parameter);
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/TestBean.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/TestBean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/generic/TestBean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.decorators.generic;
-
-import javax.enterprise.context.Dependent;
-import javax.inject.Inject;
-
-/**
- * @author Marius Bogoevici
- */
-public class TestBean
-{
- @Inject @Dependent GenericBean<String> genericBean;
-
- public void invoke()
- {
- genericBean.decoratedEcho("hello");
- genericBean.notDecoratedEcho("hello");
- }
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/AbstractDAO.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/AbstractDAO.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/AbstractDAO.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,25 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-public interface AbstractDAO<E>
-{
- public boolean save(E entity);
-
- public boolean isSaved();
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/AbstractDAOImpl.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/AbstractDAOImpl.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/AbstractDAOImpl.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-
-public abstract class AbstractDAOImpl<E>
-{
-
- private boolean saved;
-
- public boolean save(E entity)
- {
- this.saved = true;
- return true;
- }
-
- public boolean isSaved()
- {
- return saved;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Animal.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Animal.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Animal.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-public interface Animal
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Bird.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Bird.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Bird.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Remote;
-
-@Remote
-public interface Bird
-{
-
- public void observe(Feed feed);
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/BowlerHatException.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/BowlerHatException.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/BowlerHatException.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-public class BowlerHatException extends RuntimeException
-{
-
- public BowlerHatException()
- {
- super();
- }
-
- public BowlerHatException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public BowlerHatException(String message)
- {
- super(message);
- }
-
- public BowlerHatException(Throwable cause)
- {
- super(cause);
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Capercaillie.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Capercaillie.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Capercaillie.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Stateful;
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.event.Observes;
-
-@Stateful
-@RequestScoped
-public class Capercaillie implements Scottish, Bird
-{
-
- private Feed feed;
-
- public void observe(@Observes Feed feed)
- {
- this.feed = feed;
- }
-
- public Feed getFeed()
- {
- return feed;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Castle.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Castle.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Castle.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class Castle
-{
-
- private boolean pinged;
-
- public boolean isPinged()
- {
- return pinged;
- }
-
- public void ping()
- {
- this.pinged = true;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Cat.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Cat.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Cat.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Stateful;
-
-/**
- * @author pmuir
- *
- */
-@Stateful
-public class Cat implements CatLocal
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/CatLocal.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/CatLocal.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/CatLocal.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Local;
-
-/**
- * @author pmuir
- *
- */
-@Local
-public interface CatLocal
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/DAO.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/DAO.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/DAO.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target({FIELD, METHOD, TYPE, PARAMETER})
-public @interface DAO
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Dog.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Dog.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Dog.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,25 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Local;
-
-@Local
-public interface Dog extends Animal
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/DogBean.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/DogBean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/DogBean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,26 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Stateless;
-
-
-@Stateless
-public class DogBean implements Dog
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EjbDescriptorLookupTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EjbDescriptorLookupTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EjbDescriptorLookupTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.InjectionTarget;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.weld.bean.SessionBean;
-import org.jboss.weld.ejb.InternalEjbDescriptor;
-import org.jboss.weld.ejb.spi.EjbDescriptor;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author pmuir
- *
- */
-@Artifact
-(a)Packaging(PackagingType.EAR)
-public class EjbDescriptorLookupTest extends AbstractWeldTest
-{
-
- @Test
- public void testCorrectSubType()
- {
- EjbDescriptor<CatLocal> descriptor =
getCurrentManager().getEjbDescriptor("Cat");
- assert descriptor.getClass().equals(InternalEjbDescriptor.class);
- Bean<CatLocal> bean = getCurrentManager().getBean(descriptor);
- assert bean != null;
- assert bean instanceof SessionBean;
- assert bean.getBeanClass().equals(Cat.class);
- InjectionTarget<CatLocal> it =
getCurrentManager().createInjectionTarget(descriptor);
- assert it != null;
- assert it.getInjectionPoints().equals(bean.getInjectionPoints());
- assert it.produce(getCurrentManager().createCreationalContext(bean)) instanceof
CatLocal;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanDefinitionTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanDefinitionTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanDefinitionTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.jboss.weld.test.Utils;
-import org.testng.annotations.Test;
-
-@Artifact
-(a)Packaging(PackagingType.EAR)
-public class EnterpriseBeanDefinitionTest extends AbstractWeldTest
-{
-
- @Test(description="WELD-305")
- public void testSuperInterfacesAreBeanTypes()
- {
- Bean<?> bean = getBean(Dog.class);
- assert Utils.typeSetMatches(bean.getTypes(), Object.class, Dog.class,
Animal.class);
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,111 +0,0 @@
-/*
-
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.EJBException;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.testharness.impl.packaging.ear.EjbJarXml;
-import org.jboss.weld.bean.SessionBean;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.jboss.weld.test.Utils;
-import org.testng.annotations.Test;
-
-@Artifact
-@IntegrationTest
-(a)Packaging(PackagingType.EAR)
-(a)EjbJarXml("ejb-jar.xml")
-public class EnterpriseBeanTest extends AbstractWeldTest
-{
-
- @Test(description="WBRI-179")
- public void testSFSBWithOnlyRemoteInterfacesDeploys()
- {
-
- }
-
- @Test(description="WELD-326")
- public void testInvocationExceptionIsUnwrapped()
- {
- try
- {
- getReference(Fedora.class).causeRuntimeException();
- }
- catch (Throwable t)
- {
- if (t instanceof EJBException && t.getCause() instanceof
BowlerHatException)
- {
- return;
- }
- }
- assert false : "Expected a BowlerHatException to be thrown";
- }
-
- @Test(description="WBRI-275")
- public void testSLSBBusinessMethodThrowsRuntimeException()
- {
- try
- {
- getReference(Fedora.class).causeRuntimeException();
- }
- catch (Throwable t)
- {
- if (Utils.isExceptionInHierarchy(t, BowlerHatException.class))
- {
- return;
- }
- }
- assert false : "Expected a BowlerHatException to be in the cause stack";
- }
-
- @Test(description="WELD-364", groups = "broken")
- public void testEJBRemoteInterfacesOkForObservers()
- {
- Feed feed = new Feed();
- getCurrentManager().fireEvent(feed);
- assert getReference(Scottish.class).getFeed().equals(feed);
- }
-
- @Test(description = "WELD-381")
- public void testGenericEJBWorks()
- {
- assert
getReference(ResultClient.class).lookupPete().getUsername().equals("pete");
- }
-
- @Test(description = "WELD-80", groups = "broken")
- public void testPassivationOfEjbs()
- {
- HelloAction action = getReference(HelloAction.class);
- action.executeRequest();
- assert action.getHello().equals("hello");
- assert action.getGoodBye().equals("goodbye");
- }
-
- @Test(description = "Simple test for no-interface views",
groups="broken")
- public void testNoInterfaceView()
- {
- Castle castle = getReference(Castle.class);
- castle.ping();
- assert castle.isPinged();
- assert getBean(Castle.class) instanceof SessionBean<?>;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Fedora.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Fedora.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Fedora.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Local;
-
-@Local
-public interface Fedora
-{
-
- public void causeRuntimeException();
-
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/FedoraImpl.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/FedoraImpl.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/FedoraImpl.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class FedoraImpl implements Fedora
-{
-
- public void causeRuntimeException()
- {
- throw new BowlerHatException();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Feed.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Feed.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Feed.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-public class Feed
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Hat.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Hat.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Hat.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,25 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Stateful;
-
-@Stateful
-public class Hat implements HatRemote
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HatRemote.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HatRemote.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HatRemote.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,25 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Remote;
-
-@Remote
-public interface HatRemote
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HelloAction.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HelloAction.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HelloAction.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.inject.Inject;
-
-public class HelloAction
-{
-
- public static long sleepDuration = 1000 * 2;
-
- @Inject
- private IHelloBean helloBean;
-
- private String hello;
- private String goodBye;
-
- public void executeRequest()
- {
- hello = helloBean.sayHello();
- try
- {
- Thread.sleep(sleepDuration);
- }
- catch (InterruptedException e)
- {
- System.out.println("Caught Interruption.");
- }
- goodBye = helloBean.sayGoodbye();
- }
-
- public String getHello()
- {
- return hello;
- }
-
- public String getGoodBye()
- {
- return goodBye;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HelloBean.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HelloBean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/HelloBean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.annotation.Resource;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.inject.spi.BeanManager;
-
-import org.jboss.ejb3.annotation.CacheConfig;
-
-@Stateful
-@SessionScoped
-@CacheConfig(idleTimeoutSeconds=1)
-public class HelloBean implements IHelloBean
-{
- @Resource(mappedName = "java:comp/BeanManager")
- private BeanManager beanManager;
-
- public String sayHello()
- {
- return "hello";
- }
-
- public String sayGoodbye()
- {
- return beanManager.getELResolver() != null ? "goodbye" :
"error";
- }
-
- @Remove
- public void remove()
- {
- }
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/IHelloBean.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/IHelloBean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/IHelloBean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Local;
-
-@Local
-public interface IHelloBean
-{
-
- public abstract String sayHello();
-
- public abstract String sayGoodbye();
-
- public abstract void remove();
-
-}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Result.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Result.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Result.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-public class Result
-{
-
- private final String username;
-
- public Result(String username)
- {
- this.username = username;
- }
-
- public String getUsername()
- {
- return username;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultClient.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultClient.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultClient.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.inject.Inject;
-
-public class ResultClient
-{
-
- @Inject @DAO ResultDAO result;
-
- public Result lookupPete()
- {
- return result.findByUser("pete");
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultDAO.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultDAO.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultDAO.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Local;
-
-@Local
-public interface ResultDAO extends AbstractDAO<Result>
-{
-
- public Result findByUser(String username);
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultDAOImpl.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultDAOImpl.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/ResultDAOImpl.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Stateless;
-
-@DAO
-@Stateless
-public class ResultDAOImpl extends AbstractDAOImpl<Result> implements ResultDAO
-{
- public Result findByUser(String username)
- {
- return new Result(username);
- }
-}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Scottish.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Scottish.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/Scottish.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.enterprise;
-
-import javax.ejb.Local;
-
-@Local
-public interface Scottish
-{
-
- public Feed getFeed();
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Bar.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Bar.java 2010-07-28 22:23:21
UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Bar.java 2010-07-28 23:44:31
UTC (rev 6833)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.event;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.event.Event;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.util.AnnotationLiteral;
-import javax.inject.Inject;
-
-@RequestScoped
-public class Bar
-{
-
- @Inject Event<String> event;
-
- @Inject @Updated Event<String> updatedEvent;
-
- @Inject BeanManager manager;
-
- private boolean unqualifiedObserved;
- private boolean updatedObserved;
-
- public void fireWithNoQualifiers()
- {
- event.fire("");
- }
-
- public void fireWithUpdatedQualifierViaSelect()
- {
- event.select(new AnnotationLiteral<Updated>() {}).fire("");
- }
-
- public void fireWithNoQualifiersViaManager()
- {
- manager.fireEvent("");
- }
-
- public void fireWithUpdatedQualifierViaManager()
- {
- manager.fireEvent("", new AnnotationLiteral<Updated>() {});
- }
-
- public void fireWithUpdatedQualifierViaAnnotation()
- {
- updatedEvent.fire("");
- }
-
- public void reset()
- {
- unqualifiedObserved = false;
- updatedObserved = false;
- }
-
- public void onEvent(@Observes String event)
- {
- unqualifiedObserved = true;
- }
-
- private void onUpdatedEvent(@Observes @Updated String event)
- {
- updatedObserved = true;
- }
-
- public boolean isUnqualifiedObserved()
- {
- return unqualifiedObserved;
- }
-
- public boolean isUpdatedObserved()
- {
- return updatedObserved;
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/EventQualifierTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/EventQualifierTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/EventQualifierTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.event;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class EventQualifierTest extends AbstractWeldTest
-{
-
- @Test(description="WELD-226")
- public void testDefaultQualifierNotRequired()
- {
- Bar bar = getReference(Bar.class);
- bar.fireWithNoQualifiers();
- assert bar.isUnqualifiedObserved();
- assert !bar.isUpdatedObserved();
- bar.reset();
- bar.fireWithNoQualifiersViaManager();
- assert bar.isUnqualifiedObserved();
- assert !bar.isUpdatedObserved();
- bar.reset();
- bar.fireWithUpdatedQualifierViaAnnotation();
- assert bar.isUnqualifiedObserved();
- assert bar.isUpdatedObserved();
- bar.reset();
- bar.fireWithUpdatedQualifierViaManager();
- assert bar.isUpdatedObserved();
- assert bar.isUnqualifiedObserved();
- bar.reset();
- bar.fireWithUpdatedQualifierViaSelect();
- assert bar.isUnqualifiedObserved();
- assert bar.isUpdatedObserved();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Foo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Foo.java 2010-07-28 22:23:21
UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Foo.java 2010-07-28 23:44:31
UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.event;
-
-public class Foo
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/event/NormalScopedBean.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/NormalScopedBean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/NormalScopedBean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.event;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.Any;
-
-@SessionScoped
-public class NormalScopedBean implements Serializable
-{
-
- @Any Event<Foo> event;
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/event/SimpleEventTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/SimpleEventTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/event/SimpleEventTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,152 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.event;
-
-import javax.enterprise.event.Event;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Any;
-import javax.enterprise.util.AnnotationLiteral;
-import javax.inject.Inject;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.manager.BeanManagerImpl;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class SimpleEventTest extends AbstractWeldTest
-{
- private static boolean RECEIVE_1_OBSERVED;
- private static boolean RECEIVE_2_OBSERVED;
- private static boolean RECEIVE_3_OBSERVED;
-
- private static void initFlags() {
- RECEIVE_1_OBSERVED = false;
- RECEIVE_2_OBSERVED = false;
- RECEIVE_3_OBSERVED = false;
- }
-
- @Test
- public void testFireEventOnManager()
- {
- BeanManagerImpl manager = getCurrentManager();
-
- initFlags();
-
- manager.fireEvent("Fired using Manager Interface with
AnnotationLiteral.", new AnnotationLiteral<Updated>(){});
-
- assert RECEIVE_1_OBSERVED == true;
- assert RECEIVE_2_OBSERVED == true;
- assert RECEIVE_3_OBSERVED == true;
-
- initFlags();
-
- manager.fireEvent("Fired using Manager Interface.");
-
- assert RECEIVE_1_OBSERVED == false; // not called
- assert RECEIVE_2_OBSERVED == true;
- assert RECEIVE_3_OBSERVED == true;
- }
-
- @Test
- public void testFireEventOnEvent()
- {
- App app = getReference(App.class);
-
- initFlags();
-
- app.fireEventByBindingDeclaredAtInjectionPoint();
-
- assert RECEIVE_1_OBSERVED == true;
- assert RECEIVE_2_OBSERVED == true;
- assert RECEIVE_3_OBSERVED == true;
-
- initFlags();
-
- app.fireEventByAnnotationLiteral();
-
- assert RECEIVE_1_OBSERVED == true;
- assert RECEIVE_2_OBSERVED == true;
- assert RECEIVE_3_OBSERVED == true;
-
- initFlags();
-
- app.fireEventViaAny();
-
- assert RECEIVE_2_OBSERVED == true;
- assert RECEIVE_1_OBSERVED == false; // not called
- assert RECEIVE_3_OBSERVED == true;
-
- initFlags();
-
- app.fireEventViaWithNoQualifier();
-
- assert RECEIVE_1_OBSERVED == false; // not called
- assert RECEIVE_2_OBSERVED == true;
- assert RECEIVE_3_OBSERVED == true;
- }
-
- public static class App
- {
- @Inject @Any
- Event<String> event1;
-
- @Inject @Updated
- Event<String> event2;
-
- @Inject
- Event<String> event4;
-
- public void fireEventByAnnotationLiteral()
- {
- event1.select(new AnnotationLiteral<Updated>(){}).fire("Fired using
Event Interface with AnnotationLiteral.");
- }
-
- public void fireEventByBindingDeclaredAtInjectionPoint()
- {
- event2.fire("Fired using Event Interface with Binding Declared.");
- }
-
- public void fireEventViaAny()
- {
- event1.fire("Fired using Event Interface");
- }
-
- public void fireEventViaWithNoQualifier()
- {
- event4.fire("Fired using Event Interface with no qualifier");
- }
- }
-
- public static class Receiver
- {
- public void receive1(@Observes @Updated String s)
- {
- RECEIVE_1_OBSERVED = true;
- }
-
- public void receive2(@Any @Observes String s)
- {
- RECEIVE_2_OBSERVED = true;
- }
-
- public void receive3(@Observes String s)
- {
- RECEIVE_3_OBSERVED = true;
- }
- }
-}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Updated.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Updated.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/event/Updated.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.event;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-@Retention(RUNTIME)
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@interface Updated
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Capercaillie.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Capercaillie.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Capercaillie.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-public class Capercaillie
-{
-
- public Capercaillie(String name)
- {
- // TODO Auto-generated constructor stub
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Cow.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Cow.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Cow.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,25 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class Cow implements CowLocal
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/CowLocal.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/CowLocal.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/CowLocal.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,25 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import javax.ejb.Local;
-
-@Local
-public interface CowLocal
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/ExtensionObserver.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/ExtensionObserver.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/ExtensionObserver.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,295 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.AfterDeploymentValidation;
-import javax.enterprise.inject.spi.BeforeBeanDiscovery;
-import javax.enterprise.inject.spi.Extension;
-import javax.enterprise.inject.spi.ProcessAnnotatedType;
-import javax.enterprise.inject.spi.ProcessBean;
-import javax.enterprise.inject.spi.ProcessInjectionTarget;
-import javax.enterprise.inject.spi.ProcessManagedBean;
-import javax.enterprise.inject.spi.ProcessObserverMethod;
-import javax.enterprise.inject.spi.ProcessProducer;
-import javax.enterprise.inject.spi.ProcessProducerField;
-import javax.enterprise.inject.spi.ProcessProducerMethod;
-import javax.enterprise.inject.spi.ProcessSessionBean;
-
-public class ExtensionObserver implements Extension
-{
-
- private boolean allBeforeBeanDiscovery;
- private boolean allAfterBeanDiscovery;
- private boolean allAfterDeploymentValidation;
- private boolean allProcessBean;
- private boolean allProcessInjectionTarget;
- private boolean allProcessManagedBean;
- private boolean allProcessObserverMethod;
- private boolean allProcessProducer;
- private boolean allProcessProducerField;
- private boolean allProcessProducerMethod;
- private boolean allProcessSessionBean;
- private boolean allProcessAnnnotatedType;
-
- private boolean beforeBeanDiscovery;
- private boolean afterBeanDiscovery;
- private boolean afterDeploymentValidation;
- private boolean processBean;
- private boolean processInjectionTarget;
- private boolean processManagedBean;
- private boolean processObserverMethod;
- private boolean processProducer;
- private boolean processProducerField;
- private boolean processProducerMethod;
- private boolean processSessionBean;
- private boolean processAnnotatedType;
-
- public void observeAll(@Observes Object event)
- {
- if (event instanceof BeforeBeanDiscovery)
- {
- allBeforeBeanDiscovery = true;
- }
- if (event instanceof AfterBeanDiscovery)
- {
- allAfterBeanDiscovery = true;
- }
- if (event instanceof AfterDeploymentValidation)
- {
- allAfterDeploymentValidation = true;
- }
- if (event instanceof ProcessBean<?> && !(event instanceof
ProcessProducerField<?, ?> || event instanceof ProcessProducerMethod<?, ?> ||
event instanceof ProcessManagedBean<?> || event instanceof
ProcessSessionBean<?>))
- {
- allProcessBean = true;
- }
- if (event instanceof ProcessInjectionTarget<?>)
- {
- allProcessInjectionTarget = true;
- }
- if (event instanceof ProcessManagedBean<?>)
- {
- allProcessManagedBean = true;
- }
- if (event instanceof ProcessObserverMethod<?, ?>)
- {
- allProcessObserverMethod = true;
- }
- if (event instanceof ProcessProducer<?, ?>)
- {
- allProcessProducer = true;
- }
- if (event instanceof ProcessProducerField<?, ?>)
- {
- allProcessProducerField = true;
- }
- if (event instanceof ProcessProducerMethod<?, ?>)
- {
- allProcessProducerMethod = true;
- }
- if (event instanceof ProcessSessionBean<?>)
- {
- allProcessSessionBean = true;
- }
- if (event instanceof ProcessAnnotatedType<?>)
- {
- allProcessAnnnotatedType = true;
- }
- }
-
- public void observeBeforeBeanDiscovery(@Observes BeforeBeanDiscovery event)
- {
- beforeBeanDiscovery = true;
- }
-
- public void observeAfterBeanDiscovery(@Observes AfterBeanDiscovery event)
- {
- afterBeanDiscovery = true;
- }
-
- public void observeAfterDeploymentValidation(@Observes AfterDeploymentValidation
event)
- {
- afterDeploymentValidation = true;
- }
-
- public void observeProcessBean(@Observes ProcessBean<?> event)
- {
- processBean = true;
- }
-
- public void observeProcessInjectionTarget(@Observes ProcessInjectionTarget<?>
event)
- {
- processInjectionTarget = true;
- }
-
- public void observeProcessProducer(@Observes ProcessProducer<?, ?> event)
- {
- processProducer = true;
- }
-
- public void observeProcessProducerMethod(@Observes ProcessProducerMethod<?, ?>
event)
- {
- processProducerMethod = true;
- }
-
- public void observeProcessProducerField(@Observes ProcessProducerField<?, ?>
event)
- {
- processProducerField = true;
- }
-
- public void observeProcessObserverMethod(@Observes ProcessObserverMethod<?, ?>
event)
- {
- processObserverMethod = true;
- }
-
- public void observeProcessManagedBean(@Observes ProcessManagedBean<?> event)
- {
- processManagedBean = true;
- }
-
- public void observeProcessSessionBean(@Observes ProcessSessionBean<?> event)
- {
- processSessionBean = true;
- }
-
- public void observeProcessAnnotatedType(@Observes ProcessAnnotatedType<?>
event)
- {
- processAnnotatedType = true;
- }
-
- public boolean isAllBeforeBeanDiscovery()
- {
- return allBeforeBeanDiscovery;
- }
-
- public boolean isAllAfterBeanDiscovery()
- {
- return allAfterBeanDiscovery;
- }
-
- public boolean isAllAfterDeploymentValidation()
- {
- return allAfterDeploymentValidation;
- }
-
- public boolean isAllProcessBean()
- {
- return allProcessBean;
- }
-
- public boolean isAllProcessInjectionTarget()
- {
- return allProcessInjectionTarget;
- }
-
- public boolean isAllProcessManagedBean()
- {
- return allProcessManagedBean;
- }
-
- public boolean isAllProcessObserverMethod()
- {
- return allProcessObserverMethod;
- }
-
- public boolean isAllProcessProducer()
- {
- return allProcessProducer;
- }
-
- public boolean isAllProcessProducerField()
- {
- return allProcessProducerField;
- }
-
- public boolean isAllProcessProducerMethod()
- {
- return allProcessProducerMethod;
- }
-
- public boolean isAllProcessSessionBean()
- {
- return allProcessSessionBean;
- }
-
- public boolean isAllProcessAnnnotatedType()
- {
- return allProcessAnnnotatedType;
- }
-
- public boolean isBeforeBeanDiscovery()
- {
- return beforeBeanDiscovery;
- }
-
- public boolean isAfterBeanDiscovery()
- {
- return afterBeanDiscovery;
- }
-
- public boolean isAfterDeploymentValidation()
- {
- return afterDeploymentValidation;
- }
-
- public boolean isProcessBean()
- {
- return processBean;
- }
-
- public boolean isProcessInjectionTarget()
- {
- return processInjectionTarget;
- }
-
- public boolean isProcessManagedBean()
- {
- return processManagedBean;
- }
-
- public boolean isProcessObserverMethod()
- {
- return processObserverMethod;
- }
-
- public boolean isProcessProducer()
- {
- return processProducer;
- }
-
- public boolean isProcessProducerField()
- {
- return processProducerField;
- }
-
- public boolean isProcessProducerMethod()
- {
- return processProducerMethod;
- }
-
- public boolean isProcessSessionBean()
- {
- return processSessionBean;
- }
-
- public boolean isProcessAnnotatedType()
- {
- return processAnnotatedType;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.testharness.impl.packaging.jsr299.Extension;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-@IntegrationTest
-(a)Packaging(PackagingType.EAR)
-(a)Extension("javax.enterprise.inject.spi.Extension")
-public class ExtensionTest extends AbstractWeldTest
-{
-
- @Test(description="WELD-234")
- public void testExtensionInjectableAsBean()
- {
- assert getReference(SimpleExtension.class).isObservedBeforeBeanDiscovery();
- }
-
- @Test(description="WELD-243")
- public void testContainerEventsOnlySentToExtensionBeans()
- {
- ExtensionObserver extensionObserver = getReference(ExtensionObserver.class);
- OtherObserver otherObserver = getReference(OtherObserver.class);
-
- assert extensionObserver.isBeforeBeanDiscovery();
- assert extensionObserver.isAllBeforeBeanDiscovery();
- assert !otherObserver.isBeforeBeanDiscovery();
- assert !otherObserver.isAllBeforeBeanDiscovery();
-
- assert extensionObserver.isAfterBeanDiscovery();
- assert extensionObserver.isAllAfterBeanDiscovery();
- assert !otherObserver.isAfterBeanDiscovery();
- assert !otherObserver.isAllAfterBeanDiscovery();
-
- assert extensionObserver.isProcessAnnotatedType();
- assert extensionObserver.isAllProcessAnnnotatedType();
- assert !otherObserver.isProcessAnnotatedType();
- assert !otherObserver.isAllProcessAnnotatedType();
-
- assert extensionObserver.isProcessBean();
- assert extensionObserver.isAllProcessBean();
- assert !otherObserver.isProcessBean();
- assert !otherObserver.isAllProcessBean();
-
- assert extensionObserver.isProcessInjectionTarget();
- assert extensionObserver.isAllProcessInjectionTarget();
- assert !otherObserver.isProcessInjectionTarget();
- assert !otherObserver.isAllProcessInjectionTarget();
-
- assert extensionObserver.isProcessManagedBean();
- assert extensionObserver.isAllProcessManagedBean();
- assert !otherObserver.isProcessManagedBean();
- assert !otherObserver.isAllProcessManagedBean();
-
- assert extensionObserver.isProcessObserverMethod();
- assert extensionObserver.isAllProcessObserverMethod();
- assert !otherObserver.isProcessObserverMethod();
- assert !otherObserver.isAllProcessObserverMethod();
-
- assert extensionObserver.isProcessProducer();
- assert extensionObserver.isAllProcessProducer();
- assert !otherObserver.isProcessProducer();
- assert !otherObserver.isAllProcessProducer();
-
- assert extensionObserver.isProcessProducerField();
- assert extensionObserver.isAllProcessProducerField();
- assert !otherObserver.isProcessProducerField();
- assert !otherObserver.isAllProcessProducerField();
-
- assert extensionObserver.isProcessProducerMethod();
- assert extensionObserver.isAllProcessProducerField();
- assert !otherObserver.isProcessProducerMethod();
- assert !otherObserver.isAllProcessProducerMethod();
-
- assert extensionObserver.isProcessSessionBean();
- assert extensionObserver.isAllProcessSessionBean();
- assert !otherObserver.isProcessSessionBean();
- assert !otherObserver.isAllProcessSessionBean();
-
- assert extensionObserver.isAfterDeploymentValidation();
- assert extensionObserver.isAllAfterDeploymentValidation();
- assert !otherObserver.isAfterDeploymentValidation();
- assert !otherObserver.isAllAfterDeploymentValidation();
-
- }
-
- @Test
- public void testInjectionTargetWrapped()
- {
- getReference(Capercaillie.class);
- assert Woodland.isPostConstructCalled();
- assert WoodlandExtension.isInjectCalled();
- assert WoodlandExtension.isPostConstructCalled();
- assert WoodlandExtension.isPreDestroyCalled();
- assert WoodlandExtension.isProduceCalled();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Foo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Foo.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Foo.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import javax.inject.Inject;
-
-public class Foo
-{
-
- @Inject SimpleExtension simpleExtension;
-
- public SimpleExtension getSimpleExtension()
- {
- return simpleExtension;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Horse.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Horse.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Horse.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-public class Horse
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/OtherObserver.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/OtherObserver.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/OtherObserver.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,296 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.AfterDeploymentValidation;
-import javax.enterprise.inject.spi.BeforeBeanDiscovery;
-import javax.enterprise.inject.spi.ProcessAnnotatedType;
-import javax.enterprise.inject.spi.ProcessBean;
-import javax.enterprise.inject.spi.ProcessInjectionTarget;
-import javax.enterprise.inject.spi.ProcessManagedBean;
-import javax.enterprise.inject.spi.ProcessObserverMethod;
-import javax.enterprise.inject.spi.ProcessProducer;
-import javax.enterprise.inject.spi.ProcessProducerField;
-import javax.enterprise.inject.spi.ProcessProducerMethod;
-import javax.enterprise.inject.spi.ProcessSessionBean;
-
-@ApplicationScoped
-public class OtherObserver
-{
-
- private boolean allBeforeBeanDiscovery;
- private boolean allAfterBeanDiscovery;
- private boolean allAfterDeploymentValidation;
- private boolean allProcessBean;
- private boolean allProcessInjectionTarget;
- private boolean allProcessManagedBean;
- private boolean allProcessObserverMethod;
- private boolean allProcessProducer;
- private boolean allProcessProducerField;
- private boolean allProcessProducerMethod;
- private boolean allProcessSession;
- private boolean allProcessAnnotatedType;
-
- private boolean beforeBeanDiscovery;
- private boolean afterBeanDiscovery;
- private boolean afterDeploymentValidation;
- private boolean processBean;
- private boolean processInjectionTarget;
- private boolean processManagedBean;
- private boolean processObserverMethod;
- private boolean processProducer;
- private boolean processProducerField;
- private boolean processProducerMethod;
- private boolean processSessionBean;
- private boolean processAnnotatedType;
-
- public void observeAll(@Observes Object event)
- {
- if (event instanceof BeforeBeanDiscovery)
- {
- allBeforeBeanDiscovery = true;
- }
- if (event instanceof AfterBeanDiscovery)
- {
- allAfterBeanDiscovery = true;
- }
- if (event instanceof AfterDeploymentValidation)
- {
- allAfterDeploymentValidation = true;
- }
- if (event instanceof ProcessBean<?> && !(event instanceof
ProcessProducerField<?, ?> || event instanceof ProcessProducerMethod<?, ?> ||
event instanceof ProcessManagedBean<?> || event instanceof
ProcessSessionBean<?>))
- {
- allProcessBean = true;
- }
- if (event instanceof ProcessInjectionTarget<?>)
- {
- allProcessInjectionTarget = true;
- }
- if (event instanceof ProcessManagedBean<?>)
- {
- allProcessManagedBean = true;
- }
- if (event instanceof ProcessObserverMethod<?, ?>)
- {
- allProcessObserverMethod = true;
- }
- if (event instanceof ProcessProducer<?, ?>)
- {
- allProcessProducer = true;
- }
- if (event instanceof ProcessProducerField<?, ?>)
- {
- allProcessProducerField = true;
- }
- if (event instanceof ProcessProducerMethod<?, ?>)
- {
- allProcessProducerMethod = true;
- }
- if (event instanceof ProcessSessionBean<?>)
- {
- allProcessSession = true;
- }
- if (event instanceof ProcessAnnotatedType<?>)
- {
- allProcessAnnotatedType = true;
- }
- }
-
- public void observeBeforeBeanDiscovery(@Observes BeforeBeanDiscovery event)
- {
- beforeBeanDiscovery = true;
- }
-
- public void observeAfterBeanDiscovery(@Observes AfterBeanDiscovery event)
- {
- afterBeanDiscovery = true;
- }
-
- public void observeAfterDeploymentValidation(@Observes AfterDeploymentValidation
event)
- {
- afterDeploymentValidation = true;
- }
-
- public void observeProcessBean(@Observes ProcessBean<?> event)
- {
- processBean = true;
- }
-
- public void observeProcessInjectionTarget(@Observes ProcessInjectionTarget<?>
event)
- {
- processInjectionTarget = true;
- }
-
- public void observeProcessProducer(@Observes ProcessProducer<?, ?> event)
- {
- processProducer = true;
- }
-
- public void observeProcessProducerMethod(@Observes ProcessProducerMethod<?, ?>
event)
- {
- processProducerMethod = true;
- }
-
- public void observeProcessProducerField(@Observes ProcessProducerField<?, ?>
event)
- {
- processProducerField = true;
- }
-
- public void observeProcessObserverMethod(@Observes ProcessObserverMethod<?, ?>
event)
- {
- processObserverMethod = true;
- }
-
- public void observeProcessManagedBean(@Observes ProcessManagedBean<?> event)
- {
- processManagedBean = true;
- }
-
- public void observeProcessSessionBean(@Observes ProcessSessionBean<?> event)
- {
- processSessionBean = true;
- }
-
- public void observeProcessAnnotatedType(@Observes ProcessAnnotatedType<?>
event)
- {
- processAnnotatedType = true;
- }
-
- public boolean isAllBeforeBeanDiscovery()
- {
- return allBeforeBeanDiscovery;
- }
-
- public boolean isAllAfterBeanDiscovery()
- {
- return allAfterBeanDiscovery;
- }
-
- public boolean isAllAfterDeploymentValidation()
- {
- return allAfterDeploymentValidation;
- }
-
- public boolean isAllProcessBean()
- {
- return allProcessBean;
- }
-
- public boolean isAllProcessInjectionTarget()
- {
- return allProcessInjectionTarget;
- }
-
- public boolean isAllProcessManagedBean()
- {
- return allProcessManagedBean;
- }
-
- public boolean isAllProcessObserverMethod()
- {
- return allProcessObserverMethod;
- }
-
- public boolean isAllProcessProducer()
- {
- return allProcessProducer;
- }
-
- public boolean isAllProcessProducerField()
- {
- return allProcessProducerField;
- }
-
- public boolean isAllProcessProducerMethod()
- {
- return allProcessProducerMethod;
- }
-
- public boolean isAllProcessSessionBean()
- {
- return allProcessSession;
- }
-
- public boolean isAllProcessAnnotatedType()
- {
- return allProcessAnnotatedType;
- }
-
- public boolean isBeforeBeanDiscovery()
- {
- return beforeBeanDiscovery;
- }
-
- public boolean isAfterBeanDiscovery()
- {
- return afterBeanDiscovery;
- }
-
- public boolean isAfterDeploymentValidation()
- {
- return afterDeploymentValidation;
- }
-
- public boolean isProcessBean()
- {
- return processBean;
- }
-
- public boolean isProcessInjectionTarget()
- {
- return processInjectionTarget;
- }
-
- public boolean isProcessManagedBean()
- {
- return processManagedBean;
- }
-
- public boolean isProcessObserverMethod()
- {
- return processObserverMethod;
- }
-
- public boolean isProcessProducer()
- {
- return processProducer;
- }
-
- public boolean isProcessProducerField()
- {
- return processProducerField;
- }
-
- public boolean isProcessProducerMethod()
- {
- return processProducerMethod;
- }
-
- public boolean isProcessSessionBean()
- {
- return processSessionBean;
- }
-
- public boolean isProcessAnnotatedType()
- {
- return processAnnotatedType;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Rat.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Rat.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Rat.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-public class Rat
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/SimpleExtension.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/SimpleExtension.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/SimpleExtension.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.BeforeBeanDiscovery;
-import javax.enterprise.inject.spi.BeforeShutdown;
-import javax.enterprise.inject.spi.Extension;
-
-
-public class SimpleExtension implements Extension
-{
-
- private static boolean observedBeforeBeanDiscovery;
-
- public void observe(@Observes BeforeBeanDiscovery event)
- {
- observedBeforeBeanDiscovery = true;
- }
-
- public static boolean isObservedBeforeBeanDiscovery()
- {
- return observedBeforeBeanDiscovery;
- }
-
- public void observeBeforeShutdown(@Observes BeforeShutdown beforeShutdown, BeanManager
beanManager)
- {
- assert beanManager != null;
- assert beanManager.getELResolver() != null;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Special.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Special.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Special.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target({FIELD, METHOD, TYPE, PARAMETER})
-public @interface Special
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Stable.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Stable.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Stable.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import javax.enterprise.inject.Produces;
-
-public class Stable
-{
-
- @Produces @Special Rat rat = new Rat();
-
- @Produces @Special Horse produce()
- {
- return new Horse();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Woodland.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Woodland.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/Woodland.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.inject.Produces;
-
-public class Woodland
-{
-
- private static boolean postConstructCalled;
-
- @Produces
- private Capercaillie capercaillie = new Capercaillie("bob");
-
- @PostConstruct
- public void postConstruct()
- {
- postConstructCalled = true;
- }
-
- public static boolean isPostConstructCalled()
- {
- return postConstructCalled;
- }
-
- public static void reset()
- {
- postConstructCalled = false;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/WoodlandExtension.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/WoodlandExtension.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/WoodlandExtension.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,115 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions;
-
-import java.util.Set;
-
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.BeforeShutdown;
-import javax.enterprise.inject.spi.Extension;
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.enterprise.inject.spi.InjectionTarget;
-import javax.enterprise.inject.spi.ProcessInjectionTarget;
-
-public class WoodlandExtension implements Extension
-{
-
- private static boolean injectCalled;
- private static boolean postConstructCalled;
- private static boolean preDestroyCalled;
- private static boolean produceCalled;
-
- public void cleanup(@Observes BeforeShutdown shutdown)
- {
- reset();
- Woodland.reset();
- }
-
- public void enhanceWoodland(final @Observes ProcessInjectionTarget<Woodland>
processWoodland)
- {
- final InjectionTarget<Woodland> it = processWoodland.getInjectionTarget();
- processWoodland.setInjectionTarget(new InjectionTarget<Woodland>()
- {
-
- public void inject(Woodland instance, CreationalContext<Woodland> ctx)
- {
- injectCalled = true;
- it.inject(instance, ctx);
- }
-
- public void postConstruct(Woodland instance)
- {
- postConstructCalled = true;
- it.postConstruct(instance);
- }
-
- public void preDestroy(Woodland instance)
- {
- preDestroyCalled = true;
- it.preDestroy(instance);
- }
-
- public void dispose(Woodland instance)
- {
- // No-op for class bean
-
- }
-
- public Set<InjectionPoint> getInjectionPoints()
- {
- return it.getInjectionPoints();
- }
-
- public Woodland produce(CreationalContext<Woodland> ctx)
- {
- produceCalled = true;
- return it.produce(ctx);
- }
-
- });
- }
-
- public static void reset()
- {
- injectCalled = false;
- postConstructCalled = false;
- preDestroyCalled = false;
- preDestroyCalled = false;
- }
-
- public static boolean isInjectCalled()
- {
- return injectCalled;
- }
-
- public static boolean isPostConstructCalled()
- {
- return postConstructCalled;
- }
-
- public static boolean isPreDestroyCalled()
- {
- return preDestroyCalled;
- }
-
- public static boolean isProduceCalled()
- {
- return produceCalled;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/AnnotatedTypeExtension.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/AnnotatedTypeExtension.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/AnnotatedTypeExtension.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,563 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.AnnotatedCallable;
-import javax.enterprise.inject.spi.AnnotatedConstructor;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.AnnotatedMethod;
-import javax.enterprise.inject.spi.AnnotatedParameter;
-import javax.enterprise.inject.spi.AnnotatedType;
-import javax.enterprise.inject.spi.BeforeBeanDiscovery;
-import javax.enterprise.inject.spi.Extension;
-import javax.enterprise.inject.spi.ProcessAnnotatedType;
-import javax.inject.Inject;
-
-import
org.jboss.weld.tests.extensions.annotatedType.EcoFriendlyWashingMachine.EcoFriendlyWashingMachineLiteral;
-import org.jboss.weld.util.collections.Arrays2;
-
-public class AnnotatedTypeExtension implements Extension
-{
-
- public void addTumbleDryer(@Observes BeforeBeanDiscovery beforeBeanDiscovery)
- {
-
- final Set<AnnotatedConstructor<TumbleDryer>> constructors = new
HashSet<AnnotatedConstructor<TumbleDryer>>();
- final Set<AnnotatedField<? super TumbleDryer>> fields = new
HashSet<AnnotatedField<? super TumbleDryer>>();
- final Set<AnnotatedMethod<? super TumbleDryer>> methods = new
HashSet<AnnotatedMethod<? super TumbleDryer>>();
-
- final AnnotatedType<TumbleDryer> tumbleDryer = new
AnnotatedType<TumbleDryer>()
- {
-
- public Set<AnnotatedConstructor<TumbleDryer>> getConstructors()
- {
- return constructors;
- }
-
- public Set<AnnotatedField<? super TumbleDryer>> getFields()
- {
- return fields;
- }
-
- public Set<AnnotatedMethod<? super TumbleDryer>> getMethods()
- {
- return methods;
- }
-
- // Now the easy stuff
-
- public Class<TumbleDryer> getJavaClass()
- {
- return TumbleDryer.class;
- }
-
- public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
- {
- // Class has no annotations
- return null;
- }
-
- public Set<Annotation> getAnnotations()
- {
- return Collections.emptySet();
- }
-
- public Type getBaseType()
- {
- return TumbleDryer.class;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Arrays2.<Type>asSet(TumbleDryer.class, Object.class);
- }
-
- public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
- {
- // Class has no annotations
- return false;
- }
-
- };
-
- AnnotatedField<TumbleDryer> plug = new AnnotatedField<TumbleDryer>()
- {
-
- public Field getJavaMember()
- {
- try
- {
- return TumbleDryer.class.getDeclaredField("plug");
- }
- catch (NoSuchFieldException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public boolean isStatic()
- {
- return false;
- }
-
- public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
- {
- if (annotationType.equals(Inject.class))
- {
- return annotationType.cast(InjectLiteral.INSTANCE);
- }
- else if (annotationType.equals(Special.class))
- {
- return annotationType.cast(SpecialLiteral.INSTANCE);
- }
- else
- {
- return null;
- }
- }
-
- public Set<Annotation> getAnnotations()
- {
- return Arrays2.asSet(InjectLiteral.INSTANCE, SpecialLiteral.INSTANCE);
- }
-
- public Type getBaseType()
- {
- return Plug.class;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Arrays2.<Type>asSet(Plug.class, Object.class);
- }
-
- public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
- {
- if (annotationType.equals(Inject.class) ||
annotationType.equals(Special.class))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- public AnnotatedType<TumbleDryer> getDeclaringType()
- {
- return tumbleDryer;
- }
- };
- fields.add(plug);
-
-
- final List<AnnotatedParameter<TumbleDryer>> runningTimeParameters = new
ArrayList<AnnotatedParameter<TumbleDryer>>();
- final AnnotatedMethod<TumbleDryer> runningTimeMethod = new
AnnotatedMethod<TumbleDryer>()
- {
-
- public Method getJavaMember()
- {
- try
- {
- return TumbleDryer.class.getDeclaredMethod("setRunningTime",
RunningTime.class);
- }
- catch (NoSuchMethodException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public List<AnnotatedParameter<TumbleDryer>> getParameters()
- {
- return runningTimeParameters;
- }
-
- public AnnotatedType<TumbleDryer> getDeclaringType()
- {
- return tumbleDryer;
- }
-
- public boolean isStatic()
- {
- return false;
- }
-
- public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
- {
- if (annotationType.equals(Inject.class))
- {
- return annotationType.cast(InjectLiteral.INSTANCE);
- }
- else
- {
- return null;
- }
- }
-
- public Set<Annotation> getAnnotations()
- {
- return Collections.<Annotation>singleton(InjectLiteral.INSTANCE);
- }
-
- public Type getBaseType()
- {
- return TumbleDryer.class;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Arrays2.<Type>asSet(TumbleDryer.class, Object.class);
- }
-
- public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
- {
- if (annotationType.equals(Inject.class))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- };
- methods.add(runningTimeMethod);
-
- final AnnotatedParameter<TumbleDryer> runningTimeParameter = new
AnnotatedParameter<TumbleDryer>()
- {
-
- public AnnotatedCallable<TumbleDryer> getDeclaringCallable()
- {
- return runningTimeMethod;
- }
-
- public int getPosition()
- {
- return 0;
- }
-
- public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
- {
- if (annotationType.equals(Special.class))
- {
- return annotationType.cast(SpecialLiteral.INSTANCE);
- }
- else
- {
- return null;
- }
- }
-
- public Set<Annotation> getAnnotations()
- {
- return Collections.<Annotation>singleton(SpecialLiteral.INSTANCE);
- }
-
- public Type getBaseType()
- {
- return RunningTime.class;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Collections.<Type>singleton(RunningTime.class);
- }
-
- public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
- {
- if (annotationType.equals(Special.class))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- };
- runningTimeParameters.add(runningTimeParameter);
-
- final List<AnnotatedParameter<TumbleDryer>> clothesParameters = new
ArrayList<AnnotatedParameter<TumbleDryer>>();
- final AnnotatedConstructor<TumbleDryer> clothesConstructor = new
AnnotatedConstructor<TumbleDryer>()
- {
-
- public Constructor<TumbleDryer> getJavaMember()
- {
- try
- {
- return TumbleDryer.class.getDeclaredConstructor(Clothes.class);
- }
- catch (NoSuchMethodException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public List<AnnotatedParameter<TumbleDryer>> getParameters()
- {
- return clothesParameters;
- }
-
- public AnnotatedType<TumbleDryer> getDeclaringType()
- {
- return tumbleDryer;
- }
-
- public boolean isStatic()
- {
- return false;
- }
-
- public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
- {
- if (annotationType.equals(Inject.class))
- {
- return annotationType.cast(InjectLiteral.INSTANCE);
- }
- else
- {
- return null;
- }
- }
-
- public Set<Annotation> getAnnotations()
- {
- return Collections.<Annotation>singleton(InjectLiteral.INSTANCE);
- }
-
- public Type getBaseType()
- {
- return TumbleDryer.class;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Arrays2.<Type>asSet(TumbleDryer.class, Object.class);
- }
-
- public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
- {
- if (annotationType.equals(Inject.class))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- };
- constructors.add(clothesConstructor);
-
- AnnotatedParameter<TumbleDryer> clothesParameter = new
AnnotatedParameter<TumbleDryer>()
- {
-
- public AnnotatedCallable<TumbleDryer> getDeclaringCallable()
- {
- return clothesConstructor;
- }
-
- public int getPosition()
- {
- return 0;
- }
-
-
- public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
- {
- if (annotationType.equals(Special.class))
- {
- return annotationType.cast(SpecialLiteral.INSTANCE);
- }
- else
- {
- return null;
- }
- }
-
- public Set<Annotation> getAnnotations()
- {
- return Collections.<Annotation>singleton(SpecialLiteral.INSTANCE);
- }
-
- public Type getBaseType()
- {
- return Clothes.class;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Arrays2.<Type>asSet(Clothes.class, Object.class);
- }
-
- public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
- {
- if (annotationType.equals(Special.class))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- };
- clothesParameters.add(clothesParameter);
-
- beforeBeanDiscovery.addAnnotatedType(tumbleDryer);
- }
-
- /**
- * Adds an eco friendly wasing machine
- * @param beforeBeanDiscovery
- */
- public void addWashingMachine(@Observes BeforeBeanDiscovery beforeBeanDiscovery)
- {
- final Set<AnnotatedConstructor<WashingMachine>> constructors = new
HashSet<AnnotatedConstructor<WashingMachine>>();
- final AnnotatedType<WashingMachine> type = new
AnnotatedType<WashingMachine>()
- {
-
- public Set<AnnotatedConstructor<WashingMachine>> getConstructors()
- {
- return constructors;
- }
-
- public Set<AnnotatedField<? super WashingMachine>> getFields()
- {
- return Collections.emptySet();
- }
-
- public Class<WashingMachine> getJavaClass()
- {
- return WashingMachine.class;
- }
-
- public Set<AnnotatedMethod<? super WashingMachine>> getMethods()
- {
- return Collections.emptySet();
- }
-
- public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
- {
- if(annotationType == EcoFriendlyWashingMachine.class)
- {
- return annotationType.cast(EcoFriendlyWashingMachineLiteral.INSTANCE);
- }
- return null;
- }
-
- public Set<Annotation> getAnnotations()
- {
- return
Collections.<Annotation>singleton(EcoFriendlyWashingMachineLiteral.INSTANCE);
- }
-
- public Type getBaseType()
- {
- return WashingMachine.class;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Arrays2.<Type>asSet(WashingMachine.class, Object.class);
- }
-
- public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
- {
- return annotationType == EcoFriendlyWashingMachine.class;
- }
-
- };
-
- final AnnotatedConstructor<WashingMachine> constructor = new
AnnotatedConstructor<WashingMachine>()
- {
-
- public Constructor<WashingMachine> getJavaMember()
- {
- try
- {
- return WashingMachine.class.getDeclaredConstructor();
- }
- catch (NoSuchMethodException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public List<AnnotatedParameter<WashingMachine>> getParameters()
- {
- return Collections.emptyList();
- }
-
- public AnnotatedType<WashingMachine> getDeclaringType()
- {
- return type;
- }
-
- public boolean isStatic()
- {
- return false;
- }
-
- public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
- {
- return null;
- }
-
- public Set<Annotation> getAnnotations()
- {
- return Collections.emptySet();
- }
-
- public Type getBaseType()
- {
- return WashingMachine.class;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Arrays2.<Type>asSet(WashingMachine.class, Object.class);
- }
-
- public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
- {
- return false;
- }
- };
- constructors.add(constructor);
-
- beforeBeanDiscovery.addAnnotatedType(type);
- }
-
- public void vetoOriginalTumbleDryer(@Observes ProcessAnnotatedType<TumbleDryer>
event)
- {
- event.veto();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/AnnotatedTypeExtensionTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/AnnotatedTypeExtensionTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/AnnotatedTypeExtensionTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,157 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Set;
-
-import javax.enterprise.inject.Any;
-import javax.enterprise.inject.spi.AnnotatedConstructor;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.AnnotatedMethod;
-import javax.enterprise.inject.spi.AnnotatedParameter;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.jsr299.Extension;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.jboss.weld.test.Utils;
-import
org.jboss.weld.tests.extensions.annotatedType.EcoFriendlyWashingMachine.EcoFriendlyWashingMachineLiteral;
-import org.testng.annotations.Test;
-
-@Artifact
-@IntegrationTest
-(a)Extension("javax.enterprise.inject.spi.Extension")
-public class AnnotatedTypeExtensionTest extends AbstractWeldTest
-{
-
- @Test
- public void testMultipleBeansOfSameType()
- {
- Laundry laundry = getReference(Laundry.class);
- assert laundry.ecoFriendlyWashingMachine != null;
- assert laundry.fastWashingMachine != null;
- }
-
- @Test(description = "WELD-371")
- public void testAnnotationsAreOverridden()
- {
- Bean<WashingMachine> bean = getBean(WashingMachine.class,
EcoFriendlyWashingMachineLiteral.INSTANCE);
- assert Utils.annotationSetMatches(bean.getQualifiers(), Any.class,
EcoFriendlyWashingMachine.class);
-
- // Verify overriding the class structure works
- Clothes.reset();
- TumbleDryer tumbleDryer = getReference(TumbleDryer.class);
- Bean<TumbleDryer> tumbleDryerBean = getBean(TumbleDryer.class);
- assert tumbleDryer != null;
-
- assert !containsConstructor(tumbleDryerBean.getInjectionPoints(),
SerialNumber.class);
- assert containsConstructor(tumbleDryerBean.getInjectionPoints(), Clothes.class);
- assert tumbleDryer.getSerialNumber() == null;
- assert tumbleDryer.getClothes() != null;
- assert
!Clothes.getInjectionPoint().getAnnotated().isAnnotationPresent(Original.class);
- AnnotatedConstructor<?> clothesConstructor =
getConstructor(tumbleDryerBean.getInjectionPoints(), Clothes.class);
- assert
clothesConstructor.getParameters().get(0).isAnnotationPresent(Special.class);
- assert
!clothesConstructor.getParameters().get(0).isAnnotationPresent(Original.class);
-
- assert containsField(tumbleDryerBean.getInjectionPoints(), "plug");
- assert !containsField(tumbleDryerBean.getInjectionPoints(), "coins");
- assert tumbleDryer.getPlug() != null;
- assert tumbleDryer.getCoins() == null;
-
- assert containsMethod(tumbleDryerBean.getInjectionPoints(),
"setRunningTime", RunningTime.class);
- assert !containsMethod(tumbleDryerBean.getInjectionPoints(), "setHotAir",
HotAir.class);
- assert tumbleDryer.getRunningTime() != null;
- assert tumbleDryer.getHotAir() == null;
- AnnotatedMethod<?> runningTimeMethod =
getMethod(tumbleDryerBean.getInjectionPoints(), "setRunningTime",
RunningTime.class);
- assert
runningTimeMethod.getParameters().get(0).isAnnotationPresent(Special.class);
- assert
!runningTimeMethod.getParameters().get(0).isAnnotationPresent(Original.class);
- }
-
- private static boolean containsField(Set<InjectionPoint> injectionPoints, String
name)
- {
- for (InjectionPoint ip : injectionPoints)
- {
- if (ip.getAnnotated() instanceof AnnotatedField<?>)
- {
- AnnotatedField<?> field = (AnnotatedField<?>) ip.getAnnotated();
- if (field.getJavaMember().getName().equals(name))
- {
- return true;
- }
- }
- }
- return false;
- }
-
- private static boolean containsConstructor(Set<InjectionPoint> injectionPoints,
Class<?>... parameters)
- {
- return getConstructor(injectionPoints, parameters) != null;
- }
-
- private static AnnotatedConstructor<?> getConstructor(Set<InjectionPoint>
injectionPoints, Class<?>... parameters)
- {
- for (InjectionPoint ip : injectionPoints)
- {
- if (ip.getAnnotated() instanceof AnnotatedParameter<?>)
- {
- AnnotatedParameter<?> param = (AnnotatedParameter<?>)
ip.getAnnotated();
- if (param.getDeclaringCallable() instanceof AnnotatedConstructor<?>)
- {
- Class<?>[] parameterTypes = ((Constructor<?>)
param.getDeclaringCallable().getJavaMember()).getParameterTypes();
- if (Arrays.equals(parameters, parameterTypes))
- {
- return (AnnotatedConstructor<?>) param.getDeclaringCallable();
- }
- }
- }
- }
- return null;
- }
-
- private static boolean containsMethod(Set<InjectionPoint> injectionPoints,
String name, Class<?>... parameters)
- {
- return getMethod(injectionPoints, name, parameters) != null;
- }
-
- private static AnnotatedMethod<?> getMethod(Set<InjectionPoint>
injectionPoints, String name, Class<?>... parameters)
- {
- for (InjectionPoint ip : injectionPoints)
- {
- if (ip.getAnnotated() instanceof AnnotatedParameter<?>)
- {
- AnnotatedParameter<?> param = (AnnotatedParameter<?>)
ip.getAnnotated();
- if (param.getDeclaringCallable() instanceof AnnotatedMethod<?>)
- {
- Class<?>[] parameterTypes = ((Method)
param.getDeclaringCallable().getJavaMember()).getParameterTypes();
- String methodName =
param.getDeclaringCallable().getJavaMember().getName();
- if (Arrays.equals(parameters, parameterTypes) &&
methodName.equals(name))
- {
- return (AnnotatedMethod<?>) param.getDeclaringCallable();
- }
- }
- }
- }
- return null;
- }
-
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Clothes.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Clothes.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Clothes.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.inject.Inject;
-
-@Special
-public class Clothes
-{
-
- private static InjectionPoint injectionPoint;
-
- @Inject
- public void setInjectionPoint(InjectionPoint injectionPoint)
- {
- Clothes.injectionPoint = injectionPoint;
- }
-
- public static void reset()
- {
- injectionPoint = null;
- }
-
- public static InjectionPoint getInjectionPoint()
- {
- return injectionPoint;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Coins.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Coins.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Coins.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-public class Coins
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/EcoFriendlyWashingMachine.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/EcoFriendlyWashingMachine.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/EcoFriendlyWashingMachine.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.enterprise.util.AnnotationLiteral;
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-public @interface EcoFriendlyWashingMachine
-{
-
- @SuppressWarnings("serial")
- public static class EcoFriendlyWashingMachineLiteral extends
AnnotationLiteral<EcoFriendlyWashingMachine> implements EcoFriendlyWashingMachine
- {
-
- public static final EcoFriendlyWashingMachine INSTANCE = new
EcoFriendlyWashingMachineLiteral();
-
- private EcoFriendlyWashingMachineLiteral() {}
-
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/FastWashingMachine.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/FastWashingMachine.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/FastWashingMachine.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-public @interface FastWashingMachine
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/HotAir.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/HotAir.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/HotAir.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-public class HotAir
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/InjectLiteral.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/InjectLiteral.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/InjectLiteral.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import javax.enterprise.util.AnnotationLiteral;
-import javax.inject.Inject;
-
-public class InjectLiteral extends AnnotationLiteral<Inject> implements Inject
-{
-
- public static final Inject INSTANCE = new InjectLiteral();
-
- private InjectLiteral() {}
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Laundry.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Laundry.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Laundry.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import javax.inject.Inject;
-
-public class Laundry
-{
- @Inject @FastWashingMachine
- public WashingMachine fastWashingMachine;
-
- @Inject @EcoFriendlyWashingMachine
- public WashingMachine ecoFriendlyWashingMachine;
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Original.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Original.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Original.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-public @interface Original
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Plug.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Plug.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Plug.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,23 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-@Special
-public class Plug
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/RunningTime.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/RunningTime.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/RunningTime.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,23 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-@Special
-public class RunningTime
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/SerialNumber.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/SerialNumber.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/SerialNumber.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-public class SerialNumber
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Special.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Special.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/Special.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-public @interface Special
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/SpecialLiteral.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/SpecialLiteral.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/SpecialLiteral.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import javax.enterprise.util.AnnotationLiteral;
-
-public class SpecialLiteral extends AnnotationLiteral<Special> implements Special
-{
-
- public static final Special INSTANCE = new SpecialLiteral();
-
- private SpecialLiteral() {}
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/TumbleDryer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/TumbleDryer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/TumbleDryer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-import javax.inject.Inject;
-
-
-public class TumbleDryer
-{
-
-
- private Plug plug;
-
- @Inject @Original
- private Coins coins;
-
- private final Clothes clothers;
-
- private RunningTime runningTime;
-
- private final SerialNumber serialNumber;
-
- private HotAir hotAir;
-
- public TumbleDryer(@Original Clothes clothes)
- {
- this.clothers = clothes;
- this.serialNumber = null;
- }
-
- @Inject
- public TumbleDryer(SerialNumber serialNumber)
- {
- this.serialNumber = serialNumber;
- this.clothers = null;
- }
-
- public void setRunningTime(@Original RunningTime runningTime)
- {
- this.runningTime = runningTime;
- }
-
- @Inject
- public void setHotAir(HotAir hotAir)
- {
- this.hotAir = hotAir;
- }
-
- public Plug getPlug()
- {
- return plug;
- }
-
- public Clothes getClothes()
- {
- return clothers;
- }
-
- public HotAir getHotAir()
- {
- return hotAir;
- }
-
- public RunningTime getRunningTime()
- {
- return runningTime;
- }
-
- public SerialNumber getSerialNumber()
- {
- return serialNumber;
- }
-
- public Coins getCoins()
- {
- return coins;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/WashingMachine.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/WashingMachine.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/extensions/annotatedType/WashingMachine.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,23 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.extensions.annotatedType;
-
-@FastWashingMachine
-public class WashingMachine
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Cow.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Cow.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Cow.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-public class Cow
-{
-
- private final String name;
-
- public Cow(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/CowShed.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/CowShed.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/CowShed.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.weld.injection.FieldInjectionPoint;
-
-public class CowShed
-{
-
- @Produces
- public Cow get(InjectionPoint ip)
- {
- assert ip instanceof FieldInjectionPoint<?, ?>;
- FieldInjectionPoint<?, ?> fip = (FieldInjectionPoint<?, ?>) ip;
- assert fip.getDeclaringType().getJavaClass().equals(Field.class);
- return new Cow("daisy");
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/DoubleConsumer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/DoubleConsumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/DoubleConsumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-@Named
-@SessionScoped
-public class DoubleConsumer implements Serializable
-{
-
- private static final long serialVersionUID = 6619645042310126425L;
-
- @Inject
- private double maxNumber;
-
- public DoubleConsumer()
- {
- }
-
- public void ping()
- {
-
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/DoubleGenerator.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/DoubleGenerator.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/DoubleGenerator.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import java.io.Serializable;
-import java.util.Timer;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Produces;
-import javax.inject.Inject;
-
-@ApplicationScoped
-public class DoubleGenerator implements Serializable
-{
-
- private static final long serialVersionUID = -7213673465118041882L;
-
- @Inject Timer timer;
-
- @Produces
- double getDouble()
- {
- timer.cancel();
- return 11.1;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/ExtraSpecial.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/ExtraSpecial.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/ExtraSpecial.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target({FIELD, METHOD, TYPE, PARAMETER})
-public @interface ExtraSpecial
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/ExtraSpecialLiteral.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/ExtraSpecialLiteral.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/ExtraSpecialLiteral.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.injectionPoint;
-
-import javax.enterprise.util.AnnotationLiteral;
-
-public class ExtraSpecialLiteral extends AnnotationLiteral<ExtraSpecial> implements
ExtraSpecial
-{
- public static final ExtraSpecial INSTANCE = new ExtraSpecialLiteral();
-
- private ExtraSpecialLiteral() {
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Field.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Field.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Field.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import javax.inject.Inject;
-
-public class Field
-{
-
- @Inject Cow cow;
-
- public Cow getCow()
- {
- return cow;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/GrassyField.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/GrassyField.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/GrassyField.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-public class GrassyField extends Field
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/InjectionPointTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/InjectionPointTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/InjectionPointTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import java.lang.reflect.ParameterizedType;
-
-import javax.enterprise.inject.IllegalProductException;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.jboss.weld.test.Utils;
-import org.testng.annotations.Test;
-
-@Artifact
-public class InjectionPointTest extends AbstractWeldTest
-{
-
- @Test(description="WELD-239")
- public void testCorrectInjectionPointUsed()
- {
- getReference(IntConsumer.class).ping();
-
- try
- {
- getReference(DoubleConsumer.class).ping();
- }
- catch (IllegalProductException e)
- {
- assert e.getMessage().contains("Injection Point: field
org.jboss.weld.tests.injectionPoint.DoubleGenerator.timer");
- }
- }
-
- @Test(description="WELD-316")
- public void testFieldInjectionPointSerializability() throws Throwable
- {
- getReference(StringConsumer.class).ping();
- InjectionPoint ip = StringGenerator.getInjectionPoint();
- assert ip != null;
- assert ip.getMember().getName().equals("str");
- InjectionPoint ip1 = Utils.deserialize(Utils.serialize(ip));
- assert ip1.getMember().getName().equals("str");
- }
-
- @Test
- public void testGetDeclaringType()
- {
- assert
getReference(GrassyField.class).getCow().getName().equals("daisy");
- }
-
- @Test(description = "WELD-438")
- public void testInjectionPointWhenInstanceGetIsUsed() throws Exception
- {
- Pig pig = getReference(PigSty.class).getPig();
- assert pig != null;
- assert pig.getInjectionPoint().getBean() != null;
- assert pig.getInjectionPoint().getBean().getBeanClass().equals(PigSty.class);
- assert
pig.getInjectionPoint().getMember().equals(PigSty.class.getDeclaredField("pig"));
- assert pig.getInjectionPoint().getAnnotated() != null;
- assert pig.getInjectionPoint().getAnnotated().getBaseType() instanceof
ParameterizedType;
- ParameterizedType parameterizedType = ((ParameterizedType)
pig.getInjectionPoint().getAnnotated().getBaseType());
- assert parameterizedType.getRawType().equals(Instance.class);
- assert parameterizedType.getActualTypeArguments().length == 1;
- assert parameterizedType.getActualTypeArguments()[0].equals(Pig.class);
- assert pig.getInjectionPoint().getAnnotated().isAnnotationPresent(Special.class);
- assert
!pig.getInjectionPoint().getAnnotated().isAnnotationPresent(ExtraSpecial.class);
- assert Utils.annotationSetMatches(pig.injectionPoint.getQualifiers(),
Special.class, ExtraSpecial.class);
- assert Pig.class.equals(pig.getInjectionPoint().getType());
-
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/IntConsumer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/IntConsumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/IntConsumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-@Named
-@SessionScoped
-public class IntConsumer implements Serializable
-{
-
- private static final long serialVersionUID = 6619645042310126425L;
-
- @Inject
- private int maxNumber;
-
- public IntConsumer()
- {
- }
-
- public void ping()
- {
-
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/IntGenerator.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/IntGenerator.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/IntGenerator.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import java.io.Serializable;
-import java.util.Timer;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.Produces;
-import javax.inject.Inject;
-
-@ApplicationScoped
-public class IntGenerator implements Serializable
-{
-
- private static final long serialVersionUID = -7213673465118041882L;
-
- @Inject
- private Instance<Timer> timerInstance;
-
- @Produces
- int getInt()
- {
- // This has no purpose other than to invoke a method on the proxy so that the proxy
instance
- // is retrieved via the producer method
- timerInstance.get().cancel();
- return 100;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Pig.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Pig.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Pig.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.inject.Inject;
-
-@Special @ExtraSpecial
-public class Pig
-{
-
- @Inject InjectionPoint injectionPoint;
-
- public InjectionPoint getInjectionPoint()
- {
- return injectionPoint;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/PigSty.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/PigSty.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/PigSty.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.injectionPoint;
-
-import javax.enterprise.inject.Instance;
-import javax.inject.Inject;
-
-public class PigSty
-{
- @Inject @Special Instance<Pig> pig;
-
- public Pig getPig()
- {
- return pig.select(ExtraSpecialLiteral.INSTANCE).get();
- }
-
-}
-
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Special.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Special.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/Special.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target({FIELD, METHOD, TYPE, PARAMETER})
-public @interface Special
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/StringConsumer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/StringConsumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/StringConsumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import javax.inject.Inject;
-
-public class StringConsumer
-{
-
- @Inject String str;
-
- public void ping() {}
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/StringGenerator.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/StringGenerator.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/StringGenerator.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-public class StringGenerator
-{
-
- private static InjectionPoint injectionPoint;
-
- public static InjectionPoint getInjectionPoint()
- {
- return injectionPoint;
- }
-
- public static void reset()
- {
- injectionPoint = null;
- }
-
- @Produces String getString(InjectionPoint ip)
- {
- injectionPoint = ip;
- return "";
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/TimerManager.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/TimerManager.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/injectionPoint/TimerManager.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.injectionPoint;
-
-import java.io.Serializable;
-import java.util.Timer;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Produces;
-
-public class TimerManager implements Serializable
-{
-
- private static final long serialVersionUID = 5156835887786174326L;
-
- @Produces
- @RequestScoped
- public Timer getTimer()
- {
- return new Timer();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Baz.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Baz.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Baz.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,13 +0,0 @@
-package org.jboss.weld.tests.producer.field;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.inject.Qualifier;
-
-(a)Retention(RetentionPolicy.RUNTIME)
-@Qualifier
-public @interface Baz
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/IntegerCollectionInjection.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/IntegerCollectionInjection.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/IntegerCollectionInjection.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.field;
-
-import java.util.Collection;
-
-import javax.inject.Inject;
-
-public class IntegerCollectionInjection
-{
-
- private Collection<Integer> value;
-
- @Inject
- private Collection<Integer> fieldInjection;
-
- private Collection<Integer> setterInjection;
-
- @Inject
- public void init(Collection<Integer> setterInjection)
- {
- this.setterInjection = setterInjection;
- }
-
- @Inject
- public IntegerCollectionInjection(Collection<Integer> com)
- {
- this.value = com;
- }
-
- public Collection<Integer> getValue()
- {
- return value;
- }
-
- public Collection<Integer> getFieldInjection()
- {
- return fieldInjection;
- }
-
- public Collection<Integer> getSetterInjection()
- {
- return setterInjection;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ListInstance.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ListInstance.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ListInstance.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.field;
-
-import java.util.List;
-
-import javax.enterprise.inject.Any;
-import javax.enterprise.inject.Instance;
-import javax.inject.Inject;
-
-public class ListInstance
-{
- @Inject @Any
- Instance<List> instance;
-
- public Instance<List> get()
- {
- return instance;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ListStringInstance.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ListStringInstance.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ListStringInstance.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.field;
-
-import java.util.List;
-
-import javax.enterprise.inject.Any;
-import javax.enterprise.inject.Instance;
-import javax.inject.Inject;
-
-public class ListStringInstance
-{
- @Inject @Any Instance<List<String>> instance;
-
- public List<String> get()
- {
- return instance.get();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedCollectionInjection.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedCollectionInjection.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedCollectionInjection.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.field;
-
-import java.util.Collection;
-
-import javax.inject.Inject;
-
-public class ParameterizedCollectionInjection
-{
-
- private Collection<String> value;
-
- @Inject
- private Collection<String> fieldInjection;
-
- private Collection<String> setterInjection;
-
- @Inject
- public void init(Collection<String> setterInjection)
- {
- this.setterInjection = setterInjection;
- }
-
- @Inject
- public ParameterizedCollectionInjection(Collection<String> com)
- {
- this.value = com;
- }
-
- public Collection<String> getValue()
- {
- return value;
- }
-
- public Collection<String> getFieldInjection()
- {
- return fieldInjection;
- }
-
- public Collection<String> getSetterInjection()
- {
- return setterInjection;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedListInjection.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedListInjection.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedListInjection.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.field;
-
-import java.util.List;
-
-import javax.inject.Inject;
-
-public class ParameterizedListInjection
-{
-
- private List<String> value;
-
- @Inject
- private List<String> fieldInjection;
-
- private List<String> setterInjection;
-
- @Inject
- public void init(List<String> setterInjection)
- {
- this.setterInjection = setterInjection;
- }
-
- @Inject
- public ParameterizedListInjection(List<String> com)
- {
- this.value = com;
- }
-
- public java.util.List<String> getValue()
- {
- return value;
- }
-
- public List<String> getFieldInjection()
- {
- return fieldInjection;
- }
-
- public List<String> getSetterInjection()
- {
- return setterInjection;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.field;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.enterprise.inject.Produces;
-
-public class ParameterizedProducer
-{
-
- @Produces
- public List<String> createStringList()
- {
- return Arrays.asList("aaa", "bbb");
- }
-
- @Produces
- public ArrayList<Integer> createIntegerList()
- {
- List<Integer> list = Arrays.asList(1, 2, 3, 4);
- ArrayList<Integer> arrayList = new ArrayList<Integer>();
- arrayList.addAll(list);
- return arrayList;
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedProducerTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedProducerTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ParameterizedProducerTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.field;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ParameterizedProducerTest extends AbstractWeldTest
-{
-
- @Test
- public void testParameterizedListInjection()
- {
- List<String> strings = getReference(Target.class).getStringList();
- assert strings.size() == 2;
-
- ParameterizedListInjection item = getReference(ParameterizedListInjection.class);
- assert item.getFieldInjection().size() == 2;
- assert item.getValue().size() == 2;
- assert item.getSetterInjection().size() == 2;
-
- }
-
- @Test
- public void testParameterizedCollectionInjection()
- {
- Collection<String> strings = getReference(Target.class).getStrings();
- assert strings.size() == 2;
-
- ParameterizedCollectionInjection item =
getReference(ParameterizedCollectionInjection.class);
- assert item.getFieldInjection().size() == 2;
- assert item.getValue().size() == 2;
- assert item.getSetterInjection().size() == 2;
-
- }
-
- @Test
- public void testIntegerCollectionInjection()
- {
- Collection<Integer> integers = getReference(Target.class).getIntegers();
- assert integers.size() == 4;
-
- IntegerCollectionInjection item = getReference(IntegerCollectionInjection.class);
- assert item.getFieldInjection().size() == 4;
- assert item.getValue().size() == 4;
- assert item.getSetterInjection().size() == 4;
-
- }
-
- @Test
- public void testInstanceList()
- {
- ListInstance listInstance = getReference(ListInstance.class);
- assert listInstance.get().isAmbiguous();
- }
-
- @Test
- public void testTypeParameterInstance()
- {
- ListStringInstance listInstance = getReference(ListStringInstance.class);
- assert listInstance.get().size() == 2;
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ProducerBeanInvocationTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ProducerBeanInvocationTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/ProducerBeanInvocationTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.producer.field;
-
-import javax.enterprise.util.AnnotationLiteral;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * Simple test which invokes a method directly on a normal scoped producer
- * bean to ensure that it's proxy is for that bean and not the product
- * of a producer method.
- *
- * @author David Allen
- *
- */
-@Artifact
-public class ProducerBeanInvocationTest extends AbstractWeldTest
-{
- @Test
- // WELD-546
- public void test()
- {
- Qux bar = getReference(Qux.class);
- assert bar.getBar().equals("qux");
- QuxProducer producer = getReference(QuxProducer.class);
- assert producer.ping();
- Qux bazBar = getReference(Qux.class, new AnnotationLiteral<Baz>(){});
- assert bazBar.getBar().equals("baz");
- }
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Qux.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Qux.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Qux.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,26 +0,0 @@
-package org.jboss.weld.tests.producer.field;
-
-import javax.enterprise.context.RequestScoped;
-
-@RequestScoped
-public class Qux
-{
-
- private final String name;
-
- public Qux(String name)
- {
- this.name = name;
- }
-
- public Qux()
- {
- this("qux");
- }
-
- public String getBar()
- {
- return name;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/QuxProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/QuxProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/QuxProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,18 +0,0 @@
-package org.jboss.weld.tests.producer.field;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Produces;
-
-@RequestScoped
-public class QuxProducer
-{
-
- @Produces @Baz @RequestScoped
- private Qux bar = new Qux("baz");
-
- public boolean ping()
- {
- return true;
- };
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Target.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Target.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/field/Target.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.field;
-
-import java.util.Collection;
-import java.util.List;
-
-import javax.inject.Inject;
-
-public class Target
-{
-
- @Inject private Collection<String> strings;
-
- @Inject private Collection<Integer> integers;
-
- @Inject private List<String> stringList;
-
- public Collection<String> getStrings()
- {
- return strings;
- }
-
- public Collection<Integer> getIntegers()
- {
- return integers;
- }
-
- public List<String> getStringList()
- {
- return stringList;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Bar.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,26 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-public class Bar
-{
-
- public Bar(String blah)
- {
-
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarConsumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Inject;
-
-@RequestScoped
-public class BarConsumer
-{
- @Inject
- private Bar bar;
-
- public Bar getBar()
- {
- return bar;
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/BarProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import java.lang.reflect.Member;
-
-import javax.enterprise.inject.Any;
-import javax.enterprise.inject.Default;
-import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-/**
- * Class with a producer method and disposal method both containing InjectionPoint
- * parameters.
- *
- * @author David Allen
- *
- */
-public class BarProducer
-{
- private static Bar disposedBar;
- private static Member disposedInjection;
- private static Member producedInjection;
-
- @Produces
- public Bar getBar(InjectionPoint injectionPoint)
- {
- producedInjection = injectionPoint.getMember();
- return new Bar("blah");
- }
-
- public void dispose(@Disposes @Any Bar bar, InjectionPoint injectionPoint)
- {
- disposedBar = bar;
- disposedInjection = injectionPoint.getMember();
- }
-
- public static Bar getDisposedBar()
- {
- return disposedBar;
- }
-
- public static Member getDisposedInjection()
- {
- return disposedInjection;
- }
-
- public static Member getProducedInjection()
- {
- return producedInjection;
- }
-
- public static void reset()
- {
- disposedBar = null;
- disposedInjection = null;
- producedInjection = null;
- }
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Baz.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Baz.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Baz.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,13 +0,0 @@
-package org.jboss.weld.tests.producer.method;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.inject.Qualifier;
-
-(a)Retention(RetentionPolicy.RUNTIME)
-@Qualifier
-public @interface Baz
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Car.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Car.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Car.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,26 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import java.io.Serializable;
-
-public class Car implements Serializable
-{
-
- private static final long serialVersionUID = 1L;
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/CarFactory.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/CarFactory.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/CarFactory.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.inject.Produces;
-
-public class CarFactory
-{
-
- @Produces @Important
- public Car produceGovernmentCar()
- {
- return null;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodInjectionPointTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class DisposalMethodInjectionPointTest extends AbstractWeldTest
-{
- @Test(groups = { "broken" })
- // WELD-358
- public void test()
- {
- BarProducer.reset();
- Bean<BarConsumer> barConsumerBean = getBean(BarConsumer.class);
- CreationalContext<BarConsumer> ctx =
getCurrentManager().createCreationalContext(barConsumerBean);
- BarConsumer barConsumer = barConsumerBean.create(ctx);
- assert BarProducer.getProducedInjection().getName().equals("bar");
- Bar bar = barConsumer.getBar();
- barConsumerBean.destroy(barConsumer, ctx);
- assert BarProducer.getDisposedBar() == bar;
- assert BarProducer.getDisposedInjection().getName().equals("bar");
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class DisposalMethodOnOtherBeanNotResolvedTest extends AbstractWeldTest
-{
- @Test
- public void test()
- {
- FooDisposer.reset();
- FooProducer.reset();
- Bean<Foo> bean = getBean(Foo.class);
- CreationalContext<Foo> ctx =
getCurrentManager().createCreationalContext(bean);
- Foo instance = bean.create(ctx);
- assert instance.getBlah().equals("foo!");
- bean.destroy(instance, ctx);
- assert !FooDisposer.isDisposed();
- assert FooProducer.isDisposed();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Foo.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Foo.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Foo.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-/**
- * @author pmuir
- *
- */
-public class Foo
-{
-
- private final String blah;
-
- public Foo(String blah)
- {
- this.blah = blah;
- }
-
- /**
- * @return the blah
- */
- public String getBlah()
- {
- return blah;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/FooDisposer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/FooDisposer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/FooDisposer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.inject.Any;
-import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Produces;
-
-/**
- * @author pmuir
- *
- */
-public class FooDisposer
-{
-
- private static boolean disposed;
-
- public static void reset()
- {
- disposed = false;
- }
-
- void disposeFoo(@Disposes @Any Foo foo)
- {
- disposed = true;
- }
-
- /**
- * @return the disposed
- */
- public static boolean isDisposed()
- {
- return disposed;
- }
-
- @Produces @Important
- public Foo getFoo()
- {
- return new Foo("bar!");
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/FooProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/FooProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/FooProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Produces;
-
-/**
- * @author pmuir
- *
- */
-public class FooProducer
-{
-
- @Produces Foo getFoo()
- {
- return new Foo("foo!");
- }
-
- private static boolean disposed;
-
- public static void reset()
- {
- disposed = false;
- }
-
- public void disposeFoo(@Disposes Foo foo)
- {
- disposed = true;
- }
-
- /**
- * @return the disposed
- */
- public static boolean isDisposed()
- {
- return disposed;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Government.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Government.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Government.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.SessionScoped;
-
-@SessionScoped
-public class Government implements Serializable
-{
-
- private static final long serialVersionUID = 1L;
-
- @Important Car governmentCar;
-
- public void destabilize()
- {
-
- }
-
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Important.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Important.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Important.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * @author Dan Allen
- */
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@Inherited
-public @interface Important {
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/IntInjection.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/IntInjection.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/IntInjection.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.inject.Inject;
-
-public class IntInjection
-{
-
- int value;
-
- @Inject public IntInjection(Integer integer)
- {
- this.value = integer;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/JmsTemplate.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/JmsTemplate.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/JmsTemplate.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-public class JmsTemplate
-{
-
- private final int receiveTimeout;
-
- public JmsTemplate(int receiveTimeout)
- {
- this.receiveTimeout = receiveTimeout;
- }
-
- public int getReceiveTimeout()
- {
- return receiveTimeout;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/JmsTemplateConfigurationProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/JmsTemplateConfigurationProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/JmsTemplateConfigurationProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.inject.Produces;
-import javax.inject.Named;
-
-public class JmsTemplateConfigurationProducer
-{
-
- public static final int LONG_RECEIVE_TIMEOUT = 3 * 3600;
- public static final int SHORT_RECEIVE_TIMEOUT = 100;
-
- @Produces @Long
- private int longReceiveTimeout = LONG_RECEIVE_TIMEOUT;
-
- @Produces @Short
- private int shortReceiveTimeout = SHORT_RECEIVE_TIMEOUT;
-
- @Produces
- @Named
- public JmsTemplate getErrorQueueTemplate(@Long int receiveTimeout)
- {
- return new JmsTemplate(receiveTimeout);
- }
-
- @Produces
- @Named
- public JmsTemplate getLogQueueTemplate(@Short int receiveTimeout)
- {
- return new JmsTemplate(receiveTimeout);
- }
-}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Long.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Long.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Long.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * @author Dan Allen
- */
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@Inherited
-public @interface Long {
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ManagerProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ManagerProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ManagerProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.inject.Inject;
-
-class ManagerProducer
-{
-
- @Inject BeanManager beanManager;
-
- private static boolean injectionPointInjected;
-
- public static boolean isInjectionPointInjected()
- {
- return injectionPointInjected;
- }
-
- public static void setInjectionPointInjected(boolean injectionPointInjected)
- {
- ManagerProducer.injectionPointInjected = injectionPointInjected;
- }
-
- @Produces
- Integer create(InjectionPoint point)
- {
- injectionPointInjected = point != null;
- return 10;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ManagerProducerTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ManagerProducerTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ManagerProducerTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ManagerProducerTest extends AbstractWeldTest
-{
- @Test(description="WBRI-183")
- public void testInjectManagerProducer()
- {
- ManagerProducer.setInjectionPointInjected(false);
- getReference(IntInjection.class);
- assert ManagerProducer.isInjectionPointInjected();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.inject.Produces;
-import javax.inject.Named;
-
-public class NamedProducer
-{
- @Named("itoen")
- @Produces
- public String[] createName()
- {
- return new String[] { "oh", "otya" };
- }
-
- @Named("iemon")
- @Produces
- public String[] createName2()
- {
- return new String[] { "fukujyuen", "iemon", "otya"
};
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class NamedProducerTest extends AbstractWeldTest
-{
-
- @Test
- public void testNamedProducer()
- {
- Bean<?> iemonBean =
getCurrentManager().resolve(getCurrentManager().getBeans("iemon"));
- String[] iemon = (String[]) getCurrentManager().getReference(iemonBean,
Object.class, getCurrentManager().createCreationalContext(iemonBean));
- assert iemon.length == 3;
- Bean<?> itoenBean =
getCurrentManager().resolve(getCurrentManager().getBeans("itoen"));
- String[] itoen = (String[]) getCurrentManager().getReference(itoenBean,
Object.class, getCurrentManager().createCreationalContext(itoenBean));
- assert itoen.length == 2;
- }
-
- @Test
- public void testDefaultNamedProducerMethod()
- {
- Set<Bean<?>> beans = getCurrentManager().getBeans(JmsTemplate.class);
- assert beans.size() == 2;
- List<String> beanNames = new
ArrayList<String>(Arrays.asList("errorQueueTemplate",
"logQueueTemplate"));
- for (Bean<?> b : beans)
- {
- beanNames.remove(b.getName());
- }
- assert beanNames.isEmpty();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerWithBinding.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerWithBinding.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerWithBinding.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import java.util.Date;
-
-import javax.enterprise.inject.Produces;
-import javax.inject.Named;
-
-/**
- * @author Dan Allen
- */
-public class NamedProducerWithBinding {
- public @Produces @Important @Named Date getDate() {
- return new Date();
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerWithBindingTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerWithBindingTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NamedProducerWithBindingTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import static org.testng.Assert.assertNotNull;
-
-import java.util.Date;
-
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Dan Allen
- */
-@Artifact(addCurrentPackage = true)
-public class NamedProducerWithBindingTest extends AbstractWeldTest
-{
- @Test
- public void testGetNamedProducerWithBinding()
- {
- Bean<?> bean =
getCurrentManager().resolve(getCurrentManager().getBeans("date"));
- Date date = (Date) getCurrentManager().getReference(bean, Object.class,
getCurrentManager().createCreationalContext(bean));
- assertNotNull(date);
- }
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NullProducerTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NullProducerTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/NullProducerTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class NullProducerTest extends AbstractWeldTest
-{
-
- @Test(description="WBRI-276")
- public void testProducerMethodReturnsNull()
- {
- getReference(Government.class).destabilize();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ProducerBeanInvocationTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ProducerBeanInvocationTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/ProducerBeanInvocationTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.util.AnnotationLiteral;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * Simple test which invokes a method directly on a normal scoped producer
- * bean to ensure that it's proxy is for that bean and not the product
- * of a producer method.
- *
- * @author David Allen
- *
- */
-@Artifact
-public class ProducerBeanInvocationTest extends AbstractWeldTest
-{
- @Test
- // WELD-546
- public void test()
- {
- Qux bar = getReference(Qux.class);
- assert bar.getBar().equals("qux");
- QuxProducer producer = getReference(QuxProducer.class);
- assert producer.ping();
- Qux bazBar = getReference(Qux.class, new AnnotationLiteral<Baz>(){});
- assert bazBar.getBar().equals("baz");
- }
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Qux.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Qux.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Qux.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,26 +0,0 @@
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.context.RequestScoped;
-
-@RequestScoped
-public class Qux
-{
-
- private final String name;
-
- public Qux(String name)
- {
- this.name = name;
- }
-
- public Qux()
- {
- this("qux");
- }
-
- public String getBar()
- {
- return name;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/QuxProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/QuxProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/QuxProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,21 +0,0 @@
-package org.jboss.weld.tests.producer.method;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Produces;
-
-@RequestScoped
-public class QuxProducer
-{
-
- @Produces @Baz @RequestScoped
- public Qux getQux()
- {
- return new Qux("baz");
- }
-
- public boolean ping()
- {
- return true;
- };
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Short.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Short.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/producer/method/Short.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.producer.method;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * @author Dan Allen
- */
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@Inherited
-public @interface Short {
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/Foo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/Foo.java 2010-07-28 22:23:21
UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/Foo.java 2010-07-28 23:44:31
UTC (rev 6833)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.proxy;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Named;
-
-@Named
-@RequestScoped
-class Foo implements Serializable
-{
-
- public String getMsg()
- {
- return "Hi";
- }
-
-}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/ProxyTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/ProxyTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/ProxyTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.proxy;
-
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ProxyTest extends AbstractWeldTest
-{
-
- @Test(description="WBRI-122")
- public void testImplementationClassImplementsSerializable()
- {
- Bean<?> bean =
getCurrentManager().resolve(getCurrentManager().getBeans("foo"));
- assert getCurrentManager().getReference(bean, Object.class,
getCurrentManager().createCreationalContext(bean)) != null;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Bar.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Bar.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Bar.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-public class Bar
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Baz.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Baz.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Baz.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,22 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-public class Baz
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Foo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Foo.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Foo.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-public class Foo extends FooBase<Bar>
-{
-
- public String getName()
- {
- return "foo";
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/FooBase.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/FooBase.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/FooBase.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-public class FooBase<T>
-{
-
- public String getName()
- {
- return "foobase";
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/FooProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/FooProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/FooProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-import javax.enterprise.inject.Produces;
-
-public class FooProducer
-{
-
- @Produces @Special
- public FooBase<Baz> produce()
- {
- return new FooBase<Baz>();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/LookupFoo.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/LookupFoo.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/LookupFoo.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-import javax.inject.Inject;
-
-public class LookupFoo
-{
-
- @Inject Foo foo;
-
- @Inject @Special FooBase<Baz> foobaz;
-
- public Foo getFoo()
- {
- return foo;
- }
-
- public FooBase<Baz> getFoobaz()
- {
- return foobaz;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/LookupInstanceTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/LookupInstanceTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/LookupInstanceTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-import java.util.List;
-
-import javax.enterprise.inject.Instance;
-import javax.enterprise.util.TypeLiteral;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.literal.DefaultLiteral;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class LookupInstanceTest extends AbstractWeldTest
-{
-
-
- @Test
- public void testLookupInstance() throws Exception
- {
- assert getReference(new
TypeLiteral<Instance<List<?>>>(){}.getRawType(),
DefaultLiteral.INSTANCE) == null;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Special.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Special.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Special.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target({FIELD, METHOD, TYPE, PARAMETER})
-public @interface Special
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Weld256Test.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Weld256Test.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/Weld256Test.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class Weld256Test extends AbstractWeldTest
-{
-
- @Test
- public void testParameterizedInjection()
- {
- LookupFoo lookupFoo = getReference(LookupFoo.class);
- assert lookupFoo.getFoo().getName().equals("foo");
- assert lookupFoo.getFoobaz().getName().equals("foobase");
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Bar.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Bar.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Bar.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Inject;
-
-@ApplicationScoped
-class Bar
-{
-
- public static boolean success;
-
- @Inject Foo foo;
-
- public Bar()
- {
- success = false;
- }
-
- @PostConstruct
- public void postConstruct()
- {
- if (foo.getName().equals("foo"))
- {
- success = true;
- }
- }
-
- public String getName()
- {
- return "bar";
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/CircularDependencyTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/CircularDependencyTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/CircularDependencyTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class CircularDependencyTest extends AbstractWeldTest
-{
-
- @Test
- public void testCircularInjectionOnTwoSimpleDependentBeans() throws Exception
- {
- getReference(Foo.class).getName();
- assert Foo.success;
- assert Bar.success;
- }
-
- @Test
- public void
testDependentProducerMethodDeclaredOnDependentBeanWhichInjectsProducedBean() throws
Exception
- {
- getReference(DependentSelfConsumingDependentProducer.class).ping();
- }
-
- @Test
- public void testDependentSelfConsumingProducer() throws Exception
- {
- getReference(Violation.class).ping();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentLooping.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentLooping.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentLooping.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@interface DependentLooping
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentLoopingProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentLoopingProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentLoopingProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import javax.enterprise.inject.Produces;
-
-class DependentLoopingProducer
-{
-
- @Produces @DependentLooping
- public Violation produceViolation(@DependentLooping Violation violation) {
- return new Violation();
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentSelfConsumingDependentProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentSelfConsumingDependentProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/DependentSelfConsumingDependentProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import javax.enterprise.inject.Produces;
-
-class DependentSelfConsumingDependentProducer
-{
- @SelfConsumingDependent Violation violation;
-
- @Produces @SelfConsumingDependent
- public Violation produceViolation() {
- return new Violation();
- }
-
- public void ping() {
-
- }
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Farm.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Farm.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Farm.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import javax.inject.Inject;
-
-class Farm
-{
-
- @Inject
- public Farm(Farm farm)
- {
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Fish.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Fish.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Fish.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import javax.inject.Inject;
-
-class Fish
-{
-
- private Water water;
-
- @Inject
- public Fish(Water water)
- {
- this.water = water;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Foo.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Foo.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Foo.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-
-class Foo
-{
-
- public static boolean success;
-
- @Inject Bar bar;
-
- public Foo()
- {
- success = false;
- }
-
- @PostConstruct
- public void postConstruct()
- {
- if (bar.getName().equals("bar"))
- {
- success = true;
- }
- }
-
- public String getName()
- {
- return "foo";
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/NormalLooping.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/NormalLooping.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/NormalLooping.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@interface NormalLooping
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/NormalLoopingProducer.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/NormalLoopingProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/NormalLoopingProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Produces;
-
-@ApplicationScoped
-class NormalLoopingProducer
-{
-
- @Produces @ApplicationScoped @NormalLooping
- public Violation produceViolation(@NormalLooping Violation violation) {
- return new Violation();
- }
-
-}
\ No newline at end of file
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/SelfConsumingDependent.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/SelfConsumingDependent.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/SelfConsumingDependent.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@Qualifier
-@interface SelfConsumingDependent
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Violation.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Violation.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Violation.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import java.io.Serializable;
-
-class Violation implements Serializable
-{
-
- public void ping()
- {
-
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Water.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Water.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/resolution/circular/Water.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.resolution.circular;
-
-import javax.inject.Inject;
-
-class Water
-{
- @Inject
- public Water(Fish fish)
- {
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Bar.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Bar.java 2010-07-28 22:23:21
UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Bar.java 2010-07-28 23:44:31
UTC (rev 6833)
@@ -1,24 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.scope;
-
-import javax.enterprise.context.Dependent;
-
-@Dependent
-class Bar extends Foo
-{
-}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Foo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Foo.java 2010-07-28 22:23:21
UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Foo.java 2010-07-28 23:44:31
UTC (rev 6833)
@@ -1,24 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.scope;
-
-import javax.enterprise.context.RequestScoped;
-
-@RequestScoped
-class Foo
-{
-}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/ScopeTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/ScopeTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/ScopeTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.scope;
-
-import java.lang.annotation.Annotation;
-
-import javax.enterprise.context.Dependent;
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.util.AnnotationLiteral;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.Container;
-import org.jboss.weld.context.ContextLifecycle;
-import org.jboss.weld.context.beanstore.HashMapBeanStore;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class ScopeTest extends AbstractWeldTest
-{
-
- private static Annotation USELESS_LITERAL = new AnnotationLiteral<Useless>()
{};
- private static Annotation SPECIAL_LITERAL = new AnnotationLiteral<Special>()
{};
-
- @Test(description="WELD-322")
- public void testScopeDeclaredOnSubclassOverridesScopeOnSuperClass()
- {
- assert
getCurrentManager().resolve(getCurrentManager().getBeans(Bar.class)).getScope().equals(Dependent.class);
- }
- @Test(description="WELD-311")
- public void testScopeOfProducerMethod()
- {
- Bean<Temp> specialTempBean = getBean(Temp.class, SPECIAL_LITERAL);
- Bean<Temp> uselessTempBean = getBean(Temp.class, USELESS_LITERAL);
- assert specialTempBean.getScope().equals(RequestScoped.class);
- assert uselessTempBean.getScope().equals(RequestScoped.class);
- assert getReference(specialTempBean).getNumber() == 10;
- assert getReference(uselessTempBean).getNumber() == 11;
-
- TempConsumer tempConsumer = getReference(TempConsumer.class);
- tempConsumer.getSpecialTemp().setNumber(101);
- tempConsumer.getUselessTemp().setNumber(102);
-
- assert tempConsumer.getSpecialTemp().getNumber() == 101;
- assert tempConsumer.getUselessTemp().getNumber() == 102;
- assert getReference(specialTempBean).getNumber() == 101;
- assert getReference(uselessTempBean).getNumber() == 102;
-
- newRequest();
-
- assert tempConsumer.getSpecialTemp().getNumber() == 10;
- assert tempConsumer.getUselessTemp().getNumber() == 11;
- assert getReference(specialTempBean).getNumber() == 10;
- assert getReference(uselessTempBean).getNumber() == 11;
- }
-
- private void newRequest()
- {
- ContextLifecycle lifecycle =
Container.instance().services().get(ContextLifecycle.class);
- lifecycle.endRequest("test",
lifecycle.getRequestContext().getBeanStore());
- lifecycle.restoreSession("test", new HashMapBeanStore());
- lifecycle.beginRequest("test", new HashMapBeanStore());
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Special.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Special.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Special.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.scope;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target({FIELD, METHOD, TYPE, PARAMETER})
-public @interface Special
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Temp.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Temp.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Temp.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.scope;
-
-public class Temp
-{
-
- private int number;
-
- public Temp(int number)
- {
- this.number = number;
- }
-
- public Temp()
- {
- number = 0;
- }
-
- public int getNumber()
- {
- return number;
- }
-
- public void setNumber(int number)
- {
- this.number = number;
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/TempConsumer.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/TempConsumer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/TempConsumer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.scope;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Inject;
-
-@ApplicationScoped
-public class TempConsumer
-{
-
- @Inject @Special Temp specialTemp;
- @Inject @Useless Temp uselessTemp;
-
- public Temp getSpecialTemp()
- {
- return specialTemp;
- }
-
- public Temp getUselessTemp()
- {
- return uselessTemp;
- }
-
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/TempProducer.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/TempProducer.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/TempProducer.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.scope;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.inject.Produces;
-import javax.inject.Named;
-
-@Named
-@SessionScoped
-public class TempProducer implements Serializable
-{
-
- @Produces
- @RequestScoped
- @Special
- public Temp getTemp()
- {
- return new Temp(10);
- }
-
- @Produces
- @RequestScoped
- @Useless
- Temp t = new Temp(11);
-
-}
\ No newline at end of file
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Useless.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Useless.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/scope/Useless.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.scope;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target({FIELD, METHOD, TYPE, PARAMETER})
-public @interface Useless
-{
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/Bar.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/Bar.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/Bar.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,26 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-/**
- * @author pmuir
- *
- */
-public class Bar
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/CheckableInjectionServices.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/CheckableInjectionServices.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/CheckableInjectionServices.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-import org.jboss.weld.injection.spi.InjectionContext;
-import org.jboss.weld.injection.spi.InjectionServices;
-
-/**
- * @author pmuir
- *
- */
-public class CheckableInjectionServices implements InjectionServices
-{
-
- private boolean before = false;
- private boolean after = false;
- private boolean injectedAfter = false;
- private boolean injectionTargetCorrect = false;
-
- public <T> void aroundInject(InjectionContext<T> injectionContext)
- {
- before = true;
- if (injectionContext.getTarget() instanceof Foo)
- {
- ((Foo) injectionContext.getTarget()).message = "hi!";
- if (injectionContext.getInjectionTarget().getInjectionPoints().size() == 1)
- {
- injectionTargetCorrect =
injectionContext.getInjectionTarget().getInjectionPoints().iterator().next().getType().equals(Bar.class);
- }
- }
- injectionContext.proceed();
- after = true;
- if (injectionContext.getTarget() instanceof Foo)
- {
- Foo foo = (Foo) injectionContext.getTarget();
- injectedAfter = foo.getBar() instanceof Bar &&
foo.getMessage().equals("hi!");
- }
- }
-
- public void reset()
- {
- before = false;
- after = false;
- injectedAfter = false;
- injectionTargetCorrect = false;
- }
-
- public boolean isBefore()
- {
- return before;
- }
-
- public boolean isAfter()
- {
- return after;
- }
-
- public boolean isInjectedAfter()
- {
- return injectedAfter;
- }
-
- public boolean isInjectionTargetCorrect()
- {
- return injectionTargetCorrect;
- }
-
- public void cleanup() {}
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/ContainerStatusTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/ContainerStatusTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/ContainerStatusTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-import org.jboss.weld.Container;
-import org.jboss.weld.ContainerState;
-import org.jboss.weld.mock.MockServletLifecycle;
-import org.jboss.weld.mock.TestContainer;
-import org.testng.annotations.Test;
-
-public class ContainerStatusTest
-{
-
- @Test
- public void testStatus()
- {
- TestContainer container = new TestContainer(new MockServletLifecycle());
- assert !Container.available();
- container.getLifecycle().initialize();
- assert !Container.available();
- assert Container.instance().getState().equals(ContainerState.STARTING);
- container.getLifecycle().getBootstrap().startInitialization();
- assert !Container.available();
- assert Container.instance().getState().equals(ContainerState.STARTING);
- container.getLifecycle().getBootstrap().deployBeans();
- assert Container.available();
- assert Container.instance().getState().equals(ContainerState.INITIALIZED);
- container.getLifecycle().getBootstrap().validateBeans().endInitialization();
- assert Container.available();
- assert Container.instance().getState().equals(ContainerState.VALIDATED);
- container.stopContainer();
- assert !Container.available();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/DiscoverFailsBootstrapTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/DiscoverFailsBootstrapTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/DiscoverFailsBootstrapTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-import org.jboss.weld.bootstrap.WeldBootstrap;
-import org.jboss.weld.bootstrap.api.Bootstrap;
-import org.jboss.weld.bootstrap.api.Environments;
-import org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore;
-import org.testng.annotations.Test;
-
-public class DiscoverFailsBootstrapTest
-{
-
- @Test(groups="bootstrap",
expectedExceptions=IllegalArgumentException.class)
- public void testDiscoverFails()
- {
- Bootstrap bootstrap = new WeldBootstrap();
- bootstrap.startContainer(Environments.SE, null, new ConcurrentHashMapBeanStore());
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/Foo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/Foo.java 2010-07-28
22:23:21 UTC (rev 6832)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/Foo.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-import javax.inject.Inject;
-
-/**
- * @author pmuir
- *
- */
-public class Foo
-{
-
- @Inject
- private Bar bar;
-
- public String message;
-
- /**
- * @return the bar
- */
- public Bar getBar()
- {
- return bar;
- }
-
- /**
- * @return the message
- */
- public String getMessage()
- {
- return message;
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/InjectionServicesTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/InjectionServicesTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/InjectionServicesTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-import java.util.Arrays;
-
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
-
-import org.jboss.weld.injection.spi.InjectionServices;
-import org.jboss.weld.mock.MockEELifecycle;
-import org.jboss.weld.mock.TestContainer;
-import org.testng.annotations.Test;
-
-public class InjectionServicesTest
-{
-
- @Test
- public void testInjectionOfTarget()
- {
- TestContainer container = new TestContainer(new MockEELifecycle(),
Arrays.asList(Foo.class, Bar.class), null);
- CheckableInjectionServices ijs = new CheckableInjectionServices();
- container.getLifecycle().getWar().getServices().add(InjectionServices.class, ijs);
- container.startContainer();
- container.ensureRequestActive();
-
- BeanManager manager = container.getBeanManager();
-
- Bean<? extends Object> bean = manager.resolve(manager.getBeans(Foo.class));
- ijs.reset();
- Foo foo = (Foo) manager.getReference(bean, Foo.class,
manager.createCreationalContext(bean));
-
- assert ijs.isBefore();
- assert ijs.isAfter();
- assert ijs.isInjectedAfter();
- assert ijs.isInjectionTargetCorrect();
-
- assert foo.getBar() != null;
- assert foo.getMessage().equals("hi!");
-
-
- container.stopContainer();
- }
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/PreinstantiateBeanManagerTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/PreinstantiateBeanManagerTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/PreinstantiateBeanManagerTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
-
-import org.jboss.weld.mock.MockEELifecycle;
-import org.jboss.weld.mock.TestContainer;
-import org.testng.annotations.Test;
-
-/**
- * @author kkhan
- *
- */
-public class PreinstantiateBeanManagerTest
-{
-
- @Test
- public void test()
- {
- //Start the container, but do not deploy weld yet
- List<Class<?>> classes = new ArrayList<Class<?>>();
- classes.add(WeldBean.class);
- TestContainer container = new TestContainer(new MockEELifecycle(), classes, null);
- container.getLifecycle().initialize();
-
- BeanManager bootstrapManager = container.getBeanManager();
- assert bootstrapManager != null;
-
- //Check the bean is null since it is not there yet
- Set<Bean<?>> beans = bootstrapManager.getBeans(WeldBean.class);
- assert beans == null || beans.size() == 0;
-
-
- //Start the application
- container.getLifecycle().beginApplication();
- container.ensureRequestActive();
-
- //Check the manager is the same as before
- BeanManager manager = container.getBeanManager();
- assert manager != null;
- assert bootstrapManager == manager;
-
- //Check we can get the bean
- Bean<? extends Object> bean =
manager.resolve(manager.getBeans(WeldBean.class));
- WeldBean weldBean = (WeldBean) manager.getReference(bean, WeldBean.class,
manager.createCreationalContext(bean));
- assert weldBean != null;
-
- container.stopContainer();
- }
-
-}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/WeldBean.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/WeldBean.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/WeldBean.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class WeldBean
-{
-
-}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/WeldStartupTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/WeldStartupTest.java 2010-07-28
22:23:21 UTC (rev 6832)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/bootstrap/WeldStartupTest.java 2010-07-28
23:44:31 UTC (rev 6833)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.tests.unit.bootstrap;
-
-import java.util.Arrays;
-
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
-
-import org.jboss.weld.mock.MockEELifecycle;
-import org.jboss.weld.mock.TestContainer;
-import org.testng.annotations.Test;
-
-/**
- * @author pmuir
- *
- */
-public class WeldStartupTest
-{
-
- @Test
- public void test()
- {
- TestContainer container = new TestContainer(new MockEELifecycle(),
Arrays.asList(Foo.class, Bar.class), null);
- container.startContainer();
- container.ensureRequestActive();
-
- BeanManager manager = container.getBeanManager();
-
- Bean<? extends Object> bean = manager.resolve(manager.getBeans(Foo.class));
- Foo foo = (Foo) manager.getReference(bean, Foo.class,
manager.createCreationalContext(bean));
-
- assert foo != null;
- assert foo.getBar() != null;
-
- container.stopContainer();
- }
-
-}