Created
March 14, 2022 09:46
-
-
Save Farhandroid/87d9f8ca6f55d877e70b99c768397519 to your computer and use it in GitHub Desktop.
MockitoSetup.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Before | |
fun setUp() { | |
areaRepository = Mockito.mock(AreaRepository::class.java) | |
Mockito.`when`(areaRepository.calculateArea(3.5)).thenReturn(38.465) | |
areaViewModel = AreaViewModel(areaRepository) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment