Changeset 21 for party


Ignore:
Timestamp:
09/22/20 08:52:04 (4 years ago)
Author:
bart
Message:

Version 1.5.

Location:
party
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • party/pom.xml

    r20 r21  
    66        <groupId>geniusweb</groupId>
    77        <artifactId>party</artifactId>
    8         <version>1.4.4</version> <!-- must equal ${geniusweb.version} -->
     8        <version>1.5.0</version> <!-- must equal ${geniusweb.version} -->
    99        <packaging>jar</packaging>
    1010
     
    1717                <passwd>${env.ARTIFACTORY_PASS}</passwd>
    1818                <jackson-2-version>2.9.10</jackson-2-version>
    19                 <geniusweb.version>1.4.4</geniusweb.version>
     19                <geniusweb.version>1.5.0</geniusweb.version>
    2020        </properties>
    2121
  • party/src/main/java/geniusweb/party/DefaultParty.java

    r9 r21  
    33import geniusweb.actions.Action;
    44import geniusweb.connection.ConnectionEnd;
    5 import geniusweb.party.inform.Inform;
     5import geniusweb.inform.Inform;
    66import tudelft.utilities.listener.Listener;
    77import tudelft.utilities.logging.ReportToLogger;
  • party/src/main/java/geniusweb/party/Party.java

    r1 r21  
    33import geniusweb.actions.Action;
    44import geniusweb.connection.Connectable;
    5 import geniusweb.party.inform.Inform;
     5import geniusweb.inform.Inform;
    66
    77/**
  • party/src/test/java/geniusweb/party/inform/ActionDoneTest.java

    r1 r21  
    2121import geniusweb.actions.Accept;
    2222import geniusweb.actions.PartyId;
     23import geniusweb.inform.ActionDone;
     24import geniusweb.inform.Inform;
    2325import geniusweb.issuevalue.Bid;
    2426import geniusweb.issuevalue.DiscreteValue;
    2527import geniusweb.issuevalue.NumberValue;
    2628import geniusweb.issuevalue.Value;
    27 import geniusweb.party.inform.ActionDone;
    28 import geniusweb.party.inform.Inform;
    2929import tudelft.utilities.junit.GeneralTests;
    3030
  • party/src/test/java/geniusweb/party/inform/FinishedTest.java

    r1 r21  
    88import java.util.Arrays;
    99import java.util.HashMap;
     10import java.util.HashSet;
    1011import java.util.List;
    1112import java.util.Map;
     
    1920import com.fasterxml.jackson.databind.ObjectMapper;
    2021
     22import geniusweb.actions.PartyId;
     23import geniusweb.inform.Agreements;
     24import geniusweb.inform.Finished;
     25import geniusweb.inform.Inform;
    2126import geniusweb.issuevalue.Bid;
    2227import geniusweb.issuevalue.DiscreteValue;
    2328import geniusweb.issuevalue.NumberValue;
    2429import geniusweb.issuevalue.Value;
    25 import geniusweb.party.inform.Finished;
    26 import geniusweb.party.inform.Inform;
    2730import tudelft.utilities.junit.GeneralTests;
    2831
     
    3134        private Finished finished1, finished1a, finished2, finished3;
    3235
    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");
    3440
    3541        @Before
     
    5763                Bid bidc = new Bid(issuevaluesc);
    5864
    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);
    6376        }
    6477
     
    93106        public void testDeserialize()
    94107                        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.
    95111                ObjectMapper jackson = new ObjectMapper();
    96112                Finished p = (Finished) jackson.readValue(asJson, Inform.class);
  • party/src/test/java/geniusweb/party/inform/SettingsTest.java

    r8 r21  
    2121
    2222import geniusweb.actions.PartyId;
     23import geniusweb.inform.Inform;
     24import geniusweb.inform.Settings;
    2325import geniusweb.progress.ProgressRounds;
    2426import geniusweb.references.Parameters;
  • party/src/test/java/geniusweb/party/inform/YourTurnTest.java

    r1 r21  
    1616import com.fasterxml.jackson.databind.ObjectMapper;
    1717
    18 import geniusweb.party.inform.Inform;
    19 import geniusweb.party.inform.YourTurn;
     18import geniusweb.inform.Inform;
     19import geniusweb.inform.YourTurn;
    2020import tudelft.utilities.junit.GeneralTests;
    2121
Note: See TracChangeset for help on using the changeset viewer.