All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleaner Maven / Gradle / Ivy

There is a newer version: 2.0.2-beta
Show newest version
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