Esempio n. 1
0
 public CustomerStatisticApiController(ICustomerLogic customerLogic, IFeeLogic feeLogic, IExamLogic examLogic, IConclusionLogic conclusionLogic)
 {
     _customerLogic   = customerLogic;
     _feeLogic        = feeLogic;
     _examLogic       = examLogic;
     _conclusionLogic = conclusionLogic;
 }
        public CustomerLogicTest()
        {
            var unitMocked = new CustomerRepositoryMocked();

            _unitMocked    = unitMocked.GetInstance();
            _customerLogic = new CustomerLogic(_unitMocked);
        }
Esempio n. 3
0
 public Controller(ICustomerLogic customerLogic, IProblemCollector problemCollector,
                   IMapper mapper, IPublishEndpoint publishEndpoint)
 {
     _problemCollector = problemCollector;
     CustomerLogic     = customerLogic;
     Mapper            = mapper;
     PublishEndpoint   = publishEndpoint;
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoveInLogic"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="mcfClient">The mcfClient.</param>
 /// <param name="addressApi">The addressApi.</param>
 /// <param name="accountApi"></param>
 /// <param name="deviceApi">The deviceApi.</param>
 /// <param name="customerLogic"></param>
 public MoveInLogic(ILogger <MoveInLogic> logger, IMcfClient mcfClient, IAddressApi addressApi, IAccountApi accountApi, IDeviceApi deviceApi, ICustomerLogic customerLogic)
 {
     _logger        = logger ?? throw new ArgumentNullException(nameof(logger));
     _mcfClient     = mcfClient ?? throw new ArgumentNullException(nameof(mcfClient));
     _addressApi    = addressApi ?? throw new ArgumentNullException(nameof(addressApi));
     _accountApi    = accountApi ?? throw new ArgumentNullException(nameof(accountApi));
     _deviceApi     = deviceApi ?? throw new ArgumentNullException(nameof(deviceApi));
     _customerLogic = customerLogic ?? throw new ArgumentNullException(nameof(customerLogic));
 }
Esempio n. 5
0
 public OrderLogic(NowVNSimulatorContext dbContext, ICartLogic cartLogic,
                   ICustomerLogic customerLogic, IProductLogic productLogic, IOrderDetailLogic orderDetailLogic)
     : base(dbContext)
 {
     this.customerLogic    = customerLogic;
     this.cartLogic        = cartLogic;
     this.productLogic     = productLogic;
     this.orderDetailLogic = orderDetailLogic;
 }
Esempio n. 6
0
 public BankAccountLogic(IBankAccountRepository repo,
                         BankAccountDTOMapper dtomapper,
                         BankAccountFactory bankaccountfactory,
                         ICustomerLogic customerlogic)
 {
     _repository         = repo;
     _dtoMapper          = dtomapper;
     _bankAccountFactory = bankaccountfactory;
     _customerLogic      = customerlogic;
 }
Esempio n. 7
0
        public ETLService(ICatalogLogic categoryLogic, ICustomerLogic customerLogic, ICategoriesImport esCategoriesImport, IHouseBrandsImport esHouseBrandsImport, IItemImport esItemImport, IListsImportLogic listImportLogic, IEventLogRepository log)

        {
            this.categoryLogic             = categoryLogic;
            this.customerLogic             = customerLogic;
            this._esCategoriesImportLogic  = esCategoriesImport;
            this._esHouseBrandsImportLogic = esHouseBrandsImport;
            this._esItemImportLogic        = esItemImport;
            this._listImportLogic          = listImportLogic;
            this._log = log;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SyncController" /> class.
 /// </summary>
 /// <param name="appSettings">The application settings.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="customerSummaryLogic">The customer summary logic.</param>
 /// <param name="requestContextAdapter">The request context adapter.</param>
 /// <exception cref="ArgumentNullException">appSettings
 /// or
 /// logger
 /// or
 /// accountSummaryLogic</exception>
 public SyncController(
     IOptions <AppSettings> appSettings,
     ILogger <SyncController> logger,
     ICustomerLogic customerSummaryLogic,
     IRequestContextAdapter requestContextAdapter)
 {
     _config = (appSettings ?? throw new ArgumentNullException(nameof(appSettings))).Value;
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _customerSummaryLogic = customerSummaryLogic ?? throw new ArgumentNullException(nameof(customerSummaryLogic));
     _contextAdapter       = requestContextAdapter ?? throw new ArgumentNullException(nameof(requestContextAdapter));
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomerController"/> class.
 /// </summary>
 /// <param name="appSettings">application config information</param>
 /// <param name="cache">memory cache (currently not used)</param>
 /// <param name="logger">used for logging</param>
 /// <param name="customerLogic">contains logic for customer controller</param>
 public CustomerController(
     IOptions <AppSettings> appSettings,
     IDistributedCache cache,
     ILogger <CustomerController> logger,
     ICustomerLogic customerLogic)
 {
     _config        = (appSettings ?? throw new ArgumentNullException(nameof(appSettings))).Value;
     _cache         = cache ?? throw new ArgumentNullException(nameof(cache));
     _logger        = logger ?? throw new ArgumentNullException(nameof(logger));
     _customerLogic = customerLogic ?? throw new ArgumentNullException(nameof(customerLogic));
 }
Esempio n. 10
0
        public void Constructor_AuthenticationApiIsNull_ExceptionThrown()
        {
            // Arrange
            mockAuthenticationApi = null;
            ICustomerLogic logic = null;

            // Act
            Action action = () => logic = CreateCustomerLogic();

            // Assert
            logic.ShouldBeNull();
            action.ShouldThrow <ArgumentNullException>().
            ParamName.ShouldBe("authenticationApi");
        }
Esempio n. 11
0
        public void Constructor_DistributedCacheIsNull_ExceptionThrown()
        {
            // Arrange
            mockDistributedCache = null;
            ICustomerLogic logic = null;

            // Act
            Action action = () => logic = CreateCustomerLogic();

            // Assert
            logic.ShouldBeNull();
            action.ShouldThrow <ArgumentNullException>().
            ParamName.ShouldBe("redisCache");
        }
Esempio n. 12
0
        public void Constructor_CustomerRepositoryIsNull_ExceptionThrown()
        {
            // Arrange
            mockCustomerRepository = null;
            ICustomerLogic logic = null;

            // Act
            Action action = () => logic = CreateCustomerLogic();

            // Assert
            logic.ShouldBeNull();
            action.ShouldThrow <ArgumentNullException>().
            ParamName.ShouldBe("customerRepository");
        }
Esempio n. 13
0
        public void Constructor_OptionsIsNull_ExceptionThrown()
        {
            // Arrange
            mockOptions = null;
            ICustomerLogic logic = null;

            // Act
            Action action = () => logic = CreateCustomerLogic();

            // Assert
            logic.ShouldBeNull();
            action.ShouldThrow <ArgumentNullException>().
            ParamName.ShouldBe("appSettings");
        }
        public BankTransactionLogic(IBankTransactionRepository repo,
                                    BankTransactionDTOMapper dtomapper,
                                    BankTransactionExecuteEntityMapper executeentitymapper,
                                    BankTransactionFactory transactionfactory,
                                    ICustomerLogic customerlogic,
                                    IBankAccountLogic bankaccountlogic,
                                    BankTransactionSearchResultDTOMapper searchmapper)
        {
            _repository          = repo;
            _dtoMapper           = dtomapper;
            _executeEntityMapper = executeentitymapper;
            _transactionFactory  = transactionfactory;

            _customerLogic    = customerlogic;
            _bankAccountLogic = bankaccountlogic;

            _searchMapper = searchmapper;
        }
Esempio n. 15
0
 public CustomerController(ICustomerLogic customerLogic, IMapper mapper)
 {
     _customerLogic = customerLogic ?? throw new Exception();
     _mapper        = mapper ?? throw new Exception();
 }
Esempio n. 16
0
 public AppointmentLogic(IAppointmentRepo repo, ICustomerLogic customerLogic, IMapper mapper)
 {
     _repo          = repo;
     _custoemrLogic = customerLogic;
     _mapper        = mapper;
 }
 public CustomersController(ICustomerLogic customersLogic)
 {
     _customersLogic = customersLogic;
 }
Esempio n. 18
0
 public OrdersController(ICustomerLogic customerLogic)
 {
     this.customerLogic = customerLogic;
     teamContext        = new Model.Team();
 }
Esempio n. 19
0
 public ProductsController(ICustomerLogic customerLogic)
 {
     this.customerLogic = customerLogic;
 }
Esempio n. 20
0
 public CustomerController()
 {
     _customerBLL = new CustomerBLL();
 }
Esempio n. 21
0
 public AuthenticationController(ICustomerLogic customerLogic, ExtensionSettings extensionSettings) : base(extensionSettings)
 {
     this.customerLogic = customerLogic;
 }
Esempio n. 22
0
        public IActionResult Index([FromServices] ICustomerLogic customerLogic,
                                   [FromServices] IBankAccountLogic accountLogic,
                                   [FromServices] IBankTransactionLogic transactionLogic)
        {
            var new_customer = customerLogic.CreateCustomer(
                new CustomerCreateSRO {
                FirstName = "AAA", Initials = "B", LastName = "CCCCCC"
            });

            var update_customer =
                new CustomerUpdateSRO
            {
                Guid      = new_customer.Guid,
                FirstName = "David",
                Initials  = "J",
                LastName  = "Solomons"
            };
            var updated_customer = customerLogic.UpdateCustomer(update_customer);


            var acc1 = accountLogic.CreateAccount(updated_customer.Guid);
            var acc2 = accountLogic.CreateAccount(updated_customer.Guid);

            accountLogic.Deposit(
                new BankAccountLiquidizeSRO
            {
                GuidAccount = acc1.Guid,
                Value       = 10
            });
            accountLogic.Deposit(
                new BankAccountLiquidizeSRO
            {
                GuidAccount = acc2.Guid,
                Value       = 10
            });
            accountLogic.Withdraw(
                new BankAccountLiquidizeSRO
            {
                GuidAccount = acc1.Guid,
                Value       = 9
            });
            transactionLogic.Transfer(
                new BankTransactionExecuteSRO
            {
                GuidAccount = acc2.Guid,
                IbanAccount = acc2.Iban,
                IbanTarget  = acc1.Iban,
                Value       = 5
            });
            accountLogic.Withdraw(
                new BankAccountLiquidizeSRO
            {
                GuidAccount = acc1.Guid,
                Value       = 10
            });
            accountLogic.Withdraw(
                new BankAccountLiquidizeSRO
            {
                GuidAccount = acc1.Guid,
                Value       = 6
            });
            return(View(accountLogic.ViewAccounts(updated_customer.Guid)));

            return(View(customerLogic.ViewCustomer(updated_customer.Guid)));
        }
Esempio n. 23
0
 public OrdersController(ICustomerLogic customerLogic, IShopLogic shopLogic)
 {
     this.customerLogic = customerLogic;
     this._shopLogic    = shopLogic;
 }
Esempio n. 24
0
 public TeamsController(ICustomerLogic customerLogic)
 {
     this.customerLogic = customerLogic;
 }
 public CompaniesController(ICustomerLogic customerLogic, IProblemCollector problemCollector, IMapper mapper,
                            IPublishEndpoint publishEndpoint) : base(customerLogic, problemCollector, mapper, publishEndpoint)
 {
 }
Esempio n. 26
0
 public CustomerApiController(ICustomerLogic logic)
 {
     _customerLogic = logic;
 }
Esempio n. 27
0
 public SalePerformanceApiController(ICustomerLogic customerLogic, IFeeLogic feeLogic)
 {
     _customerLogic = customerLogic;
     _feeLogic      = feeLogic;
 }
 public CustomerController()
 {
     _adminBLL = new CustomerBLL();
 }
Esempio n. 29
0
 public CustomerController(ICustomerLogic stub)
 {
     _customerBLL = stub;
 }
 public CustomerController(ICustomerLogic stub)
 {
     _adminBLL = stub;
 }
Esempio n. 31
0
 public CustomerController(ICustomerLogic logic)
 {
     _logic = logic;
 }
Esempio n. 32
0
 public CustomerController(ICustomerLogic businessLogic, ILoggerService logger, IMapper mapper)
 {
     _businessLogic = businessLogic;
     _logger        = logger;
     _mapper        = mapper;
 }