Skip to content
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

FQCN of assertion classes are not replaced in assertions entry point classes when using the generateAssertionsInPackage option. #122

Open
opengl-8080 opened this issue Dec 10, 2017 · 3 comments

Comments

@opengl-8080
Copy link

I use generateAssertionsInPackage option like following.

Project structure

|-src/main/java
|  `-sample/
|    `-Foo.java
`-pom.xml

pom.xml

<configuration>
  <packages>
    <param>sample</param>
  </packages>
  <generateAssertionsInPackage>sample.assertion</generateAssertionsInPackage>
</configuration>

Assertion class is generated as sample.assertion.FooAssert.

FooAssert.java

package sample.assertion;

import sample.Foo;

...

public class FooAssert extends AbstractFooAssert<FooAssert, Foo> {

However assertions entry point classes are generated like following.

Assertions.java

package sample.assertion;

...
@javax.annotation.Generated(value="assertj-assertions-generator")
public class Assertions {

  ...
  @org.assertj.core.util.CheckReturnValue
  public static sample.FooAssert assertThat(sample.Foo actual) {
    return new sample.FooAssert(actual);
  }

FooAssert is written as sample.FooAssert (not sample.assertion.FooAssert).

@joel-costigliola
Copy link
Member

Its a bug then, thanks for reporting this !

@rmarinsky
Copy link

Is there any updates for it?

@joel-costigliola
Copy link
Member

Nope, I unfortunately don't have the time to work on the generator project these days :(

tbarabanov pushed a commit to tbarabanov/assertj-assertions-generator that referenced this issue Aug 28, 2023
tbarabanov pushed a commit to tbarabanov/assertj-assertions-generator that referenced this issue Aug 28, 2023
tbarabanov pushed a commit to tbarabanov/assertj-assertions-generator that referenced this issue Aug 29, 2023
@scordio scordio removed the bug label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants