Reporter | Alex Berezoutsky (fergard) |
---|---|
Created | Aug 31, 2011 6:19:58 PM |
Updated | Jan 24, 2012 10:11:54 PM |
Resolved | Jan 24, 2012 6:29:06 PM |
Priority | Major |
Type | Bug |
Fix versions | Next |
State | Fixed |
Assignee | Evgeny Pasynkov (pasynkov) |
Subsystem | No subsystem |
Affected versions | 6.0 |
Fixed in build | 6.5.1.3309 |
In Visual Studio 2010 with Resharper 6.0 I have a unit test in which I'm asserting the following:
Resharper insists in warning about the 'Possible System.InvalidOperationException' under the 'myObject.myNullableDate.Value' statement and suggests checking if 'myNullableDate' is not null, which I have already in the previous statement. I have even tried to change the previous statement to:
to no avail.
Assert.IsTrue(myObject.myNullableDate.HasValue); Assert.AreEqual(myExpectedDate, myObject.myNullableDate.Value);
Resharper insists in warning about the 'Possible System.InvalidOperationException' under the 'myObject.myNullableDate.Value' statement and suggests checking if 'myNullableDate' is not null, which I have already in the previous statement. I have even tried to change the previous statement to:
Assert.IsNotNull(myObject.myNullableDate);
to no avail.