docs: テストFWガイドのコンパイル不能なコード例と設定手順の事実誤りを修正 - #731
Open
kumagoro1202 wants to merge 1 commit into
Open
Conversation
- 02_DbAccessTest.rst / 03_Tips.rst: assertSqlResultSetEqualsの3引数 呼び出しを実在する4引数版(message, sheetName, id, actual)に修正 - 03_Tips.rst: 実在しないFQCN nablarch.common.idgenerator. OracleSequenceIdGeneratorをサンプル実装の実FQCN (please.change.me.common.idgenerator.OracleSequenceIdGenerator)に修正 - CustomizeMessageIDAndMessage.rst: メッセージID紐付けの設定箇所を 現行実装(nablarch-main-default-configurationのcharset-definition- message-id.config、デフォルト値errors.zenkakuCharset)に合わせて 手順を書き直し
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
日本語ドキュメントの逐語検証で見つかった、実装と一致しない記述4件(+同型1件)を修正します。全て実コード・実設定ファイルで裏取り済みです。
修正内容
1.
06_TestFWGuide/02_DbAccessTest.rst: assertSqlResultSetEquals の引数不足コード例が3引数呼び出し
assertSqlResultSetEquals("testSelectAll", "expected", actual)になっていましたが、DbAccessTestSupportに該当するオーバーロードは存在せず(nablarch-testingのDbAccessTestSupport.javaにはassertSqlResultSetEquals(String message, String sheetName, String id, SqlResultSet actual)の4引数版のみ)、このままではコンパイルできません。第1引数に比較失敗時のメッセージを補い4引数化し、直前のコメントも実引数に合わせました。2.
06_TestFWGuide/03_Tips.rst(L140付近): 同メソッドの同問題ループ内の3引数呼び出しを同様に4引数化しました。メッセージはページの簡潔なトーンに合わせた固定文言としています。
また、同ファイル後半(L611付近、委譲パターンの例
dbSupport.assertSqlResultSetEquals("test", "id", actual))にも同型の3引数呼び出しがあったため、併せて4引数化しています。3.
06_TestFWGuide/03_Tips.rst(L364付近): 実在しないFQCNnablarch.common.idgenerator.OracleSequenceIdGeneratorは実在しません。実在するのはサンプル実装(nablarch-report-sample)のplease.change.me.common.idgenerator.OracleSequenceIdGenerator(SequenceIdGeneratorSupport継承・idTableプロパティも設定例と一致)のみのため、実FQCNへ修正しました。なお同節の
nablarch.common.idgenerator.FastTableIdGenerator(L380付近)はnablarch-common-idgenerator-jdbcに実在する標準クラスであり、プロパティ名(tableName/idColumnName/noColumnName/dbTransactionManager)も実装と一致するため変更していません。4.
CustomizeMessageIDAndMessage.rst: メッセージID紐付け手順の事実誤り「
src/main/resources/common.propertiesにnablarch.zenkakuCharset.messageId=M000000017が記述されている」とありますが、現行のアーキタイプ生成プロジェクトのcommon.propertiesにこの項目は存在しません。実際のデフォルト値はnablarch-main-default-configuration内のnablarch/core/validation/charset-definition-message-id.configでerrors.zenkakuCharsetと定義され、charset-definition.xml(各アーキタイプの component-configuration が import)が読み込んで${nablarch.zenkakuCharset.messageId}プレースホルダで参照する構成です。環境設定値は後勝ち(重複キーは後に定義されたものが有効)で、各アーキタイプともcommon.propertiesの読み込みが import より後にあるため、プロジェクト側で同キーを定義して上書きする手順に書き直しました。確認
.textlintrc)を実行しエラー0件.textlint/test/test.rst(既知のエラーを含むファイル)で検出確認済み