Exemplo n.º 1
0
        public void OneTimeSetUp()
        {
            DbContextOptions <ProjectContext> options = new DbContextOptionsBuilder <ProjectContext>()
                                                        .UseInMemoryDatabase(databaseName: "Test_DB")
                                                        .Options;
            ProjectContext context = new ProjectContext(options);

            orderService = new OrderService(context);
            _crud        = new CRUDManagerOrder(orderService);

            testProduct = new Product()
            {
                ProductId = 1, Name = "testProduct", Price = 5, Url = "testUrl"
            };
            testCustomer = new Customer()
            {
                CustomerId = 1, UserId = 1
            };
        }