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