package net.ranides.assira.observable;

import net.ranides.assira.collection.ACollectionTest;
import net.ranides.assira.events.EventDispatcher;
import net.ranides.test.ContractTesters;
import net.ranides.test.data.TCollection;
import net.ranides.test.data.TMaps;
import net.ranides.test.data.TPoint;
import org.junit.Test;

import static org.junit.Assert.*;

public class ObservableCollectionTest {

    private final TCollection<TPoint> $var = TMaps.MAP_PI.keys();

    @Test
    public void testSuite() {
        ContractTesters.runner()
            .param("collection!", $var)
            .function(new int[0], (array) -> new ObservableCollection(EventDispatcher.newInstance(), $var.list(array).intoList() ))
            .run();
    }

}