org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleaner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockito-all Show documentation
Show all versions of mockito-all Show documentation
Mock objects library for java
package org.mockito.internal.exceptions.stacktrace;
import org.mockito.exceptions.stacktrace.StackTraceCleaner;
/**
* by Szczepan Faber, created at: 7/29/12
*/
public class DefaultStackTraceCleaner implements StackTraceCleaner {
public boolean isOut(StackTraceElement e) {
boolean fromMockObject = e.getClassName().contains("$$EnhancerByMockitoWithCGLIB$$");
boolean fromOrgMockito = e.getClassName().startsWith("org.mockito.");
boolean isRunner = e.getClassName().startsWith("org.mockito.runners.");
boolean isInternalRunner = e.getClassName().startsWith("org.mockito.internal.runners.");
return (fromMockObject || fromOrgMockito) && !isRunner && !isInternalRunner;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy