use of com.epam.pipeline.controller.vo.IssueVO in project cloud-pipeline by epam.
the class IssueManagerTest method creatingIssueForNonExistentEntityShouldThrowException.
@Test(expected = IllegalArgumentException.class)
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void creatingIssueForNonExistentEntityShouldThrowException() {
when(authManager.getAuthorizedUser()).thenReturn(AUTHOR);
Long nonExistentEntityId = 1L;
EntityVO nonExistentEntity = new EntityVO(nonExistentEntityId, AclClass.PIPELINE);
IssueVO issueVO = getIssueVO(ISSUE_NAME, ISSUE_TEXT, nonExistentEntity);
issueManager.createIssue(issueVO);
verify(notificationManager, Mockito.never()).notifyIssue(any(), any(), any());
}
Aggregations