Comments (10)
Great idea, thanks!
from fflib-apex-common.
Is there any news about that?
from fflib-apex-common.
Sorry no progress on this.
I'll gladly accept a pull request though.... 👍
from fflib-apex-common.
I've a client that is using fflib and we need to support some undelete behavior. Once we have the extension done and tested i'll make the code available.
from fflib-apex-common.
@Autobat thats awesome, thanks!
from fflib-apex-common.
Undelete is in and working however I'm not 100% sure on the following. The current test harness uses mocking for the domain layer, is it possible to mock the recycle bin or should i revert to testing with DML?
from fflib-apex-common.
Not its not, if you want to follow the intent of the MockDatabase support in the Domain class. The intent is to simply access the routing functionality not to mock the event that generates the event. So a new method on MockDatabase say onUndelete(List records) would then set the records member (which mocks the new list/map) along with a new isUndeleted member. Then i assume in your changes you've extended the method signature of the private triggerHandler method. If so, update the testTriggerHandler method, to pass the new isUndeleted member. Note that this framework was put in place before ApexMocks existed btw, updating it to use that is outside the scope of this PR in my view.
from fflib-apex-common.
Ah thank you for the point in the right direction. I quickly skimmed the
test class and did not grasp what it was doing in enough detail.
Will create the test for the undelete path and have it ready for your review
On Tue, Jul 28, 2015 at 5:45 PM, Andrew Fawcett [email protected]
wrote:
Not its not, if you want to follow the intent of the MockDatabase
support in the Domain class. The intent is to simply access the routing
functionality not to mock the event that generates the event. So a new
method on MockDatabase say onUndelete(List records) would then set
the records member (which mocks the new list/map) along with a new
isUndeleted member. Then i assume in your changes you've extended the
method signature of the private triggerHandler method. If so, update
the testTriggerHandler method, to pass the new isUndeleted member.
Note that this framework was put in place before ApexMocks existed btw,
updating it to use that is outside the scope of this PR in my view.—
Reply to this email directly or view it on GitHub
#18 (comment)
.
from fflib-apex-common.
Thanks for the contribution! 👍
from fflib-apex-common.
FYI: https://success.salesforce.com/ideaView?id=08730000000Brm1
from fflib-apex-common.
Related Issues (20)
- Unit test failure in multi-currency org HOT 4
- Deploy button doesn't deploy because there are test failures HOT 1
- Expected a QueryException due to read only user not having access to Opportunity HOT 7
- Switch to Inherited Sharing on SObjectDescribe and SObjectSelector HOT 2
- With latest fflib, do TriggerHandlers become service class consumers? If so what happens to UoW? HOT 6
- Selected tests in fflib_SObjectSelectorTest fail in an org with encryption enabled on Account.Name HOT 2
- Selector Mocks to Include SOQL Query Retrieve Check HOT 1
- fflib_SObjectUnitOfWork doCommitWork executes all dml for all registered types even if there are no changes
- Update README as session recordings are not available HOT 2
- fflib_SObjectDescribe.cls fails to resolve cross-object field paths for Person Accounts
- Aggregate SOQL support. HOT 2
- Disable Savepoint in tests HOT 4
- Inconsistent Code Coverage and Test Failures in fflib-apex-common HOT 1
- fflib_SObjectSelector and fflib_SObjectUnitOfWork have insufficient test code coverage. HOT 2
- Add queryWithBinds to Selector layer HOT 2
- Unit test failing fflib_SecurityUtilsTest & sysadmin_objectAndField_access HOT 8
- Coverage of UnitOfWork class HOT 1
- Versioning HOT 1
- fflib_SObjectSelectorTest failure with Lookup relationship and Person Type Accounts HOT 5
- fflib_SObjectSelectorTest Error: 'Assertion Failed: Expected: 12345.67, Actual: 9117.25' HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fflib-apex-common.