@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()); }
@Test public void testCreateNewQualificationFile() { QualificationFileCategory qualificationFileCategory = qualificationFileCategoryService.getQualificationFileCategoryById(1); QualificationFile qualificationFile = new QualificationFile(); qualificationFile.setName("企业法人营业执照"); qualificationFile.setFilePath("qualificationFile/qyfzyyzz.jepg"); qualificationFile.setQualificationFileCategory(qualificationFileCategory); qualificationFileService.createNewQualificationFile(qualificationFile, user); assertNotNull(qualificationFile.getId()); assertEquals(user.getName(), qualificationFile.getCreatedBy()); assertNotNull(qualificationFile.getCreateOn()); assertEquals( qualificationFileCategory.getName(), qualificationFile.getQualificationFileCategory().getName()); }