forked from fluentassertions/fluentassertions.json
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJsonAssertionOptions.cs
More file actions
30 lines (25 loc) · 1.04 KB
/
JsonAssertionOptions.cs
File metadata and controls
30 lines (25 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using FluentAssertions.Equivalency;
namespace FluentAssertions.Json
{
/// <summary>
/// Represents the run-time type-specific behavior of a JSON structural equivalency assertion. It is the equivalent of <see cref="FluentAssertions.Equivalency.EquivalencyOptions{T}"/>
/// </summary>
public sealed class JsonAssertionOptions<T> : EquivalencyOptions<T>, IJsonAssertionOptions<T>
{
internal JsonAssertionOptions() { }
public JsonAssertionOptions(EquivalencyOptions<T> equivalencyAssertionOptions) : base(equivalencyAssertionOptions)
{
}
internal bool IsStrictlyOrdered { get; private set; } = true;
public new IJsonAssertionRestriction<T, TProperty> Using<TProperty>(Action<IAssertionContext<TProperty>> action)
{
return new JsonAssertionRestriction<T, TProperty>(base.Using(action));
}
public new IJsonAssertionOptions<T> WithoutStrictOrdering()
{
IsStrictlyOrdered = false;
return this;
}
}
}