nesstar.api.common
Class StatementTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by nesstar.test.NesstarTestCase
              extended by nesstar.api.common.StatementTestBase
                  extended by nesstar.api.common.StatementTest
All Implemented Interfaces:
junit.framework.Test

public class StatementTest
extends StatementTestBase

A Test class for Statement.java Automatically generated from ARGO/UML

Created:
07 August 2002

Field Summary
 
Fields inherited from class nesstar.api.common.StatementTestBase
__home
 
Fields inherited from class nesstar.test.NesstarTestCase
ALL, CATALOG_HOME, CUBE_CUBE, DATAFILE_2568_F1, DATAFILE_4176_F1, DATAFILE_4213_F1, DATAFILE_44871_F1, DATAFILE_Cube_C1, DATAFILE_Mergetest_F2, DATAFILE_UnpopulatedElementsTest_F1, emWindow, HC_VAR_HOME, ID_2568, ID_2981, ID_3690, ID_4176, ID_4213, ID_4396, ID_44871, ID_4638, ID_CAMEROON, ID_CIRCULATORY, ID_CUBE, ID_HIERARCHY, ID_LANDET, ID_MERGE, ID_NOGROUPS, ID_NSD50, ID_PUBLISH, ID_UPElements, LICENSE, localIP, NESSTAR2_SERVER_URL, NESSTAR2_URL, NONE, ROOT_CATALOG, SECTION_MERGE_VG10, SECTION_MERGE_VG7, SECTION_MERGE_VG8, SERVER, SOME, SPSS_FORMAT, STAT_ENGINE, STATEMENT_HOME, STATEMENT1, STUDY_2568, STUDY_2981, STUDY_4176, STUDY_4213, STUDY_44871, STUDY_CAMEROON, STUDY_CIRCULATORY, STUDY_CUBE, STUDY_HIERARCHY, STUDY_HOME, STUDY_LANDET, STUDY_MERGE, STUDY_NOGROUPS, STUDY_NSD50, STUDY_UPElements, STUDY2_2568, STUDY2_4638, STUDY2_UPElements, TEST_PROTOCOL, VAR_HOME, VARIABLE_2568_V1, VARIABLE_2568_V13, VARIABLE_2568_V16, VARIABLE_2568_V17, VARIABLE_2568_V18, VARIABLE_2568_V3, VARIABLE_2568_V354, VARIABLE_2568_V77, VARIABLE_44871_V1, VARIABLE_CAMEROON_V238, VARIABLE_CAMEROON_V355, VARIABLE_LANDET_V1, VARIABLE_LANDET_V2, VARIABLE_MERGE_V22, VARIABLE_MERGE_V23, VARIABLE_MERGE_V26, VARIABLE_MERGE_V41, VID_2568_V1, VID_2568_V13, VID_2568_V16, VID_2568_V17, VID_2568_V18, VID_2568_V3, VID_2568_V354, VID_2568_V77, VID_44871_V1, VID_CAMEROON_V238, VID_CAMEROON_V355, VID_LANDET_V1, VID_LANDET_V2, VID_MERGE_V22, VID_MERGE_V23, VID_MERGE_V26, VID_MERGE_V41, WebDataURL
 
Constructor Summary
StatementTest(String testName)
          Constructor for the StatementTest object
 
Method Summary
static void main(String[] args)
          The main program for the StatementTest class
static String ObjURL_getID(String url)
           
static String ObjURL_getShortJNDI(String url)
          Extract the short JNDI type from an object URL.
static junit.framework.Test suite()
          Return the suite of all tests of this class
 void testAttributeComment()
          A test on Comment
 void testAttributeCreationDate()
          A test on CreationDate
 void testAttributeLabel()
          A test on Label
 void testAttributeObject()
          A Test of the attribute obj
 void testAttributeObjectAsString()
          A Test of the attribute objectAsString
 void testAttributePredicate()
          A Test of the attribute predicate
 void testAttributeSubject()
          A Test of the attribute subject
 void testGetSetMultiObjectProperty()
           
 void testGetSetPropertyOldServer1()
          The API should fail when trying to set/retrieve properties from old servers *
 void testGetSetPropertyOldServer2()
          The API should fail when trying to set/retrieve properties from old servers *
 void testHomeOperationAddProperty()
          A Test of the Home operation addProperty(RDFObject subject,URL property,RDFObject object,String label,String comment)
 void testHomeOperationAddStringProperty()
          A Test of the Home operation addStringProperty(RDFObject subject,URL property,String object)
 void testHomeOperationFind()
          A Test of the Home operation find(String subjectType,String subjectId,String objectType,String objectId,String predicateType,Integer predicateIndex)
 void testHomeOperationFindAll()
          A test on the home operation findAll(String id)
 void testHomeOperationFindByKey()
          A test on the home operation findByKey(String id)
 void testHomeOperationFindByObject()
          A Test of the Home operation findByObject(String objectType, String objectid)
 void testHomeOperationGetProperties()
          A Test of the Home operation getProperties(RDFObject subject,URL property)
 void testHomeOperationGetProperty()
          A Test of the Home operation getProperty(RDFObject subject,URL property)
 void testHomeOperationSetProperty()
          A Test of the Home operation setProperty(RDFObject subject,URL property,RDFObject object,String label,String comment)
 void testHomeOperationSetPropertyTwice()
           
 void testHomeOperationSetStringProperty()
          A Test of the Home operation setStringProperty(RDFObject subject,URL property,String value,String label,String comment)
 void testNumLinks()
           
 void testOperationRemove()
          A Test of the operation Delete()
 void testOperationRemoveByAll()
          Another Test of the operation Delete()
 void testOrphansObjects()
           
 
Methods inherited from class nesstar.api.common.StatementTestBase
getAssociationTest, getAttributesTest, getHome, getMethodsTest, getProperiesTest
 
Methods inherited from class nesstar.test.NesstarTestCase
addAllTests, addAllTests, addDatafile, addPath, adminLogin, assertBinary, assertContains, assertContains, assertDoesNotContain, assertDoesNotContain, assertDuration, assertEqualIgnoreOrder, assertEquals, assertMatches, assertMatches, assertNoAccess, assertNoAccess, assertNoAccess, assertNotEquals, assertNotEquals, assertObjDoesNotExists, assertObjDoesNotExists, assertObjExists, assertObjExists, assertWebAuthorisationRequired, assertWebAuthorisationRequired, basicSetup, cannotRun, catalogSetup, checkIllegalArgument, checkPaths, checkPathsTo, checkPathsTo, checkPerformance, compareWithFile, compareWithReferenceFile, compareWithTestFile, compareWithTestFile, createDerivedVariable, createDerivedVariable, createDerivedVariableUnprotected, cubeSetup, cvsAbstractName, cvsClientSetup, cvsCompare, cvsCompare, cvsFailIfDifferent, cvsFailIfDifferent, cvsFileRevision, cvsFileRevisions, cvsRootDir, dependsOn, dependsOn, equalToFile, equalToTestFile, equalToTestFile, executeRangeQuery, executeRangeQuery, executeRangeQuery, executeRangeQueryAdditivity, expectFalse, expectTrue, extractZipFile, factsheetSetup, findPosition, flirtWithTestFile, getBrowserPage, getBrowserPage, getCatalog, getCategoryStatistic, getCategoryStatisticFromVariable, getConcept, getCurrentBrowserPage, getCvsPropertiesFile, getDatafile, getDDITestFile, getDDITestFileContents, getDerivedVariableByName, getDimension, getDimensionFromCube, getEGMSResource, getEGMSResource2, getEvent, getExisting, getFailedDir, getFailedFile, getFilenames, getFilteredTestFile, getGeographicalUnit, getLocalFile, getMaxConcurrentOps, getMeasure, getNumberCompletedOps, getNumberHTTPConnections, getNumberStartedOps, getObj, getObjectsFrom, getObjURL, getOrganisation, getPage, getPage, getPartsOf, getPartsOf, getPartsOf, getPerson, getRawPage, getRDF, getReport, getResultDir, getResultFile, getSecureObjURL, getSecureServerURL, getServerDataDir, getServerDatafile, getServerIP, getServerLog, getServerName, getServerObjURL, getServerPage, getServerPageURL, getServerPassword, getServerPort, getServerSecurePort, getServerURL, getServerUsername, getStatementsOn, getStatementsOn, getTableFromStudy, getTerm, getTestDir, getTestFile, getTestFile, getVariable, getVariableFromStudy, getWebFile, getZipFile, hasWebData, HCSetup, isLocalServer, isNTService, isOnline, isQuickie, isReleaseTest, isWaitForSQLServerIndexer, loadCube, loadDDI, loadHashFromFile, loadStudy, loadStudy3, loadVariable, msg, msg, noDirectAccess, objExists, objsExists, openEMWindow, performRangeQuery, querySetup, read, rebootServer, rebootServer, reloadObj, removeAllVars, removeCreationDate, removeProperties, removeServerURL, repeatCheck, saveToTestFile, setNTService, setQuickie, setReleaseTest, setWaitForSQLServerIndexer, statementSetup, studyCleanup, studySetup, tableSetup, toMsg, toString, untested, updateChildren, variableSetup, waitForSQLServerIndexer, waitServer, warn, webclientSetup, write, xthesaurusSetup
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatementTest

public StatementTest(String testName)
Constructor for the StatementTest object

Parameters:
testName -
Method Detail

main

public static void main(String[] args)
The main program for the StatementTest class

Parameters:
args - The command line arguments

suite

public static junit.framework.Test suite()
Return the suite of all tests of this class

Returns:
The test suite

testAttributeSubject

public void testAttributeSubject()
                          throws Exception
A Test of the attribute subject

Overrides:
testAttributeSubject in class StatementTestBase
Throws:
Exception

testAttributeObject

public void testAttributeObject()
                         throws Exception
A Test of the attribute obj

Overrides:
testAttributeObject in class StatementTestBase
Throws:
Exception

testAttributePredicate

public void testAttributePredicate()
                            throws Exception
A Test of the attribute predicate

Overrides:
testAttributePredicate in class StatementTestBase
Throws:
Exception

testAttributeComment

public void testAttributeComment()
                          throws Exception
A test on Comment

Overrides:
testAttributeComment in class StatementTestBase
Throws:
Exception

testAttributeLabel

public void testAttributeLabel()
                        throws Exception
A test on Label

Overrides:
testAttributeLabel in class StatementTestBase
Throws:
Exception

testHomeOperationFindByKey

public void testHomeOperationFindByKey()
                                throws Exception
A test on the home operation findByKey(String id)

Overrides:
testHomeOperationFindByKey in class StatementTestBase
Throws:
Exception

testHomeOperationFindAll

public void testHomeOperationFindAll()
                              throws Exception
A test on the home operation findAll(String id)

Overrides:
testHomeOperationFindAll in class StatementTestBase
Throws:
Exception

testHomeOperationFind

public void testHomeOperationFind()
                           throws Exception
Description copied from class: StatementTestBase
A Test of the Home operation find(String subjectType,String subjectId,String objectType,String objectId,String predicateType,Integer predicateIndex)

Overrides:
testHomeOperationFind in class StatementTestBase
Throws:
Exception

testHomeOperationFindByObject

public void testHomeOperationFindByObject()
                                   throws Exception
A Test of the Home operation findByObject(String objectType, String objectid)

Overrides:
testHomeOperationFindByObject in class StatementTestBase
Throws:
Exception

ObjURL_getShortJNDI

public static String ObjURL_getShortJNDI(String url)
Extract the short JNDI type from an object URL.

Parameters:
url - The object URL, both the long (for example "http://www.myserver.org/obj/fStudy/2568") and the short form (for example "fStudy/2568") are supported.
Returns:
The short JNDI type extracted from the object URL, for example "fStudy".

ObjURL_getID

public static String ObjURL_getID(String url)
Parameters:
the - URL of an object or the ID of an object
Returns:
the ID part of the URL, example: 2568

testNumLinks

public void testNumLinks()
                  throws Exception
Throws:
Exception

testOrphansObjects

public void testOrphansObjects()
                        throws Exception
Throws:
Exception

testHomeOperationAddProperty

public void testHomeOperationAddProperty()
                                  throws Exception
Description copied from class: StatementTestBase
A Test of the Home operation addProperty(RDFObject subject,URL property,RDFObject object,String label,String comment)

Add an occurrance of the specified property on 'subject' with value equal to 'object'.

Overrides:
testHomeOperationAddProperty in class StatementTestBase
Throws:
Exception

testHomeOperationAddStringProperty

public void testHomeOperationAddStringProperty()
                                        throws Exception
A Test of the Home operation addStringProperty(RDFObject subject,URL property,String object)

Add an occurrance of the specified property on 'subject' with value equal to 'object'.

Overrides:
testHomeOperationAddStringProperty in class StatementTestBase
Throws:
Exception

testHomeOperationSetProperty

public void testHomeOperationSetProperty()
                                  throws Exception
Description copied from class: StatementTestBase
A Test of the Home operation setProperty(RDFObject subject,URL property,RDFObject object,String label,String comment)

Set the specified property on 'subject' with value equal to 'object'.

If the same user had previously set the same property to one or more values all previous values are removed before the new value is set.

Overrides:
testHomeOperationSetProperty in class StatementTestBase
Throws:
Exception

testHomeOperationSetPropertyTwice

public void testHomeOperationSetPropertyTwice()
                                       throws Exception
Throws:
Exception

testGetSetMultiObjectProperty

public void testGetSetMultiObjectProperty()
                                   throws Exception
Throws:
Exception

testHomeOperationGetProperty

public void testHomeOperationGetProperty()
                                  throws Exception
Description copied from class: StatementTestBase
A Test of the Home operation getProperty(RDFObject subject,URL property)

A convenience method that returns getProperties.get(0) if there are properties, null otherwise.

Overrides:
testHomeOperationGetProperty in class StatementTestBase
Throws:
Exception

testHomeOperationSetStringProperty

public void testHomeOperationSetStringProperty()
                                        throws Exception
Description copied from class: StatementTestBase
A Test of the Home operation setStringProperty(RDFObject subject,URL property,String value,String label,String comment)

Set the specified property on 'subject' with value equal to 'object'.

If the same user had previously set the same property to one or more values all previous values are removed before the new value is set.

Overrides:
testHomeOperationSetStringProperty in class StatementTestBase
Throws:
Exception

testGetSetPropertyOldServer1

public void testGetSetPropertyOldServer1()
                                  throws Exception
The API should fail when trying to set/retrieve properties from old servers *

Throws:
Exception

testGetSetPropertyOldServer2

public void testGetSetPropertyOldServer2()
                                  throws Exception
The API should fail when trying to set/retrieve properties from old servers *

Throws:
Exception

testOperationRemove

public void testOperationRemove()
                         throws Exception
A Test of the operation Delete()

Overrides:
testOperationRemove in class StatementTestBase
Throws:
Exception

testOperationRemoveByAll

public void testOperationRemoveByAll()
                              throws Exception
Another Test of the operation Delete()

Throws:
Exception

testAttributeCreationDate

public void testAttributeCreationDate()
                               throws Exception
A test on CreationDate

Overrides:
testAttributeCreationDate in class StatementTestBase
Throws:
Exception

testAttributeObjectAsString

public void testAttributeObjectAsString()
                                 throws Exception
A Test of the attribute objectAsString

Represents the object of the statement as a String

Overrides:
testAttributeObjectAsString in class StatementTestBase
Throws:
Exception

testHomeOperationGetProperties

public void testHomeOperationGetProperties()
                                    throws Exception
A Test of the Home operation getProperties(RDFObject subject,URL property)

Returns a, possibly empty, collection of statements that state the given property.

The server might return more or less of the values assigned to the property by the current user depending on the server setup.

In particular the server might send additional statements created by another user in the same user group or by the server administrator.

The server should return the statements in order with the more specific values of the property (normally the ones set bu the user himsefl) preceding the less specific ones (e.g. a server default).

Overrides:
testHomeOperationGetProperties in class StatementTestBase
Throws:
Exception

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved