Changeset 19 for src/test/java


Ignore:
Timestamp:
09/22/20 16:26:46 (4 years ago)
Author:
bart
Message:

Minor fixes

Location:
src/test/java/geniusweb/partiesserver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/test/java/geniusweb/partiesserver/AvailablePartiesUpdaterTest.java

    r18 r19  
    3131
    3232public class AvailablePartiesUpdaterTest {
    33         private static final String RANDOMPARTY = "target/jars/randomparty-1.5.0.jar";
     33        private static final String RANDOMPARTY = "target/jars/randomparty-1.5.1.jar";
    3434        private static final int TESTRATE = 200; // check file changes every 200ms
    3535        @SuppressWarnings("unchecked")
  • src/test/java/geniusweb/partiesserver/JavaClientTest.java

    r18 r19  
    3939 */
    4040public class JavaClientTest {
    41         private static final String RANDOMPARTY = "http://localhost:8080/partiesserver/run/randomparty-1.5.0";
    42         // private static final String JSON = "{\"jobs\":[\"jobs1\"]}";
    43 //      private static final String JOBS1PROFILE = "{\"LinearAdditiveUtilitySpace\":{\"issueUtilities\":{\"lease car\":{\"discreteutils\":{\"valueUtilities\":{\"no\":0,\"yes\":1}}},\"permanent contract\":{\"discreteutils\":{\"valueUtilities\":{\"no\":0,\"yes\":1}}},\"career development opportunities\":{\"discreteutils\":{\"valueUtilities\":{\"high\":1,\"low\":0,\"medium\":0.5}}},\"fte\":{\"discreteutils\":{\"valueUtilities\":{\"1.0\":0.75,\"0.6\":0.25,\"0.8\":0.5}}},\"salary\":{\"discreteutils\":{\"valueUtilities\":{\"4000\":1.0,\"2500\":0.25,\"3500\":0.75,\"2000\":0,\"3000\":0.3}}},\"work from home\":{\"discreteutils\":{\"valueUtilities\":{\"1\":0.5,\"2\":0.666666666666,\"0\":0.333333333}}}},\"issueWeights\":{\"lease car\":0.06,\"permanent contract\":0.16,\"career development opportunities\":0.04,\"fte\":0.32,\"salary\":0.24,\"work from home\":0.18},\"domain\":{\"name\":\"jobs\",\"issuesValues\":{\"lease car\":{\"values\":[\"yes\",\"no\"]},\"permanent contract\":{\"values\":[\"yes\",\"no\"]},\"career development opportunities\":{\"values\":[\"low\",\"medium\",\"high\"]},\"fte\":{\"values\":[\"0.6\",\"0.8\",\"1.0\"]},\"salary\":{\"values\":[\"2000\",\"2500\",\"3000\",\"3500\",\"4000\"]},\"work from home\":{\"values\":[\"0\",\"1\",\"2\"]}}},\"name\":\"jobs1\"}}";
     41        private static final String RANDOMPARTY = "http://localhost:8080/partiesserver/run/randomparty-1.5.1";
    4442        private EmbeddedTomcat tomcat = new EmbeddedTomcat();
    4543        private JavaClient client = new JavaClient();
     
    115113        }
    116114
    117 //      @Test
    118 //      public void testGetList() throws IOException, InterruptedException, WebSocketException {
    119 //              final List<String> received = new LinkedList<>();
    120 //              Thread.sleep(5000);
    121 //              WebSocketFactory factory = new WebSocketFactory().setConnectionTimeout(20000);
    122 //              WebSocket ws = factory.createSocket("ws://localhost:8080/profilesserver/websocket/liststream");
    123 //
    124 //              ws.addListener(new WebSocketAdapter() {
    125 //                      @Override
    126 //                      public void onTextMessage(WebSocket websocket, String message) throws Exception {
    127 //                              System.out.println("received message: " + message);
    128 //                              received.add(message);
    129 //                      }
    130 //              });
    131 //              ws.connect();
    132 //              assertTrue(ws.isOpen());
    133 //
    134 //              Thread.sleep(2000);
    135 //              assertEquals(1, received.size());
    136 //              assertEquals(JSON, received.get(0));
    137 //      }
    138 //
    139 //      @Test
    140 //      public void testExample() throws WebSocketException, InterruptedException, IOException {
    141 //              DownloadProfileExample test = new DownloadProfileExample();
    142 //              test.run();
    143 //              assertEquals(JOBS1PROFILE, test.getReceived());
    144 //      }
    145 //
    146 //      @Test
    147 //      public void testExample2() throws WebSocketException, InterruptedException, IOException {
    148 //              DownloadProfileExample2 test = new DownloadProfileExample2();
    149 //              assertEquals(JOBS1PROFILE, test.getReceived());
    150 //      }
    151115
    152116        /**
Note: See TracChangeset for help on using the changeset viewer.