public async void ShouldUpdateAccount()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb238196")
                          .Options;


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddAccount(Acc1);

                await service.Save();

                Acc1.Funds = -500m;
                await service.UpdateAccount(Acc1);

                await service.Save();
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Assert.Equal(-500m, Acc1.Funds);
                Assert.Equal(500, Acc1.Id);
            }
        }
        public async void ShouldAddBank()
        {
            Bank Bank3123 = new Bank
            {
                Id       = 4000,
                Reserves = 500000m,
                City     = "Reston"
            };

            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb2381963")
                          .Options;


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddBank(Bank1);

                await service.Save();
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Assert.NotNull(context.Bank.FindAsync(Bank3123.Id).Result);
            }
        }
        public async void ShouldDeleteCustomer()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb421512")
                          .Options;

            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddCustomer(Cus1);

                await service.Save();

                await service.DeleteCustomer(Cus1.Id);

                await service.Save();
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Assert.Equal(0, context.Customer.CountAsync().Result);
            }
        }
        public async void ShouldGetAccountByID()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb000921")
                          .Options;

            Account Acc2;

            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddAccount(Acc1);

                Acc2 = await service.GetAccountById(Acc1.Id);

                await service.Save();
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Acc2.Should().BeEquivalentTo(Acc1);
            }
        }
        public async void ShouldUpdateCustomer()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb3123141")
                          .Options;

            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddCustomer(Cus1);

                await service.Save();

                Cus1.PhoneNumber = 1294123;
                await service.UpdateCustomer(Cus1);

                await service.Save();
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Assert.Equal(1294123, Cus1.PhoneNumber);
                Assert.Equal(10, Cus1.Id);
            }
        }
        public async void ShouldGetCreditCardByID()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb9347293427")
                          .Options;

            CreditCard CC2;

            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddCreditCard(CC1);

                CC2 = await service.GetCreditCardById(CC1.Id);

                await service.Save();
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                CC2.Should().BeEquivalentTo(CC1);
            }
        }
        public async void ShouldUpdateCreditCard()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb41241231")
                          .Options;

            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddCreditCard(CC1);

                await service.Save();

                CC1.CreditLimit = 111500m;
                await service.UpdateCreditCard(CC1);

                await service.Save();
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Assert.Equal(111500m, CC1.CreditLimit);
                Assert.Equal(30, CC1.Id);
            }
        }
        public void ShouldAddAccount()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb342342")
                          .Options;


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Assert.Equal(1, context.Account.FindAsync(Acc1.Id).Id);
            }
        }
        public async void ShouldAddCreditCard()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb252352")
                          .Options;


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddCreditCard(CC1);

                await service.Save();
            }

            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Assert.NotNull(context.CreditCard.FindAsync(CC1.Id).Result);
            }
        }
        public async void ShouldAddEmployee()
        {
            var options = new DbContextOptionsBuilder <SecureXContext.SecureXdbContext>()
                          .UseInMemoryDatabase(databaseName: "testXdb23198261")
                          .Options;


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                var service = new SecureXRepository(context);

                await service.AddEmployee(Emp1);

                await service.Save();
            }


            using (var context = new SecureXContext.SecureXdbContext(options))
            {
                Assert.NotNull(context.Employee.FindAsync(Emp1.Id).Result);
            }
        }