assertj / assertj/assertj-generator
Support Java 8 Optional Feature
- 主要言語
- Java
- スター
- 72
- フォーク
- 47
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 2
説明
Is it possible to support Java 8 Optional feature for the generator?
Sample model class:
``` java
public class Person {
private String name;
public Person(String name) {
this.name = name;
}
public Optional getName() {
return name == null ? Optional.empty() : Optional.of(name);
}
}
```
Generated assertion class:
``` java
public class PersonAssert extends AbstractAssert {
public PersonAssert hasName(java.util.Optional name) {
}
}
```
Suggested assert class:
``` java
public class PersonAssert extends AbstractAssert {
// Generator might lookup generic type of the Optional and generate the method without Optional parameter
public PersonAssert hasName(String name) {
}
public PersonAssert hasName(java.util.Optional name) {
}
}
```
コントリビューションガイド
調査の方向性
No source file or test is named in the issue. Start by locating the generator entry point that handles getter return types and generic types, then compare its output for the provided Person model. Done means Optional getters produce the requested assertion overloads with the intended String and Optional parameters.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100