public async Task GivenProductServiceWhenGetAllByUserWithUserIsValidAndHaveProductsThenListWithSameNumberProducts() { ClaimsPrincipal user = new ClaimsPrincipal(); List <Product> listProductsDb = FakeBuilder.GetProductsFake(); this.mockProductRepository.Setup(repo => repo.GetAllByUser(It.IsAny <User>())) .ReturnsAsync(listProductsDb); List <ProductViewModel> listProductsModel = await this.productService.GetAllByUser(user); Assert.NotEmpty(listProductsModel); Assert.True(listProductsDb.Count == listProductsModel.Count); }