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

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

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

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

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

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

            // Assert
            Assert.AreEqual("six", result);
        }
 public float GetLastElement_ReturnsLastDoubleElement(float[] array)
 {
     // Act
     return(UsingIndexerForAccessingArrayElement.GetLastElement(array));
 }
 public char GetLastElement_ReturnsLastCharElement(char[] array)
 {
     // Act
     return(UsingIndexerForAccessingArrayElement.GetLastElement(array));
 }
 public bool GetLastElement_ReturnsLastBoolElement(bool[] array)
 {
     // Act
     return(UsingIndexerForAccessingArrayElement.GetLastElement(array));
 }