forked from fluentassertions/fluentassertions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ActionAssertions.cs
31 lines (27 loc) · 929 Bytes
/
ActionAssertions.cs
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
31
using System;
using System.Diagnostics;
using FluentAssertions.Common;
namespace FluentAssertions.Specialized
{
/// <summary>
/// Contains a number of methods to assert that an <see cref="Action"/> yields the expected result.
/// </summary>
[DebuggerNonUserCode]
public class ActionAssertions : DelegateAssertions<Action, ActionAssertions>
{
public ActionAssertions(Action subject, IExtractExceptions extractor) : this(subject, extractor, new Clock())
{
}
public ActionAssertions(Action subject, IExtractExceptions extractor, IClock clock) : base(subject, extractor, clock)
{
}
protected override void InvokeSubject()
{
Subject();
}
/// <summary>
/// Returns the type of the subject the assertion applies on.
/// </summary>
protected override string Identifier => "action";
}
}