-
Notifications
You must be signed in to change notification settings - Fork 519
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
fflib_SObjectSelectorTest Error: 'Assertion Failed: Expected: 12345.67, Actual: 9117.25' #489
Comments
Setting the CurrencyIsoCode = 'USD' when the account data is created in the test fixed the issue for me List accountList = new List |
Thanks for the update @adayIvey. Glad to hear that you were able to resolve your issue. Cheers! |
While I did resolve my issue I think the test should be updated to include a currency code when creating Account Data |
Sounds like a reasonable and simple test improvement that would shield users from a nuisance test failure. |
Hi @adayIvey, |
***@***.***
***@***.***
From: John Storey ***@***.***>
Sent: Wednesday, June 12, 2024 7:30 PM
To: apex-enterprise-patterns/fflib-apex-common ***@***.***>
Cc: Day, Andrew ***@***.***>; Mention ***@***.***>
Subject: Re: [apex-enterprise-patterns/fflib-apex-common] fflib_SObjectSelectorTest Error: 'Assertion Failed: Expected: 12345.67, Actual: 9117.25' (Issue #489)
External email: Only click links and attachments from recognized senders. Contact IT if you are unsure.
Hi @adayIvey<https://github.com/adayIvey>,
I'm having difficulty reproducing your issue. Would you, please, send me a screenshot of your Manage Currencies page so that I recreate that in a scratch org?
-
Reply to this email directly, view it on GitHub<#489 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADXEGU7JPBH5G5CDSUJPPE3ZHDKY3AVCNFSM6AAAAABJHD4AM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRUGA3DCMJUHE>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hi again @adayIvey, |
@adayIvey Are there other multicurrency configurations that might help me to reproduce the issue that you're seeing? It's obvious you're experiencing something; we just need to identify the culprit for reproducibility. Thanks! |
sorry for the late reply but tbh I am not sure what else I can say to help but I did just try deploying into our production org from github and I get this error `Status: Completed Test failure, method: fflib_SObjectSelectorTest.testSelectSObjectsById -- System.AssertException: Assertion Failed: Expected: 12345.67, Actual: 9038.49 stack Class.fflib_SObjectSelectorTest.testSelectSObjectsById: line 61, column 1 labels/CustomLabels.labels` to get around this I want to try and deploy it manually from from a sandbox where I have updated the test that is causing me issues and I have tried using changesets or vscode and I get issues. Is there a specific way I need to deploy these files (I have already deployed the Apex Mocks classes) |
@adayIvey Aye? 😁 |
thanks, if you have any ideas on additional info I can provide I will just ask |
@adayIvey, |
Describe the bug
when I run the tests in 'fflib_SObjectSelectorTest Class' I get the following error.
System.AssertException: Assertion Failed: Expected: 12345.67, Actual: 9117.25
CODE LINE: system.assertEquals(12345.67,result[0].AnnualRevenue);
I think this has to do with our org being multi currency and there is a conversion being applied on all currency fields in the Account object
To Reproduce
Run test 'fflib_SObjectSelectorTest' from Developer Console in salesforce in a multi currency org
Expected behavior
All tests in class 'fflib_SObjectSelectorTest' pass and can handle currency correctly
Version
I just installed the latest version
The text was updated successfully, but these errors were encountered: