- Timestamp:
- 09/22/20 08:52:04 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocol/src/test/java/geniusweb/protocol/session/shaop/SHAOPStateTest.java
r20 r21 4 4 import static org.junit.Assert.assertFalse; 5 5 import static org.junit.Assert.assertNotNull; 6 import static org.junit.Assert.assertNull;7 6 import static org.junit.Assert.assertTrue; 8 7 import static org.mockito.Mockito.mock; … … 194 193 SHAOPState state = new SHAOPState(actions, connections3, progressrounds, 195 194 settings, null, 0, null, null); 196 assert Null(state.getAgreement());195 assertTrue(state.getAgreements().getMap().isEmpty()); 197 196 } 198 197 … … 201 200 List<Action> actions = Arrays.asList(offer1, accept2); 202 201 SHAOPState state = new SHAOPState(actions, connections4, progressrounds, 203 settings, null, 0, null, null);204 assert NotNull(state.getAgreement());202 settings, null, 0, partynrs, null); 203 assertFalse(state.getAgreements().getMap().isEmpty()); 205 204 assertTrue(state.isFinal(NOW)); 206 205 } … … 211 210 SHAOPState state = new SHAOPState(actions, connections3, progressrounds, 212 211 settings, null, 0, null, null); 213 assert Null(state.getAgreement());212 assert (state.getAgreements().getMap().isEmpty()); 214 213 } 215 214 … … 219 218 SHAOPState state = new SHAOPState(actions, connections3, progressrounds, 220 219 settings, null, 0, null, null); 221 assert Equals(null, state.getAgreement());220 assertTrue(state.getAgreements().getMap().isEmpty()); 222 221 } 223 222 … … 245 244 SHAOPState state = new SHAOPState(actions, connections3, progressrounds, 246 245 settings, null, 0, null, null); 247 assert Equals(null, state.getAgreement());246 assertTrue(state.getAgreements().getMap().isEmpty()); 248 247 assertEquals(null, state.getError()); 249 248 assertTrue(state.isFinal(NOW)); … … 254 253 public void isProtocolErrorFinal() { 255 254 SHAOPState state = new SHAOPState(actions, connections3, progressrounds, 256 settings, new ProtocolException("test error", "test"), 0, null, 257 null); 255 settings, 256 new ProtocolException("test error", new PartyId("test")), 0, 257 null, null); 258 258 assertTrue(state.isFinal(NOW)); 259 259 assertNotNull(state.getError());
Note:
See TracChangeset
for help on using the changeset viewer.