0 Replies Latest reply on Mar 6, 2014 10:31 PM by yi gong

    A Mockito extension

    yi gong Newbie

      Hi, all

      I create an extension to integrate mockito, topikachu/arquillian-extension-mockito · GitHub

      I use this extension to verify method execution, for example

      @Inject
      private FooService fooService;
      
      
      @Inject
      @Spy
      private BarResource barResource;
      
      
      @Before
      public void beforeTest() {
          reset(barResource);
      }
      
      
      @Test
      public void testFoo() {     
          fooService.execute();
          verify(barResource).getText();
      
      
      }
      
      
      
      

       

      Any comments are welcome.

       

       

      Thanks