Esempio n. 1
0
        public void LegacyRazorDiagnostic_Equals()
        {
            // 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.Equals(diagnostic2);

            // Assert
            Assert.True(result);
        }
Esempio n. 2
0
        public void LegacyRazorDiagnostic_NotEquals_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.Equals(diagnostic2);

            // Assert
            Assert.False(result);
        }