Resharper 8.1 Assert on MS Unit tests files

On a Unit test project i have the following lines

  1.             AddressTypeManager.Save(item, out errorMessage);
  2.             Assert.IsNotNull(item);
  3.             Assert.IsNotNull(item.AddressTypeID);
  4.             AddressType item2 = AddressTypeManager.Load(item.AddressTypeID.Value);
  5.             Assert.IsNotNull(item2);

Line 4 complains about a possible System Invalid operation. Why is the new resharper not looking into my asserts prior to getting to that line? The previous version of resharper had no problem. BTW item.AddressTypeID is of type int ?

Please sign in to leave a comment.