mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-13 03:35:04 +00:00
Implementing stub tests
This commit is contained in:
@@ -3,6 +3,7 @@ using ICD.Common.Utils.Extensions;
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System;
|
||||
|
||||
namespace ICD.Common.Utils.Tests.Extensions
|
||||
{
|
||||
@@ -323,13 +324,22 @@ namespace ICD.Common.Utils.Tests.Extensions
|
||||
[Test]
|
||||
public void MinByTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
Assert.AreEqual(1, (new int[] { 3, 6, 2, 7, 1 }).MinBy(i => i));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MinByComparerTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
IComparer<int> comparer = new NegativeComparer();
|
||||
Assert.AreEqual(7, (new int[] { 3, 6, 2, 7, 1 }).MinBy(i => i, comparer));
|
||||
}
|
||||
|
||||
private class NegativeComparer : IComparer<int>
|
||||
{
|
||||
public int Compare(int x, int y)
|
||||
{
|
||||
return Comparer<int>.Default.Compare(-x, -y);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -10,7 +10,9 @@ namespace ICD.Common.Utils.Tests.Extensions
|
||||
[Test]
|
||||
public void IndexOfTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
string first;
|
||||
Assert.AreEqual(5, "test1test3test2".IndexOf(new string[] { "test2", "test3" }, out first));
|
||||
Assert.AreEqual("test3", first);
|
||||
}
|
||||
|
||||
[TestCase(true, "12345", '1')]
|
||||
|
||||
Reference in New Issue
Block a user