コード例 #1
0
  @Test(dependsOnMethods = "create")
  public void read() {

    repo = ctx.getBean(PatientsRepository.class);

    Patients doc = repo.findOne(id);
    Assert.assertEquals("P1001", doc.getPatientID());
  }
コード例 #2
0
  @Test(dependsOnMethods = "read")
  public void update() {

    repo = ctx.getBean(PatientsRepository.class);

    Patients doc = repo.findOne(id);

    Patients updateDoc = new Patients.Builder().patients(doc).patientID("P1002").build();
    repo.save(updateDoc);
    Patients newDoc = repo.findOne(id);
    Assert.assertEquals("P1002", newDoc.getPatientID());
  }