Add unit tests for the query and command builders
還沒有人認領這個 Issue。
評估
研究方向
閱讀 QuickbaseNet/Helpers/QuickbaseQueryBuilder.cs 和 QuickbaseNet/Helpers/QuickbaseCommandBuilder.cs,接著參考 QuickbaseNet.UnitTests/Tests/QuickbaseClientTests.cs 的風格。在 QuickbaseNet.UnitTests/Tests/ 下新增指定的兩個 builder 測試檔案,並透過建立 request、驗證回傳的物件來涵蓋列出的每種行為。執行 dotnet test --filter FullyQualifiedName~BuilderTests;所有案例都通過,且 QuickbaseNet/ 下沒有檔案變更時,即為完成。
由索引模型根據 Issue 內容生成。
描述
Neither builder has a test. The 7 existing tests cover the client constructor, QueryRecords and QuickbaseResult. Builder tests don't need the HTTP mock: build a request and assert on the object you get back.
What to do
Add QuickbaseQueryBuilderTests.cs and QuickbaseCommandBuilderTests.cs under QuickbaseNet.UnitTests/Tests/, in the style of the existing tests. Cover at least:
Build()copiesFrom,SelectandWhereinto the request.SortByandGroupBycalled twice keep both items, in order.Selectcalled twice keeps only the last list.- With nothing set,
SortBy,GroupByandOptionsare null. AddNewRecordtwice gives two entries inData, andReturnFieldsends up inFieldsToReturn.UpdateRecord(8, ...)adds field"3"with the string value"8"next to the configured fields.AddFieldssets every field, andAddFieldtwice on one ID keeps the last value.BuildDeleteCommandmapsForTabletoFromandWithDeletionCriteriatoWhere.
Test what the builders do today. If something looks wrong, say so in the PR instead of changing the builder.
Where to look
QuickbaseNet/Helpers/QuickbaseQueryBuilder.csQuickbaseNet/Helpers/QuickbaseCommandBuilder.cs(field 3 is set at line 65)QuickbaseNet.UnitTests/Tests/QuickbaseClientTests.csfor style
Done when
- Every case above has a passing test
- Nothing under
QuickbaseNet/changes
Testing it
dotnet test --filter FullyQualifiedName~BuilderTests
- 主要語言
- C#
- 星號
- 3
- 分支
- 2
- 平均合併
- 3 小時 14 分鐘
- 30 天內合併 PR
- 2
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hazeliscoding/quickbase-net 的其他 Issue
-
good first issue
難度 2/5 1-3 小時 新手友好度 84/100
-
Add `Skip()` and `Top()` to `QuickbaseQueryBuilder`可能已有人在做 @bercedev 於 12 天前認領。 未關閉enhancement good first issue
難度 2/5 1-3 小時 新手友好度 88/100
hazeliscoding/quickbase-net#16 · 1 則留言 ·
-
Update the package metadata that still points at ducksoop可能已有人在做 @hazeliscoding 於 13 天前認領。 未關閉
hazeliscoding/quickbase-net#15 · 已指派 1 人 ·
查看 hazeliscoding/quickbase-net 的全部 Issue
相似的 Issue
-
effort:S P3 refactor
難度 2/5 1-3 小時 新手友好度 72/100
nightscout/nocturne#3243 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
dasher-project/Dasher-Windows#84 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
libnativeapi/nativeapi#21 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 3 天內回覆
-
enhancement P3 performance
難度 2/5 1-3 小時 新手友好度 75/100
thomhurst/TUnit#7380 · 2 則留言 ·
維護者通常 1 天內回覆