public void GetUsersAsyncGetsAllUsers()
        {
            var options = new DbContextOptionsBuilder <Project2JAGVContext>()
                          .UseInMemoryDatabase("GetUsersAsyncGetsAllUsers")
                          .Options;

            using var arrangeContext = new Project2JAGVContext(options);

            int    id         = 1;
            string name       = "name";
            string password   = "******";
            int    addressId  = 1;
            int    userTypeId = 1;

            arrangeContext.Users.Add(new Users {
                Id = id, Name = name, Password = password, UserTypeId = userTypeId, AddressId = addressId,
            });
            arrangeContext.SaveChanges();

            using var actContext = new Project2JAGVContext(options);
            var repo = new DataAccess.DataAccess(actContext, new MapperStub());

            // act
            var result = repo.GetUsersAsync(id: id, name: name, password: password);

            // assert
            Assert.NotNull(result);
        }
        public async Task GetOrdersAsynGetsc()
        {
            var options = new DbContextOptionsBuilder <Project2JAGVContext>()
                          .UseInMemoryDatabase("GetOrdersAsynGetsc")
                          .Options;

            Orders orders = new Orders
            {
                Id          = 1,
                UserId      = 1,
                DelivererId = 1,
                Delivered   = false,
                Date        = DateTime.Now,
            };

            using var arrangeContext = new Project2JAGVContext(options);

            arrangeContext.Add(orders);
            arrangeContext.SaveChanges();

            using var actContext = new Project2JAGVContext(options);
            var repo = new DataAccess.DataAccess(actContext, new MapperStub());

            var result = await repo.GetOrdersAsync(id : orders.Id, userId : orders.UserId,
                                                   delivererId : orders.DelivererId, delivered : orders.Delivered, date : orders.Date);

            Assert.NotNull(result);
        }
        public async Task GetPizzasAsyncGets()
        {
            var options = new DbContextOptionsBuilder <Project2JAGVContext>()
                          .UseInMemoryDatabase("GetOrdersAsynGetsc")
                          .Options;

            Pizzas pizzas = new Pizzas
            {
                Id      = 1,
                OrderId = 1,
                Name    = "name",
            };

            using var arrangeContext = new Project2JAGVContext(options);

            arrangeContext.Add(pizzas);
            arrangeContext.SaveChanges();

            using var actContext = new Project2JAGVContext(options);
            var repo = new DataAccess.DataAccess(actContext, new MapperStub());

            var result = await repo.GetPizzasAsync(id : pizzas.Id, orderId : pizzas.OrderId, name : pizzas.Name);

            Assert.NotNull(result);
        }
        public async Task GetIngredientsAsyncGets()
        {
            var options = new DbContextOptionsBuilder <Project2JAGVContext>()
                          .UseInMemoryDatabase("GetIngredientsAsyncGets")
                          .Options;

            Ingredients ingredients = new Ingredients
            {
                Id    = 1,
                Name  = "name",
                Price = 1,
            };

            using var arrangeContext = new Project2JAGVContext(options);

            arrangeContext.Add(ingredients);
            arrangeContext.SaveChanges();

            using var actContext = new Project2JAGVContext(options);
            var repo = new DataAccess.DataAccess(actContext, new MapperStub());

            var result = await repo.GetIngredientsAsync();

            Assert.NotNull(result);
        }
        public async Task GetAddressesAsyncGets()
        {
            var options = new DbContextOptionsBuilder <Project2JAGVContext>()
                          .UseInMemoryDatabase("GetAddressesAsyncGets")
                          .Options;

            using var arrangeContext = new Project2JAGVContext(options);

            Addresses addresses = new Addresses
            {
                Id      = 1,
                Street  = "Street",
                City    = "City",
                State   = "State",
                ZipCode = "ZipCode",
            };

            Address address = new Address
            {
                Id      = 1,
                Street  = "Street",
                City    = "City",
                State   = "State",
                ZipCode = "ZipCode",
            };

            arrangeContext.Addresses.Add(addresses);
            arrangeContext.SaveChanges();

            using var actContext = new Project2JAGVContext(options);
            var repo = new DataAccess.DataAccess(actContext, new MapperStub());

            var result = await repo.GetAddressesAsync(id : addresses.Id, address : address);

            Assert.NotNull(result);
        }