package leigh.eo;

import leigh.mecha.log.MechaLogger;
import leigh.mecha.log.MechaLoggerFactory;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class EOLoopTest {
    private static final MechaLogger logger = MechaLoggerFactory.getLogger(EOLoopTest.class);

    @Test
    public void testRemoveAfter() {
        EOLoop loop = new EOLoop();
        loop.add(new EO("0"));
        loop.add(new EO("1"));
        loop.add(new EO("2"));
        loop.add(new EO("3"));
        loop.add(new EO("4"));

        loop.removeAfter(2);

        assertEquals(3, loop.size());

        logger.info("Loop state: {}", loop);
    }
}
