Search in sources :

Example 1 with ExplicitEventSet

use of il.ac.bgu.cs.bp.bpjs.model.eventsets.ExplicitEventSet in project BPjs by bThink-BGU.

the class SimpleEventSelectionStrategyTest method testDeadlock.

@Test
public void testDeadlock() {
    ExplicitEventSet setOfEvt2 = new ExplicitEventSet();
    setOfEvt2.add(eventTwo);
    Set<BSyncStatement> sets = new HashSet<>(Arrays.asList(BSyncStatement.make(null).request(eventOne), BSyncStatement.make(null).request(setOfEvt2), BSyncStatement.make(null).block(eventTwo), BSyncStatement.make(null).block(eventOne)));
    assertEquals(emptySet(), sut.selectableEvents(sets, Collections.emptyList()));
    assertEquals(Optional.empty(), sut.select(sets, Collections.emptyList(), emptySet()));
}
Also used : BSyncStatement(il.ac.bgu.cs.bp.bpjs.model.BSyncStatement) ExplicitEventSet(il.ac.bgu.cs.bp.bpjs.model.eventsets.ExplicitEventSet) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

BSyncStatement (il.ac.bgu.cs.bp.bpjs.model.BSyncStatement)1 ExplicitEventSet (il.ac.bgu.cs.bp.bpjs.model.eventsets.ExplicitEventSet)1 HashSet (java.util.HashSet)1 Test (org.junit.Test)1