Author: dallen6
Date: 2010-04-27 15:33:23 -0400 (Tue, 27 Apr 2010)
New Revision: 6168
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
Log:
Fixed test implementation to work better generically with proxies.
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2010-04-27
19:32:14 UTC (rev 6167)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2010-04-27
19:33:23 UTC (rev 6168)
@@ -79,12 +79,8 @@
assert anotherStadtInstance != stadtInstance : "create() should not return
same bean as before";
// Verify that the instance returned is a proxy by checking for all local
interfaces
- Class<?>[] classes = stadtInstance.getClass().getInterfaces();
- List<Class<?>> classesList = Arrays.asList(classes);
- Set<Class<?>> interfaces = new
HashSet<Class<?>>(classesList);
-
- assert interfaces.contains(KleinStadt.class);
- assert interfaces.contains(SchoeneStadt.class);
+ assert stadtInstance instanceof KleinStadt;
+ assert stadtInstance instanceof SchoeneStadt;
}
@Test(groups = { "enterpriseBeans", "clientProxy",
"lifecycle", "integration" })