# Serialization Tests

Comprehensive test suite for binary and JSON serialization: round-trips, reference handling, chains, and source generator integration.

## Key Files

### Basic Types
- **`AcBinarySerializerBasicTests.cs`** — Primitives: int, double, string, bool, DateTime, Guid.
- **`AcBinarySerializerDateTimeTests.cs`** — DateTime handling and type mismatch detection.
- **`AcBinarySerializerNullableTests.cs`** — Nullable types: int?, long?, etc.

### Complex Objects
- **`AcBinarySerializerObjectTests.cs`** — Nested objects and hierarchies.
- **`AcBinarySerializerNavigationPropertyTests.cs`** — EF-style navigation properties.
- **`AcBinarySerializerGenericTypeTests.cs`** — Generic type parameters.

### Reference Handling
- **`AcBinarySerializerChainTests.cs`** — Binary Chain API (CreateDeserializeChain, ThenDeserialize).
- **`AcBinarySerializerChainReferenceTests.cs`** — Chain with $id/$ref references.
- **`AcBinarySerializerCircularReferenceTests.cs`** — Circular/bidirectional references.
- **`AcBinarySerializerIIdReferenceTests.cs`** — IId<T> interface-based reference tracking.
- **`AcBinarySerializerStringInterningTests.cs`** — String deduplication via [AcStringIntern].

### JSON
- **`AcJsonSerializerChainTests.cs`** — JSON chain operations.
- **`AcJsonSerializerIIdReferenceTests.cs`** — JSON $id/$ref handling.
- **`AcExpressionNodeSerializationTests.cs`** — Expression tree serialization.

### Source Generator & Performance
- **`GeneratedSerializerIntegrationTests.cs`** — Verifies generated writer types implement IGeneratedBinaryWriter.
- **`QuickBenchmark.cs`** — Performance comparison: AcBinary vs MessagePack.
- **`AcSerializerTestHelper.cs`** — Factory methods for test data.
