View Javadoc

1   package org.kuali.student.lum.statement.service.impl;
2   
3   import org.junit.Assert;
4   import org.junit.Test;
5   import org.junit.runner.RunWith;
6   import org.kuali.student.core.statement.service.StatementService;
7   import org.springframework.beans.factory.annotation.Autowired;
8   import org.springframework.test.context.ContextConfiguration;
9   import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
10  
11  @RunWith(SpringJUnit4ClassRunner.class)
12  @ContextConfiguration(locations={"classpath:statement-test-context.xml"})
13  public class SampleStatementServiceTests {
14  
15  	@Autowired
16      public StatementService statementService;
17  
18  	@Test
19      public void testGetNaturalLanguageForReqComponent1() throws Exception {
20          //req. type: 'kuali.reqComponent.type.test'
21          String nl = statementService.getNaturalLanguageForReqComponent("TEST-REQCOMP-1", "KUALI.RULE", null);
22          Assert.assertEquals("Must completed all courses from English Dept", nl);
23      }	
24  
25  	@Test
26      public void testGetNaturalLanguageForReqComponent2() throws Exception {
27          //req. type: 'kuali.reqComponent.type.test'
28          String nl = statementService.getNaturalLanguageForReqComponent("TEST-REQCOMP-2", "KUALI.RULE", null);
29          Assert.assertEquals("Must completed all courses from French Dept", nl);
30      }	
31  
32  	@Test
33      public void testGetNaturalLanguageForStatement1() throws Exception {
34          //req. type: 'kuali.reqComponent.type.test'
35          String nl = statementService.getNaturalLanguageForStatement("TEST-STMT-1", "KUALI.RULE", "en");
36          Assert.assertEquals("Must completed all courses from English Dept", nl);
37      }	
38  
39  	@Test
40      public void testGetNaturalLanguageForStatement2() throws Exception {
41          //req. type: 'kuali.reqComponent.type.test'
42          String nl = statementService.getNaturalLanguageForStatement("TEST-STMT-2", "KUALI.RULE", "en");
43          Assert.assertEquals("Must completed all courses from English Dept and Must completed all courses from French Dept", nl);
44      }	
45  }