1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common_test_tester; |
17 |
|
|
18 |
|
import static org.junit.Assert.assertEquals; |
19 |
|
import static org.junit.Assert.assertNotNull; |
20 |
|
|
21 |
|
import org.junit.Test; |
22 |
|
import org.kuali.student.common.test.spring.AbstractTransactionalDaoTest; |
23 |
|
import org.kuali.student.common.test.spring.Dao; |
24 |
|
import org.kuali.student.common.test.spring.PersistenceFileLocation; |
25 |
|
import org.kuali.student.common_test_tester.support.MyDao; |
26 |
|
import org.kuali.student.common_test_tester.support.Value; |
27 |
|
|
28 |
|
@PersistenceFileLocation("classpath:META-INF/test-persistence.xml") |
|
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 2 |
Complexity Density: 0.17 |
|
29 |
|
public class DaoCommonTest extends AbstractTransactionalDaoTest { |
30 |
|
|
31 |
|
@Dao(value = "org.kuali.student.common_test_tester.support.MyDaoImpl", testDataFile = "classpath:META-INF/load-my-beans.xml", testSqlFile="classpath:test.sql") |
32 |
|
private MyDao myDao; |
33 |
|
|
34 |
|
public Value value1; |
35 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1
PASS
|
|
36 |
1
|
@Test... |
37 |
|
public void test1() { |
38 |
1
|
Value value = new Value("Cheerios"); |
39 |
|
|
40 |
1
|
String id = myDao.createValue(value); |
41 |
|
|
42 |
1
|
String result = myDao.findValue(id); |
43 |
1
|
assertEquals("Cheerios", result); |
44 |
|
|
45 |
1
|
assertNotNull(myDao.findValueFromValue("Value Number One")); |
46 |
1
|
assertNotNull(myDao.findValue("11223344-1122-1122-1111-000000000000")); |
47 |
|
} |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1
PASS
|
|
49 |
1
|
@Test... |
50 |
|
public void test2() { |
51 |
1
|
Value value = new Value("Cheerios"); |
52 |
|
|
53 |
1
|
String id = myDao.createValue(value); |
54 |
|
|
55 |
1
|
String result = myDao.findValue(id); |
56 |
1
|
assertEquals("Cheerios", result); |
57 |
|
|
58 |
1
|
assertNotNull(myDao.findValueFromValue("Value Number One")); |
59 |
1
|
assertNotNull(myDao.findValue("11223344-1122-1122-1111-000000000000")); |
60 |
|
} |
61 |
|
} |