apex-enterprise-patterns / fflib-apex-common

Common Apex Library supporting Apex Enterprise Patterns and much more!
BSD 3-Clause "New" or "Revised" License
899 stars 514 forks source link

Update api version to 56.0 and test classes to use new Assert class #436

Closed chazwatkins closed 1 year ago

chazwatkins commented 1 year ago

This change is Reviewable

ImJohnMDaniel commented 1 year ago

G'day @chazwatkins -- Just wanted to say again thank you very much for this PR. There is a lot that you updated and it is very much appreciated. Cheers!

ImJohnMDaniel commented 1 year ago

Also, @chazwatkins, will you be updating the class xml files to v56.0? If not, no worries. I can definitely do it. I just didn't want to double up on the work.

Thanks again!!

chazwatkins commented 1 year ago

Since I was updating all the repos, I managed to forget to do the xml files on this one. I'll do this now.

chazwatkins commented 1 year ago

The xml files are now all 56.0

chazwatkins commented 1 year ago

G'day @chazwatkins. I noticed that fflib_SObjectDomain.TestSObjectStatefulDomain and fflib_SObjectDomain.TestSObjectDomain each have an assertion in the old style. Was this deliberate?

@ImJohnMDaniel It wasn't. I'll check on them and submit the update

chazwatkins commented 1 year ago

G'day @chazwatkins. I noticed that fflib_SObjectDomain.TestSObjectStatefulDomain and fflib_SObjectDomain.TestSObjectDomain each have an assertion in the old style. Was this deliberate?

@ImJohnMDaniel It wasn't. I'll check on them and submit the update

fflib_SObjectDomain.TestSObjectStatefulDomain and fflib_SObjectDomain.TestSObjectDomain are updated to use System.Assert.areEqual now

chazwatkins commented 1 year ago

Reviewable status: 0 of 40 files reviewed, 1 unresolved discussion (waiting on @chazwatkins and @daveespo)

_sfdx-source/apex-common/test/classes/fflib_SObjectDescribeTest.cls line 49 at r3 (raw file):_

        System.Assert.isNull(fflib_SObjectDescribe.getDescribe(nullType));
        System.Assert.isNull(fflib_SObjectDescribe.getDescribe(nullDescribe));
        System.Assert.isNull(fflib_SObjectDescribe.getDescribe(nullSObject));

Should all of these use the Assert.areEqual(null, ...) pattern too? I cannot see how they would ever be insufficient, BUT ...

Yes, they should be. Thanks for catching that. I double-checked for other isNull and isNotNull occurrences and updated them to areEqual(null, ...) and areNotEqual(null, ...)