public void GetHashCodeReturnsCorrectResult( string name, double unitPriceD, int quantity) { var unitPrice = (decimal)unitPriceD; var sut = new BasketItem(name, unitPrice, quantity); var actual = sut.GetHashCode(); var expected = name.GetHashCode() ^ unitPrice.GetHashCode() ^ quantity.GetHashCode(); Assert.Equal(expected, actual); }