Beispiel #1
0
        public void getLastNameInArrayUsingLinq()
        {
            string[] nameArray = { "apple", "orange", "banana" };

            string result = ArrayKatas.getLastItemInArrayUsingLinq(nameArray);

            Assert.AreEqual("banana", result);
        }
Beispiel #2
0
        public void getLastNumberInArrayUsingLinq()
        {
            int[] numbersArray = { 1, 2, 3 };

            int result = ArrayKatas.getLastItemInArrayUsingLinq(numbersArray);

            Assert.AreEqual(3, result);
        }