Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Docs/pages/08-collections.md → Docs/pages/03-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ You can verify that all items in the collection are equal to the `expected` valu
await Expect.That([1, 1, 1]).All().AreEqualTo(1);
```

You can also use a [custom comparer](/docs/expectations/object#custom-comparer) or
configure [equivalence](/docs/expectations/object#equivalence):
You can also use a [custom comparer](/docs/expectations/common-types/object#custom-comparer) or
configure [equivalence](/docs/expectations/common-types/object#equivalence):

```csharp
IEnumerable<MyClass> values = //...
Expand Down Expand Up @@ -203,8 +203,8 @@ await Expect.That(values).Contains(1).LessThan(5.Times());
await Expect.That(values).Contains(1).Between(1).And(5.Times());
```

You can also use a [custom comparer](/docs/expectations/object#custom-comparer) or
configure [equivalence](/docs/expectations/object#equivalence):
You can also use a [custom comparer](/docs/expectations/common-types/object#custom-comparer) or
configure [equivalence](/docs/expectations/common-types/object#equivalence):

```csharp
IEnumerable<MyClass> values = //...
Expand Down Expand Up @@ -289,8 +289,8 @@ await Expect.That(values).StartsWith(1, 2);
await Expect.That(values).DoesNotStartWith(2, 3);
```

You can also use a [custom comparer](/docs/expectations/object#custom-comparer) or
configure [equivalence](/docs/expectations/object#equivalence):
You can also use a [custom comparer](/docs/expectations/common-types/object#custom-comparer) or
configure [equivalence](/docs/expectations/common-types/object#equivalence):

```csharp
IEnumerable<MyClass> values = //...
Expand Down Expand Up @@ -320,8 +320,8 @@ await Expect.That(values).EndsWith(4, 5);
await Expect.That(values).DoesNotEndWith(3, 5);
```

You can also use a [custom comparer](/docs/expectations/object#custom-comparer) or
configure [equivalence](/docs/expectations/object#equivalence):
You can also use a [custom comparer](/docs/expectations/common-types/object#custom-comparer) or
configure [equivalence](/docs/expectations/common-types/object#equivalence):

```csharp
IEnumerable<MyClass> values = //...
Expand Down
2 changes: 1 addition & 1 deletion Docs/pages/07-delegates.md → Docs/pages/04-delegates.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ await Expect.That(Act).ThrowsException().WithMessageContaining("my exception");
await Expect.That(Act).ThrowsException().WithoutMessageContaining("something else");
```

You can use the same configuration options as when [comparing strings](/docs/expectations/string#equality).
You can use the same configuration options as when [comparing strings](/docs/expectations/common-types/string#equality).

## Inner exceptions

Expand Down
File renamed without changes.
44 changes: 18 additions & 26 deletions Docs/pages/17-benchmarks.mdx → Docs/pages/07-benchmarks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,39 @@ These benchmarks compare aweXpect's happy-path overhead — passing assertions,

<Tabs groupId="aweXpectBenchmark">

<TabItem value="Bool" label="Boolean" default>
<TabItem value="String" label="String">

Verifies that a boolean subject is `true`.
Verifies that two `string` values are equal, ignoring case.

<BenchmarkResult name="Bool" />
<BenchmarkResult name="String" />

```csharp title="aweXpect"
await Expect.That(_boolSubject).IsTrue();
await Expect.That(_stringSubject).IsEqualTo(_stringExpectation).IgnoringCase();
```

```csharp title="FluentAssertions"
_boolSubject.Should().BeTrue();
_stringSubject.Should().BeEquivalentTo(_stringExpectation, o => o.IgnoringCase());
```

[View source on GitHub →](https://github.com/Testably/aweXpect/blob/main/Benchmarks/aweXpect.Benchmarks/HappyCaseBenchmarks.Bool.cs)
[View source on GitHub →](https://github.com/Testably/aweXpect/blob/main/Benchmarks/aweXpect.Benchmarks/HappyCaseBenchmarks.String.cs)

</TabItem>

<TabItem value="String" label="String">
<TabItem value="Bool" label="Boolean" default>

Verifies that two `string` values are equal, ignoring case.
Verifies that a boolean subject is `true`.

<BenchmarkResult name="String" />
<BenchmarkResult name="Bool" />

```csharp title="aweXpect"
await Expect.That(_stringSubject).IsEqualTo(_stringExpectation).IgnoringCase();
await Expect.That(_boolSubject).IsTrue();
```

```csharp title="FluentAssertions"
_stringSubject.Should().BeEquivalentTo(_stringExpectation, o => o.IgnoringCase());
_boolSubject.Should().BeTrue();
```

[View source on GitHub →](https://github.com/Testably/aweXpect/blob/main/Benchmarks/aweXpect.Benchmarks/HappyCaseBenchmarks.String.cs)
[View source on GitHub →](https://github.com/Testably/aweXpect/blob/main/Benchmarks/aweXpect.Benchmarks/HappyCaseBenchmarks.Bool.cs)

</TabItem>

Expand Down Expand Up @@ -116,33 +116,25 @@ Verifies that two three-element `string` arrays are equal in the same order.

<BenchmarkResult name="StringArray" />

```csharp title="aweXpect"
await Expect.That(_stringArraySubject).IsEqualTo(_stringArrayExpectation);
```

```csharp title="FluentAssertions"
_stringArraySubject.Should().Equal(_stringArrayExpectation);
```

[View source on GitHub →](https://github.com/Testably/aweXpect/blob/main/Benchmarks/aweXpect.Benchmarks/HappyCaseBenchmarks.StringArray.cs)

</TabItem>

<TabItem value="StringArrayInAnyOrder" label="String array (any order)">

**In any order**
Verifies that two three-element `string` arrays contain the same values regardless of order.

<BenchmarkResult name="StringArrayInAnyOrder" />

```csharp title="aweXpect"
await Expect.That(_stringArraySubject).IsEqualTo(_stringArrayExpectation);
// In any order
await Expect.That(_stringArrayAnyOrderSubject)
.IsEqualTo(_stringArrayAnyOrderExpectation).InAnyOrder();
```

```csharp title="FluentAssertions"
_stringArraySubject.Should().Equal(_stringArrayExpectation);
// In any order
_stringArrayAnyOrderSubject.Should().BeEquivalentTo(_stringArrayAnyOrderExpectation);
```

[View source on GitHub →](https://github.com/Testably/aweXpect/blob/main/Benchmarks/aweXpect.Benchmarks/HappyCaseBenchmarks.StringArray.cs)
[View source on GitHub →](https://github.com/Testably/aweXpect/blob/main/Benchmarks/aweXpect.Benchmarks/HappyCaseBenchmarks.StringArrayInAnyOrder.cs)

</TabItem>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Docs/pages/advanced/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Advanced",
"position": 16,
"position": 6,
"link": {
"type": "generated-index"
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions Docs/pages/common-types/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Common types",
"position": 2,
"link": {
"type": "generated-index"
}
}