Skip to content

Commit e6b47ef

Browse files
committed
fix: pass on nested customizations from construct
1 parent e14cd84 commit e6b47ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/github/nylle/javafixture/InstanceFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private Object createParameter(Parameter parameter, CustomizationContext customi
131131
}
132132
return specimenFactory
133133
.build(SpecimenType.fromClass(parameter.getParameterizedType()))
134-
.create(new CustomizationContext(List.of(), Map.of(), customizationContext.useRandomConstructor()), new Annotation[0]);
134+
.create(customizationContext.newForField(parameter.getName()), new Annotation[0]);
135135
}
136136

137137
private <T> Object createProxyForInterface(SpecimenType<T> type, Map<String, ISpecimen<?>> specimens) {

0 commit comments

Comments
 (0)