package geniusweb.actions; import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.List; import org.junit.Test; import tudelft.utilities.junit.GeneralTests; public class PartyIdTest extends GeneralTests { private final PartyId id = new PartyId("party1"); private final PartyId id1 = new PartyId("party1"); private final PartyId idb = new PartyId("party2"); @Override public List> getGeneralTestData() { return Arrays.asList(Arrays.asList(id, id1), Arrays.asList(idb)); } @Override public List getGeneralTestStrings() { return Arrays.asList("party1", "party2"); } @SuppressWarnings("unused") @Test(expected = IllegalArgumentException.class) public void testRestrictions() { new PartyId(""); } @SuppressWarnings("unused") @Test(expected = IllegalArgumentException.class) public void testRestrictions2() { new PartyId("@2"); } @SuppressWarnings("unused") @Test(expected = IllegalArgumentException.class) public void testRestrictions3() { new PartyId("_12"); } @SuppressWarnings("unused") @Test(expected = IllegalArgumentException.class) public void testRestrictions4() { new PartyId("12A"); } @SuppressWarnings("unused") @Test(expected = IllegalArgumentException.class) public void testRestrictions5() { new PartyId(" fds "); } @Test public void testGetName() { assertEquals("party1", id.getName()); } @SuppressWarnings("unused") @Test public void testRestrictions6() { new PartyId("A_1_23_ok"); } @SuppressWarnings("unused") @Test public void testRestrictions7() { new PartyId("a_1_23_ok"); } }