Code example for XmlBeanFactory

Methods: containsBeanDefinition, getBeanDefinition

0
        setupContext("test-feature-service-context.xml"); 
    } 
     
    @Test
    public void testCreateFeatureServiceFactory() { 
        assertNotNull(context.containsBeanDefinition("featureServiceFactory"));
        assertEquals(FeatureServiceDirectFactory.class.getName(), context.getBeanDefinition("featureServiceFactory").getBeanClassName());
    } 
     
    @Test
    public void testFeatureServiceFactoryProperties() { 
        BeanDefinition beanDefinition = context.getBeanDefinition("featureServiceFactory");
 
        // Test ContextProviders setup 
        PropertyValue contextProvidersProperty = beanDefinition.getPropertyValues().getPropertyValue("contextProviders");
        assertNotNull(contextProvidersProperty);
        assertTrue(contextProvidersProperty.getValue() instanceof List);
        List contextProvidersList = ((List)contextProvidersProperty.getValue());
        assertEquals(2, contextProvidersList.size());