public void LastIndex__An_Array_Can_Get_The_Last_Index_Of_An_Item() { var animals = new IAnimal[] { _dog, _cat, _fish }; Assert.IsTrue(animals.LastIndex() == animals.Length - 1); }
public void LastIndex__An_Array_Can_Get_The_Last_Index_Of_An_Empty_Array() { var animals = new IAnimal[0]; Assert.IsTrue(animals.LastIndex() == 0); }