001    package org.kuali.student.lum.statement.service.impl;
002    
003    import org.junit.Assert;
004    import org.junit.Test;
005    import org.junit.runner.RunWith;
006    import org.kuali.student.core.statement.service.StatementService;
007    import org.springframework.beans.factory.annotation.Autowired;
008    import org.springframework.test.context.ContextConfiguration;
009    import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
010    
011    @RunWith(SpringJUnit4ClassRunner.class)
012    @ContextConfiguration(locations={"classpath:statement-test-context.xml"})
013    public class SampleStatementServiceTests {
014    
015            @Autowired
016        public StatementService statementService;
017    
018            @Test
019        public void testGetNaturalLanguageForReqComponent1() throws Exception {
020            //req. type: 'kuali.reqComponent.type.test'
021            String nl = statementService.getNaturalLanguageForReqComponent("TEST-REQCOMP-1", "KUALI.RULE", null);
022            Assert.assertEquals("Must completed all courses from English Dept", nl);
023        }   
024    
025            @Test
026        public void testGetNaturalLanguageForReqComponent2() throws Exception {
027            //req. type: 'kuali.reqComponent.type.test'
028            String nl = statementService.getNaturalLanguageForReqComponent("TEST-REQCOMP-2", "KUALI.RULE", null);
029            Assert.assertEquals("Must completed all courses from French Dept", nl);
030        }   
031    
032            @Test
033        public void testGetNaturalLanguageForStatement1() throws Exception {
034            //req. type: 'kuali.reqComponent.type.test'
035            String nl = statementService.getNaturalLanguageForStatement("TEST-STMT-1", "KUALI.RULE", "en");
036            Assert.assertEquals("Must completed all courses from English Dept", nl);
037        }   
038    
039            @Test
040        public void testGetNaturalLanguageForStatement2() throws Exception {
041            //req. type: 'kuali.reqComponent.type.test'
042            String nl = statementService.getNaturalLanguageForStatement("TEST-STMT-2", "KUALI.RULE", "en");
043            Assert.assertEquals("Must completed all courses from English Dept and Must completed all courses from French Dept", nl);
044        }   
045    }