Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: link-ified a reference to the unit testing conventions page

...

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:

...