@Autowired
private ProjectCategoryService projectCategoryService;
@Test
public void testCreateProject() {
ProjectCategory category = new ProjectCategory();
category.setCode("People");
category.setLabel("人员");
projectCategoryService.createCategory(category);
//
ProjectUser user = new ProjectUser();
user.setUsername("haozhonghu");
user.setPassword("123456");
user.setEmail("haozhonghu@hotmail.com");
projectUserDao.insert(user);
//
Date now = new Date();
Project project = new Project();
project.setCode("gavin");
project.setTitle("Gavin Hu");
project.setDescription("This is gavin's profile!");
//
project.setCreatedAt(now);
project.setModifiedAt(now);
project.setCreatedById(user.getId());
project.setModifiedById(user.getId());
project.setCategoryId(category.getId());
//
projectService.createProject(project);
}