apex-enterprise-patterns / fflib-apex-mocks

An Apex mocking framework for true unit testing in Salesforce, with Stub API support
BSD 3-Clause "New" or "Revised" License
423 stars 214 forks source link

Feature/migration to sfdx format #83

Closed ImJohnMDaniel closed 4 years ago

ImJohnMDaniel commented 4 years ago

This fixes #81 Migration to SFDX Source Format

The migration script used was the following:

mkdir sfdx-source
mkdir sfdx-source/apex-mocks
mkdir sfdx-source/apex-mocks/main
mkdir sfdx-source/apex-mocks/main/classes
mkdir sfdx-source/apex-mocks/test
mkdir sfdx-source/apex-mocks/test/classes
mkdir sfdx-source/apex-mocks/test/classes/mocks

for file in $(ls src/classes/*Test.cls); do git mv $file sfdx-source/apex-mocks/test/classes/; done;
for file in $(ls src/classes/*Test.cls-meta.xml); do git mv $file sfdx-source/apex-mocks/test/classes/; done;
for file in $(ls src/classes/fflib_Mocks.cls); do git mv $file sfdx-source/apex-mocks/test/classes/mocks/; done;
for file in $(ls src/classes/fflib_Mocks.cls-meta.xml); do git mv $file sfdx-source/apex-mocks/test/classes/mocks/; done;
for file in $(ls src/classes/fflib_MyList.cls); do git mv $file sfdx-source/apex-mocks/test/classes/; done;
for file in $(ls src/classes/fflib_MyList.cls-meta.xml); do git mv $file sfdx-source/apex-mocks/test/classes/; done;
for file in $(ls src/classes/*.cls); do git mv $file sfdx-source/apex-mocks/main/classes/; done;
for file in $(ls src/classes/*.cls-meta.xml); do git mv $file sfdx-source/apex-mocks/main/classes/; done;

rm .travis.yml
rm build.xml
rm build.properties.template
rm interfacemocks.properties
rm apex-mocks-generator-*.jar
rm -R src
rm -R lib
ImJohnMDaniel commented 4 years ago

@daveespo -- regarding your question

why did fflib_Mock.cls end up in test/classes/mock vs. test/classes?

I moved it there simply to have some basic separation of concerns. The fflib_Mocks class is basically a mock class exclusively used by test classes but it is not a test class by itself.