public void Test_01_Array_AddItem_Extension() { Vector2[] newArray = null; Vector2[] testArray = null; try { // ReSharper disable once ExpressionIsAlwaysNull // We know the array is null and is initialized // in the extension method we're testing newArray = testArray.AddItem(Vector2.zero); } catch { // ignored } Assert.IsNotNull(newArray); testArray = new Vector2[5]; newArray = testArray.AddItem(Vector2.one); Assert.IsTrue(newArray[newArray.Length - 1] == Vector2.one); Assert.IsTrue(newArray.Length > testArray.Length); Assert.IsTrue(newArray.Length - testArray.Length == 1); }