Resolving warnings

This commit is contained in:
Chris Cameron
2018-01-02 16:49:23 -05:00
parent 1e2a863744
commit 3a2f3b7526
3 changed files with 9 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ namespace ICD.Common.Utils.Tests
[TestFixture]
public sealed class RecursionUtilsTest
{
private IEnumerable<int> Graph(int node)
private static IEnumerable<int> Graph(int node)
{
switch (node)
{
@@ -29,6 +29,7 @@ namespace ICD.Common.Utils.Tests
[Test]
public void BreadthFirstSearchTest()
{
// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
Assert.Throws<ArgumentNullException>(() => RecursionUtils.BreadthFirstSearch(1, null).ToArray());
int[] nodes = RecursionUtils.BreadthFirstSearch(1, Graph).ToArray();
@@ -43,8 +44,11 @@ namespace ICD.Common.Utils.Tests
[Test]
public void BreadthFirstSearchPathTest()
{
Assert.Throws<ArgumentNullException>(() => RecursionUtils.BreadthFirstSearchPath(1, 4, null).ToArray());
Assert.Throws<ArgumentNullException>(() => RecursionUtils.BreadthFirstSearchPath(1, 4, null));
Assert.IsNull(RecursionUtils.BreadthFirstSearchPath(1, 5, Graph));
// ReSharper disable once AssignNullToNotNullAttribute
int[] path = RecursionUtils.BreadthFirstSearchPath(1, 4, Graph).ToArray();
Assert.AreEqual(3, path.Length);
@@ -63,6 +67,7 @@ namespace ICD.Common.Utils.Tests
[Test]
public void BreadthFirstSearchPathSingleNodeTest()
{
// ReSharper disable once AssignNullToNotNullAttribute
int[] path = RecursionUtils.BreadthFirstSearchPath(1, 1, Graph).ToArray();
Assert.AreEqual(1, path.Length);