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 static org.junit.Assert.assertTrue;
19
20 import java.io.File;
21 import java.util.ArrayList;
22 import java.util.LinkedHashMap;
23 import java.util.List;
24
25 import org.apache.maven.model.Build;
26 import org.apache.maven.model.Model;
27 import org.apache.maven.project.MavenProject;
28 import org.junit.After;
29 import org.junit.AfterClass;
30 import org.junit.Before;
31 import org.junit.BeforeClass;
32 import org.junit.Ignore;
33 import org.junit.Test;
34
35
36
37
38 @Ignore
39 public class KSDictionaryDocMojoTest {
40 private static final String DICTIONARY_DOC_DIRECTORY = "target/site/dictionary";
41 public KSDictionaryDocMojoTest() {
42 }
43
44 @BeforeClass
45 public static void setUpClass() throws Exception {
46 }
47
48 @AfterClass
49 public static void tearDownClass() throws Exception {
50 }
51
52 @Before
53 public void setUp() {
54 }
55
56 @After
57 public void tearDown() {
58 }
59
60
61
62
63 @Test
64 public void testExecute() throws Exception {
65 System.out.println("execute");
66 KSDictionaryDocMojo instance = new KSDictionaryDocMojo();
67 List<String> supportFiles = new ArrayList<String> ();
68 supportFiles.add("ks-base-dictionary.xml");
69 supportFiles.add("ks-base-dictionary-validchars.xml");
70 supportFiles.add("org/kuali/rice/krad/bo/datadictionary/DataDictionaryBaseTypes.xml");
71 supportFiles.add("org/kuali/rice/krad/uif/UifControlDefinitions.xml");
72 supportFiles.add("org/kuali/rice/krad/uif/UifWidgetDefinitions.xml");
73 supportFiles.add("org/kuali/rice/krad/uif/UifFieldDefinitions.xml");
74 supportFiles.add("org/kuali/rice/krad/uif/UifGroupDefinitions.xml");
75 instance.setSupportFiles(supportFiles);
76 instance.setHtmlDirectory(new File (DICTIONARY_DOC_DIRECTORY));
77
78 instance.setTestDictionaryFile("ks-test-AtpInfo-dictionary.xml");
79
80 instance.execute();
81 assertTrue(new File(instance.getHtmlDirectory() + "/" + "index.html").exists());
82 assertTrue(new File(instance.getHtmlDirectory() + "/" + "AtpInfo.html").exists());
83 }
84 }