public void CategoryMain_Equal_ClothesTypeMain() { var first = CategoryData.CategoryClothesTypeDomains.First(); var second = new CategoryClothesTypeDomain(first, ClothesTypeData.ClothesTypeMainDomains); Assert.True(first.Equals(second)); Assert.True(second.Equals(first)); }
public void CategoryClothesType_Equal_Ok() { const string category = "обувь"; var clothesTypes = ClothesTypeData.ClothesTypeDomains; var categoryClothesTypeDomain = new CategoryClothesTypeDomain(category, clothesTypes); int categoryClothesTypeHash = HashCode.Combine(category, clothesTypes.Average(clothesType => clothesType.GetHashCode())); Assert.Equal(categoryClothesTypeHash, categoryClothesTypeDomain.GetHashCode()); }