Skip to content

Commit b491023

Browse files
committed
[Bot] Automated ReSharper CLT update
1 parent 5f2eebb commit b491023

File tree

2 files changed

+40
-40
lines changed

2 files changed

+40
-40
lines changed

src/CombatDicesTeam.Graphs/DirectedGraph.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using JetBrains.Annotations;
22

3-
namespace CombatDicesTeam.Graphs;
4-
5-
/// <summary>
6-
/// Base implementation of the graph.
7-
/// </summary>
8-
/// <typeparam name="TNodePayload">Type of node data.</typeparam>
3+
namespace CombatDicesTeam.Graphs;
4+
5+
/// <summary>
6+
/// Base implementation of the graph.
7+
/// </summary>
8+
/// <typeparam name="TNodePayload">Type of node data.</typeparam>
99
[PublicAPI]
1010
public sealed class DirectedGraph<TNodePayload> : IGraph<TNodePayload>
1111
{

tests/CombatDicesTeam.Graphs.Tests/DirectedGraphTests.cs

+34-34
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@
33
namespace CombatDicesTeam.Graphs.Tests;
44

55
public class DirectedGraphTests
6-
{
7-
/// <summary>
8-
/// Test checks a node from the middle of linear directed graph returns related node from the end as next.
9-
/// </summary>
10-
[Test]
11-
public void GetNext_LinearGraph3_ReturnsSingleNodeFromRoot()
12-
{
13-
// ARRANGE
14-
15-
var graph = new DirectedGraph<int>();
16-
17-
var nodeList = new List<IGraphNode<int>>();
18-
const int SEQUENCE_LENGTH = 3;
19-
for (var i = 0; i < SEQUENCE_LENGTH; i++)
20-
{
21-
var nodePayload = i;
22-
var graphNode = Mock.Of<IGraphNode<int>>(x => x.Payload == nodePayload);
23-
nodeList.Add(graphNode);
24-
}
25-
26-
CreateLinearGraph(graph, nodeList);
27-
28-
// ACT
29-
30-
var next = graph.GetNext(nodeList[1]);
31-
32-
// ASSERT
33-
34-
next.Should().HaveCount(1).And.Subject.Should().Satisfy(x => x == nodeList[2]);
35-
}
36-
37-
/// <summary>
38-
/// Test checks a root returns related node as next.
39-
/// </summary>
6+
{
7+
/// <summary>
8+
/// Test checks a node from the middle of linear directed graph returns related node from the end as next.
9+
/// </summary>
10+
[Test]
11+
public void GetNext_LinearGraph3_ReturnsSingleNodeFromRoot()
12+
{
13+
// ARRANGE
14+
15+
var graph = new DirectedGraph<int>();
16+
17+
var nodeList = new List<IGraphNode<int>>();
18+
const int SEQUENCE_LENGTH = 3;
19+
for (var i = 0; i < SEQUENCE_LENGTH; i++)
20+
{
21+
var nodePayload = i;
22+
var graphNode = Mock.Of<IGraphNode<int>>(x => x.Payload == nodePayload);
23+
nodeList.Add(graphNode);
24+
}
25+
26+
CreateLinearGraph(graph, nodeList);
27+
28+
// ACT
29+
30+
var next = graph.GetNext(nodeList[1]);
31+
32+
// ASSERT
33+
34+
next.Should().HaveCount(1).And.Subject.Should().Satisfy(x => x == nodeList[2]);
35+
}
36+
37+
/// <summary>
38+
/// Test checks a root returns related node as next.
39+
/// </summary>
4040
[Test]
4141
public void GetNext_SimplestGraph_ReturnsSingleOtherNode()
4242
{

0 commit comments

Comments
 (0)