Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/unit test without dml #223

Conversation

wimvelzeboer
Copy link
Contributor

@wimvelzeboer wimvelzeboer commented Apr 30, 2019

The Unit tests are failing from this fflib_QueryFactoryTest class on same Orgs. Especially when there are mandatory fields on the account, contact or task object.
Also did a bit of reformatting of the source code.


This change is Reviewable

@foxysolutions
Copy link
Contributor

@wimvelzeboer would be nice to have org independent test classes to have a generic framework. Could you elaborate on which lines of code you specifically changed? For now I could only see syntax/spacing changes. Thanks!

@afawcett
Copy link
Contributor

Yes agree with @foxcreation kinda hard to see the wood for the trees. Also i would maybe focus on just the changes for now. There is an outstanding issue to add PMD to this repo so we will have to agree what the formatting rules are and likely make changes anyway. Can I thus propose that you update this PR with just the key changes you need and thus for now its easier to review?

@wimvelzeboer
Copy link
Contributor Author

@foxcreation & @afawcett I removed a lot of the reformatting so that the actual changes are more clear. Hope this helps with the review.

@wimvelzeboer wimvelzeboer force-pushed the feature/UnitTestWithoutDML branch 2 times, most recently from bd53fad to c4d2ca1 Compare March 3, 2020 08:10
Copy link
Contributor

@foxysolutions foxysolutions left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wimvelzeboer nice changes and great to get rid of all inserts. Maybe we can move the test class to be inParallel as well?
@istest( isParallel = true )

@wimvelzeboer
Copy link
Contributor Author

@foxcreation Good idea! I have added it!

foxysolutions
foxysolutions previously approved these changes Mar 6, 2020
afawcett
afawcett previously approved these changes Apr 7, 2020
Copy link
Contributor

@afawcett afawcett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work!

@afawcett
Copy link
Contributor

afawcett commented Apr 7, 2020

@wimvelzeboer thank you!

@wimvelzeboer
Copy link
Contributor Author

@afawcett @foxcreation @ImJohnMDaniel Please review again. I've rebased the branch again to resolve the merge conflict

afawcett
afawcett previously approved these changes Jul 20, 2020
@afawcett
Copy link
Contributor

@wimvelzeboer apologies for the delay - looks good - added my review. cc @foxcreation @ImJohnMDaniel

foxysolutions
foxysolutions previously approved these changes Aug 21, 2020
DML statement were removed from unit test to avoid failing tests
@wimvelzeboer
Copy link
Contributor Author

wimvelzeboer commented Jun 23, 2021

@afawcett @foxysolutions @ImJohnMDaniel
I wasn't aware that this brach was out-of-date. So I rebased it again and its now in a healthy state. :-)

@wimvelzeboer
Copy link
Contributor Author

wimvelzeboer commented Jul 27, 2021

@afawcett @daveespo @ImJohnMDaniel I know that there is work going to be done on the QueryFactory in the Selector, but could we merge this PR in the mean time?
For my company I have created a unlock package of this repo and having difficulties promoting that package because of too low code coverage, as I have to remove the test methods with DML statements..

Copy link
Contributor

@stohn777 stohn777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @afawcett and @daveespo)

Copy link
Contributor

@stohn777 stohn777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @afawcett and @daveespo)

@ImJohnMDaniel ImJohnMDaniel merged commit 26fca1d into apex-enterprise-patterns:master Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants