Ignore:
Timestamp:
10/06/20 13:12:20 (4 years ago)
Author:
bart
Message:

Fixes an issue with processing maxPower of a vote. Javadoc maven plugin now uses latest version.

Location:
exampleparties/simpleshaop/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/ShaopParty.java

    r21 r24  
    3838 * created.
    3939 * <p>
    40  * <b>Requirement<b> the initial {@link PartialOrdering} must contain at least
     40 * <b>Requirement</b> the initial {@link PartialOrdering} must contain at least
    4141 * the bids with lowest utility and highest utility, and the proper comparison
    4242 * info for these two bids.
  • exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/SimpleLinearOrdering.java

    r11 r24  
    2121
    2222        private final Domain domain;
    23         private final List<Bid> bids; // worst bid first, best bid last.
     23        /**
     24         * List of bids. worst bid first, best bid last.
     25         */
     26        private final List<Bid> bids;
    2427
    2528        SimpleLinearOrdering(Profile profile) {
     
    2932        /**
    3033         *
    31          * @param domain
     34         * @param domain The {@link Domain}
    3235         * @param bids   a list of bids, ordered from lowest to highest util. The
    3336         *               first bid will have utility 0, the last utility 1. If only
     
    6770        /**
    6871         *
    69          * @param bid
     72         * @param bid the {@link Bid}
    7073         * @return true iff bid is contained in this ordering
    7174         */
     
    8487        /**
    8588         *
    86          * @param profile
     89         * @param profile the {@link Profile}
    8790         * @return a list of bids in the profile sorted from low to high utility.
    8891         */
     
    108111
    109112        /**
    110          * @param bid       a new bid to be inserted
     113         * @param bid       a new {@link Bid} to be inserted
    111114         * @param worseBids all bids that are worse than this bid.
    112          * @return a SimpleLinearOrdering, updated with the given comparison. Thee
    113          *         bid will be inserted after the first bid that is not worse than
    114          *         bid.
     115         * @return a {@link SimpleLinearOrdering}, updated with the given
     116         *         comparison. Thee bid will be inserted after the first bid that is
     117         *         not worse than bid.
    115118         */
    116119        public SimpleLinearOrdering with(Bid bid, List<Bid> worseBids) {
  • exampleparties/simpleshaop/src/test/java/geniusweb/exampleparties/simpleshaop/ShaopPartyTest.java

    r21 r24  
    88import static org.mockito.Mockito.mock;
    99import static org.mockito.Mockito.verify;
     10import static org.mockito.Mockito.when;
    1011
    1112import java.io.IOException;
     
    3738import geniusweb.connection.ConnectionEnd;
    3839import geniusweb.inform.ActionDone;
     40import geniusweb.inform.Agreements;
    3941import geniusweb.inform.Finished;
    4042import geniusweb.inform.Inform;
     
    178180                party.connect(connection);
    179181                party.notifyChange(settings);
    180                 party.notifyChange(new Finished(null));
     182
     183                Agreements agreements = mock(Agreements.class);
     184                when(agreements.toString()).thenReturn("agree");
     185                party.notifyChange(new Finished(agreements));
    181186
    182187                verify(reporter).log(eq(Level.INFO),
    183                                 eq("Final ourcome:Finished[null]"));
     188                                eq("Final ourcome:Finished[agree]"));
    184189        }
    185190
Note: See TracChangeset for help on using the changeset viewer.