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 import org.kuali.student.validation.decorator.mojo.ValidationDecoratorWriterForOneService;
35 import org.slf4j.Logger;
36 import org.slf4j.LoggerFactory;
37
38
39
40
41 @Ignore
42 public class KSDictionaryDocMojoTest {
43 private static Logger log = LoggerFactory.getLogger(KSDictionaryDocMojoTest.class);
44
45 private static final String DICTIONARY_DOC_DIRECTORY = "target/site/dictionary";
46 public KSDictionaryDocMojoTest() {
47 }
48
49 @BeforeClass
50 public static void setUpClass() throws Exception {
51 }
52
53 @AfterClass
54 public static void tearDownClass() throws Exception {
55 }
56
57 @Before
58 public void setUp() {
59 }
60
61 @After
62 public void tearDown() {
63 }
64
65
66
67
68 @Test
69 public void testExecute() throws Exception {
70 log.info("execute");
71 KSDictionaryDocMojo instance = new KSDictionaryDocMojo();
72 List<String> supportFiles = new ArrayList<String> ();
73 supportFiles.add("ks-base-dictionary.xml");
74 supportFiles.add("ks-base-dictionary-validchars.xml");
75 supportFiles.add("org/kuali/rice/krad/bo/datadictionary/DataDictionaryBaseTypes.xml");
76 supportFiles.add("org/kuali/rice/krad/uif/UifControlDefinitions.xml");
77 supportFiles.add("org/kuali/rice/krad/uif/UifWidgetDefinitions.xml");
78 supportFiles.add("org/kuali/rice/krad/uif/UifFieldDefinitions.xml");
79 supportFiles.add("org/kuali/rice/krad/uif/UifGroupDefinitions.xml");
80 instance.setSupportFiles(supportFiles);
81 instance.setHtmlDirectory(new File (DICTIONARY_DOC_DIRECTORY));
82
83 instance.setTestDictionaryFile("ks-test-AtpInfo-dictionary.xml");
84
85 instance.execute();
86 assertTrue(new File(instance.getHtmlDirectory() + "/" + "index.html").exists());
87 assertTrue(new File(instance.getHtmlDirectory() + "/" + "AtpInfo.html").exists());
88 }
89 }