Line | |
---|
1 | package de.ugoe.cs.eventbench.models;
|
---|
2 |
|
---|
3 | import java.util.Random;
|
---|
4 | import org.junit.*;
|
---|
5 | import static org.junit.Assert.*;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * The class <code>FirstOrderMarkovModelTest</code> contains tests for the class
|
---|
9 | * <code>{@link FirstOrderMarkovModel}</code>.
|
---|
10 | *
|
---|
11 | * @author Steffen Herbold
|
---|
12 | * @version 1.0
|
---|
13 | */
|
---|
14 | public class FirstOrderMarkovModelTest {
|
---|
15 |
|
---|
16 | @Test
|
---|
17 | public void testFirstOrderMarkovModel_1() throws Exception {
|
---|
18 | Random r = new Random();
|
---|
19 |
|
---|
20 | FirstOrderMarkovModel result = new FirstOrderMarkovModel(r);
|
---|
21 |
|
---|
22 | assertNotNull(result);
|
---|
23 | assertEquals(r, result.r);
|
---|
24 | assertEquals(2, result.trieOrder);
|
---|
25 | }
|
---|
26 |
|
---|
27 | @Test(expected = java.security.InvalidParameterException.class)
|
---|
28 | public void testFirstOrderMarkovModel_2() throws Exception {
|
---|
29 | new FirstOrderMarkovModel(null);
|
---|
30 | }
|
---|
31 |
|
---|
32 | public static void main(String[] args) {
|
---|
33 | new org.junit.runner.JUnitCore().run(FirstOrderMarkovModelTest.class);
|
---|
34 | }
|
---|
35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.