-
Notifications
You must be signed in to change notification settings - Fork 3
/
TestCase.cs
29 lines (25 loc) · 1.08 KB
/
TestCase.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
using System;
using System.Linq;
using System.Threading.Tasks;
using Xenial.Delicious.Execution;
namespace Xenial.Delicious.Metadata
{
[System.Diagnostics.DebuggerDisplay("Name: {Name} Outcome: {TestOutcome} Duration: {Duration}")]
public class TestCase : IExecutable, IForceAble
{
public string Name { get; internal set; } = string.Empty;
public TestGroup? Group { get; internal set; }
public Executable Executor { get; set; } = () => Task.FromResult(true);
public TestOutcome TestOutcome { get; internal set; } = TestOutcome.NotRun;
public Exception? Exception { get; internal set; }
public Func<bool?> IsIgnored { get; internal set; } = () => false;
public string IgnoredReason { get; internal set; } = string.Empty;
public TimeSpan Duration { get; internal set; }
public string AdditionalMessage { get; internal set; } = string.Empty;
public Func<bool>? IsForced { get; set; }
public string FullName =>
Group == null
? Name
: $"{Group.FullName} {Name}";
}
}