@Test public void errorCheckNoPort() { Config config = newConfig() .set("host", "localhost") .set("subject", "test") .set("_command", "mail_body.txt") .set("timezone", "Asia/Tokyo") .set("from", "alice@example.com") .set("to", "bob@example.com"); try { Operator op = factory.newOperator(newContext( tempPath, newTaskRequest().withConfig(config))); op.run(); fail("should be thrown Exception."); } catch (ConfigException ignore) { } }
@Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); }
MailOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); } }
MailOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); } @Inject  MailOperatorFactory(TemplateEngine templateEngine, Config systemConfig); }
MailOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); } @Inject  MailOperatorFactory(TemplateEngine templateEngine, Config systemConfig); String getType(); @Override Operator newOperator(OperatorContext context); }
MailOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new MailOperator(context); } @Inject  MailOperatorFactory(TemplateEngine templateEngine, Config systemConfig); String getType(); @Override Operator newOperator(OperatorContext context);  }