SHARE
TWEET

Untitled

a guest Apr 21st, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @RunWith(AndroidJUnit4::class)
  2. abstract class BaseMockitoTest {
  3.  
  4.     private val mockitoMocksCollector = MockitoMocksCollector()
  5.  
  6.     @After
  7.     fun after() {
  8.         val allMocks = mockitoMocksCollector.getAllMocks()
  9.         allMocks.forEach { mock ->
  10.             verifyNoMoreInteractions(mock)
  11.         }
  12.         mockitoMocksCollector.close()
  13.     }
  14.  
  15.     protected fun inOrderVerifier(): InOrder {
  16.         return inOrder(mockitoMocksCollector.getAllMocks())
  17.     }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top