Skip to content

Commit

Permalink
Remove illegal mocking of enum type.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Aug 13, 2024
1 parent 79f92c4 commit f6a4c02
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ public class SuperBinderTest extends AbstractAnnotationBinderTest<Super> {
@Mock
private TypeDescription.Generic genericTargetType;

@Mock
private Super.Instantiation instantiation;

public SuperBinderTest() {
super(Super.class);
}
Expand All @@ -32,8 +29,7 @@ public void setUp() throws Exception {
super.setUp();
when(target.getType()).thenReturn(genericTargetType);
when(genericTargetType.asErasure()).thenReturn(targetType);
when(annotation.strategy()).thenReturn(instantiation);
when(instantiation.proxyFor(targetType, implementationTarget, annotationDescription)).thenReturn(stackManipulation);
when(annotation.strategy()).thenReturn(Super.Instantiation.CONSTRUCTOR);
when(annotation.constructorParameters()).thenReturn(new Class<?>[0]);
when(targetType.asErasure()).thenReturn(targetType);
}
Expand All @@ -50,7 +46,6 @@ public void testAssignableBinding() throws Exception {
MethodDelegationBinder.ParameterBinding<?> parameterBinding = Super.Binder.INSTANCE
.bind(annotationDescription, source, target, implementationTarget, assigner, Assigner.Typing.STATIC);
assertThat(parameterBinding.isValid(), is(true));
verify(instantiation).proxyFor(targetType, implementationTarget, annotationDescription);
}

@Test
Expand Down

0 comments on commit f6a4c02

Please sign in to comment.