ExpectationsModifier(ClassLoader classLoader, ClassReader classReader, MockedType typeMetadata) { super(classReader); if (typeMetadata == null) { mockingCfg = null; } else { mockingCfg = typeMetadata.mockingCfg; stubOutClassInitialization = typeMetadata.isClassInitializationToBeStubbedOut(); } setUseMockingBridge(classLoader); }
public void useDynamicMockingForInstanceMethods(MockedType typeMetadata) { ignoreConstructors = typeMetadata == null || typeMetadata.getMaxInstancesToCapture() <= 0; executionMode = 2; }