Skip to content

Commit

Permalink
fix issue #122
Browse files Browse the repository at this point in the history
  • Loading branch information
Барабанов Тимофей Андреевич committed Aug 28, 2023
1 parent 159bafd commit b49d133
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ private String generateAssertionEntryPointMethodsFor(final Set<ClassDescription>
// resolve class (ex: Player)
// in case of inner classes like Movie.PublicCategory use class name with outer class i.e. Movie.PublicCategory.
assertionEntryPointMethodContent = replace(assertionEntryPointMethodContent, CLASS_TO_ASSERT,
classDescription.getFullyQualifiedClassName());
generatedAssertionsPackage == null ?
classDescription.getFullyQualifiedAssertClassName() :
generatedAssertionsPackage + "." + classDescription.getAssertClassName());

allAssertThatsContentBuilder.append(lineSeparator).append(assertionEntryPointMethodContent);
}
Expand All @@ -497,7 +499,7 @@ private String determineBestEntryPointsAssertionsClassPackage(final Set<ClassDes
/**
* Returns the target directory path where the assertions file for given classDescription will be created.
*
* @param packageName package name
* @param packageName package name
* @return the target directory path corresponding to the given package.
*/
private String getDirectoryPathCorrespondingToPackage(final String packageName) {
Expand Down Expand Up @@ -607,11 +609,11 @@ private String assertionContentForField(FieldDescription field, ClassDescription

private String getTypeName(DataDescription fieldOrGetter) {
if (generatedAssertionsPackage != null) {
// if the user has chosen to generate assertions in a given package we assume that
// if the user has chosen to generate assertions in a given package we assume that
return fieldOrGetter.getFullyQualifiedTypeName();
}
// returns a simple class name if the field or getter type is in the same package as its owning type which is the package where the
// Assert class is generated.
// returns a simple class name if the field or getter type is in the same package as its owning type which is the package where the
// Assert class is generated.
return fieldOrGetter.getTypeName();
}

Expand Down

0 comments on commit b49d133

Please sign in to comment.