package net.ranides.assira.collection.arrays;

import org.junit.Test;

import net.ranides.assira.collection.lists.ListBuilder;
import net.ranides.assira.collection.query.CQuery;

import java.util.Arrays;
import java.util.List;

import static org.junit.Assert.*;

public class NativeArrayBuilderTest {

    @Test
    public void basic() {
        String[] array = new NativeArrayBuilder(String[]::new, 3)
            .value("x")
            .values("a", "b", "c")
            .values("p q r".split(" "))
            .values(Arrays.asList("f", "g", "h", "i"))
            .values(CQuery.from().values("A", "B", "C"))
            .toArray();

        assertArrayEquals("x a b c p q r f g h i A B C".split(" "), array);

    }

}