Clover Coverage Report - Maven Impex Plugin 1.0.26
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
18   41   3   6
0   35   0.17   3
3     1  
1    
 
  TransactionComparatorTest       Line # 11 18 0% 3 21 0% 0.0
 
No Tests
 
1    package org.apache.torque.mojo;
2   
3    import java.util.Collections;
4    import java.util.Comparator;
5    import java.util.Vector;
6   
7    import org.apache.torque.util.TransactionComparator;
8    import org.junit.Test;
9    import org.kuali.db.Transaction;
10   
 
11    public class TransactionComparatorTest {
12   
 
13  0 toggle @Test
14    public void testComparator() {
15  0 Comparator<Transaction> comparator = new TransactionComparator<Transaction>("ks-embedded-db");
16  0 Vector<Transaction> transactions = new Vector<Transaction>();
17  0 transactions.add(getTransaction("003.sql"));
18  0 transactions.add(getTransaction("004.sql"));
19  0 transactions.add(getTransaction("001.sql"));
20  0 transactions.add(getTransaction("sql/oracle/ks-embedded-db.sql"));
21  0 transactions.add(getTransaction("002.sql"));
22  0 transactions.add(getTransaction("sql/oracle/ks-embedded-db-constraints.sql"));
23  0 transactions.add(getTransaction("001.sql"));
24  0 transactions.add(getTransaction("000.sql"));
25  0 transactions.add(getTransaction("zzz000.sql"));
26  0 Collections.sort(transactions, comparator);
27  0 showTransactions(transactions);
28    }
29   
 
30  0 toggle protected void showTransactions(Vector<Transaction> transactions) {
31  0 for (Transaction t : transactions) {
32  0 System.out.println(t.getResourceLocation());
33    }
34    }
35   
 
36  0 toggle protected Transaction getTransaction(String location) {
37  0 Transaction t = new Transaction();
38  0 t.setResourceLocation(location);
39  0 return t;
40    }
41    }