public void Comparison_Equality() { // Arrange ExpressionType nodeType = ExpressionType.Lambda; Type type = typeof(Action<object>); // Act LambdaExpressionFingerprint fingerprint1 = new LambdaExpressionFingerprint(nodeType, type); LambdaExpressionFingerprint fingerprint2 = new LambdaExpressionFingerprint(nodeType, type); // 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.Lambda; Type type = typeof(Action <object>); // Act LambdaExpressionFingerprint fingerprint1 = new LambdaExpressionFingerprint(nodeType, type); LambdaExpressionFingerprint fingerprint2 = new LambdaExpressionFingerprint(nodeType, type); // Assert Assert.Equal(fingerprint1, fingerprint2); Assert.Equal(fingerprint1.GetHashCode(), fingerprint2.GetHashCode()); }
public void Comparison_Equality() { // Arrange ExpressionType nodeType = ExpressionType.Lambda; Type type = typeof(Action <object>); // Act LambdaExpressionFingerprint fingerprint1 = new LambdaExpressionFingerprint(nodeType, type); LambdaExpressionFingerprint fingerprint2 = new LambdaExpressionFingerprint(nodeType, type); // 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.Lambda; Type type = typeof(Action<object>); // Act LambdaExpressionFingerprint fingerprint1 = new LambdaExpressionFingerprint(nodeType, type); LambdaExpressionFingerprint fingerprint2 = new LambdaExpressionFingerprint(nodeType, type); // Assert Assert.Equal(fingerprint1, fingerprint2); Assert.Equal(fingerprint1.GetHashCode(), fingerprint2.GetHashCode()); }