@TestVisible on property accessor with access modifiers shows incorrect error

Issue #1561 resolved
Aidan Harding created an issue

The following is a legitimate way to make a property which is public-get, private-set, but also settable in a test:

@TestVisible
public Integer n {get; private set;}

The IC code inspector reports this as an error with the message:

@TestVisible should only be used on private or protected symbols

Comments (2)

  1. Scott Wells repo owner

    Thanks for filing, Aidan. I'll take a look at this and the other you opened about bind variables shortly.

  2. Log in to comment