package com.jmonad.seq;

import org.junit.Test;

public class SeqTakeTest {

  @Test public void takeListElementsTest() {
    Integer[] numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

    Seq<Integer> elements = new Seq<Integer>(numbers);

    assert elements.take(5).toArrayList().toString().equals("[1, 2, 3, 4, 5]");
    assert elements.take(0).toArrayList().toString().equals("[]");
    assert elements.take(20).toArrayList().toString().equals("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]");
  }
}

@@ -76,54 +76,15 @@
 %0A%0A  
-@Test public void takeListElementsTest() %7B%0A   
+private
  Int
@@ -133,20 +133,25 @@
 9, 10%7D;%0A
-%0A
   
- 
+private
  Seq%3CInt
@@ -195,16 +195,61 @@
 bers);%0A%0A
+  @Test public void takeListElementsTest() %7B%0A
     asse
@@ -316,24 +316,82 @@
 3, 4, 5%5D%22);%0A
+  %7D%0A%0A  @Test public void takeElementsWithNoAmountTest() %7B%0A
     assert e
@@ -445,16 +445,222 @@
 (%22%5B%5D%22);%0A
+  %7D%0A%0A  @Test public void takeElementsWithNegativeAmountTest() %7B%0A    assert elements.take(-1).toArrayList().toString().equals(%22%5B%5D%22);%0A  %7D%0A%0A  @Test public void takeElementsWithAmountHigherThanListSizeTest() %7B%0A
     asse

Split take function tests