1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.datadictionary.mojo;
17
18 import java.io.File;
19 import java.util.ArrayList;
20 import java.util.List;
21 import org.junit.After;
22 import org.junit.AfterClass;
23 import org.junit.Before;
24 import org.junit.BeforeClass;
25 import org.junit.Test;
26 import static org.junit.Assert.*;
27
28
29
30
31 public class KSDictionaryDocMojoTest {
32 private static final String DICTIONARY_DOC_DIRECTORY = "target/site/dictionary";
33 public KSDictionaryDocMojoTest() {
34 }
35
36 @BeforeClass
37 public static void setUpClass() throws Exception {
38 }
39
40 @AfterClass
41 public static void tearDownClass() throws Exception {
42 }
43
44 @Before
45 public void setUp() {
46 }
47
48 @After
49 public void tearDown() {
50 }
51
52
53
54
55 @Test
56 public void testExecute() throws Exception {
57 System.out.println("execute");
58 KSDictionaryDocMojo instance = new KSDictionaryDocMojo();
59 List<String> supportFiles = new ArrayList ();
60
61 supportFiles.add("ks-base-dictionary.xml");
62 supportFiles.add("ks-base-dictionary-validchars.xml");
63 supportFiles.add("org/kuali/rice/krad/bo/datadictionary/DataDictionaryBaseTypes.xml");
64 supportFiles.add("org/kuali/rice/krad/uif/UifControlDefinitions.xml");
65 supportFiles.add("org/kuali/rice/krad/uif/UifWidgetDefinitions.xml");
66 supportFiles.add("org/kuali/rice/krad/uif/UifFieldDefinitions.xml");
67 supportFiles.add("org/kuali/rice/krad/uif/UifGroupDefinitions.xml");
68 instance.setSupportFiles(supportFiles);
69 List<String> inputFiles = new ArrayList ();
70 inputFiles.add("ks-AtpInfo-dictionary.xml");
71
72 instance.setInputFiles(inputFiles);
73 instance.setHtmlDirectory(new File (DICTIONARY_DOC_DIRECTORY));
74 instance.execute();
75 assertTrue(new File(instance.getHtmlDirectory() + "/" + "index.html").exists());
76 assertTrue(new File(instance.getHtmlDirectory() + "/" + "AtpInfo.html").exists());
77 }
78 }