コード例 #1
0
  @Test
  public void testGetQualificationFileById() {
    QualificationFile qualificationFile = qualificationFileService.getQualificationFileById(1);

    assertEquals("企业法人营业执照", qualificationFile.getName());
    assertEquals("admin", qualificationFile.getCreatedBy());
    assertEquals("2013-06-29 13:58:38", DateTimeUtils.format(qualificationFile.getCreateOn()));
    assertNull(qualificationFile.getModifiedBy());
    assertNull(qualificationFile.getModifyOn());
  }
コード例 #2
0
  @Test
  public void testUpdateQualificationFile() {
    QualificationFile qualificationFile = qualificationFileService.getQualificationFileById(1);
    qualificationFile.setName("税务登记证");

    qualificationFile = qualificationFileService.updateQualificationFile(qualificationFile, user);
    assertEquals("税务登记证", qualificationFile.getName());
    assertEquals(user.getName(), qualificationFile.getModifiedBy());
    assertNotNull(qualificationFile.getModifyOn());
  }