maito.datacollecting
Class DataCollectorImplTest

java.lang.Object
  extended by TestCase
      extended by maito.datacollecting.DataCollectorImplTest

public class DataCollectorImplTest
extends TestCase

This is a test driver for the class DataCollectorImpl. NOTE: This test driver uses some test stubs that act as the OAI-PMH repository. The stubs are found at http://db.cs.helsinki.fi/~saarekas/stub/. NOTE: There should be no existing data sources in the system.

Author:
Antti Laitinen

Constructor Summary
DataCollectorImplTest()
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testAddSource()
          Tests that when a source is added it can afterwards be seen using the method getSources() and it is written correctly in the database.
 void testRemoveSources()
          Tests that all data sources are removed when using the removeSources() -method.
 void testUpdate()
          Tests that when a source is updated the data ends up in the database and the data source's field "updated" gets set in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataCollectorImplTest

public DataCollectorImplTest()
Method Detail

setUp

public void setUp()

tearDown

public void tearDown()

testAddSource

public void testAddSource()
Tests that when a source is added it can afterwards be seen using the method getSources() and it is written correctly in the database.


testRemoveSources

public void testRemoveSources()
Tests that all data sources are removed when using the removeSources() -method.


testUpdate

public void testUpdate()
Tests that when a source is updated the data ends up in the database and the data source's field "updated" gets set in the database. This also tests at least someway that the workInProgress() method works because this method waits for the update to finish using that method.