use of com.xiaomi.shepher.common.Status in project shepher by XiaoMi.
the class PermissionServiceTest method testAddForTeamIdClusterPathStatus.
/**
* Method: add(long teamId, String cluster, String path, Status status)
*/
@Test
public void testAddForTeamIdClusterPathStatus() throws Exception {
long teamId = 5;
Status status = Status.AGREE;
String cluster = "local_test";
String path = "/test";
boolean addResult = permissionService.add(teamId, cluster, path, status);
Assert.assertEquals(true, addResult);
}
use of com.xiaomi.shepher.common.Status in project shepher by XiaoMi.
the class TeamServiceTest method testUpdateStatus.
/**
* Method: updateStatus(long id, Status status)
*/
@Test
public void testUpdateStatus() throws Exception {
long id = 3;
Status status = Status.DELETE;
int updateResult = teamService.updateStatus(id, status);
Assert.assertEquals(RESULT_OK, updateResult);
}
use of com.xiaomi.shepher.common.Status in project shepher by XiaoMi.
the class PermissionServiceTest method testUpdateStatus.
/**
* Method: updateStatus(long id, Status status)
*/
@Test
public void testUpdateStatus() throws Exception {
int id = 3;
Status status = Status.AGREE;
int updateResult = permissionService.updateStatus(id, status);
Assert.assertEquals(RESULT_OK, updateResult);
}
use of com.xiaomi.shepher.common.Status in project shepher by XiaoMi.
the class PermissionServiceTest method testAddForPermissionIdTeamIdStatus.
/**
* Method: add(long permissionId, long teamId, Status status)
*/
@Test
public void testAddForPermissionIdTeamIdStatus() throws Exception {
long permissionId = 3;
long teamId = 5;
Status status = Status.AGREE;
PermissionTeam permissionTeam = permissionService.add(permissionId, teamId, status);
Assert.assertNotNull(permissionTeam);
Assert.assertEquals(4, permissionTeam.getId());
}
Aggregations