public void Clothes_Equal_Clothes() { var first = ClothesData.ClothesDomains.First(); var second = new ClothesDomain(first.Id, first.Name, first.Description, first.Price, first.GenderType, first.ClothesTypeName); Assert.True(first.Equals(second)); }
public void Clothes_Equal_Ok() { const int id = 1; const string name = "Полушубок"; const string description = "Полушубок дерзкий"; const decimal price = 0.55m; const GenderType genderType = GenderType.Child; const string clothesTypeName = "Одежа"; var clothes = new ClothesDomain(id, name, description, price, genderType, clothesTypeName); int clothesHash = HashCode.Combine(id, name, description, price, genderType, clothesTypeName); Assert.Equal(clothesHash, clothes.GetHashCode()); }