tests: add the first tests for ViewLocator
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- csharp
- 領域
- desktop, testing-qa
調査の方向性
src/LageBuch.App.Shared/ViewLocator.cs 用のテストファイルを tests/LageBuch.Acceptance.Tests/ の下に追加してください。まず ViewLocator.cs と NumericInputTests.cs を読み、次に make test PROJECT=tests/LageBuch.Acceptance.Tests FILTER=Name~ViewLocator を実行してください。null のフォールバック、ビューが見つからない場合のフォールバック、Match のアサーションを網羅してください。フィルターされたテストが成功するはずです。
索引モデルが issue の本文から書いたものです。
説明
src/LageBuch.App.Shared/ViewLocator.cs maps a view model to its view by string
convention: it replaces ViewModel with View in the type name and resolves
that type. Convention-based resolution breaks quietly when a file is renamed,
and there is no test file for it anywhere — the only mention in tests/ is a
passing comment in ForcesTabRenderTests.cs.
What to do
Add a new test file in tests/LageBuch.Acceptance.Tests/ (the only test project
that references LageBuch.App.Shared). Three cheap assertions cover the whole
class:
Build(null)returns aTextBlockwhose text is the em-dash placeholder.Build(x)for anObservableObjectsubclass with no matching view returns a
TextBlockstarting withNicht gefunden:.Matchis true for aCommunityToolkit.Mvvm.ComponentModel.ObservableObject
and false for a plainobject.
The two fallback paths construct a TextBlock only, so a plain [Fact] is
enough and you do not need the Avalonia dispatcher. If you want to also assert
that a real view model resolves to its view, use [AvaloniaFact] and copy the
setup from NumericInputTests.cs in the same project.
Note this project is on xunit.v3 while the other test projects are on v2.
Verify
make test PROJECT=tests/LageBuch.Acceptance.Tests FILTER=Name~ViewLocator
Difficulty: easy.
New here?
Comment to claim this issue and it is yours. If no pull request appears within
seven days it goes back in the pool, no hard feelings.
Before you open the PR, please skim CONTRIBUTING.md:
commits need DCO sign-off (git commit -s) and a Conventional Commit subject.
Changes under src/ additionally need an entry under ## [Unreleased] in
CHANGELOG.md — CI fails the PR otherwise.
Questions are welcome right here or in
Discussions.
- 主要言語
- C#
- スター
- 1
- フォーク
- 3
- 平均マージ
- 4時間 34分
- マージ済み PR(30日)
- 182
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeForFire/lagebuch のほかの issue
-
bug ux
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CodeForFire/lagebuch#714 ·
メンテナーはふだん 1 日以内に返信
-
bug ux
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
CodeForFire/lagebuch#713 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
CodeForFire/lagebuch#405 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
CodeForFire/lagebuch#349 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
CodeForFire/lagebuch#348 ·
メンテナーはふだん 1 日以内に返信
CodeForFire/lagebuch の issue をすべて見る
似ている issue
-
/api/oauth/introspect emits clientId and tokenType instead of RFC 7662's client_id and token_typeオープンbug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nightscout/nocturne#2317 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO order対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
joinrpg/joinrpg-net#5752 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
dimitar-radenkov/Pointframe#294 ·
メンテナーはふだん 1 日以内に返信
-
kind/feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Altinn/altinn-correspondence#2154 ·
メンテナーはふだん 1 日以内に返信