コード例 #1
0
 @Test(dependsOnMethods = "read")
 public void update() throws Exception {
   PersonLanguage personLanguage = repo.findById(id);
   PersonLanguage newPersonLanguage =
       new PersonLanguage.Builder().copy(personLanguage).languageId("Xhosa").build();
   repo.update(newPersonLanguage);
   PersonLanguage updatedPersonLanguage = repo.findById(id);
   Assert.assertEquals("Xhosa", updatedPersonLanguage.getLanguageId());
 }
コード例 #2
0
  @Test
  public void create() throws Exception {
    PersonLanguage language1 =
        PersonLanguageFactory.getPersonLanguage("Test1", "Test2", "Test3", "Test4", "Test5");
    PersonLanguage language2 =
        PersonLanguageFactory.getPersonLanguage("Test1", "Test2", "Test3", "Test4", "Test5");
    PersonLanguage language3 =
        PersonLanguageFactory.getPersonLanguage("Test1", "Test2", "Test3", "Test4", "Test5");

    System.out.println(" Language 1 " + language1.getId());
    System.out.println(" Language 2 " + language2.getId());
    System.out.println(" Language 3 " + language3);
    repo.save(language1);
    Assert.assertNotNull(language1.getLanguageId(), "Xhosa");
  }