Esempio n. 1
0
        private void ApproveDocument(string documentId, string manCo, string docType, string subDocType, List <string> documentsAlreadyApproved, List <string> documentsApproved, List <string> documentsAlreadyRejcted)
        {
            try
            {
                _approvalService.ApproveDocument(this.HttpContext.User.Identity.Name, documentId, manCo, docType, subDocType);

                documentsApproved.Add(documentId);
            }
            catch (DocumentAlreadyApprovedException)
            {
                documentsAlreadyApproved.Add(documentId);
            }
            catch (DocumentAlreadyRejectedException)
            {
                documentsAlreadyRejcted.Add(documentId);
            }
        }
Esempio n. 2
0
 public void GivenValidData_WhenADocumentIsApproved_ThenTheDocumentIsApproved()
 {
     _approvalService.ApproveDocument(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>());
     _approvalEngine.Verify(s => s.ApproveDocument(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>()), Times.Once);
 }