コード例 #1
0
        public void ShouldCloseChangeRequest()
        {
            MandatoryListChangeRequest changeRequest = new MandatoryListDefault().GetMandatoryListChangeRequestWithRejectedStatus();

            changeRequest.Close();

            Assert.Equal((int)Enums.MandatoryListChangeRequestStatus.Closed, changeRequest.StatusId);
        }
コード例 #2
0
        public void ShoulsThrowBusinessExceptionWhileClosingChangeRequestWhenWrongStatus()
        {
            MandatoryListChangeRequest changeRequest = new MandatoryListDefault().GetMandatoryListChangeRequest();

            var e = Assert.Throws <BusinessRuleException>(() => changeRequest.Close());

            Assert.Equal(Resources.SharedResources.ErrorMessages.NotAddedAuthorized, e.Message);
        }