Changeset 22 for protocol/src/test/java
- Timestamp:
- 09/22/20 16:26:36 (4 years ago)
- Location:
- protocol/src/test/java/geniusweb/protocol
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocol/src/test/java/geniusweb/protocol/session/amop/AMOPSettingsTest.java
r21 r22 97 97 } 98 98 99 @SuppressWarnings("unused") 99 100 @Test(expected = IllegalArgumentException.class) 100 101 public void constructorNoDeadlineTest() { -
protocol/src/test/java/geniusweb/protocol/session/amop/AMOPStateTest.java
r21 r22 172 172 } 173 173 174 @SuppressWarnings("unused") 174 175 @Test 175 176 public void constructWithNullConnection() { … … 375 376 @Test 376 377 public void testCollectVotes() { 377 Votes vote1AB = new Votes(party1, 378 Arrays.asList(new Vote(party1, a, 2), new Vote(party1, b, 2))); 379 Votes vote2AB = new Votes(party2, 380 Arrays.asList(new Vote(party2, a, 2), new Vote(party2, b, 2))); 381 Votes vote3C = new Votes(party3, Arrays.asList(new Vote(party3, c, 2))); 382 Votes vote4AC = new Votes(party4, 383 Arrays.asList(new Vote(party4, a, 2), new Vote(party4, c, 2))); 378 Votes vote1AB = new Votes(party1, Arrays 379 .asList(new Vote(party1, a, 2, 9), new Vote(party1, b, 2, 9))); 380 Votes vote2AB = new Votes(party2, Arrays 381 .asList(new Vote(party2, a, 2, 9), new Vote(party2, b, 2, 9))); 382 Votes vote3C = new Votes(party3, 383 Arrays.asList(new Vote(party3, c, 2, 9))); 384 Votes vote4AC = new Votes(party4, Arrays 385 .asList(new Vote(party4, a, 2, 9), new Vote(party4, c, 2, 9))); 384 386 // party 1,2,4 vote for A, party 1,2 vote for B, party 3,4 vote for C. 385 387 // the biggest vote is P,Q,S … … 407 409 public void testNextPhase() { 408 410 // copy of above. todo cleanup 409 Votes vote1AB = new Votes(party1, 410 Arrays.asList(new Vote(party1, a, 2), new Vote(party1, b, 2))); 411 Votes vote2AB = new Votes(party2, 412 Arrays.asList(new Vote(party2, a, 2), new Vote(party2, b, 2))); 413 Votes vote3C = new Votes(party3, Arrays.asList(new Vote(party3, c, 2))); 414 Votes vote4AC = new Votes(party4, 415 Arrays.asList(new Vote(party4, a, 2), new Vote(party4, c, 2))); 411 Votes vote1AB = new Votes(party1, Arrays 412 .asList(new Vote(party1, a, 2, 9), new Vote(party1, b, 2, 9))); 413 Votes vote2AB = new Votes(party2, Arrays 414 .asList(new Vote(party2, a, 2, 9), new Vote(party2, b, 2, 9))); 415 Votes vote3C = new Votes(party3, 416 Arrays.asList(new Vote(party3, c, 2, 9))); 417 Votes vote4AC = new Votes(party4, Arrays 418 .asList(new Vote(party4, a, 2, 9), new Vote(party4, c, 2, 9))); 416 419 // party 1,2,4 vote for A, party 1,2 vote for B, party 3,4 vote for C. 417 420 // the biggest vote is P,Q,S -
protocol/src/test/java/geniusweb/protocol/tournament/allpermutations/AllPermutationsSettingsTest.java
r18 r22 68 68 profile2 = new ProfileRef("profile2"); 69 69 profile3 = new ProfileRef("profile3"); 70 ProfileListprofiles1 = new ProfileList(Arrays.asList(profile1));71 ProfileListprofiles2 = new ProfileList(Arrays.asList(profile2));72 ProfileListprofiles3 = new ProfileList(Arrays.asList(profile3));70 profiles1 = new ProfileList(Arrays.asList(profile1)); 71 profiles2 = new ProfileList(Arrays.asList(profile2)); 72 profiles3 = new ProfileList(Arrays.asList(profile3)); 73 73 74 74 List<ProfileList> profiles = Arrays.asList(profiles1, profiles2, … … 137 137 } 138 138 139 @SuppressWarnings("unused") 139 140 @Test(expected = IllegalArgumentException.class) 140 141 public void testNullParties() { … … 145 146 } 146 147 148 @SuppressWarnings("unused") 147 149 @Test(expected = IllegalArgumentException.class) 148 150 public void testNoParties() { … … 153 155 } 154 156 157 @SuppressWarnings("unused") 155 158 @Test(expected = IllegalArgumentException.class) 156 159 public void testNullProfiles() { … … 159 162 } 160 163 164 @SuppressWarnings("unused") 161 165 @Test(expected = IllegalArgumentException.class) 162 166 public void testInsufficientProfiles() { … … 167 171 } 168 172 173 @SuppressWarnings("unused") 169 174 @Test(expected = IllegalArgumentException.class) 170 175 public void testNullSessionSettings() { … … 175 180 } 176 181 182 @SuppressWarnings("unused") 177 183 @Test(expected = IllegalArgumentException.class) 178 184 public void testOnePartyPerSession() { … … 189 195 } 190 196 191 // @Test192 // public void makeCobTest() throws URISyntaxException {193 // // Check that the cob party gets profile without the query part194 // String profilebase = "ws://1.2.3.4:8080/profilesserver-a.b.c/websocket/get/someprofile";195 // String partybase = "http://131.180.202.213:8080/partiesserver/run/";196 // String query = "?a=2&partial=4";197 // PartyWithProfile partyprofile = AllPermutationsSettings.makeCob(198 // new PartyRef(partybase + AllPermutationsSettings.COB_PARTY),199 // new ProfileRef(profilebase + query));200 // assertEquals(profilebase,201 // partyprofile.getProfile().getURI().toString());202 // assertEquals(partybase + AllPermutationsSettings.COB_PARTY,203 // partyprofile.getParty().getPartyRef().getURI().toString());204 // }205 206 197 }
Note:
See TracChangeset
for help on using the changeset viewer.