Skip to content

Commit 98d1308

Browse files
feat: fill test and documentation coverage gaps (#58)
* docs: add coverage-gaps design doc Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: add coverage-gaps implementation plan Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add Merge unit tests for AsyncDataTable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add Merge unit tests for AsyncDataTable * test: add Compute unit tests for AsyncDataTable * test: add Compute unit tests for AsyncDataTable * test: add LoadDataRow unit tests for AsyncDataTable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add LoadDataRow unit tests for AsyncDataTable * test: add BeginInit, BeginLoadData, Reset unit tests for AsyncDataTable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: add BeginInit, BeginLoadData, Reset unit tests for AsyncDataTable * docs: add XML I/O cookbook page * docs: add Merge and row versioning cookbook page * docs: add Compute, constraints, and relations cookbook page * docs: add DataRowVersion.Proposed example to merge-and-row-versioning cookbook --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6a7177e commit 98d1308

6 files changed

Lines changed: 1622 additions & 0 deletions

File tree

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Design: Fill Test & Documentation Coverage Gaps
2+
3+
**Date:** 2026-04-17
4+
**Status:** Approved
5+
**Branch:** `feat/coverage-gaps`
6+
7+
---
8+
9+
## Overview
10+
11+
The project is feature-complete at v1.1.4 but has identified gaps in test coverage and Docusaurus documentation for several delegated ADO.NET features. This document describes what will be added and how.
12+
13+
---
14+
15+
## Scope
16+
17+
### Tests (new test class in `System.Data.Async.DataSet.Tests`)
18+
19+
| Feature | What to test |
20+
|---------|-------------|
21+
| `Merge()` | `MissingSchemaAction.Add`, `MissingSchemaAction.Ignore`, `MissingSchemaAction.Error`; `preserveChanges=true` vs `false`; merge into empty table; merge with overlapping rows |
22+
| `Compute()` | Aggregate expressions (`Sum`, `Count`, `Avg`, `Min`, `Max`) on a plain `AsyncDataTable`; filter expressions; `DBNull` handling |
23+
| `LoadDataRow()` | `LoadOption.OverwriteChanges`, `LoadOption.PreserveChanges`, `LoadOption.Upsert`; bool overload (accept=true/false) |
24+
| `BeginInit/EndInit` | Call sequence does not throw; columns added between Begin/End are visible after EndInit |
25+
| `BeginLoadData/EndLoadData` | Row events are suppressed during load; constraints are re-evaluated after EndLoadData |
26+
| `Reset()` | Table is empty after Reset; columns are cleared |
27+
28+
All tests go in a new file `tests/System.Data.Async.DataSet.Tests/AsyncDataTableAdvancedTests.cs`.
29+
30+
### Docusaurus Docs (new pages in `website/docs/cookbook/`)
31+
32+
| File | Content |
33+
|------|---------|
34+
| `xml-io.md` | Async `WriteXmlAsync` / `ReadXmlAsync` round-trip; `WriteXmlSchemaAsync`; reading from a file path; streaming patterns |
35+
| `merge-and-row-versioning.md` | `Merge()` with each `MissingSchemaAction`; `preserveChanges`; reading `DataRowVersion.Original` vs `Current` vs `Proposed` via `AsyncDataRow[name, version]`; `GetChanges()` workflow |
36+
| `compute-constraints-relations.md` | `Compute()` aggregate expressions on a plain table; adding `UniqueConstraint` and `ForeignKeyConstraint` manually; adding `DataRelation` and navigating parent/child rows |
37+
38+
All pages follow the existing cookbook format: frontmatter with `sidebar_position` and `title`, H2 sections per scenario, C# code blocks, brief prose.
39+
40+
---
41+
42+
## Architecture
43+
44+
No new source code. All changes are:
45+
- One new test file (tests only, no production code changes)
46+
- Three new Markdown pages (docs only)
47+
48+
No API changes, no breaking changes, no NuGet version bump required.
49+
50+
---
51+
52+
## Testing Strategy
53+
54+
- New tests use the existing `xunit` + `FluentAssertions` stack
55+
- Tests are synchronous where the feature is synchronous (Merge, Compute, LoadDataRow) — async `AddAsync`/`AcceptChangesAsync` used for setup only
56+
- All existing 228 + 109 tests must continue to pass
57+
58+
---
59+
60+
## Delivery
61+
62+
Single branch `feat/coverage-gaps`, single PR to `main`.

0 commit comments

Comments
 (0)