-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestWithoutDescription.cs
More file actions
36 lines (30 loc) · 1.26 KB
/
TestWithoutDescription.cs
File metadata and controls
36 lines (30 loc) · 1.26 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
31
32
33
34
35
36
using CSF.Screenplay.Performances;
namespace CSF.Screenplay;
[TestFixture,Parallelizable]
public class TestWithoutDescription
{
[Test,Screenplay]
public void FirstTest(IPerformance performance)
{
IdentifierAndName[] expectedNamingHierarchy = [
new(typeof(TestWithoutDescription).FullName),
new($"{typeof(TestWithoutDescription).FullName}.{nameof(FirstTest)}"),
];
AssertThatPerformanceHasCorrectState(performance, expectedNamingHierarchy);
}
[Test,Screenplay]
public void SecondTest(IPerformance performance)
{
IdentifierAndName[] expectedNamingHierarchy = [
new(typeof(TestWithoutDescription).FullName),
new($"{typeof(TestWithoutDescription).FullName}.{nameof(SecondTest)}"),
];
AssertThatPerformanceHasCorrectState(performance, expectedNamingHierarchy);
}
static void AssertThatPerformanceHasCorrectState(IPerformance performance, IdentifierAndName[] expectedNamingHierarchy)
{
using var scope = Assert.EnterMultipleScope();
Assert.That(performance, Is.Not.Null, "Performance must not be null");
Assert.That(performance.NamingHierarchy, Is.EqualTo(expectedNamingHierarchy), "Performance naming hierarchy is correct");
}
}