use of org.springframework.integration.mongodb.inbound.MongoDbMessageSource in project spring-integration by spring-projects.
the class MongoDbInboundChannelAdapterParserTests method fullConfigWithQueryExpression.
@Test
public void fullConfigWithQueryExpression() {
MongoDbMessageSource source = assertMongoDbMessageSource(this.fullConfigWithQueryExpressionAdapter);
assertTrue(TestUtils.getPropertyValue(source, "queryExpression") instanceof SpelExpression);
assertEquals("new BasicQuery('{''address.state'' : ''PA''}').limit(2)", TestUtils.getPropertyValue(source, "queryExpression.expression"));
}
use of org.springframework.integration.mongodb.inbound.MongoDbMessageSource in project spring-integration by spring-projects.
the class MongoDbInboundChannelAdapterParserTests method fullConfigWithCollectionExpression.
@Test
public void fullConfigWithCollectionExpression() {
MongoDbMessageSource source = assertMongoDbMessageSource(this.fullConfigWithCollectionExpressionAdapter);
assertTrue(TestUtils.getPropertyValue(source, "collectionNameExpression") instanceof SpelExpression);
assertEquals("'foo'", TestUtils.getPropertyValue(source, "collectionNameExpression.expression"));
}
use of org.springframework.integration.mongodb.inbound.MongoDbMessageSource in project spring-integration by spring-projects.
the class MongoDbInboundChannelAdapterParserTests method fullConfigWithQuery.
@Test
public void fullConfigWithQuery() {
MongoDbMessageSource source = assertMongoDbMessageSource(this.fullConfigWithQueryAdapter);
assertTrue(TestUtils.getPropertyValue(source, "queryExpression") instanceof LiteralExpression);
assertEquals("{'address.state' : 'PA'}", TestUtils.getPropertyValue(source, "queryExpression.literalValue"));
}
Aggregations