You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
My class has asserts but is flagged as without asserts in org check
To Reproduce
Create an apex test class.
Add for example the only. assert in the code: System.assertEquals('this', 'that', 'This is an example');
Open Org Check, refresh the apex tab and you see the test "has" assert no issue (yet).
Then go back to the class and add a space before the opening parenthesis like this: System.assertEquals ('this', 'that', 'This is an example');
Go back to Org Check, refresh the data and on the apex test unit tab now the same test appears to not have ANY assert.
Seems the RegEx that is used to check assert usage is not taking the spaces in consideration.
The text was updated successfully, but these errors were encountered:
Same error if the annotation IsTest with see all data is used
If there is a space between IsTest and the opening parenthesis, then org check does not see the test as see all data
need to change the regex matcher
VinceFINET
changed the title
Apex Class Test with asserts flaged as without asserts
Apex Class Test with asserts flagged as without asserts
Jan 8, 2025
Describe the bug
My class has asserts but is flagged as without asserts in org check
To Reproduce
Create an apex test class.
Add for example the only. assert in the code:
System.assertEquals('this', 'that', 'This is an example');
Open Org Check, refresh the apex tab and you see the test "has" assert no issue (yet).
Then go back to the class and add a space before the opening parenthesis like this:
System.assertEquals ('this', 'that', 'This is an example');
Go back to Org Check, refresh the data and on the apex test unit tab now the same test appears to not have ANY assert.
Seems the RegEx that is used to check assert usage is not taking the spaces in consideration.
The text was updated successfully, but these errors were encountered: