Skip to content

Added deserialization unit tests to CodeDomComponentSerializationService - #14900

Open
Rabina4363sf wants to merge 2 commits into
dotnet:mainfrom
Rabina4363sf:Fix_Issue_10135
Open

Added deserialization unit tests to CodeDomComponentSerializationService#14900
Rabina4363sf wants to merge 2 commits into
dotnet:mainfrom
Rabina4363sf:Fix_Issue_10135

Conversation

@Rabina4363sf

@Rabina4363sf Rabina4363sf commented Aug 18, 2026

Copy link
Copy Markdown

Fixes #10135

Proposed changes

  • Added 20 comprehensive unit tests for CodeDomComponentSerializationService.Deserialize() method
  • Tests cover null store and container parameter validation
  • Tests verify single and multiple object deserialization scenarios
  • Tests ensure round-trip serialization/deserialization preserves object state
  • Tests validate empty store handling
  • Tests cover DeserializeTo() method with various flag combinations (validateRecycledTypes, applyDefaults)
  • Tests include integration with IServiceProvider and IContainer
  • Tests verify proper exception handling for invalid operations

Customer Impact

  • Improves test coverage for component serialization service
  • Ensures deserialization APIs work reliably across different scenarios
  • Validates serialization/deserialization round-trip fidelity

Regression?

  • No

Risk

  • Low (tests only, no product code changes)

Test methodology

  • Unit tests using xUnit framework
  • Mock objects created with Moq for isolated testing
  • Validation of exception types and messages
  • Property assertion checks for deserialized objects
  • Control round-trip testing to verify state preservation
  • Empty and edge-case scenarios covered

Accessibility testing

NA

Test environment(s)

  • Visual Studio (Test Explorer)
  • Windows
  • .NET 11
Microsoft Reviewers: Open in CodeFlow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add deserialization unit tests to CodeDomComponentSerializationService

1 participant