source: src/test/java/genius/core/utility/UncertainAdditiveUtilSpaceTest.java

Last change on this file was 159, checked in by Tim Baarslag, 6 years ago

Quick fix for junit tests, important domains on top of repo

File size: 1.2 KB
Line 
1package genius.core.utility;
2
3import static org.junit.Assert.assertEquals;
4
5import java.io.IOException;
6
7import org.junit.Test;
8
9import genius.core.DomainImpl;
10
11public 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}
Note: See TracBrowser for help on using the repository browser.