Last active
March 6, 2020 01:50
-
-
Save SDiamante13/12650f2ebc9e9a11e0dfc37255d0355d to your computer and use it in GitHub Desktop.
An example of how to use @mock and @Injectmocks
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
| @RunWith(MockitoJUnitRunner.class) | |
| public class CustomerServiceTest { | |
| @Mock | |
| private CustomerRepository mockCustomerRepository; | |
| @InjectMocks | |
| private CustomerService customerService; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment