I am doing a unit test of a customization for the accounts receivable module but I get the following error, I have already done the exercises of the pdf T280_Testing_Business_Logic_2023R2, can you help me?
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/56a14a70-b2df-4236-b559-1a7233e67a21.png)
I am doing a unit test of a customization for the accounts receivable module but I get the following error, I have already done the exercises of the pdf T280_Testing_Business_Logic_2023R2, can you help me?
In your Acumatica environment has someone gone to the AR Preferences screen and pressed save? I usually get this error on brand new sites when the numbering sequences, etc. have not been saved (though they populate by default).
I did what you indicated, but now I get the following error, remember that I'm running unit tests
Is there at least one company set up in your system and has the basic configuration been completed? There may be some other ideas here for troubleshooting your error:
Yes there is, but I would like to make use of the [Fact] property when executing I get another error:
ComponentNotRegisteredException: The requested service 'System.Func`2[[PX.Data.PXGraph, PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[PX.Objects.CM.Extensions.IPXCurrencyService, PX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' has not been registered. To avoid this exception, register a component that provides the service, check the service registration using IsRegistered() or use the ResolveOptional() method to resolve an optional dependency
Did you register the service as it is described in https://help.acumatica.com/(W(2))/Help?ScreenId=ShowWiki&pageid=83427471-c909-4771-90ca-96045ef0b064 and in Activity 2.5 of the training course?
Take a look at this example:
https://github.com/Acumatica/UnitTestExamples/blob/master/UnitTestsDemo/Setup/UnitTestWithARSetup.cs
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.