@Test public void testFormatString() { thrown.expect(CreationException.class); thrown.expectMessage("Test java.lang.String"); thrown.expectMessage(not(containsString("CreationException"))); Guice.createInjector(new AbstractModule() { @Override protected void configure() { DelayedError.create(binder(), "Test %s", new Key<String>() { }); } }); }
public static DelayedError create(Binder binder, String message, Object... args) { return create(binder, new Message(PrettyTypes.format(message, args))); }
DelayedError { public static DelayedError create(Binder binder, String message, Object... args) { return create(binder, new Message(PrettyTypes.format(message, args))); } }
DelayedError { public static DelayedError create(Binder binder, String message, Object... args) { return create(binder, new Message(PrettyTypes.format(message, args))); } private  DelayedError(Throwable error); }
DelayedError { public static DelayedError create(Binder binder, String message, Object... args) { return create(binder, new Message(PrettyTypes.format(message, args))); } private  DelayedError(Throwable error); static DelayedError create(Binder binder, String message, Object... args); static DelayedError create(Binder binder, Throwable t); static DelayedError create(Binder binder, Message message); void cancel(); }
DelayedError { public static DelayedError create(Binder binder, String message, Object... args) { return create(binder, new Message(PrettyTypes.format(message, args))); } private  DelayedError(Throwable error); static DelayedError create(Binder binder, String message, Object... args); static DelayedError create(Binder binder, Throwable t); static DelayedError create(Binder binder, Message message); void cancel();  }