@Test public void newOperator() throws IOException { Map<String, Object> configInput = ImmutableMap.of( "host", "foobar0.org", "user", "user0", "database", "database0" ); TaskRequest taskRequest = testHelper.createTaskRequest(configInput, Optional.absent()); Operator operator = operatorFactory.newOperator(newContext(testHelper.projectPath(), taskRequest)); assertThat(operator, is(instanceOf(PgOperatorFactory.PgOperator.class))); }
@Override public PgOperator newOperator(OperatorContext context) { return new PgOperator(systemConfig, context, templateEngine); }
PgOperatorFactory implements OperatorFactory { @Override public PgOperator newOperator(OperatorContext context) { return new PgOperator(systemConfig, context, templateEngine); } }
PgOperatorFactory implements OperatorFactory { @Override public PgOperator newOperator(OperatorContext context) { return new PgOperator(systemConfig, context, templateEngine); } @Inject  PgOperatorFactory(Config systemConfig, TemplateEngine templateEngine); }
PgOperatorFactory implements OperatorFactory { @Override public PgOperator newOperator(OperatorContext context) { return new PgOperator(systemConfig, context, templateEngine); } @Inject  PgOperatorFactory(Config systemConfig, TemplateEngine templateEngine); @Override String getType(); @Override PgOperator newOperator(OperatorContext context); }
PgOperatorFactory implements OperatorFactory { @Override public PgOperator newOperator(OperatorContext context) { return new PgOperator(systemConfig, context, templateEngine); } @Inject  PgOperatorFactory(Config systemConfig, TemplateEngine templateEngine); @Override String getType(); @Override PgOperator newOperator(OperatorContext context);  }