1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.impl.repository;
17
18 import org.junit.Before;
19 import org.junit.Test;
20 import org.kuali.rice.krms.api.repository.language.NaturalLanguageTemplate;
21 import org.kuali.rice.krms.test.AbstractBoTest;
22 import org.kuali.rice.test.BaselineTestCase;
23
24 import java.util.HashMap;
25 import java.util.Map;
26
27
28
29
30 @BaselineTestCase.BaselineMode(BaselineTestCase.Mode.CLEAR_DB)
31 public class RuleManagementIntegrationTest extends AbstractBoTest {
32
33 RuleManagementServiceImpl ruleManagementServiceImpl;
34
35 @Before
36 public void setup() {
37 ruleManagementServiceImpl = new RuleManagementServiceImpl();
38 NaturalLanguageTemplateBoServiceImpl naturalLanguageTemplateBoServiceImpl = new NaturalLanguageTemplateBoServiceImpl();
39 naturalLanguageTemplateBoServiceImpl.setNaturalLanguageTemplater(NaturalLanguageTemplateIntegrationGenTest.newStringReplaceTemplater());
40 ruleManagementServiceImpl.setNaturalLanguageTemplateBoService(naturalLanguageTemplateBoServiceImpl);
41 ruleManagementServiceImpl.setBusinessObjectService(getBoService());
42 }
43
44 @Test
45 public void naturalLanguage() {
46
47 NaturalLanguageTemplateIntegrationGenTest nltTest = new NaturalLanguageTemplateIntegrationGenTest();
48 nltTest.setup();
49 nltTest.test_createNaturalLanguageTemplate();
50 NaturalLanguageTemplate nlt = nltTest.getNaturalLanguageTemplate();
51
52
53 NaturalLanguageTemplateBo nltBo = NaturalLanguageTemplateBo.from(nlt);
54
55 Map<String, String> attributes = new HashMap<String, String>();
56 attributes.put("TEMPLATE", "template");
57 nltBo.setAttributes(attributes);
58
59 String krmsObjectId = "ID";
60
61
62
63
64 }
65 }
66