init
This commit is contained in:
59
docs/ai/DataPRO/UnitTest/DatabaseUnitTesting/Properties.md
Normal file
59
docs/ai/DataPRO/UnitTest/DatabaseUnitTesting/Properties.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/UnitTest/DatabaseUnitTesting/Properties/Settings.Designer.cs
|
||||
generated_at: "2026-04-17T16:45:48.166150+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "414dafff4d3f4086"
|
||||
---
|
||||
|
||||
# Documentation: DatabaseUnitTesting.Properties.Settings
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module is an auto-generated settings class that provides strongly-typed access to application configuration values for the `DatabaseUnitTesting` project. It exists to centralize configuration management for database unit testing, specifically storing connection parameters, database names, and snapshot identifiers. The class is generated by Visual Studio's `SettingsSingleFileGenerator` tool and serves as the configuration layer between the unit test code and the underlying `.settings` file.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `Settings` (sealed partial class)
|
||||
**Inherits from:** `global::System.Configuration.ApplicationSettingsBase`
|
||||
|
||||
| Member | Signature | Scope | Description |
|
||||
|--------|-----------|-------|-------------|
|
||||
| `Default` | `public static Settings Default { get; }` | Static | Returns the singleton default instance of the `Settings` class, synchronized for thread-safe access. |
|
||||
| `ConnectionString` | `public string ConnectionString { get; }` | Application-scoped | Returns the database connection string for the unit test database. Read-only. Default value points to `FAJITA\DEV_SQL` server with `DataPRO_UnitTest` catalog. |
|
||||
| `DBName` | `public string DBName { get; set; }` | User-scoped | Gets or sets the database name. Default value is `"DataPRO_UnitTest"`. |
|
||||
| `DBSnapshot` | `public string DBSnapshot { get; set; }` | User-scoped | Gets or sets the database snapshot name. Default value is `"DataPRO_UnitTestSnapshot"`. |
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- **Auto-generated constraint**: This file is machine-generated by `Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator` version `17.10.0.0`. Manual modifications will be lost upon regeneration.
|
||||
- **Singleton pattern**: The `defaultInstance` field is created once via `Synchronized()` and returned through the `Default` property.
|
||||
- **Scope immutability**: `ConnectionString` is application-scoped (read-only at runtime); `DBName` and `DBSnapshot` are user-scoped (read/write).
|
||||
- **Type safety**: All settings are typed as `string`; accessors perform explicit casts from the underlying settings dictionary.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
- `System.Configuration.ApplicationSettingsBase` - Base class providing settings management infrastructure
|
||||
- `System.Configuration.ApplicationScopedSettingAttribute` - Attribute for application-level settings
|
||||
- `System.Configuration.UserScopedSettingAttribute` - Attribute for user-level settings
|
||||
- `System.Configuration.SpecialSettingAttribute` - Marks `ConnectionString` as a special connection string type
|
||||
- `System.Configuration.DefaultSettingValueAttribute` - Provides default values for each setting
|
||||
- `System.Runtime.CompilerServices.CompilerGeneratedAttribute` - Indicates tool-generated code
|
||||
- `System.CodeDom.Compiler.GeneratedCodeAttribute` - Metadata about the code generator
|
||||
|
||||
### What depends on this module:
|
||||
- **Inferred**: Any code within the `DatabaseUnitTesting` project that accesses configuration values via `Settings.Default`.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Hardcoded credentials in source control**: The `ConnectionString` default value contains a plaintext SQL Server `sa` password (`!!QQAAZZxxssww22`). This is a significant security risk and should be moved to a secure configuration mechanism (e.g
|
||||
Reference in New Issue
Block a user