use of example.models.triggers.services.BillingService in project elide by yahoo.
the class VerboseErrorResponsesTestBinder method configure.
@Override
protected void configure() {
EntityDictionary dictionary = EntityDictionary.builder().injector(injector::inject).checks(TestCheckMappings.MAPPINGS).build();
bind(dictionary).to(EntityDictionary.class);
// Elide instance
bindFactory(new Factory<Elide>() {
@Override
public Elide provide() {
DefaultFilterDialect defaultFilterStrategy = new DefaultFilterDialect(dictionary);
RSQLFilterDialect rsqlFilterStrategy = RSQLFilterDialect.builder().dictionary(dictionary).build();
MultipleFilterDialect multipleFilterStrategy = new MultipleFilterDialect(Arrays.asList(rsqlFilterStrategy, defaultFilterStrategy), Arrays.asList(rsqlFilterStrategy, defaultFilterStrategy));
Elide elide = new Elide(new ElideSettingsBuilder(getDataStore()).withAuditLogger(auditLogger).withJoinFilterDialect(multipleFilterStrategy).withSubqueryFilterDialect(multipleFilterStrategy).withEntityDictionary(dictionary).withVerboseErrors().build());
elide.doScans();
return elide;
}
@Override
public void dispose(Elide elide) {
// do nothing
}
}).to(Elide.class).named("elide");
bind(new BillingService() {
@Override
public long purchase(Invoice invoice) {
return 0;
}
}).to(BillingService.class);
}
Aggregations