Apex
How to get test coverage of co...
About ClientFactory
as the name suggests, cldfs clientfactory is a class built on the factory pattern which returns a runtime instance or a test instance depending on the context since you would've already written code using cldfs client static methods, the first step would be to modify this code to use cldfs clientfactory 's instance methods instead don't worry, this would be simple enough since signatures for each method in both of these classes remain the same here's an example of how to change such a piece of code, we'll take for example the create attachments docid\ yvh dhtsakkluksjr t7y method //using cldfs client static methods list\<cldfs types createattachmentinput> inputs = new list\<cldfs types createattachmentinput>{ new cldfs types createattachmentinput(\<folder id>, 'folder', \<salesforce record id>, 'b!zfa15hrs1uy9ph3vw5tfjahfp1lrylzavdwlnhyyq8sa l6ejxb tjbmyuxi1qfl') }; list\<cldfs attachment> attachments = cldfs client createattachments( inputs, 'sharepoint', 'integrationuser' ); //converted code to use cldfs clientfactory instance methods list\<cldfs types createattachmentinput> inputs = new list\<cldfs types createattachmentinput>{ new cldfs types createattachmentinput(\<folder id>, 'folder', \<salesforce record id>, 'b!zfa15hrs1uy9ph3vw5tfjahfp1lrylzavdwlnhyyq8sa l6ejxb tjbmyuxi1qfl') }; cldfs clientfactory client = cldfs clientfactory getinstance(); list\<cldfs attachment> attachments = client createattachments( inputs, 'sharepoint', 'integrationuser' );