The Meta-Environment API

nl.cwi.sen1.visplugin.graphplugin
Class GraphVisualizationTest

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

public class GraphVisualizationTest
extends junit.framework.TestCase

Test class for the GraphChartVisualization Plugin. Parts of the code copied and adapted from the PieCharVisualizationTest.

Author:
Anton Gerdessen

Field Summary
private  GraphVisualizationController m_controller
           
private  nl.cwi.sen1.relationstores.Factory m_factory
           
private  nl.cwi.sen1.relationstores.types.RTuple m_relIntInt
           
private  nl.cwi.sen1.relationstores.types.RTuple m_relStrStr
           
private  nl.cwi.sen1.relationstores.types.RType m_typeRelIntInt
           
private  nl.cwi.sen1.relationstores.types.RType m_typeRelStrStr
           
private  GraphVisualizationWindow m_window
           
 
Constructor Summary
GraphVisualizationTest()
           
 
Method Summary
private  boolean isRTypeInATermArray(aterm.ATerm[] arr, nl.cwi.sen1.relationstores.types.RType type)
          Test if a specific RType is part of an ATerm array.
protected  void setUp()
          Test setup.
 void testControllerSupportedTypes()
          See if the controller correctly advertises a supported types.
 void testGetChartName()
          Test to see if the name for the chart is correctly found.
 void testPieChartVisualizationController()
          Test to see whether the control returns the correct type Window.
 void testTypeCheck()
          Test to see if the supported types system works.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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_controller

private GraphVisualizationController m_controller

m_window

private GraphVisualizationWindow m_window

m_factory

private nl.cwi.sen1.relationstores.Factory m_factory

m_relStrStr

private nl.cwi.sen1.relationstores.types.RTuple m_relStrStr

m_relIntInt

private nl.cwi.sen1.relationstores.types.RTuple m_relIntInt

m_typeRelStrStr

private nl.cwi.sen1.relationstores.types.RType m_typeRelStrStr

m_typeRelIntInt

private nl.cwi.sen1.relationstores.types.RType m_typeRelIntInt
Constructor Detail

GraphVisualizationTest

public GraphVisualizationTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Test setup.

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

testPieChartVisualizationController

public void testPieChartVisualizationController()
Test to see whether the control returns the correct type Window.


testTypeCheck

public void testTypeCheck()
Test to see if the supported types system works.


testGetChartName

public void testGetChartName()
Test to see if the name for the chart is correctly found.


testControllerSupportedTypes

public void testControllerSupportedTypes()
See if the controller correctly advertises a supported types.


isRTypeInATermArray

private boolean isRTypeInATermArray(aterm.ATerm[] arr,
                                    nl.cwi.sen1.relationstores.types.RType type)
Test if a specific RType is part of an ATerm array.

Parameters:
arr - Array of ATerms
type - RType to find in ATerm array
Returns:
true if it is in the array, false if it isn't

The Meta-Environment API