Project

General

Profile

« Previous | Next » 

Revision 2255

Add additional comments to the test cases.

View differences:

HarvestDocumentTest.java
38 38
import junit.framework.TestSuite;
39 39

  
40 40
/**
41
 * Test HarvestDocument code using JUnit.
41
 * Tests HarvestDocument code using JUnit.
42 42
 *
43 43
 * @author  costa
44 44
 */
......
49 49
  private HarvestSiteSchedule harvestSiteSchedule;
50 50
  
51 51

  
52
  /**
53
   * Constructor for this test.
54
   * 
55
   * @param name     name of the test case
56
   */
52 57
  public HarvestDocumentTest(String name) {
53 58
    super(name);
54 59
  }
55 60
  
56
  
61

  
62
  /**
63
   * Sets up the test by instantiating HarvestSiteSchedule and HarvestDocument
64
   * objects.
65
   */
57 66
  protected void setUp() {
58 67
    String contactEmail = "jdoe@institution.edu";
59 68
    String dateLastHarvest = "2004-04-01 00:00:00.0";
......
107 116
                                        );
108 117
  }
109 118
  
110
  
119

  
120
  /**
121
   * Closes the database connection after the test completes.
122
   */
111 123
  protected void tearDown() {
112 124
    harvester.closeConnection();
113 125
  }
114 126
  
115
  
127

  
128
  /**
129
   * Tests the getSiteDocument() method. The test succeeds if a non-null
130
   * StringReader is returned.
131
   */
116 132
  public void testGetSiteDocument() {
117 133
    StringReader stringReader = null;
118 134
    stringReader = harvestDocument.getSiteDocument();
......
121 137
  
122 138
  
123 139
  /**
124
   * Test that the harvesterDocument object was created successfully.
140
   * Tests that the harvesterDocument object was created successfully.
125 141
   */
126 142
  public void testHarvestDocumentObject() {
127 143
    assertTrue(harvestDocument != null);
128 144
  }
129 145
  
130
  
146

  
147
  /**
148
   * Tests the metacatHighestRevision() method. This test ensures that -1
149
   * is returned for a non-existent document.
150
   */
131 151
  public void testMetacatHighestRevision() {
132 152
    int highestRevision;
133 153
    

Also available in: Unified diff