public async Task ListCategories() { //Arrange var BDName = Guid.NewGuid().ToString(); var context = BuildContext(BDName); var fakecategory = new Categoria() { Nombre = "A1", Descripcion = "Un tipo de vehiculo", }; var fakecategory2 = new Categoria() { Nombre = "A2", Descripcion = "Un tipo de vehiculo", }; context.Categorias.Add(fakecategory); context.Categorias.Add(fakecategory2); await context.SaveChangesAsync(); var context2 = BuildContext(BDName); //Act var controller = new CategoriasController(context2); var response = await controller.List(); //Assert Assert.IsNotNull(response); }