Author: dallen6
Date: 2009-05-19 13:43:33 -0400 (Tue, 19 May 2009)
New Revision: 2691
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Den.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBeanLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Litter.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Monkey.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/MonkeyLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java
Log:
A few more tests for section 3
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+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.Retention;
+import java.lang.annotation.Target;
+
+import javax.annotation.Named;
+import javax.annotation.Stereotype;
+import javax.context.RequestScoped;
+
+@Stereotype
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@RequestScoped
+@Named
+@interface AnimalStereotype
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Den.java
(from rev 2689,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Den.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Den.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Den.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,24 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+import java.io.Serializable;
+
+public class Den implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+ private String name;
+
+ public Den(String name)
+ {
+ this.name = name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java
(from rev 2689,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,69 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+import javax.ejb.Stateful;
+import javax.event.Observes;
+import javax.inject.Disposes;
+import javax.inject.Produces;
+
+@Stateful
+@AnimalStereotype
+public class Fox implements FoxLocal
+{
+ @Produces
+ public Den den = new Den("FoxDen");
+
+ private int nextLitterSize;
+
+ private boolean litterDisposed = false;
+
+ /* (non-Javadoc)
+ * @see
org.jboss.jsr299.tck.tests.implementation.enterprise.newBean.FoxLocal#getDen()
+ */
+ public Den getDen()
+ {
+ return den;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.jboss.jsr299.tck.tests.implementation.enterprise.newBean.FoxLocal#setDen(org.jboss.jsr299.tck.tests.implementation.enterprise.newBean.Den)
+ */
+ public void setDen(Den den)
+ {
+ this.den = den;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.jboss.jsr299.tck.tests.implementation.enterprise.newBean.FoxLocal#getNextLitterSize()
+ */
+ public int getNextLitterSize()
+ {
+ return nextLitterSize;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.jboss.jsr299.tck.tests.implementation.enterprise.newBean.FoxLocal#setNextLitterSize(int)
+ */
+ public void setNextLitterSize(int nextLitterSize)
+ {
+ this.nextLitterSize = nextLitterSize;
+ }
+
+ @Produces
+ public Litter produceLitter()
+ {
+ return new Litter(nextLitterSize);
+ }
+
+ public void disposeLitter(@Disposes Litter litter)
+ {
+ this.litterDisposed = true;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.jboss.jsr299.tck.tests.implementation.enterprise.newBean.FoxLocal#isLitterDisposed()
+ */
+ public boolean isLitterDisposed()
+ {
+ return litterDisposed;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+import javax.ejb.Local;
+
+@Local
+public interface FoxLocal
+{
+
+ public abstract Den getDen();
+
+ public abstract void setDen(Den den);
+
+ public abstract int getNextLitterSize();
+
+ public abstract void setNextLitterSize(int nextLitterSize);
+
+ public abstract Litter produceLitter();
+
+ public abstract void disposeLitter(Litter litter);
+
+ public abstract boolean isLitterDisposed();
+
+}
\ No newline at end of file
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBean.java
(from rev 2689,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/InitializerSimpleBean.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBean.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBean.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,38 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+import java.io.Serializable;
+
+import javax.annotation.Named;
+import javax.context.SessionScoped;
+import javax.ejb.Stateful;
+import javax.inject.Initializer;
+
+@Stateful
+@SessionScoped
+@Named("Charlie")
+public class InitializerSimpleBean implements Serializable, InitializerSimpleBeanLocal
+{
+ private static final long serialVersionUID = 1L;
+ private static int initializerCalls = 0;
+
+ @Initializer
+ public void initializer()
+ {
+ initializerCalls++;
+ }
+
+ public void businessMethod()
+ {
+
+ }
+
+ public int getInitializerCalls()
+ {
+ return initializerCalls;
+ }
+
+ public void setInitializerCalls(int initializerCalls)
+ {
+ InitializerSimpleBean.initializerCalls = initializerCalls;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBeanLocal.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBeanLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBeanLocal.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+import javax.ejb.Local;
+
+@Local
+public interface InitializerSimpleBeanLocal
+{
+ public void initializer();
+ public void businessMethod();
+ public int getInitializerCalls();
+ public void setInitializerCalls(int initializerCalls);
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/InitializerSimpleBeanLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Litter.java
(from rev 2689,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Litter.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Litter.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Litter.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+class Litter
+{
+ private int quantity;
+
+ public Litter(int quantity)
+ {
+ this.quantity = quantity;
+ }
+
+ public int getQuantity()
+ {
+ return quantity;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Monkey.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Monkey.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Monkey.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+import javax.ejb.Stateful;
+
+@Stateful
+@AnimalStereotype
+public class Monkey implements MonkeyLocal
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Monkey.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/MonkeyLocal.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/MonkeyLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/MonkeyLocal.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+import javax.ejb.Local;
+
+@Local
+public interface MonkeyLocal
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/MonkeyLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -0,0 +1,99 @@
+package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+
+import javax.inject.manager.Bean;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.literals.NewLiteral;
+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.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+@IntegrationTest
+public class NewEnterpriseBeanICTest extends AbstractJSR299Test
+{
+
+ @Test(groups = { "new" })
+ @SpecAssertion(section = "3.3.6", id = "b")
+ public void testNewBeanHasSameInitializers()
+ {
+ InitializerSimpleBeanLocal bean =
getCurrentManager().getInstanceByType(InitializerSimpleBeanLocal.class);
+ InitializerSimpleBeanLocal newBean =
getCurrentManager().getInstanceByType(InitializerSimpleBeanLocal.class, new
NewLiteral());
+ assert bean != newBean;
+ assert bean.getInitializerCalls() == 2;
+ }
+
+ /**
+ * Sets up both the bean and the @New bean with different configurations
+ * so that the correct producer method used can be determined.
+ *
+ * @throws Exception
+ */
+ @Test(groups = { "new", "ri-broken" })
+ @SpecAssertion(section = "3.3.6", id = "j")
+ public void testNewBeanHasNoProducerMethods() throws Exception
+ {
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ FoxLocal fox = getCurrentManager().getInstanceByType(FoxLocal.class);
+ FoxLocal newFox = getCurrentManager().getInstanceByType(FoxLocal.class, new
NewLiteral());
+ fox.setNextLitterSize(3);
+ newFox.setNextLitterSize(5);
+ Litter theOnlyLitter = getCurrentManager().getInstanceByType(Litter.class);
+ assert theOnlyLitter.getQuantity() == fox.getNextLitterSize();
+ }
+
+ }.run();
+ }
+
+ @Test(groups = { "new", "ri-broken" })
+ @SpecAssertion(section = "3.3.6", id = "k")
+ public void testNewBeanHasNoProducerFields() throws Exception
+ {
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ FoxLocal fox = getCurrentManager().getInstanceByType(FoxLocal.class);
+ FoxLocal newFox = getCurrentManager().getInstanceByType(FoxLocal.class, new
NewLiteral());
+ newFox.setDen(new Den("NewFoxDen"));
+ Den theOnlyDen = getCurrentManager().getInstanceByType(Den.class);
+ assert theOnlyDen.getName().equals(fox.getDen().getName());
+ }
+
+ }.run();
+ }
+
+ @Test(groups = { "new", "ri-broken", "disposal" })
+ @SpecAssertion(section = "3.3.6", id = "l")
+ public void testNewBeanHasNoDisposalMethods() throws Exception
+ {
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ FoxLocal fox = getCurrentManager().getInstanceByType(FoxLocal.class);
+ FoxLocal newFox = getCurrentManager().getInstanceByType(FoxLocal.class, new
NewLiteral());
+ Bean<Litter> litterBean =
getCurrentManager().resolveByType(Litter.class).iterator().next();
+ Litter litter = getCurrentManager().getInstanceByType(Litter.class);
+ litterBean.destroy(litter);
+ assert fox.isLitterDisposed();
+ assert !newFox.isLitterDisposed();
+ }
+
+ }.run();
+ }
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java 2009-05-18
18:37:12 UTC (rev 2690)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java 2009-05-19
17:43:33 UTC (rev 2691)
@@ -4,14 +4,15 @@
import java.util.Set;
import javax.context.Dependent;
+import javax.context.RequestScoped;
import javax.inject.AnnotationLiteral;
import javax.inject.Current;
-import javax.inject.DefinitionException;
import javax.inject.New;
import javax.inject.Standard;
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.literals.NewLiteral;
import org.jboss.testharness.impl.packaging.Artifact;
@@ -73,11 +74,16 @@
assert newEnterpriseBean.getName() == null;
}
- @Test(groups = { "stub", "new"})
+ @Test(groups = { "new"})
@SpecAssertion(section = "3.3.6", id = "h")
public void testNewBeanHasNoStereotypes()
{
- assert false;
+ Bean<MonkeyLocal> monkeyBean =
getCurrentManager().resolveByType(MonkeyLocal.class).iterator().next();
+ Bean<MonkeyLocal> newMonkeyBean =
getCurrentManager().resolveByType(MonkeyLocal.class, new NewLiteral()).iterator().next();
+ assert monkeyBean.getScopeType().equals(RequestScoped.class);
+ assert newMonkeyBean.getScopeType().equals(Dependent.class);
+ assert monkeyBean.getName().equals("monkey");
+ assert newMonkeyBean.getName() == null;
}
@Test(groups = {"new" })
@@ -88,65 +94,34 @@
assert getCurrentManager().resolveObservers("event").size() == 1;
}
- @Test(groups = { "new", "stub", "underInvestigation" })
- @SpecAssertion(section = "3.3.6", id = "k")
- public void testNewBeanHasNoProducerFields()
- {
- assert false;
- }
-
- /**
- *
- * TODO There really is no way to prove that a @New bean has no producers
- *
- * PLM - Make sure that there is no ambiguous dependency exception when resolving it -
if the @New bean did have a producer method you would get one (I think?!)
- */
- @Test(groups = { "new", "stub" })
- @SpecAssertion(section = "3.3.6", id = "j")
- public void testNewBeanHasNoProducerMethods()
- {
- assert false;
- }
-
- @Test(groups = { "new", "stub", "disposal" })
- @SpecAssertion(section = "3.3.6", id = "l")
- public void testNewBeanHasNoDisposalMethods()
- {
- assert false;
- }
-
- /**
- * If the @New binding type appears in conjunction with some other binding
- * type, or is specified for a field or parameter of a type which does not
- * satisfy the definition of a simple Web Bean implementation class or
- * enterprise Web Bean implementation class, a DefinitionException is thrown
- * by the container at deployment time.
- */
- @Test(groups = { "stub", "new" }, expectedExceptions =
DefinitionException.class)
- @SpecAssertion(section = "review", id = "review")
- public void testNewAnnotationCannotBeAppliedToNonWebBeanImplementationClass()
- {
- assert false;
- }
-
- @Test @SpecAssertion(section="3.3.6", id = "aa")
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section="3.3.6", id = "aa"),
+ @SpecAssertion(section="3.3.6", id="a")
+ })
public void testForEachEnterpriseBeanANewBeanExists()
{
- assert getCurrentManager().resolveByType(OrderLocal.class).size() == 1;
- assert
getCurrentManager().resolveByType(OrderLocal.class).iterator().next().getBindings().size()
== 1;
- assert
getCurrentManager().resolveByType(OrderLocal.class).iterator().next().getBindings().iterator().next().annotationType().equals(Current.class);
+ Bean<OrderLocal> orderBean =
getCurrentManager().resolveByType(OrderLocal.class).iterator().next();
+ Bean<OrderLocal> newOrderBean =
getCurrentManager().resolveByType(OrderLocal.class, new NewLiteral()).iterator().next();
+ assert orderBean.getBindings().size() == 1;
+ assert
orderBean.getBindings().iterator().next().annotationType().equals(Current.class);
assert getCurrentManager().resolveByType(OrderLocal.class, new NewLiteral()).size()
== 1;
- assert getCurrentManager().resolveByType(OrderLocal.class, new
NewLiteral()).iterator().next().getBindings().size() == 1;
- assert getCurrentManager().resolveByType(OrderLocal.class, new
NewLiteral()).iterator().next().getBindings().iterator().next().annotationType().equals(New.class);
+ assert newOrderBean.getBindings().size() == 1;
+ assert
newOrderBean.getBindings().iterator().next().annotationType().equals(New.class);
+ assert orderBean.getTypes().equals(newOrderBean.getTypes());
+
+ Bean<LionLocal> lionBean = getCurrentManager().resolveByType(LionLocal.class,
TAME_LITERAL).iterator().next();
+ Bean<LionLocal> newLionBean =
getCurrentManager().resolveByType(LionLocal.class, new NewLiteral()).iterator().next();
assert getCurrentManager().resolveByType(LionLocal.class, TAME_LITERAL).size() ==
1;
- assert getCurrentManager().resolveByType(LionLocal.class,
TAME_LITERAL).iterator().next().getBindings().size() == 1;
- assert getCurrentManager().resolveByType(LionLocal.class,
TAME_LITERAL).iterator().next().getBindings().iterator().next().annotationType().equals(Tame.class);
+ assert lionBean.getBindings().size() == 1;
+ assert
lionBean.getBindings().iterator().next().annotationType().equals(Tame.class);
assert getCurrentManager().resolveByType(LionLocal.class, new NewLiteral()).size()
== 1;
- assert getCurrentManager().resolveByType(LionLocal.class, new
NewLiteral()).iterator().next().getBindings().size() == 1;
- assert getCurrentManager().resolveByType(LionLocal.class, new
NewLiteral()).iterator().next().getBindings().iterator().next().annotationType().equals(New.class);
+ assert newLionBean.getBindings().size() == 1;
+ assert
newLionBean.getBindings().iterator().next().annotationType().equals(New.class);
+
+ assert lionBean.getTypes().equals(newLionBean.getTypes());
}
-
}