use of org.springframework.data.mongodb.gridfs.GridFsOperations in project spring-data-mongodb by spring-projects.
the class MongoNamespaceTests method testThirdGridFsTemplateFactory.
// DATAMONGO-823
@Test
public void testThirdGridFsTemplateFactory() {
assertTrue(ctx.containsBean("thirdGridFsTemplate"));
GridFsOperations operations = (GridFsOperations) ctx.getBean("thirdGridFsTemplate");
MongoDbFactory dbf = (MongoDbFactory) getField(operations, "dbFactory");
assertEquals("database", getField(dbf, "databaseName"));
assertEquals("bucketString", getField(operations, "bucket"));
MongoConverter converter = (MongoConverter) getField(operations, "converter");
assertNotNull(converter);
}
use of org.springframework.data.mongodb.gridfs.GridFsOperations in project spring-data-mongodb by spring-projects.
the class MongoNamespaceTests method testSecondGridFsTemplateFactory.
// DATAMONGO-628
@Test
public void testSecondGridFsTemplateFactory() {
assertTrue(ctx.containsBean("secondGridFsTemplate"));
GridFsOperations operations = (GridFsOperations) ctx.getBean("secondGridFsTemplate");
MongoDbFactory dbf = (MongoDbFactory) getField(operations, "dbFactory");
assertEquals("database", getField(dbf, "databaseName"));
assertEquals(null, getField(operations, "bucket"));
MongoConverter converter = (MongoConverter) getField(operations, "converter");
assertNotNull(converter);
}
use of org.springframework.data.mongodb.gridfs.GridFsOperations in project spring-data-mongodb by spring-projects.
the class MongoNamespaceTests method testGridFsTemplateFactory.
// DATAMONGO-628
@Test
public void testGridFsTemplateFactory() {
assertTrue(ctx.containsBean("gridFsTemplate"));
GridFsOperations operations = (GridFsOperations) ctx.getBean("gridFsTemplate");
MongoDbFactory dbf = (MongoDbFactory) getField(operations, "dbFactory");
assertEquals("database", getField(dbf, "databaseName"));
MongoConverter converter = (MongoConverter) getField(operations, "converter");
assertNotNull(converter);
}
Aggregations