mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
Resolving warnings
This commit is contained in:
parent
1e2a863744
commit
3a2f3b7526
3 changed files with 9 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ namespace ICD.Common.Utils
|
|||
#if SIMPLSHARP
|
||||
return CrestronConsole.SendControlSystemCommand(command, ref result);
|
||||
#else
|
||||
result = string.Empty;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace ICD.Common.Utils.Json
|
|||
/// <param name="writer">The <see cref="T:Newtonsoft.Json.JsonWriter"/> to write to.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <param name="serializer">The calling serializer.</param>
|
||||
public override sealed void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
public sealed override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
|
|
@ -42,7 +42,7 @@ namespace ICD.Common.Utils.Json
|
|||
/// <returns>
|
||||
/// The object value.
|
||||
/// </returns>
|
||||
public override sealed object ReadJson(JsonReader reader, Type objectType, object existingValue,
|
||||
public sealed override object ReadJson(JsonReader reader, Type objectType, object existingValue,
|
||||
JsonSerializer serializer)
|
||||
{
|
||||
if (reader.TokenType == JsonToken.Null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue