1 | package genius.core.utility;
|
---|
2 |
|
---|
3 | import static org.junit.Assert.assertEquals;
|
---|
4 |
|
---|
5 | import java.io.IOException;
|
---|
6 |
|
---|
7 | import org.junit.Test;
|
---|
8 |
|
---|
9 | import genius.core.DomainImpl;
|
---|
10 |
|
---|
11 | public class UncertainAdditiveUtilSpaceTest {
|
---|
12 |
|
---|
13 | String PARTY = "src/test/resources/partydomain/";
|
---|
14 |
|
---|
15 | @Test
|
---|
16 | public void testAdditive1() throws IOException {
|
---|
17 | DomainImpl domain = new DomainImpl(PARTY + "party_domain.xml");
|
---|
18 | UncertainAdditiveUtilitySpace additive = new UncertainAdditiveUtilitySpace(
|
---|
19 | domain, PARTY + "party1_utility_uncertain.xml");
|
---|
20 |
|
---|
21 | assertEquals(UTILITYSPACETYPE.UNCERTAIN, UTILITYSPACETYPE
|
---|
22 | .getUtilitySpaceType(PARTY + "party1_utility_uncertain.xml"));
|
---|
23 | assertEquals(domain, additive.getDomain());
|
---|
24 | assertEquals(6, additive.getNrOfEvaluators());
|
---|
25 | assertEquals((Integer) 1, additive.getComparisons());
|
---|
26 | assertEquals((Integer) 2, additive.getErrors());
|
---|
27 | assertEquals(false, additive.isExperimental());
|
---|
28 | }
|
---|
29 |
|
---|
30 | @Test
|
---|
31 | public void testUncertain2() throws IOException {
|
---|
32 | DomainImpl domain = new DomainImpl(PARTY + "party_domain.xml");
|
---|
33 | UncertainAdditiveUtilitySpace additive = new UncertainAdditiveUtilitySpace(
|
---|
34 | domain, PARTY + "party2_utility_uncertain.xml");
|
---|
35 | assertEquals(UncertainAdditiveUtilitySpace.SEED, additive.getSeed());
|
---|
36 | }
|
---|
37 |
|
---|
38 | }
|
---|