I am trying to learn how to write tests for apex services using ApexMocks framework. I want to generate Mock classes through apex-mocks-generator and I am following simple instructions given in this article.
I download repository from GitHub and placed required apex files to src/classes location. I run following in from my terminal:
java -jar apex-mocks-generator-3.0.1.jar src/classes IAccountUpdate mockAccountUpdate src/results
sourcePath=src/classes interfaces=IAccountUpdate mocksClassname=mockAccountUpdate targetPath=src/results
Exception in thread "main" java.io.FileNotFoundException: IAccountUpdate (The system cannot find the file specified) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(Unknown Source) at java.io.FileInputStream.(Unknown Source) at java.io.FileInputStream.(Unknown Source) at java.io.FileReader.(Unknown Source) at com.financialforce.apexmocks.MocksGenerator.(MocksGenerator.jav a:34) at com.financialforce.apexmocks.ApexMockGenerator.main(ApexMockGenerator .java:31)
I have tried the older version of this generator which has a different command to create mocks. And it also gives
java.io.FileNotFoundException. Interface is present in src folder. I am not sure what I am doing wrong here.