View Javadoc

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