public async Task ShoudGetById() { var productLineId = Guid.NewGuid(); var productCategory = new CategoryProductBuilder() .WithName("celular") .Construct(); var productLine = new ProductLineBuilder(). WithProductCategoryId(productLineId) .WithName("nokia 780") .WhithCategory(productCategory) .Construct(); _productLineRepository.GetById(productLineId).Returns(productLine); var productLineFound = await _productLineService.GetById(productLineId); Assert.Equal("nokia 780", productLineFound.Name); }
public async Task <ProductLineResponseModel> GetById([FromRoute] Guid id) { return(await _productLineService.GetById(id)); }