Questions tagged [jukito]

Jukito is a library that combines Junit, Guice, and Mockito into a single tool to make injecting mocks into unit tests easier.

Jukito is a library that combines Junit, Guice, and Mockito into a single tool to make injecting mocks into unit tests easier.

20 questions
0
votes
0 answers

Mockito 0 matchers expected 2 recorded

I am getting weird exception for: when(IMMUTABLE_TABLE_MOCK.get(Mockito.any(), Mockito.any())).thenReturn(true); InvalidUseOfMatchersException 0 matchers expected, 2 recorded IMMUTABLE_TABLE_MOCK is Guava's ImmutableTable :…
sidss
  • 923
  • 1
  • 12
  • 20
0
votes
1 answer

Test class which depends on Guice Provider

How to test a class which depends on Provider<>? Please see the code below. class ToTest { @Inject Provider processorProvider; public buildData() { processorProvider.get().process(); } class…
sidss
  • 923
  • 1
  • 12
  • 20
0
votes
0 answers

Jukito: How to instantiate Widget while testing view

I have Jukito test like this: @RunWith(JukitoRunner.class) public class HomeViewTest extends ViewTestBase { @Inject private HomeView homeView; public static class Module extends ViewTestModule { @Override protected void…
Alex Po
  • 1,837
  • 1
  • 24
  • 28
0
votes
2 answers

How do I bind named providers in a Jukito module?

I am testing a GWTP presenter using Jukito, and can't seem to get named bindings to work. I want to be able to test the onReveal() of my login widget, so I need to provide a copy of my CurrentUserDto that is logged in, and one that isn't. This is…
slugmandrew
  • 1,776
  • 2
  • 25
  • 45
0
votes
0 answers

Why does my my GIN factory always return null?

I am trying to write a Jukito test that uses a GIN factory I created. My factory looks like so: public interface ClientFactory { public DOMModel create(Entity ref); } I am binding it in my gin module like so: public class ClientModule…
Casey Jordan
  • 1,204
  • 1
  • 20
  • 39
1
2