Exemple #1
0
        public void LegacyRazorDiagnostic_GetMessage_FormatProvider()
        {
            // Arrange
            var error      = new RazorError("This is an error", SourceLocation.Zero, 5);
            var diagnostic = new LegacyRazorDiagnostic(error);

            // Act
            var result = diagnostic.GetMessage(CultureInfo.InvariantCulture);

            // Assert
            Assert.Equal("This is an error", result);
        }
Exemple #2
0
        public void LegacyRazorDiagnostic_GetMessage()
        {
            // Arrange
            var error      = new RazorError("This is an error", SourceLocation.Zero, 5);
            var diagnostic = new LegacyRazorDiagnostic(error);

            // Act
            var result = diagnostic.GetMessage();

            // Assert
            Assert.Equal("This is an error", result);
        }