public void ensureInstancesHaveSameHashCode() { CatalogueCollection catalogueCollection = buildCatalogueCollection(); CatalogueCollection catalogueCollection2 = buildCatalogueCollection(); Assert.Equal(catalogueCollection.GetHashCode(), catalogueCollection2.GetHashCode()); }
public void ensureInstancesHaveDifferentHashCode() { CatalogueCollection catalogueCollection = buildCatalogueCollection(); CustomizedProductCollection customizedProductCollection = new CustomizedProductCollection("Some other collection"); CatalogueCollection otherCatalogueCollection = new CatalogueCollection(customizedProductCollection); Assert.NotEqual(catalogueCollection.GetHashCode(), otherCatalogueCollection.GetHashCode()); }