Am Dienstag, den 31.07.2007, 15:03 +0000 schrieb [EMAIL PROTECTED]:
> Author: dandiep
> Date: Tue Jul 31 08:03:43 2007
> New Revision: 561354
> 
> Modified: 
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?view=diff&rev=561354&r1=561353&r2=561354
> ==============================================================================
> --- 
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
>  (original)
> +++ 
> incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
>  Tue Jul 31 08:03:43 2007
> @@ -85,6 +85,12 @@
>          ep = (EndpointImpl) bean;
>          assertTrue(ep.getInvoker() instanceof NullInvoker);
>          assertTrue(ep.getService().getInvoker() instanceof NullInvoker);
> +
> +        bean = ctx.getBean("implementorClass");
> +        assertNotNull(bean);
> +        ep = (EndpointImpl) bean;
> +        assertEquals(Hello.class, ep.getImplementorClass());
> +        assertTrue(ep.getImplementor().getClass() == Object.class);
>          
>          bean = ctx.getBean("epWithProps");
>          assertNotNull(bean);
> @@ -109,6 +115,21 @@
>          bean = ctx.getBean("wsdlLocation");
>          assertNotNull(bean);
>          
> +        // test for existence of Endpoint without an id element
> +        boolean found = false;
> +        String[] names = ctx.getBeanNamesForType(EndpointImpl.class);
> +        for (String n : names) {
> +            if (n.startsWith(EndpointImpl.class.getName())) { 
> +                found = true;
> +            }
> +        }

If there is a bean named "FooBar" and I'm searching for an Endpoint
named "Foo", wouldn't the above incorrectly set found = true because of
the startWith() (instead of equals())?

Thanks,
Glen


Reply via email to