I have a Service with simple query in it that I’d like to integrate into unit test. But I constantly get
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘xxxx’ available error. I tried to use AppBeans.get() method , no luck.
I have tried the methods in the existing topics in the forum, none of it worked so far.
All I want is to test if the service queried the correct result from database.
Version 6.6.4
public class SampleIntegrationTest {
....
private StatiiServiceBean statusService ;
@Before
public void setUp() throws Exception {
....
dataManager = AppBeans.get(DataManager.class);
statusService = AppBeans.get(StatiiServiceBean.class);
}
The Datamanager can be found and no error using it.
Thank you