public void Comparison_Equality() { // Arrange ExpressionType nodeType = ExpressionType.Parameter; Type type = typeof(object); int parameterIndex = 1; // Act ParameterExpressionFingerprint fingerprint1 = new ParameterExpressionFingerprint(nodeType, type, parameterIndex); ParameterExpressionFingerprint fingerprint2 = new ParameterExpressionFingerprint(nodeType, type, parameterIndex); // Assert Assert.AreEqual(fingerprint1, fingerprint2, "Fingerprints should have been equal."); Assert.AreEqual(fingerprint1.GetHashCode(), fingerprint2.GetHashCode(), "Fingerprints should have been different."); }
public void Comparison_Equality() { // Arrange ExpressionType nodeType = ExpressionType.Parameter; Type type = typeof(object); int parameterIndex = 1; // Act ParameterExpressionFingerprint fingerprint1 = new ParameterExpressionFingerprint(nodeType, type, parameterIndex); ParameterExpressionFingerprint fingerprint2 = new ParameterExpressionFingerprint(nodeType, type, parameterIndex); // Assert Assert.Equal(fingerprint1, fingerprint2); Assert.Equal(fingerprint1.GetHashCode(), fingerprint2.GetHashCode()); }