Author: dallen6
Date: 2010-04-27 19:32:18 -0400 (Tue, 27 Apr 2010)
New Revision: 6169
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
Log:
Fixed test implementation to work better generically with proxies.
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2010-04-27
19:33:23 UTC (rev 6168)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2010-04-27
23:32:18 UTC (rev 6169)
@@ -84,10 +84,9 @@
// Verify that the instance returned is a proxy by checking for all local
interfaces
assert getCurrentConfiguration().getBeans().isProxy(stadtInstance);
- Set<Class> interfaces = new
HashSet<Class>(Arrays.asList(stadtInstance.getClass().getInterfaces()));
- assert interfaces.contains(KleinStadt.class);
- assert interfaces.contains(SchoeneStadt.class);
- assert interfaces.contains(Serializable.class);
+ assert stadtInstance instanceof KleinStadt;
+ assert stadtInstance instanceof SchoeneStadt;
+ assert stadtInstance instanceof Serializable;
}
@Test(groups = { "enterpriseBeans", "clientProxy",
"lifecycle", "integration" })
@@ -157,9 +156,8 @@
assert stadtInstance != null : "Expected instance to be created by
container";
// Verify that the instance returned is a proxy by checking for all local
interfaces
- Set<Class> interfaces = new
HashSet<Class>(Arrays.asList(stadtInstance.getClass().getInterfaces()));
- assert interfaces.contains(NeueStadt.class);
- assert interfaces.contains(GeschichtslosStadt.class);
+ assert stadtInstance instanceof NeueStadt;
+ assert stadtInstance instanceof GeschichtslosStadt;
}
@Test(groups = { "enterpriseBeans", "lifecycle",
"integration" })