use of org.apache.dolphinscheduler.dao.entity.ProjectUser in project dolphinscheduler by apache.
the class ProjectUserMapperTest method insertOne.
/**
* insert
* @return ProjectUser
*/
private ProjectUser insertOne() {
// insertOne
ProjectUser projectUser = new ProjectUser();
projectUser.setProjectId(1010);
projectUser.setUserId(111);
projectUserMapper.insert(projectUser);
return projectUser;
}
use of org.apache.dolphinscheduler.dao.entity.ProjectUser in project dolphinscheduler by apache.
the class ProjectUserMapperTest method testQueryProjectRelation.
/**
* test query project relation
*/
@Test
public void testQueryProjectRelation() {
ProjectUser projectUser = insertOne();
ProjectUser projectUser1 = projectUserMapper.queryProjectRelation(projectUser.getProjectId(), projectUser.getUserId());
Assert.assertNotEquals(projectUser1, null);
}
use of org.apache.dolphinscheduler.dao.entity.ProjectUser in project dolphinscheduler by apache.
the class ProjectServiceTest method getProjectUser.
/**
* get project user
*/
private ProjectUser getProjectUser() {
ProjectUser projectUser = new ProjectUser();
projectUser.setProjectId(1);
projectUser.setUserId(1);
return projectUser;
}
use of org.apache.dolphinscheduler.dao.entity.ProjectUser in project dolphinscheduler by apache.
the class ProjectUserMapperTest method testQuery.
/**
* test query
*/
@Test
public void testQuery() {
ProjectUser projectUser = insertOne();
// query
List<ProjectUser> projectUsers = projectUserMapper.selectList(null);
Assert.assertNotEquals(projectUsers.size(), 0);
}
use of org.apache.dolphinscheduler.dao.entity.ProjectUser in project dolphinscheduler by apache.
the class ProjectUserMapperTest method testUpdate.
/**
* test update
*/
@Test
public void testUpdate() {
// insertOne
ProjectUser projectUser = insertOne();
projectUser.setCreateTime(new Date());
// update
int update = projectUserMapper.updateById(projectUser);
Assert.assertEquals(update, 1);
}
Aggregations