示例#1
0
        public TransactionsBll(IConfigurationBll configurationBll, ISecurityBll securityBll, ITransactionDal transactionDal)
        {
            if (configurationBll == null)
            {
                throw new ArgumentNullException("configurationBll");
            }
            if (securityBll == null)
            {
                throw new ArgumentNullException("securityBll");
            }
            if (transactionDal == null)
            {
                throw new ArgumentNullException("transactionDal");
            }

            _configurationBll = configurationBll;
            _securityBll      = securityBll;
            _transactionDal   = transactionDal;
        }
示例#2
0
        public void Init()
        {
            _pos             = new PosBdo();
            _pos.Id          = 1005;
            _pos.Name        = "Ritos Masazai";
            _pos.PosUrl      = new Uri("http://www.ritosmasazai.lt/");
            _pos.ValidateUrl = new Uri("http://localhost:56620/Test/Validate");

            _communicationBllMock.Setup(x => x.GetJsonResponse <BaseResponse>(It.IsAny <Uri>())).Returns(new BaseResponse {
                Status = true, Message = "Faked OK message"
            });

            _configBllMock = new Mock <IConfigurationBll>();
            _configBllMock.Setup(x => x.Get())
            .Returns(() => new MySettings
            {
                LengthOfPosUid = 32
            });

            _securityBll = new SecurityBll(_configBllMock.Object, _communicationBllMock.Object);
        }
示例#3
0
        public ProductsBll(GiftValidationBll giftValidationBll, ISecurityBll securityBll, IProductsDal productsDal, IPosDal posDal)
        {
            if (giftValidationBll == null)
            {
                throw new ArgumentNullException("validationBll");
            }
            if (productsDal == null)
            {
                throw new ArgumentNullException("productsDal");
            }
            if (posDal == null)
            {
                throw new ArgumentNullException("posDal");
            }
            if (securityBll == null)
            {
                throw new ArgumentNullException("securityBll");
            }

            _giftValidationBll = giftValidationBll;
            _productsDal       = productsDal;
            _posDal            = posDal;
            _securityBll       = securityBll;
        }