Skip to content

Instantly share code, notes, and snippets.

@JayBazuzi
Created May 23, 2019 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JayBazuzi/557c4a467684ab0bfc9380b58e17b5b3 to your computer and use it in GitHub Desktop.
Save JayBazuzi/557c4a467684ab0bfc9380b58e17b5b3 to your computer and use it in GitHub Desktop.
@Test
class YouCanAddToAnArrayTheSameWayYouCanAddToAList
{
public void addToArray_WillResultInANewCopyOfTheArrayWithTheAddedItems() throws Exception
{
Integer[] numbers = {1, 2, 3};
Integer[] result = ArrayUtils.addtoArray(numbers, 4, 5, 6);
assertArrayEquals({1, 2, 3, 4, 5, 6}, result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment