Created
May 3, 2020 14:17
-
-
Save aalmada/d5dd5cffcf865f7e43911cd9d50818a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void TestMethod2() | |
{ | |
var test = @" | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
namespace ConsoleApplication1 | |
{ | |
class TypeName | |
{ | |
} | |
}"; | |
var expected = new DiagnosticResult | |
{ | |
Id = "Analyzer1", | |
Message = String.Format("Type name '{0}' contains lowercase letters", "TypeName"), | |
Severity = DiagnosticSeverity.Warning, | |
Locations = | |
new[] { | |
new DiagnosticResultLocation("Test0.cs", 11, 15) | |
} | |
}; | |
VerifyCSharpDiagnostic(test, expected); | |
var fixtest = @" | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
namespace ConsoleApplication1 | |
{ | |
class TYPENAME | |
{ | |
} | |
}"; | |
VerifyCSharpFix(test, fixtest); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment