public void Test_CheckBoundsF() { Assert.AreEqual(5.11f, Algorithms.CheckBounds(5.11f, 3.1f, 11.7f)); Assert.AreEqual(3.1f, Algorithms.CheckBounds(2f, 3.1f, 11.7f)); Assert.AreEqual(11.7f, Algorithms.CheckBounds(15f, 3.1f, 11.7f)); }
public void Test_IfElse() { Assert.AreEqual(5, Algorithms.IfElse(true, 5, 11)); Assert.AreEqual(11, Algorithms.IfElse(false, 5, 11)); }
public void Test_IndexOfT() { int[] array = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; Assert.AreEqual(5, Algorithms.IndexOf(array, 6)); Assert.AreEqual(-1, Algorithms.IndexOf(array, 11)); }
public void Test_Optional() { Assert.AreEqual(5, Algorithms.Optional(true, 5)); Assert.AreEqual(0, Algorithms.Optional(false, 5)); }
public void Test_CheckBoundsI() { Assert.AreEqual(5, Algorithms.CheckBounds(5, 3, 11)); Assert.AreEqual(3, Algorithms.CheckBounds(2, 3, 11)); Assert.AreEqual(11, Algorithms.CheckBounds(15, 3, 11)); }