The Meta-Environment API

nl.cwi.sen1.visbase.rstorecontainer.datatypes
Class FactInfoTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by nl.cwi.sen1.visbase.rstorecontainer.datatypes.FactInfoTest
All Implemented Interfaces:
junit.framework.Test

public class FactInfoTest
extends junit.framework.TestCase

Tests the FactInfo class.

Author:
Ricardo Lindooren, Arend van Beelen (reviewer)

Field Summary
private  FactInfo m_factInfo
           
private static org.apache.commons.logging.Log m_log
           
private static int RSTORE_ID
           
private static java.lang.String RSTORE_NAME
           
private static java.lang.String RSTORE_TYPE
           
 
Constructor Summary
FactInfoTest()
           
 
Method Summary
static nl.cwi.sen1.relationstores.types.RTuple getTestRTuple(java.lang.String name)
          Creates a dummy RTuple.
protected  void setUp()
           
protected  void tearDown()
           
 void testConstructFromAtermList()
          Tests the Constructor used to parse ATermList data.
 void testConstructFromRTuple()
          Tests the Constructor used to parse RTuple data (this code is actually also indirectly tested from the RStoreContainerTest).
 void testGetId()
          Simple getter test.
 void testGetName()
          Simple getter test.
 void testGetRType()
          Simple getter test.
 void testGetType()
          Simple getter test.
 void testToAtermList()
          Tests the code that creates an AtermList.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_factInfo

private FactInfo m_factInfo

m_log

private static final org.apache.commons.logging.Log m_log

RSTORE_ID

private static final int RSTORE_ID
See Also:
Constant Field Values

RSTORE_NAME

private static final java.lang.String RSTORE_NAME
See Also:
Constant Field Values

RSTORE_TYPE

private static final java.lang.String RSTORE_TYPE
See Also:
Constant Field Values
Constructor Detail

FactInfoTest

public FactInfoTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testGetId

public void testGetId()
Simple getter test.


testGetName

public void testGetName()
Simple getter test.


testGetType

public void testGetType()
Simple getter test.


testGetRType

public void testGetRType()
Simple getter test.


testToAtermList

public void testToAtermList()
Tests the code that creates an AtermList.


testConstructFromAtermList

public void testConstructFromAtermList()
                                throws java.lang.Exception
Tests the Constructor used to parse ATermList data.

Throws:
java.lang.Exception

testConstructFromRTuple

public void testConstructFromRTuple()
Tests the Constructor used to parse RTuple data (this code is actually also indirectly tested from the RStoreContainerTest).

See Also:
RStoreContainerTest

getTestRTuple

public static nl.cwi.sen1.relationstores.types.RTuple getTestRTuple(java.lang.String name)
Creates a dummy RTuple. Format is like: rtuple("##name##",relation([str,str]),set([tuple([str("a"),str("b")]),tuple([str("b"),str("c")]),tuple([str("c"),str("d")]),tuple([str("d"),str("a")])]))
This method is shared with the FactInfoListTest.

Returns:
The dummy RTuple

The Meta-Environment API