Skip to content

Commit

Permalink
Fix documentation layout
Browse files Browse the repository at this point in the history
  • Loading branch information
siewers committed Mar 12, 2024
1 parent 19732aa commit a7be412
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions docs/_pages/basicassertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,28 @@ As an alternative to using predicate matching, it is also possible to use elemen

```csharp
var productDto = new ProductDto
{
Name = "Some product name",
Price = 19.95,
SKU = "ABC12345",
Store = new Store
{
Name = "Some product name",
Price = 19.95,
SKU = "ABC12345",
Store = new Store
{
Country = "Germany",
Quantity = 42
}
};
Country = "Germany",
Quantity = 42
}
};

productDto.Should().Satisfy<ProductDto>(dto =>
{
dto.Name.Should().Be("Some product name");
dto.Price.Should().Be(19.95);
dto.SKU.Should().EndWith("12345");
dto.Store.Should().Satisfy<Store>(store =>
{
dto.Name.Should().Be("Some product name");
dto.Price.Should().Be(19.95);
dto.SKU.Should().EndWith("12345");
dto.Store.Should().Satisfy<Store>(store =>
{
store.Country.Should().Be("Germany");
store.Quantity.Should().BeGreaterThan(40);
}
);
}
);
store.Country.Should().Be("Germany");
store.Quantity.Should().BeGreaterThan(40);
});
});
```

Some users requested the ability to easily downcast an object to one of its derived classes in a fluent way.
Expand Down

0 comments on commit a7be412

Please sign in to comment.