| 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"}) |
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 4 |
Complexity Density: 0.5 |
|
| 13 |
|
public class SampleStatementServiceTests { |
| 14 |
|
|
| 15 |
|
@Autowired |
| 16 |
|
public StatementService statementService; |
| 17 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
4
-
|
|
| 18 |
0
|
@Test... |
| 19 |
|
public void testGetNaturalLanguageForReqComponent1() throws Exception { |
| 20 |
|
|
| 21 |
0
|
String nl = statementService.getNaturalLanguageForReqComponent("TEST-REQCOMP-1", "KUALI.RULE", null); |
| 22 |
0
|
Assert.assertEquals("Must completed all courses from English Dept", nl); |
| 23 |
|
} |
| 24 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
4
-
|
|
| 25 |
0
|
@Test... |
| 26 |
|
public void testGetNaturalLanguageForReqComponent2() throws Exception { |
| 27 |
|
|
| 28 |
0
|
String nl = statementService.getNaturalLanguageForReqComponent("TEST-REQCOMP-2", "KUALI.RULE", null); |
| 29 |
0
|
Assert.assertEquals("Must completed all courses from French Dept", nl); |
| 30 |
|
} |
| 31 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
4
-
|
|
| 32 |
0
|
@Test... |
| 33 |
|
public void testGetNaturalLanguageForStatement1() throws Exception { |
| 34 |
|
|
| 35 |
0
|
String nl = statementService.getNaturalLanguageForStatement("TEST-STMT-1", "KUALI.RULE", "en"); |
| 36 |
0
|
Assert.assertEquals("Must completed all courses from English Dept", nl); |
| 37 |
|
} |
| 38 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
4
-
|
|
| 39 |
0
|
@Test... |
| 40 |
|
public void testGetNaturalLanguageForStatement2() throws Exception { |
| 41 |
|
|
| 42 |
0
|
String nl = statementService.getNaturalLanguageForStatement("TEST-STMT-2", "KUALI.RULE", "en"); |
| 43 |
0
|
Assert.assertEquals("Must completed all courses from English Dept and Must completed all courses from French Dept", nl); |
| 44 |
|
} |
| 45 |
|
} |