public void LegacyRazorDiagnostic_HashCodesNotEqual_DifferentMessage() { // Arrange var diagnostic1 = new LegacyRazorDiagnostic(new RazorError("This is an error", SourceLocation.Zero, 5)); var diagnostic2 = new LegacyRazorDiagnostic(new RazorError("This is maybe an error", SourceLocation.Zero, 5)); // Act var result = diagnostic1.GetHashCode() == diagnostic2.GetHashCode(); // Assert Assert.False(result); }
public void LegacyRazorDiagnostic_HashCodesEqual() { // Arrange var diagnostic1 = new LegacyRazorDiagnostic(new RazorError("This is an error", SourceLocation.Zero, 5)); var diagnostic2 = new LegacyRazorDiagnostic(new RazorError("This is an error", SourceLocation.Zero, 5)); // Act var result = diagnostic1.GetHashCode() == diagnostic2.GetHashCode(); // Assert Assert.True(result); }