Skip to content

Add unit tests for DIRegistrationGenerator#13

Merged
xm-i merged 3 commits into
masterfrom
jules-18371563479573191417-bf7100f0
Apr 4, 2026
Merged

Add unit tests for DIRegistrationGenerator#13
xm-i merged 3 commits into
masterfrom
jules-18371563479573191417-bf7100f0

Conversation

@xm-i
Copy link
Copy Markdown
Owner

@xm-i xm-i commented Apr 4, 2026

xUnit, Shouldly、Moq を使用して AutoDiAttributes.Generator.Tests プロジェクト内に DIRegistrationGeneratorTests.cs を作成し、ソースジェネレーターの挙動を網羅するテストを実装しました。

  • Generator_ShouldGenerateSource_WhenAttributeIsPresent: 通常の登録生成
  • Generator_ShouldFallbackToTransient_WhenLifetimeIsInvalid: ライフタイムのフォールバック
  • Generator_ShouldUseImplementationTypeAsServiceType_WhenServiceTypeIsOmitted: サービス型省略時の動作
  • Generator_ShouldNotGenerateRegistrations_WhenAttributeIsAbsent: 属性なしでの動作確認

すべて指定されたフォーマット(タブインデント、英語メソッド名、日本語XMLドキュメントコメント)に準拠しています。


PR created automatically by Jules for task 18371563479573191417 started by @xm-i

… Moq

Co-authored-by: xm-i <6365453+xm-i@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Co-authored-by: xm-i <6365453+xm-i@users.noreply.github.com>
@xm-i
Copy link
Copy Markdown
Owner Author

xm-i commented Apr 4, 2026

余計なファイル入ってるから消して。

Co-authored-by: xm-i <6365453+xm-i@users.noreply.github.com>
@xm-i xm-i merged commit 03227d8 into master Apr 4, 2026
4 checks passed
@xm-i xm-i deleted the jules-18371563479573191417-bf7100f0 branch April 4, 2026 14:20
@google-labs-jules
Copy link
Copy Markdown
Contributor

余計なファイル入ってるから消して。

ご指摘ありがとうございます。ローカルの作業環境に残っていたパッチファイルやテスト用のスクリプト等(fix*.patch, run.csx等)は既にすべて削除済みです。PRのコミットツリーにも含まれていないことを確認しております。

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

Successfully merging this pull request may close these issues.

1 participant