File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,22 @@ public class fflib_Application
6262 return new fflib_SObjectUnitOfWork (m_objectTypes );
6363 }
6464
65+ /**
66+ * Returns a new fflib_SObjectUnitOfWork configured with the
67+ * SObjectType list specified, returns a Mock implementation
68+ * if set via the setMock method
69+ *
70+ * @remark If mock is set, the list of SObjectType in the mock could be different
71+ * then the list of SObjectType specified in this method call
72+ **/
73+ public fflib_ISObjectUnitOfWork newInstance (List <SObjectType > objectTypes )
74+ {
75+ // Mock?
76+ if (m_mockUow != null )
77+ return m_mockUow ;
78+ return new fflib_SObjectUnitOfWork (objectTypes );
79+ }
80+
6581 @TestVisible
6682 private void setMock (fflib_ISObjectUnitOfWork mockUow )
6783 {
You can’t perform that action at this time.
0 commit comments