Changeset 21 for party/src/test/java
- Timestamp:
- 09/22/20 08:52:04 (4 years ago)
- Location:
- party/src/test/java/geniusweb/party/inform
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
party/src/test/java/geniusweb/party/inform/ActionDoneTest.java
r1 r21 21 21 import geniusweb.actions.Accept; 22 22 import geniusweb.actions.PartyId; 23 import geniusweb.inform.ActionDone; 24 import geniusweb.inform.Inform; 23 25 import geniusweb.issuevalue.Bid; 24 26 import geniusweb.issuevalue.DiscreteValue; 25 27 import geniusweb.issuevalue.NumberValue; 26 28 import geniusweb.issuevalue.Value; 27 import geniusweb.party.inform.ActionDone;28 import geniusweb.party.inform.Inform;29 29 import tudelft.utilities.junit.GeneralTests; 30 30 -
party/src/test/java/geniusweb/party/inform/FinishedTest.java
r1 r21 8 8 import java.util.Arrays; 9 9 import java.util.HashMap; 10 import java.util.HashSet; 10 11 import java.util.List; 11 12 import java.util.Map; … … 19 20 import com.fasterxml.jackson.databind.ObjectMapper; 20 21 22 import geniusweb.actions.PartyId; 23 import geniusweb.inform.Agreements; 24 import geniusweb.inform.Finished; 25 import geniusweb.inform.Inform; 21 26 import geniusweb.issuevalue.Bid; 22 27 import geniusweb.issuevalue.DiscreteValue; 23 28 import geniusweb.issuevalue.NumberValue; 24 29 import geniusweb.issuevalue.Value; 25 import geniusweb.party.inform.Finished;26 import geniusweb.party.inform.Inform;27 30 import tudelft.utilities.junit.GeneralTests; 28 31 … … 31 34 private Finished finished1, finished1a, finished2, finished3; 32 35 33 private String asJson = "{\"Finished\":{\"agreedBid\":{\"issuevalues\":{\"issue3\":9012,\"issue2\":1,\"issue1\":\"b\"}}}}"; 36 private String asJson = "{\"Finished\":{\"agreements\":{\"party2\":{\"issuevalues\":{\"issue3\":9012,\"issue2\":1,\"issue1\":\"b\"}},\"party1\":{\"issuevalues\":{\"issue3\":9012,\"issue2\":1,\"issue1\":\"b\"}}}}}"; 37 38 private PartyId party1 = new PartyId("party1"); 39 private PartyId party2 = new PartyId("party2"); 34 40 35 41 @Before … … 57 63 Bid bidc = new Bid(issuevaluesc); 58 64 59 finished1 = new Finished(bid); 60 finished1a = new Finished(bid); 61 finished2 = new Finished(bidb); 62 finished3 = new Finished(bidc); 65 Agreements agree = new Agreements().with(bid, 66 new HashSet<>(Arrays.asList(party1, party2))); 67 Agreements agreeb = new Agreements().with(bidb, 68 new HashSet<>(Arrays.asList(party1, party2))); 69 Agreements agreec = new Agreements().with(bidc, 70 new HashSet<>(Arrays.asList(party1, party2))); 71 72 finished1 = new Finished(agree); 73 finished1a = new Finished(agree); 74 finished2 = new Finished(agreeb); 75 finished3 = new Finished(agreec); 63 76 } 64 77 … … 93 106 public void testDeserialize() 94 107 throws JsonParseException, JsonMappingException, IOException { 108 // FIXME there seems a disturbing bug in this test, 109 // jackson seems to ignore the @JsonProperty annotation and therefore 110 // this test does not work in some cases. 95 111 ObjectMapper jackson = new ObjectMapper(); 96 112 Finished p = (Finished) jackson.readValue(asJson, Inform.class); -
party/src/test/java/geniusweb/party/inform/SettingsTest.java
r8 r21 21 21 22 22 import geniusweb.actions.PartyId; 23 import geniusweb.inform.Inform; 24 import geniusweb.inform.Settings; 23 25 import geniusweb.progress.ProgressRounds; 24 26 import geniusweb.references.Parameters; -
party/src/test/java/geniusweb/party/inform/YourTurnTest.java
r1 r21 16 16 import com.fasterxml.jackson.databind.ObjectMapper; 17 17 18 import geniusweb. party.inform.Inform;19 import geniusweb. party.inform.YourTurn;18 import geniusweb.inform.Inform; 19 import geniusweb.inform.YourTurn; 20 20 import tudelft.utilities.junit.GeneralTests; 21 21
Note:
See TracChangeset
for help on using the changeset viewer.