Code Monkey home page Code Monkey logo

Comments (10)

afawcett avatar afawcett commented on August 14, 2024

Great idea, thanks!

from fflib-apex-common.

maximorojr avatar maximorojr commented on August 14, 2024

Is there any news about that?

from fflib-apex-common.

afawcett avatar afawcett commented on August 14, 2024

Sorry no progress on this.

I'll gladly accept a pull request though.... 👍

from fflib-apex-common.

Autobat avatar Autobat commented on August 14, 2024

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.

afawcett avatar afawcett commented on August 14, 2024

@Autobat thats awesome, thanks!

from fflib-apex-common.

Autobat avatar Autobat commented on August 14, 2024

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.

afawcett avatar afawcett commented on August 14, 2024

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.

Autobat avatar Autobat commented on August 14, 2024

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.

afawcett avatar afawcett commented on August 14, 2024

Thanks for the contribution! 👍

from fflib-apex-common.

afawcett avatar afawcett commented on August 14, 2024

FYI: https://success.salesforce.com/ideaView?id=08730000000Brm1

from fflib-apex-common.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.