Changeset 8 for src/test/java/geniusweb/partiesserver/JavaClientTest.java
- Timestamp:
- 11/28/19 14:41:10 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/test/java/geniusweb/partiesserver/JavaClientTest.java
r7 r8 39 39 */ 40 40 public class JavaClientTest { 41 // private static final String JSON = "{\"jobs\":[\"jobs1\"]}"; 41 private static final String RANDOMPARTY = "http://localhost:8080/partiesserver/run/randomparty-1.1.0"; 42 // private static final String JSON = "{\"jobs\":[\"jobs1\"]}"; 42 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\"}}"; 43 44 private EmbeddedTomcat tomcat = new EmbeddedTomcat(); … … 60 61 public void after() throws Throwable { 61 62 Thread.sleep(2000); 63 System.setSecurityManager(null); 62 64 tomcat.stop(); 63 65 } … … 157 159 */ 158 160 private String startParty() throws IOException, InterruptedException { 159 URL url = new URL( 160 "http://localhost:8080/partiesserver/run/randomparty-1.0.0"); 161 URL url = new URL(RANDOMPARTY); 161 162 HttpURLConnection conn = (HttpURLConnection) url.openConnection(); 162 163 conn.setRequestMethod("GET");
Note:
See TracChangeset
for help on using the changeset viewer.