The Meta-Environment API

nl.cwi.sen1.visplugin.csvexport
Class ExporterTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by nl.cwi.sen1.visplugin.csvexport.ExporterTest
All Implemented Interfaces:
junit.framework.Test

public class ExporterTest
extends junit.framework.TestCase

JUnit Testcase used to test the Exporter class

Author:
Chris Woolderink, Antoine Savelkoul

Field Summary
private  nl.cwi.sen1.relationstores.Factory m_factory
           
 
Constructor Summary
ExporterTest()
           
 
Method Summary
private  java.lang.String rTupleToCsv(nl.cwi.sen1.relationstores.types.RTuple rTuple, Exporter.ExportSelection selection)
          Converts a RTuple to CSV formatted text by calling: Exporter.export(rTuple, csvWriter)
protected  void setUp()
          This method is executed before the start of a test
protected  void tearDown()
          This method is executed after the end of a test
 void testExportFromRTupleStrInt()
          Export from a RTuple with "String Integer"-relation
 void testExportFromRTupleStrStr()
          Export from a RTuple with "String String"-relation
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_factory

private nl.cwi.sen1.relationstores.Factory m_factory
Constructor Detail

ExporterTest

public ExporterTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
This method is executed before the start of a test

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
This method is executed after the end of a test

Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testExportFromRTupleStrStr

public void testExportFromRTupleStrStr()
Export from a RTuple with "String String"-relation


testExportFromRTupleStrInt

public void testExportFromRTupleStrInt()
Export from a RTuple with "String Integer"-relation


rTupleToCsv

private java.lang.String rTupleToCsv(nl.cwi.sen1.relationstores.types.RTuple rTuple,
                                     Exporter.ExportSelection selection)
Converts a RTuple to CSV formatted text by calling: Exporter.export(rTuple, csvWriter)

Parameters:
rTuple - The RTuple to export
Returns:
a String with the CSV formatted output

The Meta-Environment API