Closed VictorAlbertos closed 8 years ago
Hi,
The problem here is that in Java it's impossible to connect constructor parameters with properties.
Just consider the following code:
public class Mock {
@MockAnnotation private final String s1;
// Here it's impossible to say what is relation between s1 and constructor's parameters
public Mock(String a1, String a2, String a3) {
this.s1 = a2 + a3;
}
public String getS1() {
return s1;
}
}
The only thing you can do is to annotate constructor parameter itself.
Thanks, Daniil
Hi :)
When I extend from
AbstractRandomDataProviderStrategy
overridinggetStringValue
theAttributeMetadata
instance contains null references in its fieldsattributeName
andattributeAnnotations
in the following scenarios:But if I create the previous Mock class without declaring any constructor, the
AttributeMetadata.attributeName
andAttributeMetadata.attributeAnnotations
returns the expected result, that is valid references to the name of the field as long as the annotation.And I'm using PodamFactory as follows:
Ayn help will be appreciate.
Thanks!