source: MotivateDuringTherapy/src/test/java/tudelft/mentalhealth/motivatepersisting/StatementsTest.java@ 7

Last change on this file since 7 was 5, checked in by Bart Vastenhouw, 5 years ago

Intermediate update

File size: 1.1 KB
Line 
1package tudelft.mentalhealth.motivatepersisting;
2
3import static org.junit.Assert.assertEquals;
4
5import java.io.IOException;
6import java.util.Locale;
7
8import org.junit.Test;
9
10import tudelft.utilities.statistic.WeightedSet;
11
12public class StatementsTest {
13
14 private static final Locale NL = new Locale("nl", "NL");
15
16 @Test
17 public void smokeTest() throws IOException {
18 new Statements(NL);
19 }
20
21 @Test(expected = IllegalStateException.class)
22 public void smokeTestFrench() throws IOException {
23 new Statements(Locale.FRENCH);
24 }
25
26 @Test
27 public void testTogether() throws IOException {
28 WeightedSet<String> texts = new Statements(NL)
29 .getStatements(Category.TOGETHER, Subcategory.ALL);
30 assertEquals((Double) 20d, texts.getSum());
31 assertEquals("Laten we kijken hoe we dit kunnen omkeren.",
32 texts.get(12d));
33 }
34
35 @Test
36 public void testNotepcl() throws IOException {
37 WeightedSet<String> texts = new Statements(NL)
38 .getStatements(Category.NOTEPCL, Subcategory.DROPPING);
39 assertEquals((Double) 68d, texts.getSum());
40 assertEquals("Je klachten verminderen, de behandeling slaat aan.",
41 texts.get(37d));
42 }
43}
Note: See TracBrowser for help on using the repository browser.