public void Product_NewProductWithProductItem_ShouldSetCorrectProperties() { //Arrange var productExpected = _productTestFixture.GenerateProductExpected(); //Act var product = new Product(productExpected.Id, productExpected.Name); foreach (var item in productExpected.ProductItems) { var productItem = new ProductItem(item.Id, item.Modelo, item.Value, item.ImageZip); productItem.SetProductForSale(); product.AddProductItem(productItem); } //Assert Assert.Equal(productExpected.Id, product.Id); Assert.Equal(productExpected.Name, productExpected.Name); //TODO: Adicionar teste para as propriedade de log. foreach (var item in product.ProductItems) { foreach (var itemExpected in productExpected.ProductItems) { if (item.Id == itemExpected.Id) { Assert.Equal(item.Id, itemExpected.Id); Assert.Equal(item.Modelo, itemExpected.Modelo); Assert.Equal(item.Value, itemExpected.Value); Assert.Equal(item.IsSold, itemExpected.IsSold); Assert.Equal(item.IsAvailable, itemExpected.IsAvailable); Assert.Equal(item.ImageZip, itemExpected.ImageZip); } } } }