...
Code Block |
---|
public class MyTests extends BaseContextSensitiveTest { public void getPatientByName_shouldReturnValidPatients() { List patients = Context.getPatientService().getPatientsByName("bob"); Assert.assertEquals(34, patients.get(0).getPatientId()); } } |
Be sure to read our Unit Testing Conventions as well.
Getting Started
Using the ?Generate Test Case Plugin almost makes testing fun! Check it out!
To test a class that is not associated with the Context unit testing is only a three step process:
...