public void GetNextToLastElement_ReturnsNextToLastElement([Values(2, 3, 20)] int arrayLength)
        {
            // Arrange
            int[] array = Enumerable.Range(1, arrayLength).ToArray();

            // Act
            int result = UsingIndexerForAccessingArrayElement.GetNextToLastElement(array);

            // Assert
            Assert.AreEqual(array[array.Length - 2], result);
        }
        public void GetNextToLastElement_ReturnsNextToLastDecimalElement()
        {
            // Arrange
            decimal[] array = { 0.01m, 0.02m, 0.03m, 0.04m };

            // Act
            decimal result = UsingIndexerForAccessingArrayElement.GetNextToLastElement(array);

            // Assert
            Assert.AreEqual(0.03m, result);
        }
        public void GetNextToLastElement_ReturnsLastStringElement()
        {
            // Arrange
            string[] array = { "one", "two", "three", "four", "five", "six" };

            // Act
            string result = UsingIndexerForAccessingArrayElement.GetNextToLastElement(array);

            // Assert
            Assert.AreEqual("five", result);
        }
 public float GetNextToLastElement_ReturnsNextToLastDoubleElement(float[] array)
 {
     // Act
     return(UsingIndexerForAccessingArrayElement.GetNextToLastElement(array));
 }
 public char GetNextToLastElement_ReturnsNextToLastCharElement(char[] array)
 {
     // Act
     return(UsingIndexerForAccessingArrayElement.GetNextToLastElement(array));
 }
 public bool GetNextToLastElement_ReturnsNextToLastBoolElement(bool[] array)
 {
     // Act
     return(UsingIndexerForAccessingArrayElement.GetNextToLastElement(array));
 }