Reporter | Alexander Kurakin (Alexander.Kurakin) |
---|---|
Created | Nov 20, 2012 11:52:05 AM |
Updated | Apr 26, 2018 12:06:40 PM |
Subsystem | Code Analysis - C# |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Major |
State | Submitted |
Type | Bug |
Fix version | Backlog |
Affected versions | 2018.1, 7.0.1, 7.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
In the following example, the message parameter is grayed out.
private const string Message = "SomeMessage";
[TestMethod]
[ExpectedException(typeof(Exception))]
public void TestMethodExceptionExprected() {
Test(Message);
}
private static void Test(string message) {
try
{
throw new Exception(Message);
}
catch (Exception ex)
{
Assert.IsTrue(ex.Message == message);
throw;
}
}