Skip to content

Commit a6524a1

Browse files
committed
Projects move to the conventional src/ and tests/ layout: the four shipping-side projects (SqlServerSimulator, .EFCore, .Analyzers, Example) under src/ and the six test projects under tests/ with the solution, Directory.Build.props, and Directory.Packages.props staying at the root. The only content changes are path fixups.
1 parent 55b9555 commit a6524a1

854 files changed

Lines changed: 49 additions & 49 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dotnet build
3131
dotnet test
3232
```
3333

34-
Shared build settings live in the root `Directory.Build.props` (TargetFramework, nullable, warnings-as-errors, `EnforceCodeStyleInBuild=true` — so `dotnet build` runs the IDE / SSS / MSTEST analyzers and fails on violations); package versions are centralized in `Directory.Packages.props` (NuGet CPM), with deliberate per-project divergences as visible `VersionOverride`s (Tests.Smo pins SqlClient 5.1.x, SMO's supported line, while Tests.SqlClient tests the current 7.x — the reason those two projects stay separate). Csprojs carry only per-project content. No separate `dotnet format` pass — it catches nothing build doesn't. CI matrix: Debug + Release. `obj/` permission errors mean building outside the dev container; `rm -rf obj/ bin/` clears them.
34+
Projects live under `src/` (`SqlServerSimulator`, `SqlServerSimulator.EFCore`, `SqlServerSimulator.Analyzers`, `Example`) and `tests/` (the six test projects); the sln and both props files stay at the repo root, so `dotnet build` / `dotnet test` run from the root unchanged. Shared build settings live in the root `Directory.Build.props` (TargetFramework, nullable, warnings-as-errors, `EnforceCodeStyleInBuild=true` — so `dotnet build` runs the IDE / SSS / MSTEST analyzers and fails on violations); package versions are centralized in `Directory.Packages.props` (NuGet CPM), with deliberate per-project divergences as visible `VersionOverride`s (Tests.Smo pins SqlClient 5.1.x, SMO's supported line, while Tests.SqlClient tests the current 7.x — the reason those two projects stay separate). Csprojs carry only per-project content. No separate `dotnet format` pass — it catches nothing build doesn't. CI matrix: Debug + Release. `obj/` permission errors mean building outside the dev container; `rm -rf obj/ bin/` clears them.
3535

3636
A full build + test cycle runs 20–30s; single-test filter (`--filter "FullyQualifiedName~Foo"`) stays fast. Still cheap enough to treat `dotnet test` as a verifier between micro-edits, not a checkpoint.
3737

SqlServerSimulator.sln

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 18
44
VisualStudioVersion = 18.3.11218.70
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqlServerSimulator", "SqlServerSimulator\SqlServerSimulator.csproj", "{CF5684B4-08DF-4CD3-8342-5B627155B40A}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqlServerSimulator", "src\SqlServerSimulator\SqlServerSimulator.csproj", "{CF5684B4-08DF-4CD3-8342-5B627155B40A}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqlServerSimulator.Tests", "SqlServerSimulator.Tests\SqlServerSimulator.Tests.csproj", "{25DCB2FC-636F-4442-9662-894F2CA075A0}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqlServerSimulator.Tests", "tests\SqlServerSimulator.Tests\SqlServerSimulator.Tests.csproj", "{25DCB2FC-636F-4442-9662-894F2CA075A0}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{527F1E6C-BCEE-442F-96C4-B0ED5E47B5EE}"
1111
ProjectSection(SolutionItems) = preProject
@@ -15,21 +15,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1515
README.md = README.md
1616
EndProjectSection
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Tests.EFCore", "SqlServerSimulator.Tests.EFCore\SqlServerSimulator.Tests.EFCore.csproj", "{C2F98EBD-5A19-45BC-A2AD-F24E4976909F}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Tests.EFCore", "tests\SqlServerSimulator.Tests.EFCore\SqlServerSimulator.Tests.EFCore.csproj", "{C2F98EBD-5A19-45BC-A2AD-F24E4976909F}"
1919
EndProject
20-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example", "Example\Example.csproj", "{56BC4138-449D-456E-840F-6F55303BA26A}"
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example", "src\Example\Example.csproj", "{56BC4138-449D-456E-840F-6F55303BA26A}"
2121
EndProject
22-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Tests.Internal", "SqlServerSimulator.Tests.Internal\SqlServerSimulator.Tests.Internal.csproj", "{6E34AEB7-52E7-4BB0-B179-F8CD56BE436F}"
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Tests.Internal", "tests\SqlServerSimulator.Tests.Internal\SqlServerSimulator.Tests.Internal.csproj", "{6E34AEB7-52E7-4BB0-B179-F8CD56BE436F}"
2323
EndProject
24-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Analyzers", "SqlServerSimulator.Analyzers\SqlServerSimulator.Analyzers.csproj", "{6CF65391-9236-486B-A6B9-AD2441D77259}"
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Analyzers", "src\SqlServerSimulator.Analyzers\SqlServerSimulator.Analyzers.csproj", "{6CF65391-9236-486B-A6B9-AD2441D77259}"
2525
EndProject
26-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Analyzers.Tests", "SqlServerSimulator.Analyzers.Tests\SqlServerSimulator.Analyzers.Tests.csproj", "{F90DB0DD-7A0C-4DBE-B5BB-786B295CC27B}"
26+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Analyzers.Tests", "tests\SqlServerSimulator.Analyzers.Tests\SqlServerSimulator.Analyzers.Tests.csproj", "{F90DB0DD-7A0C-4DBE-B5BB-786B295CC27B}"
2727
EndProject
28-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.EFCore", "SqlServerSimulator.EFCore\SqlServerSimulator.EFCore.csproj", "{D6BCA163-E34B-4066-A4D7-27882875A9B4}"
28+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.EFCore", "src\SqlServerSimulator.EFCore\SqlServerSimulator.EFCore.csproj", "{D6BCA163-E34B-4066-A4D7-27882875A9B4}"
2929
EndProject
30-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Tests.SqlClient", "SqlServerSimulator.Tests.SqlClient\SqlServerSimulator.Tests.SqlClient.csproj", "{68F4759F-61B2-4FF7-960A-B78C6BC689CC}"
30+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Tests.SqlClient", "tests\SqlServerSimulator.Tests.SqlClient\SqlServerSimulator.Tests.SqlClient.csproj", "{68F4759F-61B2-4FF7-960A-B78C6BC689CC}"
3131
EndProject
32-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Tests.Smo", "SqlServerSimulator.Tests.Smo\SqlServerSimulator.Tests.Smo.csproj", "{6297C6FC-9C79-4332-8F33-726B36B5639B}"
32+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlServerSimulator.Tests.Smo", "tests\SqlServerSimulator.Tests.Smo\SqlServerSimulator.Tests.Smo.csproj", "{6297C6FC-9C79-4332-8F33-726B36B5639B}"
3333
EndProject
3434
Global
3535
GlobalSection(SolutionConfigurationPlatforms) = preSolution

docs/claude/alias-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Scalar alias types (also called UDDTs — user-defined data types) bind a name t
44

55
## Storage
66

7-
`AliasType` (`SqlServerSimulator/AliasType.cs`) carries the underlying `SqlType`, the alias's nullability default, name, schema, and `user_type_id`. `Schema.AliasTypes` is the per-schema `ConcurrentDictionary<string, AliasType>` keyed by name (case-insensitive via `Collation.Baseline`). Shares the type-name namespace with `TableTypes` — duplicate-name collision across either dict raises **Msg 219** verbatim.
7+
`AliasType` (`src/SqlServerSimulator/AliasType.cs`) carries the underlying `SqlType`, the alias's nullability default, name, schema, and `user_type_id`. `Schema.AliasTypes` is the per-schema `ConcurrentDictionary<string, AliasType>` keyed by name (case-insensitive via `Collation.Baseline`). Shares the type-name namespace with `TableTypes` — duplicate-name collision across either dict raises **Msg 219** verbatim.
88

99
`user_type_id` allocation: per-database counter starting at 256, advanced by `Database.AllocateAliasTypeId`. The underlying built-in's `system_type_id` propagates through to `sys.types` (e.g. `nvarchar`-backed alias → `system_type_id=231`).
1010

docs/claude/bacpac-loader.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void ImportBacpac(Stream stream, out BacpacImportResult result, BacpacImp
3030

3131
Per-element exceptions land on `Skipped` with a `"Load failed: …"` prefix and the load continues; the entire load doesn't abort because one constraint / view / proc fails. Deferred-computed-column failures (phase 8, for the rare UDF-forward-ref table) use a `"Deferred: …"` prefix instead, so the `Load_AW_No_Per_Element_Failures` guard test stays meaningful — it would otherwise spuriously fire on known unmodeled-function gaps.
3232

33-
## Code layout — `SqlServerSimulator/Storage/Bacpac/`
33+
## Code layout — `src/SqlServerSimulator/Storage/Bacpac/`
3434

3535
- **`BacpacReader.cs`** — OPC zip walker, dispatches to model + data readers
3636
- **`ModelXmlReader.cs`**`model.xml` → DDL emitter (the 9-phase dispatcher)
@@ -120,7 +120,7 @@ Both AW + WWI exports re-import cleanly into a real SQL Server 2025 (CU7, full-t
120120

121121
## Reference sample coverage
122122

123-
Reference bacpacs live in `.vs/<probe>/` as gitignored cross-check probes (`aw-crosscheck`, `wwi-crosscheck`). The retired `*.Tests.Internal/Storage/BacpacLoaderTests.cs` suite has been replaced by synthetic in-memory bacpacs built via `SqlServerSimulator.Bacpac.BacpacBuilder` + `TableBuilder` in `SqlServerSimulator.Tests/Bacpac/`. CI runs against synthetic builders in seconds.
123+
Reference bacpacs live in `.vs/<probe>/` as gitignored cross-check probes (`aw-crosscheck`, `wwi-crosscheck`). The retired `*.Tests.Internal/Storage/BacpacLoaderTests.cs` suite has been replaced by synthetic in-memory bacpacs built via `SqlServerSimulator.Bacpac.BacpacBuilder` + `TableBuilder` in `tests/SqlServerSimulator.Tests/Bacpac/`. CI runs against synthetic builders in seconds.
124124

125125
**AdventureWorks2025** — 100% row coverage (760,167 / 760,167 rows, zero BCP-file failures). 5/5 schemas, 71/71 tables, 90/90 FKs, 89/89 CHECKs, 152/152 DEFAULTs, 89/95 indexes, 11/20 views, 10/10 procs, 11/11 functions, 10/10 DML triggers, 1/1 DDL trigger, 538/538 extended properties, 8/8 XML indexes, 1/1 full-text catalog, 3/3 full-text indexes, 2/2 indexed-view `SqlIndex` elements. **Import skips are 0.** The DacFx-export element gap vs the Microsoft original is 0 missing; property diffs are 0. One pre-existing divergence surfaces as an "extra" element: AW's system-named UNIQUE constraint on `Production.Document.rowguid` is scripted anonymously (name in an annotation) by DacFx normally, but *named* once the table has a full-text index — and the simulator's auto-generated constraint name (FNV-based) differs from real's object-id-derived one (a documented quirk), so the named form doesn't byte-match. Doesn't block real import (verified: aw-export re-imports into a live SQL Server 2025, both view indexes present at index_id 1 / CLUSTERED / unique).
126126

docs/claude/full-text.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ The bacpac-loaded AW procedure `uspSearchCandidateResumes` (which exercises `CON
66

77
## Storage
88

9-
**`FullTextCatalog`** (`SqlServerSimulator/FullTextCatalog.cs`) carries id + name + is_default + is_accent_sensitivity_on + principal_id + create_date.
9+
**`FullTextCatalog`** (`src/SqlServerSimulator/FullTextCatalog.cs`) carries id + name + is_default + is_accent_sensitivity_on + principal_id + create_date.
1010

1111
**`Database.FullTextCatalogs`** — per-database `ConcurrentDictionary<string, FullTextCatalog>` (case-insensitive). The catalog-id counter starts at 5 — matches Microsoft Learn's documented numbering convention (ids 0..4 are reserved internal slots).
1212

13-
**`FullTextIndex`** (`SqlServerSimulator/FullTextIndex.cs`) carries catalog_id + key_index_name + unique_index_id (resolved at CREATE) + `List<FullTextIndexColumn>`.
13+
**`FullTextIndex`** (`src/SqlServerSimulator/FullTextIndex.cs`) carries catalog_id + key_index_name + unique_index_id (resolved at CREATE) + `List<FullTextIndexColumn>`.
1414

1515
**`HeapTable.FullTextIndex`** — single nullable slot (real SQL Server's invariant: at most one FT index per table).
1616

0 commit comments

Comments
 (0)