public TransactionController()
 {
     context         = new BankContext();
     transactionRepo = new EFTransactionRepo(context);
     customerRepo    = new EFCustomerRepo(context);
     accountRepo     = new EFAccountRepo(context);
 }
Example #2
0
 // Create a new RpcControlClientTests instance
 public MigrationAndLoggingTest()
 {
     _wallet    = _services.GetRequiredService <IMultiChainRpcWallet>();
     _contract  = _services.GetRequiredService <ITransactionRepo>();
     _address   = _wallet.RpcOptions.ChainAdminAddress;
     _chainName = _wallet.RpcOptions.ChainName;
 }
 /// <summary>
 /// Controller constructor
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="articleRepo"></param>
 /// <param name="userRepo"></param>
 /// <param name="cartRepo"></param>
 /// <param name="transactionRepo"></param>
 public UserController(ILogger <UserController> logger, IArticleRepo articleRepo, IUserRepo userRepo, ICartRepo cartRepo, ITransactionRepo transactionRepo)
 {
     this._userRepo        = userRepo;
     this._articleRepo     = articleRepo;
     this._logger          = logger;
     this._cartRepo        = cartRepo;
     this._transactionRepo = transactionRepo;
 }
 public TestController()
 {
     context = new BankContext();
     context.Configuration.LazyLoadingEnabled = false;
     transactionRepo = new EFTransactionRepo(context);
     customerRepo    = new EFCustomerRepo(context);
     accountRepo     = new EFAccountRepo(context);
 }
        public void TransactionRepo_AddToTransactionHistorymethod_Failtest()
        {
            transactionRepo = new TransactionRepo();


            var response = transactionRepo.addToTransactionHistory(null, null);

            Assert.IsFalse(response);
        }
Example #6
0
 public Service(string conn)
 {
     this._conn       = conn;
     _artistRepo      = new ArtistDbRepo(_conn);
     _employeeRepo    = new EmployeesDbRepo(_conn);
     _officeRepo      = new OfficeDbRepo(_conn);
     _showRepo        = new ShowDbRepo(_conn);
     _transactionRepo = new TransDbRepo(_conn);
 }
Example #7
0
 public Supervisor(IMapper mapper, ICustomerRepo ICustomerRepo,
                   IAccountRepo IAccountRepo, ICurrencyRepo ICurrencyRepo,
                   IAccountTypeRepo IAccountTypeRepo, ICurrencyRatioRepo ICurrencyRatioRepo,
                   IOperationRepo IOperationRepo, ITransactionRepo ITransactionRepo
                   )
 {
     _mapper             = mapper;
     _ICustomerRepo      = ICustomerRepo;
     _IAccountRepo       = IAccountRepo;
     _ICurrencyRepo      = ICurrencyRepo;
     _IAccountTypeRepo   = IAccountTypeRepo;
     _ICurrencyRatioRepo = ICurrencyRatioRepo;
     _IOperationRepo     = IOperationRepo;
     _ITransactionRepo   = ITransactionRepo;
 }
Example #8
0
        public async Task Test_Transaction_Rerun()
        {
            var                 transactionId = new Guid("bb9a9a5b-c8de-11e4-9511-005056ab171b");
            IKernel             kernel        = new StandardKernel();
            ITransactionRepo    transRepo     = kernel.Get <TransactionRepo>(new ConstructorArgument("db", _iAgentProd));
            ITransactionService transService  = kernel.Get <TransactionService>(new ConstructorArgument("transRepo", transRepo));

            try
            {
                var rerun = await transService.RerunTransactionAsync(transactionId);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #9
0
        public void ReparseTransactionTest()
        {
            var                 transId      = new Guid("2ee526e9-c99d-11e4-9511-005056ab171b");
            IKernel             kernel       = new StandardKernel();
            ITransactionRepo    transRepo    = kernel.Get <TransactionRepo>(new ConstructorArgument("db", _iAgentProd));
            ITransactionService transService = kernel.Get <TransactionService>(new ConstructorArgument("transRepo", transRepo));

            try
            {
                transService.ReparseTransactionAsync(transId);
            }
            catch (Exception)
            {
                throw;
            }
        }
 public WheelService(ISpinRepo spinRepo,
                     ITransactionRepo transactionRepo,
                     IBalanceRepo balanceRepo,
                     ICouponRepo couponRepo,
                     ICouponValueRepo couponValueRepo,
                     IWheelConfigurationRepo wheelConfigurationRepo,
                     IWheelConfigurationSliceRepo wheelConfigurationSliceRepo,
                     IUserRepo userRepo)
 {
     _spinRepo                    = spinRepo;
     _transactionRepo             = transactionRepo;
     _balanceRepo                 = balanceRepo;
     _couponRepo                  = couponRepo;
     _couponValueRepo             = couponValueRepo;
     _wheelConfigurationRepo      = wheelConfigurationRepo;
     _wheelConfigurationSliceRepo = wheelConfigurationSliceRepo;
     _userRepo                    = userRepo;
 }
Example #11
0
        public void MultipleAgentReparseTest()
        {
            List <Guid> transIds = new List <Guid>()
            {
                Guid.Parse("50b12285-c9b1-11e4-9511-005056ab171b"),
                Guid.Parse("0cc1396b-c9ad-11e4-9511-005056ab171b"),
                Guid.Parse("f1095767-c977-11e4-9511-005056ab171b")
            };
            IKernel             kernel       = new StandardKernel();
            ITransactionRepo    transRepo    = kernel.Get <TransactionRepo>(new ConstructorArgument("db", _iAgentProd));
            ITransactionService transService = kernel.Get <TransactionService>(new ConstructorArgument("transRepo", transRepo));

            try
            {
                transService.ReparseMultipleTransactionsAsync(transIds);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TransactionRepo_AddToTransactionHistorymethod_Passtest()
        {
            transactionRepo = new TransactionRepo();
            Account account = new Account()
            {
                AccountId   = 5,
                AccountType = "Savings2",
                Balance     = 100,
                CustomerId  = 6,
                minBalance  = 1000
            };
            TransactionStatus transactionStatus = new TransactionStatus()
            {
                destination_balance = 2000,
                message             = "amount credited",
                source_balance      = 1900
            };
            var response = transactionRepo.addToTransactionHistory(transactionStatus, account);

            Assert.IsTrue(response);
        }
Example #13
0
        public void Setup()
        {
            // Stage - build our test configuration pipeline
            var builder = new ConfigurationBuilder()
                          .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                          .AddEnvironmentVariables();

            // Stage - build configuration
            IConfiguration configuration = builder.Build();

            // Stage - start service collection
            ServiceCollection services = new ServiceCollection();

            // Act - add the ConfigureMultiChainDbStorage services to the DI pipeline
            //       supports MultiChainDbContext local storage
            services.ConfigureMultiChainDbStorage(configuration);
            var provider = services.BuildServiceProvider();

            // Act - fetch required service from temp provider
            //       ITransactionRepo offers basic List and CRUD functions
            //       ITransactionRepo also offers direct access to the MultiChainDbContext and ILogger services, for ease of use
            _contract = provider.GetRequiredService <ITransactionRepo>();
        }
Example #14
0
 public TransactionController(IResidentRepo resident, ITransactionRepo transactionRepo)
 {
     this.resident = resident;
     trxRepo       = transactionRepo;
 }
 public TransactionsEntriesService(ITransactionRepo transactionRepo, BalanceService balanceService, IncomeStatmentService incomeStatmentService)
 {
     this.transactionRepo       = transactionRepo;
     this.balanceService        = balanceService;
     this.incomeStatmentService = incomeStatmentService;
 }
Example #16
0
 public HomeController(ITransactionRepo repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
 public TransactionProvider(ITransactionRepo repo)
 {
     _repo = repo;
 }
 public TransactionController(ICustomerRepo customerRepo, IAccountRepo accountRepo, ITransactionRepo transactionRepo)
 {
     this.customerRepo    = customerRepo;
     this.accountRepo     = accountRepo;
     this.transactionRepo = transactionRepo;
 }
 public frmTransactionManagment(ITransactionService transService, ITransactionRepo transRepo)
 {
     this._transService = transService;
     this._transRepo    = transRepo;
     InitializeComponent();
 }
 public Transactions(ITransactionRepo transactionRepo)
 {
     _transactionRepo = transactionRepo;
 }
Example #21
0
 public BankController(ITransactionRepo repo)
 {
     transactionRepo = repo;
 }
Example #22
0
 public TransactionService(ITransactionRepo transactionRepo)
 {
     _transactionRepo = transactionRepo;
 }
 public TransactionBL(ITransactionRepo repo)
 {
     _repo = repo;
 }
 public TransactionController(ITransactionRepo repo)
 {
     _repo = repo;
 }
Example #25
0
 public TransactionController(ITransactionRepo tranContext, IBankAccountRepo bankContext, ApplicationDbContext context)
 {
     _bankContext = bankContext;
     _tranContext = tranContext;
     _context     = context;
 }
Example #26
0
 public TransactionController(ITransactionRepo transactionRepo)
 {
     repo = transactionRepo;
 }
Example #27
0
 public BlockController(IBlockRepo BlockRepository, ITransactionRepo transactionRepository, IMapper mapper)
 {
     _blockRepository       = BlockRepository;
     _transactionRepository = transactionRepository;
     _mapper = mapper;
 }