apex-enterprise-patterns / fflib-apex-common

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

Add bulkified registerDirty method for registering with dirty fields #271

Closed wimvelzeboer closed 4 years ago

wimvelzeboer commented 4 years ago

Previously you could only register a single record with dirty fields, with this change you can register a list of SObjects with dirty fields.

wimvelzeboer commented 4 years ago

@daveespo I have added a unit test that covers this new method. I didn't want to use DML statements to make it Org in depended, but when I was using mocking I found a bug in fflib_MatcherDefinitions.SObjectsWith.matches object. It was only checking the first record in a list and not all of them. I raised a PR in fflib-apex-mocks for that to fix it. Once that is merged the unit-test will be successful

wimvelzeboer commented 4 years ago

@daveespo I have removed the file.. :-)

JAertgeerts commented 4 years ago

@afawcett can this get merged?

ImJohnMDaniel commented 4 years ago

@JAertgeerts -- FYI on the comment above

wimvelzeboer commented 4 years ago

@ImJohnMDaniel, that is because the PR on fflib-apex-mocks first need to get merged. (See my comment of 4 months ago)

ImJohnMDaniel commented 4 years ago

checking....

ImJohnMDaniel commented 4 years ago

yup - I see it now. Let me work to merge that and then circle back to this PR. Shouldn't be long.

ImJohnMDaniel commented 4 years ago

@wimvelzeboer -- even after merging the ApexMocks PR 88, I am still getting the compilation failure on fflib_SObjectMocks.SObjectUnitOfWork from this PR. Can you take a look please?

wimvelzeboer commented 4 years ago

@wimvelzeboer -- even after merging the ApexMocks PR 88, I am still getting the compilation failure on fflib_SObjectMocks.SObjectUnitOfWork from this PR. Can you take a look please?

@ImJohnMDaniel Fixed!