-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
@ActiveProfiles({"resthub-mongodb"})
public class TestVideoExistsInMongo extends AbstractTransactionalTest {
@Inject
VideoRepository videoRepository;
@Test
public void videoExists() {
String videoId = "3u1fu6f8Hto";
Integer size = videoRepository.findByVideoId(videoId, new PageRequest(0, 1)).size();
System.out.println("Found : " + size);
}
}
As per the documentation (http://resthub.org/docs/spring/testing/) the above code should work, but instead throws
19:49:20 [main] ERROR o.s.t.c.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@15f9a2a4] to prepare test instance [com.nitinsurana.TestVideoExistsInMongo@17073812]
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels