Mock-framework for Java
- Mock and spy objects with annotations
- Stubbing
- Argument matcher
- thenThrow method
- Call Real Methods
- with
mock()method:
Test test = Tarjun.mock(Test.class);- with
@Mockannotation:
@Mock
Test test;- with
spy()method:
List<String> testList = new ArrayList<>();
List<String> testListSpied = Tarjun.spy(testList)- with
@Spyannotation:
@Spy
List<String> testListSpied = new ArrayList<>();