maito.datacollecting.oaipmh
Class OAIPMHDataSourceTest

java.lang.Object
  extended by TestCase
      extended by maito.datacollecting.oaipmh.OAIPMHDataSourceTest

public class OAIPMHDataSourceTest
extends TestCase

This class implements the RecordParser interface so that OAIPMHDataSource can pass it's data here. 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/.

Author:
Antti Laitinen

Constructor Summary
OAIPMHDataSourceTest(java.lang.String name)
           
 
Method Summary
 void putData(java.lang.String data)
           
 void testDataFlow()
          Tests that the data is passed to the RecordParser (this object).
 void testErrorMidStream()
          Tests that OAIPMHDataSource behaves correctly when an error occurs somewhere in the middle of the data stream.
 void testInvalidParameters()
          Tests that OAIPMHDataSource behaves correctly when the parameters are invalid.
 void testInvalidRepository()
          Tests that OAIPMHDataSource behaves correctly when the repository sends invalid data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAIPMHDataSourceTest

public OAIPMHDataSourceTest(java.lang.String name)
Method Detail

testDataFlow

public void testDataFlow()
Tests that the data is passed to the RecordParser (this object). The RecordParser should receive a number of record sections defined by REQUIRED_RECORD_AMOUNT.


testInvalidParameters

public void testInvalidParameters()
Tests that OAIPMHDataSource behaves correctly when the parameters are invalid. It should only throw DataSourceException.


testInvalidRepository

public void testInvalidRepository()
Tests that OAIPMHDataSource behaves correctly when the repository sends invalid data.


testErrorMidStream

public void testErrorMidStream()
Tests that OAIPMHDataSource behaves correctly when an error occurs somewhere in the middle of the data stream.


putData

public void putData(java.lang.String data)