
org.mockito.internal.creation.ClassNameFinder 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, modified to allow cache disabling
The newest version!
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.creation;
public class ClassNameFinder {
public static String classNameForMock(Object mock) {
if (mock.getClass().getInterfaces().length == 2) {
return mock.getClass().getInterfaces()[0].getSimpleName();
} else {
return mock.getClass().getSuperclass().getSimpleName();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy