| Line | Hits | Source |
|---|---|---|
| 1 | package umich.cac.pbs.test; | |
| 2 | ||
| 3 | import java.util.logging.Logger; | |
| 4 | ||
| 5 | import junit.framework.Test; | |
| 6 | import junit.framework.TestCase; | |
| 7 | import junit.framework.TestSuite; | |
| 8 | import umich.cac.pbs.RecordType; | |
| 9 | ||
| 10 | /** | |
| 11 | * Tests for RecordType class. | |
| 12 | * | |
| 13 | * @author rmach@umich.edu | |
| 14 | * @version $Header: /cvsroot/pbsaccounting/pbsaccounting/src/umich/cac/pbs/test/RecordTypeTest.java,v 1.3 2003/10/21 19:08:00 rodmach Exp $ | |
| 15 | */ | |
| 16 | public class RecordTypeTest extends TestCase { | |
| 17 | ||
| 18 | /** Logger */ | |
| 19 | 9 | private Logger logger = Logger.getLogger(RecordTypeTest.class.getName()); |
| 20 | ||
| 21 | /** | |
| 22 | * Constructor | |
| 23 | * | |
| 24 | * @param testName | |
| 25 | * name of test suite | |
| 26 | */ | |
| 27 | public RecordTypeTest(java.lang.String testName) { | |
| 28 | 6 | super(testName); |
| 29 | 6 | } |
| 30 | ||
| 31 | /** | |
| 32 | * Main - for running stand-alone test | |
| 33 | * | |
| 34 | * @param args | |
| 35 | * command line arguments | |
| 36 | */ | |
| 37 | public static void main(java.lang.String[] args) { | |
| 38 | 0 | junit.textui.TestRunner.run(suite()); |
| 39 | 0 | } |
| 40 | ||
| 41 | /** | |
| 42 | * Return a new test suite | |
| 43 | * | |
| 44 | * @return a new test suite | |
| 45 | */ | |
| 46 | public static Test suite() { | |
| 47 | 3 | TestSuite suite = new TestSuite(RecordTypeTest.class); |
| 48 | ||
| 49 | 3 | return suite; |
| 50 | } | |
| 51 | ||
| 52 | /** Test that different record types aren't equal */ | |
| 53 | public void testnotEquals() { | |
| 54 | 3 | RecordType bogusRecord = new RecordType("BOGUS"); |
| 55 | 3 | assertTrue(!bogusRecord.equals(RecordType.QUEUE_RECORD)); |
| 56 | 3 | } |
| 57 | ||
| 58 | /** Test that the same record types are equal */ | |
| 59 | public void testEquals() { | |
| 60 | 3 | RecordType pseudoExecRecord = new RecordType("E"); |
| 61 | 3 | assertTrue(pseudoExecRecord.equals(RecordType.EXECUTION_RECORD)); |
| 62 | ||
| 63 | 3 | } |
| 64 | ||
| 65 | } |
|
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |