コード例 #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;
 }
コード例 #2
0
        public CustomerAssetServiceTests()
        {
            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();
            customerAssetService = new CustomerAssetService(transaction, configuration, logger);
            CustomerTopics       = configuration["CustomerTopicNames"]
                                   .Split(',')
                                   .Select(t => t + configuration["TopicSuffix"])
                                   .ToList();
        }