Changeset 18 for protocol/src/test/java/geniusweb
- Timestamp:
- 06/11/20 16:34:40 (4 years ago)
- Location:
- protocol/src/test/java/geniusweb/protocol
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocol/src/test/java/geniusweb/protocol/tournament/allpermutations/AllPermutationsSettingsTest.java
r14 r18 32 32 private final ObjectMapper jackson = new ObjectMapper(); 33 33 34 private final String serialized = "{\"AllPermutationsSettings\":{\"teams\":[{\"Team\":[{\"partyref\":\"party1\",\"parameters\":{}}]},{\"Team\":[{\"partyref\":\"party2\",\"parameters\":{}}]}],\"profileslists\":[{\"ProfileList\":[\"profile1\"]},{\"ProfileList\":[\"profile2\"]},{\"ProfileList\":[\"profile3\"]}],\"reuseTeams\":false,\"teamsPerSession\":2,\"sessionsettings\":{\"SAOPSettings\":{\"participants\":[],\"deadline\":{\"deadlinetime\":{\"durationms\":10000}}}} }}";34 private final String serialized = "{\"AllPermutationsSettings\":{\"teams\":[{\"Team\":[{\"partyref\":\"party1\",\"parameters\":{}}]},{\"Team\":[{\"partyref\":\"party2\",\"parameters\":{}}]}],\"profileslists\":[{\"ProfileList\":[\"profile1\"]},{\"ProfileList\":[\"profile2\"]},{\"ProfileList\":[\"profile3\"]}],\"reuseTeams\":false,\"teamsPerSession\":2,\"sessionsettings\":{\"SAOPSettings\":{\"participants\":[],\"deadline\":{\"deadlinetime\":{\"durationms\":10000}}}},\"numberTournaments\":1}}"; 35 35 private AllPermutationsSettings settings, settings1a, settings2, settings3, 36 settings4 ;36 settings4, settings5; 37 37 38 38 // use directly because there is some hard coding currently. … … 76 76 77 77 settings = new AllPermutationsSettings(parties, profiles, false, 2, 78 saopsettings );78 saopsettings, 1); 79 79 80 80 settings1a = new AllPermutationsSettings(parties, profiles, false, 2, 81 saopsettings );81 saopsettings, 1); 82 82 83 83 settings2 = new AllPermutationsSettings(Arrays.asList(partywithparams1, 84 84 partywithparams2, partywithparams3), profiles, false, 2, 85 saopsettings );85 saopsettings, 1); 86 86 87 87 settings3 = new AllPermutationsSettings(parties, profiles, true, 2, 88 saopsettings );88 saopsettings, 1); 89 89 90 90 settings4 = new AllPermutationsSettings(parties, 91 91 Arrays.asList(profiles1, profiles2, profiles3, profiles1), 92 false, 2, saopsettings); 92 false, 2, saopsettings, 1); 93 94 settings5 = new AllPermutationsSettings(parties, profiles, false, 2, 95 saopsettings, 2); 93 96 94 97 } … … 98 101 return Arrays.asList(Arrays.asList(settings, settings1a), 99 102 Arrays.asList(settings2), Arrays.asList(settings3), 100 Arrays.asList(settings4) );103 Arrays.asList(settings4), Arrays.asList(settings5)); 101 104 } 102 105 … … 104 107 public List<String> getGeneralTestStrings() { 105 108 return Arrays.asList( 106 "AllPermutationsSettings.*party1.*party2.*,false,.*profile1.*profile2.*profile3.*,2,SAOPSettings.*", 107 "AllPermutationsSettings.*party1.*party2.*party3.*,false,.*profile1.*profile2.*profile3.*,2,SAOPSettings.*", 108 "AllPermutationsSettings.*party1.*party2.*,true,.*profile1.*profile2.*profile3.*,2,SAOPSettings.*", 109 "AllPermutationsSettings.*party1.*party2.*,false,.*profile1.*profile2.*profile3.*profile1.*,2,SAOPSettings.*"); 109 "AllPermutationsSettings.*party1.*party2.*,false,.*profile1.*profile2.*profile3.*,2,SAOPSettings.*1.*", 110 "AllPermutationsSettings.*party1.*party2.*party3.*,false,.*profile1.*profile2.*profile3.*,2,SAOPSettings.*1.*", 111 "AllPermutationsSettings.*party1.*party2.*,true,.*profile1.*profile2.*profile3.*,2,SAOPSettings.*1.*", 112 "AllPermutationsSettings.*party1.*party2.*,false,.*profile1.*profile2.*profile3.*profile1.*,2,SAOPSettings.*1.*", 113 "AllPermutationsSettings.*party1.*party2.*,false,.*profile1.*profile2.*profile3.*,2,SAOPSettings.*2.*"); 110 114 } 111 115 … … 137 141 new AllPermutationsSettings(null, 138 142 Arrays.asList(profiles1, profiles2, profiles3, profiles1), true, 139 2, saopsettings );143 2, saopsettings, 1); 140 144 141 145 } … … 145 149 new AllPermutationsSettings(Collections.emptyList(), 146 150 Arrays.asList(profiles1, profiles2, profiles3, profiles1), true, 147 2, saopsettings );151 2, saopsettings, 1); 148 152 149 153 } … … 151 155 @Test(expected = IllegalArgumentException.class) 152 156 public void testNullProfiles() { 153 new AllPermutationsSettings(parties, null, true, 2, saopsettings );157 new AllPermutationsSettings(parties, null, true, 2, saopsettings, 1); 154 158 155 159 } … … 159 163 new AllPermutationsSettings(parties, 160 164 Arrays.asList(profiles1, profiles2, profiles3, profiles1), true, 161 4, saopsettings );165 4, saopsettings, 1); 162 166 163 167 } … … 167 171 new AllPermutationsSettings(parties, 168 172 Arrays.asList(profiles1, profiles2, profiles3, profiles1), true, 169 4, null );173 4, null, 1); 170 174 171 175 } … … 175 179 new AllPermutationsSettings(parties, 176 180 Arrays.asList(profiles1, profiles2, profiles3, profiles1), true, 177 1, saopsettings );181 1, saopsettings, 1); 178 182 179 183 }
Note:
See TracChangeset
for help on using the changeset viewer.