/*
 * @author Ranides Atterwim <ranides@gmail.com>
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.collection;

import java.util.Arrays;
import java.util.List;
import net.ranides.assira.collection.arrays.IntArrays;
import net.ranides.assira.collection.lists.IntList;
import net.ranides.assira.collection.lists.IntListUtils;
import net.ranides.assira.collection.lists.ListUtils;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public class SwapperTest {
	
	public SwapperTest() {
	}

	@Test
	public void testSwapper() {
		IntList list1 = IntArrays.asList(1,2,3,4);
		IntListUtils.swapper(list1).swap(0, 2);
		assertEquals(IntArrays.asList(3,2,1,4), list1);
		
		List<String> list2 = Arrays.asList("1","2","3","4");
		ListUtils.swapper(list2).swap(0, 2);
		assertEquals(Arrays.asList("3","2","1","4"), list2);
	}
	
}
