1 package org.drools.jsr94.rules.admin;
2
3 import org.drools.jsr94.rules.JSR94TestBase;
4
5 import javax.rules.admin.RuleAdministrator;
6 import javax.rules.admin.RuleExecutionSet;
7 import javax.rules.admin.RuleExecutionSetProvider;
8
9 /***
10 * Test the RuleRuntime implementation.
11 */
12 public class RuleExecutionSetProviderTestCase extends JSR94TestBase
13 {
14
15 private RuleAdministrator ruleAdministrator;
16 private RuleExecutionSetProvider ruleSetProvider;
17
18 /***
19 * Setup the test case.
20 */
21 protected void setUp() throws Exception
22 {
23 super.setUp();
24 ruleAdministrator = ruleServiceProvider.getRuleAdministrator();
25 ruleSetProvider = ruleAdministrator.getRuleExecutionSetProvider( null );
26 }
27
28 /***
29 * Test createRuleExecutionSet from DOM.
30 */
31 public void testCreateFromDOM() throws Exception
32 {
33 // not implemented
34 }
35
36
37 /***
38 * Test createRuleExecutionSet from Serializable.
39 */
40 public void testCreateFromSerializable() throws Exception
41 {
42 // not implemented
43 }
44
45 /***
46 * Test createRuleExecutionSet from URI.
47 */
48 public void testCreateFromURI() throws Exception
49 {
50 String rulesUri = getResource(RULES_RESOURCE).toExternalForm();
51 RuleExecutionSet ruleSet = ruleSetProvider.createRuleExecutionSet(rulesUri, null);
52 assertEquals("rule set name", "Sisters Rules", ruleSet.getName());
53 assertEquals("number of rules", 2, ruleSet.getRules().size());
54 }
55 }
This page was automatically generated by Maven