source: bidspace/src/test/java/geniusweb/bidspace/PartialSpaceFromUtilityTest.java@ 10

Last change on this file since 10 was 2, checked in by bart, 5 years ago

Added new parties : linear, hardliner, conceder, boulware

File size: 910 bytes
Line 
1package geniusweb.bidspace;
2
3import static org.junit.Assert.assertEquals;
4
5import java.io.IOException;
6import java.nio.file.Files;
7import java.nio.file.Paths;
8
9import org.junit.Test;
10
11import com.fasterxml.jackson.databind.ObjectMapper;
12
13import geniusweb.profile.Profile;
14import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
15
16public class PartialSpaceFromUtilityTest {
17 private final static ObjectMapper jackson = new ObjectMapper();
18
19 @Test
20 public void createPartialSpaceJobs() throws IOException {
21 String file1 = new String(Files.readAllBytes(Paths.get("src/test/resources/jobs/jobs1.json")));
22 LinearAdditiveUtilitySpace profile = (LinearAdditiveUtilitySpace) jackson.readValue(file1, Profile.class);
23 PartialSpaceFromUtility partial = new PartialSpaceFromUtility(profile, 20);
24 System.out.println(jackson.writeValueAsString(partial));
25 assertEquals(20, partial.getBetter().size());
26 }
27}
Note: See TracBrowser for help on using the repository browser.