Changeset 22 for protocol/src/test


Ignore:
Timestamp:
09/22/20 16:26:36 (4 years ago)
Author:
bart
Message:

Minor fixes

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  
    9797        }
    9898
     99        @SuppressWarnings("unused")
    99100        @Test(expected = IllegalArgumentException.class)
    100101        public void constructorNoDeadlineTest() {
  • protocol/src/test/java/geniusweb/protocol/session/amop/AMOPStateTest.java

    r21 r22  
    172172        }
    173173
     174        @SuppressWarnings("unused")
    174175        @Test
    175176        public void constructWithNullConnection() {
     
    375376        @Test
    376377        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)));
    384386                // party 1,2,4 vote for A, party 1,2 vote for B, party 3,4 vote for C.
    385387                // the biggest vote is P,Q,S
     
    407409        public void testNextPhase() {
    408410                // 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)));
    416419                // party 1,2,4 vote for A, party 1,2 vote for B, party 3,4 vote for C.
    417420                // the biggest vote is P,Q,S
  • protocol/src/test/java/geniusweb/protocol/tournament/allpermutations/AllPermutationsSettingsTest.java

    r18 r22  
    6868                profile2 = new ProfileRef("profile2");
    6969                profile3 = new ProfileRef("profile3");
    70                 ProfileList profiles1 = new ProfileList(Arrays.asList(profile1));
    71                 ProfileList profiles2 = new ProfileList(Arrays.asList(profile2));
    72                 ProfileList profiles3 = 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));
    7373
    7474                List<ProfileList> profiles = Arrays.asList(profiles1, profiles2,
     
    137137        }
    138138
     139        @SuppressWarnings("unused")
    139140        @Test(expected = IllegalArgumentException.class)
    140141        public void testNullParties() {
     
    145146        }
    146147
     148        @SuppressWarnings("unused")
    147149        @Test(expected = IllegalArgumentException.class)
    148150        public void testNoParties() {
     
    153155        }
    154156
     157        @SuppressWarnings("unused")
    155158        @Test(expected = IllegalArgumentException.class)
    156159        public void testNullProfiles() {
     
    159162        }
    160163
     164        @SuppressWarnings("unused")
    161165        @Test(expected = IllegalArgumentException.class)
    162166        public void testInsufficientProfiles() {
     
    167171        }
    168172
     173        @SuppressWarnings("unused")
    169174        @Test(expected = IllegalArgumentException.class)
    170175        public void testNullSessionSettings() {
     
    175180        }
    176181
     182        @SuppressWarnings("unused")
    177183        @Test(expected = IllegalArgumentException.class)
    178184        public void testOnePartyPerSession() {
     
    189195        }
    190196
    191 //      @Test
    192 //      public void makeCobTest() throws URISyntaxException {
    193 //              // Check that the cob party gets profile without the query part
    194 //              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 
    206197}
Note: See TracChangeset for help on using the changeset viewer.