-
Notifications
You must be signed in to change notification settings - Fork 3
Automated Testing
Tim Tong edited this page Aug 2, 2015
·
12 revisions
- JUnit
- Mockito
- PowerMockito
*** Should only be using mock objects and mocked behavior for unit testing.
The most typical JUnit commands will be:
- Assert.assertEquals(Object expected, Object actual);
- Assert.assertTrue(boolean expression);
- Assert.assertFalse(boolean expression);
- Assert.assertNull(Object object);
- Assert.assertNotNull(Object object);
See JUnit API for more.
To create a mock object
@RunWith(MockitoJUnitRunner.class)
public class Test {
@Mock
private Object object;
}
Integration testing is temporarily put on hold.