Skip to content

Commit

Permalink
Implements mocking for constructor invocations.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Aug 13, 2020
1 parent 12ce7ea commit 19a7d84
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,7 @@ private InlineConstructionMockContext(
@Override
public int getCount() {
if (count == 0) {
throw new MockitoConfigurationException(
"mocked construction context is not initialized");
throw new MockitoConfigurationException("mocked construction context is not initialized");
}
return count;
}
Expand All @@ -768,8 +767,7 @@ public Constructor<?> constructor() {
parameterTypes[index++] = PRIMITIVES.get(parameterTypeName);
} else {
try {
parameterTypes[index++] =
Class.forName(parameterTypeName, false, type.getClassLoader());
parameterTypes[index++] = Class.forName(parameterTypeName, false, type.getClassLoader());
} catch (ClassNotFoundException e) {
throw new MockitoException(
"Could not find parameter of type " + parameterTypeName, e);
Expand Down

0 comments on commit 19a7d84

Please sign in to comment.