-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package name of the generated asserts is always the same as for the source classes #13
Comments
I guess that AssertJ Assertions Generator does not support it. Package name is generated at BaseAssertionGenerator.java#L282 template = replace(template, PACKAGE, classDescription.getPackageName());
private TypeToken<?> type;
....
public String getPackageName() {
return type.getRawType().getPackage().getName();
}
private static void generateFlatAssertions(Set<TypeToken<?>> types) throws IOException {
logger.info("Generating assertions for types {}", types);
BaseAssertionGenerator customAssertionGenerator = new BaseAssertionGenerator();
for (TypeToken<?> type : types) {
logger.info("Generating assertions for class : {}", type);
File customAssertionFile = customAssertionGenerator.generateCustomAssertionFor(toClassDescription(type)); // here!!
logger.info("Generated {} assertions file -> {}", type,
customAssertionFile.getAbsolutePath());
}
} There are no options to configure package name. |
Thank you. If I understand you correctly it should be fixed on "AssertJ Assertions Generator" side? Am I right? |
Yes. |
Hi, |
Thank you. |
I made version2. However I found a bug of |
Hello,
I have the following configs
As a result, generated asserts are placed to 'src/main/java/com/mycompany/api/asserts' but with package name com.mycompany.api.jsonModels.
Here is the part of log:
Please check what could be done to have generated asserts with the corresponding package name
The text was updated successfully, but these errors were encountered: