Esempio n. 1
0
 /// <summary>
 /// Customer controller constructor
 /// </summary>
 public CustomerController(ICustomerService customerService,
                           IAccountService accountService, IUserCustomerService userCustomerService,
                           ICustomerAssetService customerAssetService, ILogger logger)
 {
     this.customerService      = customerService;
     this.accountService       = accountService;
     this.customerAssetService = customerAssetService;
     this.userCustomerService  = userCustomerService;
     this.logger = logger;
 }
 public CustomersController(ICustomerCompanyService customerCompanyService,
                            IUserCustomerService userService,
                            IPurchaseService purchaseService,
                            IProductResellerCustomerService productResellerCustomerService)
 {
     _customerService = customerCompanyService;
     _userService     = userService;
     _purchaseService = purchaseService;
     _productResellerCustomerService = productResellerCustomerService;
 }
Esempio n. 3
0
        public UserCustomerServiceTests()
        {
            logger      = Substitute.For <ILogger>();
            transaction = Substitute.For <ITransactions>();
            string currentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            configuration = new ConfigurationBuilder().SetBasePath(currentDirectory)
                            .AddJsonFile("appsettings.json", true)
                            .AddEnvironmentVariables()
                            .Build();
            userCustomerService = new UserCustomerService(transaction, configuration, logger);
            CustomerTopics      = configuration["CustomerTopicNames"]
                                  .Split(',')
                                  .Select(t => t + configuration["TopicSuffix"])
                                  .ToList();
        }