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); }
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); }