public void ShouldCloseChangeRequest() { MandatoryListChangeRequest changeRequest = new MandatoryListDefault().GetMandatoryListChangeRequestWithRejectedStatus(); changeRequest.Close(); Assert.Equal((int)Enums.MandatoryListChangeRequestStatus.Closed, changeRequest.StatusId); }
public void ShoulsThrowBusinessExceptionWhileClosingChangeRequestWhenWrongStatus() { MandatoryListChangeRequest changeRequest = new MandatoryListDefault().GetMandatoryListChangeRequest(); var e = Assert.Throws <BusinessRuleException>(() => changeRequest.Close()); Assert.Equal(Resources.SharedResources.ErrorMessages.NotAddedAuthorized, e.Message); }