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 测试文件,并通过构建请求、断言返回对象来覆盖列出的每种行为。运行 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
- 平均合并
- 5 小时 53 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hazeliscoding/quickbase-net 的其他 Issue
-
good first issue
难度 2/5 1-3 小时 新手友好度 84/100
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 88/100
-
Add `Skip()` and `Top()` to `QuickbaseQueryBuilder`可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
-
Update the package metadata that still points at ducksoop可能已有人在做 @hazeliscoding 于 2 天前认领。 未关闭
hazeliscoding/quickbase-net#15 · 已指派 1 人 ·
查看 hazeliscoding/quickbase-net 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
KnifeLemon/Filee#363 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
-
area-Native untriaged
难度 2/5 1-3 小时 新手友好度 76/100
dotnet/machinelearning#7837 ·
维护者通常 2 天内回复