/*
 * @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.ListIterator;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author ranides
 */
public class SingleIteratorTest {

    @Test
    public void testIterator() {
        ListIterator<Integer> iterator = new SingleIterator<>(44);
        
        assertFalse( iterator.hasPrevious());
        assertTrue( iterator.hasNext());
        
        assertEquals(44, (int)iterator.next());
        
        assertFalse( iterator.hasNext());
        assertTrue( iterator.hasPrevious());
        
        assertEquals(44, (int)iterator.previous());
        
        assertFalse( iterator.hasPrevious());
        assertTrue( iterator.hasNext());
        
        assertTrue(true);
    }
}
