Witam, mam kolejny problem przy robieniu testów. Chcę sprawdzić działanie automappera gdzie mam także porównywanie list
public bool Equals(Product other)
{
bool equals =
int.Equals(this.OriginalProductID, other.OriginalProductID) &&
string.Equals(this.Barcode, other.Barcode, StringComparison.InvariantCultureIgnoreCase) &&
string.Equals(this.BaseMeasureUnit, other.BaseMeasureUnit, StringComparison.InvariantCultureIgnoreCase) &&
string.Equals(this.Description, other.Description, StringComparison.InvariantCultureIgnoreCase) &&
string.Equals(this.SupplierSymbol, other.SupplierSymbol, StringComparison.InvariantCultureIgnoreCase) &&
decimal.Equals(this.Vat, other.Vat) &&
decimal.Equals(this.Quantity, other.Quantity) &&
string.Equals(this.ImageUrl, other.ImageUrl, StringComparison.InvariantCultureIgnoreCase) &&
**List<ProductPrice>.Equals(this.ProductPrices, other.ProductPrices) &&**
**List<ProductLanguage>.Equals(this.ProductLanguages, other.ProductLanguages);**
return equals;
}
Problem jest bo te listy mają zerową długość a i tak sprawdzenie nie idzie pomyślnie:
Jest jakiś patent na sprawdzenie tych list? Potem będę musiał uporać się ze słownikami i też pewnie będzie podobny problem