MessagesApi messagesApi = mock(MessagesApi.class);
Validator validator = mock(Validator.class);
FormFactory formFactory = new FormFactory(messagesApi, new Formatters(messagesApi), validator);
Playground controller = new Playground(formFactory);
Form<MyForm> form = formFactory.form(MyForm.class).bindFromRequest();
It is like the main issue is instantiating a validator. Could you help how to do that correctly?(with regards that I don't have injector in tests.)
--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/edf7867e-e03c-4691-87f3-c6578ad29cb2%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
Application app = new GuiceApplicationBuilder()
.disable(DBModule.class, JPAModule.class)
.build();
FormFactory formFactory = app.injector().instanceOf(FormFactory.class);
--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/ffda3350-f96d-4303-8409-e55ba59a7187%40googlegroups.com.