package geniusweb.protocol; import static org.mockito.Mockito.mock; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import geniusweb.actions.Action; import geniusweb.actions.PartyId; import geniusweb.progress.Progress; import geniusweb.progress.ProgressTime; import geniusweb.protocol.session.saop.SAOPSettings; import geniusweb.protocol.session.saop.SAOPState; import tudelft.utilities.junit.GeneralTests; public class CurrentNegoStateTest extends GeneralTests { private PartyId party1 = new PartyId("party1"); private PartyId party2 = new PartyId("party2"); private List actions1 = new LinkedList<>(); private List connections = Arrays.asList(party1); private List connections2 = Arrays.asList(party1, party2); private Progress progresstime = mock(ProgressTime.class); private SAOPSettings settings = mock(SAOPSettings.class); SAOPState saop1 = new SAOPState(actions1, connections2, progresstime, settings, null, null); SAOPState saop2 = new SAOPState(actions1, connections, progresstime, settings, null, null); CurrentNegoState state1 = new CurrentNegoState(saop1); CurrentNegoState state1a = new CurrentNegoState(saop1); CurrentNegoState state2 = new CurrentNegoState(saop2); @Override public List> getGeneralTestData() { return Arrays.asList(Arrays.asList(state1, state1a), Arrays.asList(state2)); } @Override public List getGeneralTestStrings() { return Arrays.asList( "CurrentNegoState.*SAOPState.*party1.*party2.*ProgressTime.*SAOPSettings.*", "CurrentNegoState.*SAOPState.*party1.*ProgressTime.*SAOPSettings.*"); } }