---
title: Specimen graphs
description: AutoFixture builds nested object graphs automatically from constructor and property dependencies.
---

When you call `Create<T>()` on a complex type, AutoFixture fills constructor parameters and properties with anonymous values, including nested types.

## Example scenario

You are testing code that reads `Person.Name` and `Person.HomeAddress.City`. You need a fully wired object graph without manually constructing `Address` and assigning it to `Person`.

## Example

```csharp
var fixture = new Fixture();
var person = fixture.Create<Person>();

Assert.False(string.IsNullOrEmpty(person.Name));
Assert.False(string.IsNullOrEmpty(person.HomeAddress.Street));
Assert.False(string.IsNullOrEmpty(person.HomeAddress.City));
```

A `Person` with an `Address` property gets both objects populated without manual wiring.

## How it works

AutoFixture walks constructor parameters and writable properties, creating specimens for each dependency. Nested reference types become part of the same graph in one `Create` call.

Some graphs have business rules (collections, circular references, interfaces). When `Create` fails, use [Build DSL](/docs/fundamentals/build-dsl), [Register, Freeze, and Inject](/docs/how-to/register-freeze-inject), or [Circular references](/docs/how-to/circular-refs).

For how AutoFixture wires **builders and specifications** inside the kernel, see [Specimen builders and specifications](/docs/advanced/specimen-builders-and-specifications).

## Next steps

- [Advanced overview](/docs/advanced/overview)
- [Specimen pipeline](/docs/advanced/specimen-pipeline)
- [Specimen builders and specifications](/docs/advanced/specimen-builders-and-specifications)
- [Collections](/docs/how-to/collections)
- [Circular references](/docs/how-to/circular-refs)
- [Build DSL](/docs/fundamentals/build-dsl)
