assertj / assertj/assertj-generator

Add @see tags to methods to point back to the original member

Open
#100 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
72
Forks
47
Avg merge
1d 16h
Merged PRs (30d)
2

Description

It'd be helpful if generated methods included an `@see` to the member the value was generated from.

## Example

### Given
```java
class Foo {
public int getBar() {
return 0;
}
}
```
### Actual

```java
/**
* Verifies that the actual Foo's bar is equal to the given one.
* @param bar the given bar to compare the actual Foo's bar to.
* @return this assertion object.
* @throws AssertionError - if the actual Foo's bar is not equal to the given one.
*/
public FooAssert hasBar(int bar) {
// ... cut for brevity ...
return this;
}
```

### Expected

```java
/**
* Verifies that the actual Foo's bar is equal to the given one.
* @param bar the given bar to compare the actual Foo's bar to.
* @return this assertion object.
* @throws AssertionError - if the actual Foo's bar is not equal to the given one.
* @see Foo#getBar() Member under test.
*/
public FooAssert hasBar(int bar) {
// ... cut for brevity ...
return this;
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.