Changeset 10 for exampleparties/humangui


Ignore:
Timestamp:
01/28/20 10:19:54 (4 years ago)
Author:
bart
Message:

Update 28 jan 2020

Location:
exampleparties/humangui/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • exampleparties/humangui/src/main/java/geniusweb/exampleparties/humangui/HumanGui.java

    r9 r10  
    22
    33import java.awt.BorderLayout;
    4 import java.net.URI;
    5 import java.net.URISyntaxException;
    64import java.util.Arrays;
    75import java.util.HashSet;
     
    2321import geniusweb.profileconnection.ProfileConnectionFactory;
    2422import geniusweb.profileconnection.ProfileInterface;
    25 import geniusweb.references.ProtocolRef;
    2623import tudelft.utilities.logging.Reporter;
    2724
     
    8582        @Override
    8683        public Capabilities getCapabilities() {
    87                 try {
    88                         return new Capabilities(new HashSet<>(
    89                                         Arrays.asList(new ProtocolRef(new URI("SAOP")))));
    90                 } catch (URISyntaxException e) {
    91                         getReporter().log(Level.SEVERE, "Failed to create capabilities URI",
    92                                         e);
    93                         return null;
    94                 }
     84                return new Capabilities(new HashSet<>(Arrays.asList("SAOP")));
    9585        }
    9686
  • exampleparties/humangui/src/test/java/geniusweb/exampleparties/humangui/BiddingInfoTest.java

    r9 r10  
    3232import geniusweb.party.inform.Settings;
    3333import geniusweb.profile.Profile;
    34 import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
     34import geniusweb.profile.utilityspace.LinearAdditive;
    3535import geniusweb.profileconnection.ProfileConnectionFactory;
    3636import geniusweb.profileconnection.ProfileInterface;
     
    6161        private final ProgressRounds progress = mock(ProgressRounds.class);
    6262        private Settings settings;
    63         private LinearAdditiveUtilitySpace profile, profile2;
     63        private LinearAdditive profile, profile2;
    6464        private final Parameters parameters = new Parameters();
    6565        private Reporter reporter = mock(Reporter.class);
     
    7676                String serialized = new String(Files.readAllBytes(Paths.get(PROFILE)),
    7777                                StandardCharsets.UTF_8);
    78                 profile = (LinearAdditiveUtilitySpace) jackson.readValue(serialized,
    79                                 Profile.class);
     78                profile = (LinearAdditive) jackson.readValue(serialized, Profile.class);
    8079                String serialized2 = new String(Files.readAllBytes(Paths.get(PROFILE2)),
    8180                                StandardCharsets.UTF_8);
    82                 profile2 = (LinearAdditiveUtilitySpace) jackson.readValue(serialized2,
     81                profile2 = (LinearAdditive) jackson.readValue(serialized2,
    8382                                Profile.class);
    8483
  • exampleparties/humangui/src/test/java/geniusweb/exampleparties/humangui/HumanGuiTest.java

    r9 r10  
    3434import geniusweb.party.inform.YourTurn;
    3535import geniusweb.profile.Profile;
    36 import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
     36import geniusweb.profile.utilityspace.LinearAdditive;
    3737import geniusweb.progress.ProgressRounds;
    3838import geniusweb.references.Parameters;
     
    5757        private final ProgressRounds progress = mock(ProgressRounds.class);
    5858        private Settings settings;
    59         private LinearAdditiveUtilitySpace profile;
     59        private LinearAdditive profile;
    6060        private final Parameters parameters = new Parameters();
    6161
     
    7070                String serialized = new String(Files.readAllBytes(Paths.get(PROFILE)),
    7171                                StandardCharsets.UTF_8);
    72                 profile = (LinearAdditiveUtilitySpace) jackson.readValue(serialized,
    73                                 Profile.class);
     72                profile = (LinearAdditive) jackson.readValue(serialized, Profile.class);
    7473
    7574        }
     
    9392                Capabilities capabilities = party.getCapabilities();
    9493                assertFalse("party does not define protocols",
    95                                 capabilities.getProtocols().isEmpty());
     94                                capabilities.getBehaviours().isEmpty());
    9695        }
    9796
    9897        @Test
    9998        public void testGetCapabilities() {
    100                 assertTrue(party.getCapabilities().getProtocols().contains(SAOP));
     99                assertTrue(party.getCapabilities().getBehaviours().contains(SAOP));
    101100        }
    102101
Note: See TracChangeset for help on using the changeset viewer.