public WalletControllerTest()
     : base(
         new DbContextOptionsBuilder <WalletContext>()
         .UseInMemoryDatabase("WalletsDBTest")
         .Options, new DbContextOptionsBuilder <TransactionContext>()
         .UseInMemoryDatabase("WalletsDBTest")
         .Options)
 {
     _txReadService      = new TransactionReadService(new TransactionContext(TransactionContextOptions));
     _txWriteService     = new TransactionWriteService(new TransactionContext(TransactionContextOptions), new WalletContext(WalletContextOptions));
     _walletWriteService = new WalletWriteService(new WalletContext(WalletContextOptions));
     walletController    = new WalletController(_txReadService, _txWriteService, _walletWriteService);
 }
Ejemplo n.º 2
0
 public WalletController(ITransactionReadQueryHandler txReadService, ITransactionWriteCommandHandler txWriteService, IWalletWriteCommandHandler walletWriteService)
 {
     _txReadService      = (TransactionReadService)txReadService;
     _txWriteService     = (TransactionWriteService)txWriteService;
     _walletWriteService = (WalletWriteService)walletWriteService;
 }