Example #1
0
        public void ShouldThrowBusinessExceptionWhileClosingEditRequestWhenWrongRequestStatus()
        {
            MandatoryList mandatoryList = new MandatoryListDefault().GetMandatoryListWithStatusApprove();

            mandatoryList.ChangeRequests.Add(new MandatoryListDefault().GetMandatoryListChangeRequest());

            var e = Assert.Throws <BusinessRuleException>(() => mandatoryList.CloseEdit());

            Assert.Equal(Resources.SharedResources.ErrorMessages.NotAddedAuthorized, e.Message);
        }
Example #2
0
        public void ShouldCloseEditRequest()
        {
            MandatoryList mandatoryList = new MandatoryListDefault().GetMandatoryListWithStatusApprove();

            mandatoryList.ChangeRequests.Add(new MandatoryListDefault().GetMandatoryListChangeRequestWithRejectedStatus());

            mandatoryList.CloseEdit();

            Assert.Equal((int)Enums.MandatoryListChangeRequestStatus.Closed, mandatoryList.ChangeRequests.FirstOrDefault().StatusId);
        }