Beispiel #1
0
        public CustomerProfile(int customerId)
        {
            this.context             = new BankAppDataContext();
            this.customer_queries    = new CustomerQueriesHandler(context);
            this.disposition_queries = new DispositionQueriesHandler(context);

            Customer = customer_queries.GetCustomer(customerId);
            this.ConnectedDispositions = disposition_queries.GetConnectedDispositions(Customer.CustomerId);
        }
Beispiel #2
0
        public void Setup()
        {
            options = new DbContextOptionsBuilder <BankAppDataContext>()
                      .UseInMemoryDatabase(databaseName: "TestingDb")
                      .Options;

            systemClock               = Substitute.For <ISystemClock>();
            context                   = new BankAppDataContext(options);
            accountQueriesHandler     = new AccountQueriesHandler(context);
            accountCommandHandler     = new AccountCommandHandler(context);
            customerCommandHandler    = new CustomerCommandHandler(context);
            customerQueriesHandler    = new CustomerQueriesHandler(context);
            dispositionQueriesHandler = new DispositionQueriesHandler(context);
        }