Ejemplo n.º 1
0
        public void ShouldThrowBusinessExceptionWihleApproveAndWrongStatus()
        {
            MandatoryList mandatoryList = new MandatoryListDefault().GetMandatoryListWithProdcuts();

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

            Assert.Equal(Resources.SharedResources.ErrorMessages.NotAddedAuthorized, e.Message);
        }
        public void ShouldApproveChangeRequest()
        {
            MandatoryListChangeRequest changeRequest = new MandatoryListDefault().GetMandatoryListChangeRequest();

            changeRequest.Approve();

            Assert.Equal((int)Enums.MandatoryListChangeRequestStatus.Approved, changeRequest.StatusId);
        }
Ejemplo n.º 3
0
        public void ShouldApproveMandatoryList()
        {
            MandatoryList mandatoryList = new MandatoryListDefault().GetMandatoryListWithStatusWaitingApprove();

            mandatoryList.Approve();

            Assert.Equal((int)Enums.MandatoryListStatus.Approved, mandatoryList.StatusId);
        }