nesstar.api.faster
Class CatalogTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by nesstar.test.NesstarTestCase
              extended by nesstar.api.faster.CatalogTestBase
                  extended by nesstar.api.faster.CatalogTest
All Implemented Interfaces:
junit.framework.Test

public class CatalogTest
extends CatalogTestBase

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

Created:
30 July 2002

Field Summary
 
Fields inherited from class nesstar.api.faster.CatalogTestBase
__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
CatalogTest(String testName)
          Constructor for the CatalogTest object
 
Method Summary
 void allRangeQueries(int startFrom, boolean wantPaths)
          A basic test of the operation RangeQuery()
 void checkPathsTo(String path, Catalog from, RDFObject to)
           
 void doAddRemoveChild(boolean doRead)
           
 void doAddRemoveChildChecked()
          A Test of the operation AddChildAt()
 void doParallelAddRemoveChild(boolean doRead)
           
 List executeExQuery(Catalog catalog, String query, int size)
          Description of the Method
static void main(String[] args)
          The main program for the CatalogTest class
static junit.framework.Test suite()
          Return the suite of all tests of this class
 void testAttributeChildren()
          A Test of the attribute noted as:
 void testAttributeComment()
          A test on Comment
 void testAttributeCreationDate()
          A test on CreationDate
 void testAttributeLabel()
          A test on Label
 void testChildrenOfDifferentType()
          Test support for children of different types
 void testComplexRangeQuery()
           
 void testExQuerySyntaxError()
          A unit test for JUnit
 void testHomeOperationCreate()
          A Test of the Home operation create(String id)
 void testHomeOperationEJBQL()
           
 void testHomeOperationEJBQLINClause()
           
 void testImportUTF8()
           
 void testLightSimpleQuery()
          test query using a light simple search string
 void testLongRangeQuery()
          A unit test for JUnit
 void testNewProtocolQuery()
          test query using a light simple search string twice with a new protocol
 void testOperationAddChild()
          A test of the operation AddChild() The theory behind this test is this: Find out how many children the catalog has.
 void testOperationAddChildAt()
          A Test of the operation AddChildAt()
 void testOperationEditChildConcurrent()
          A Test of the operations AddChildAt() and RemoveChildAt() concurrently
 void testOperationExQuery()
          A Test of the operation ExQuery()
 void testOperationKeywordRangeQuery()
          Keyword search doesn't return hits (seems to fail if more than 2 fields of 'Organisation' are searched).
 void testOperationPathsTo()
          A Test of the operation PathsTo(RDFObject to)
 void testOperationRangeQuery()
          A basic test of the operation RangeQuery()
 void testOperationRangeQueryAND()
           
 void testOperationRangeQueryByPhrase()
           
 void testOperationRangeQueryFaultyResult()
           
 void testOperationRangeQueryFromMiddle()
          A Test of the operation RangeQuery() starting from an element in the middle
 void testOperationRangeQueryOnSections()
          A unit test for JUnit
 void testOperationRangeQueryOthers()
          Other tests on the operation RangeQuery()
 void testOperationRangeQueryOthers2()
          Other tests on the operation RangeQuery()
 void testOperationRangeQueryPaths()
          A Test of the operation RangeQuery() starting from an element in the middle
 void testOperationRangeQueryStopword()
           
 void testOperationRemove()
          A Test of the operation Remove()
 void testOperationRemoveChild()
          A Test of the operation RemoveChild()
 void testOperationRemoveChildAt()
          A unit test for JUnit
 void testOrderClause()
          A unit test for JUnit
 void testParallelAddEditRemoveChild()
          This occassionally fails, it seems the server cannot handle too many simultaneous changes in such rapid succession.
 void testParallelAddRemoveChild()
           
 void testPhraseSearch()
          A unit test for JUnit
 void testRangeQueryCubes()
          Test that RangeQuery gets Cubes even though only their study is explicitly entered as a child of the catalog
 void testRangeQueryNotStopword()
          Test that 'British' is not a stop word in a fulltext query
 void testRangeQueryOrderBy()
          A unit test for JUnit
 void testRangeQueryPartialDate()
          test queries using partial date formats
 void testRangeQuerySyntaxError()
          A unit test for JUnit
 void testRangeQueryUTF8()
          test query using a utf search string
 void testRangeQueryWithWildcard()
          test query using a wildcard phrase
 void testRangeQueryWithWildcard1()
          test query using a wildcard field list
 void testRangeQueryWithWildcard2()
          test query using a wildcard field list
 void testRangeQueryWithWildcard3()
          test query using a wildcard field list
 void testSequentialAddRemoveChild()
           
 void testSlowRangeQuery()
          WithPaths will be optimised using bag subsetting (@bag[from..to] ops) from=1 items =500 paths=false - all objects returned with the bag Returns Query Time With Paths (wrong times?) ServerTime Full Object 32-18 50-18 Without x-1 relationships 13-5 21-5 1.2 Only label+comment+path 2.2-1.6 5-1.7
 void testSlowRangeQuery1()
          A unit test for JUnit
 void testSQLCrash()
          test a special query which used to crash MySQL
 void testTimeout()
           
 
Methods inherited from class nesstar.api.faster.CatalogTestBase
getAssociationTest, getAttributesTest, getHome, getMethodsTest, getProperiesTest, testHomeOperationFindAll, testHomeOperationFindByKey
 
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

CatalogTest

public CatalogTest(String testName)
            throws Exception
Constructor for the CatalogTest object

Parameters:
testName -
Throws:
Exception
Method Detail

main

public static void main(String[] args)
The main program for the CatalogTest 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

testAttributeChildren

public void testAttributeChildren()
                           throws Exception
A Test of the attribute noted as:

Overrides:
testAttributeChildren in class CatalogTestBase
Throws:
Exception

testAttributeComment

public void testAttributeComment()
                          throws Exception
A test on Comment

Overrides:
testAttributeComment in class CatalogTestBase
Throws:
Exception

testAttributeLabel

public void testAttributeLabel()
                        throws Exception
A test on Label

Overrides:
testAttributeLabel in class CatalogTestBase
Throws:
Exception

testOperationExQuery

public void testOperationExQuery()
                          throws Exception
A Test of the operation ExQuery()

Throws:
Exception

executeExQuery

public List executeExQuery(Catalog catalog,
                           String query,
                           int size)
                    throws Exception
Description of the Method

Parameters:
catalog -
query -
size -
Returns:
Throws:
Exception

testOperationAddChild

public void testOperationAddChild()
                           throws Exception
A test of the operation AddChild() The theory behind this test is this: Find out how many children the catalog has. Add a child. If the number of children has increased by one pass; otherwise fail.

Overrides:
testOperationAddChild in class CatalogTestBase
Throws:
Exception

testOperationAddChildAt

public void testOperationAddChildAt()
                             throws Exception
A Test of the operation AddChildAt()

Overrides:
testOperationAddChildAt in class CatalogTestBase
Throws:
Exception

doAddRemoveChildChecked

public void doAddRemoveChildChecked()
                             throws Exception
A Test of the operation AddChildAt()

Throws:
Exception

doAddRemoveChild

public void doAddRemoveChild(boolean doRead)
                      throws Exception
Throws:
Exception

testSequentialAddRemoveChild

public void testSequentialAddRemoveChild()
                                  throws Exception
Throws:
Exception

doParallelAddRemoveChild

public void doParallelAddRemoveChild(boolean doRead)
                              throws Exception
Throws:
Exception

testParallelAddRemoveChild

public void testParallelAddRemoveChild()
                                throws Exception
Throws:
Exception

testParallelAddEditRemoveChild

public void testParallelAddEditRemoveChild()
                                    throws Exception
This occassionally fails, it seems the server cannot handle too many simultaneous changes in such rapid succession. However, adding the _OPERATION_PAUSE seems to improve the success rate.

Throws:
Exception

allRangeQueries

public void allRangeQueries(int startFrom,
                            boolean wantPaths)
                     throws Exception
A basic test of the operation RangeQuery()

Parameters:
startFrom -
wantPaths -
Throws:
Exception

testOperationKeywordRangeQuery

public void testOperationKeywordRangeQuery()
                                    throws Exception
Keyword search doesn't return hits (seems to fail if more than 2 fields of 'Organisation' are searched).

Throws:
Exception

testOperationRangeQuery

public void testOperationRangeQuery()
                             throws Exception
A basic test of the operation RangeQuery()

Overrides:
testOperationRangeQuery in class CatalogTestBase
Throws:
Exception

testOperationRangeQueryByPhrase

public void testOperationRangeQueryByPhrase()
                                     throws Exception
Throws:
Exception

testOperationRangeQueryFaultyResult

public void testOperationRangeQueryFaultyResult()
                                         throws Exception
Throws:
Exception

testOperationRangeQueryFromMiddle

public void testOperationRangeQueryFromMiddle()
                                       throws Exception
A Test of the operation RangeQuery() starting from an element in the middle

Throws:
Exception

testOperationRangeQueryPaths

public void testOperationRangeQueryPaths()
                                  throws Exception
A Test of the operation RangeQuery() starting from an element in the middle

Throws:
Exception

testOperationRangeQueryOthers

public void testOperationRangeQueryOthers()
                                   throws Exception
Other tests on the operation RangeQuery()

Throws:
Exception

testOperationRangeQueryOnSections

public void testOperationRangeQueryOnSections()
                                       throws Exception
A unit test for JUnit

Throws:
Exception

testOperationRangeQueryOthers2

public void testOperationRangeQueryOthers2()
                                    throws Exception
Other tests on the operation RangeQuery()

Throws:
Exception

testSlowRangeQuery

public void testSlowRangeQuery()
                        throws Exception
WithPaths will be optimised using bag subsetting (@bag[from..to] ops) from=1 items =500 paths=false - all objects returned with the bag
Returns Query Time With Paths (wrong times?) ServerTime
Full Object 32-18 50-18
Without x-1 relationships 13-5 21-5 1.2
Only label+comment+path 2.2-1.6 5-1.7

Throws:
Exception

testOperationRangeQueryStopword

public void testOperationRangeQueryStopword()
                                     throws Exception
Throws:
Exception

testOperationRangeQueryAND

public void testOperationRangeQueryAND()
                                throws Exception
Throws:
Exception

testSlowRangeQuery1

public void testSlowRangeQuery1()
                         throws Exception
A unit test for JUnit

Throws:
Exception

testRangeQueryOrderBy

public void testRangeQueryOrderBy()
                           throws Exception
A unit test for JUnit

Throws:
Exception

testRangeQuerySyntaxError

public void testRangeQuerySyntaxError()
                               throws Exception
A unit test for JUnit

Throws:
Exception

testExQuerySyntaxError

public void testExQuerySyntaxError()
                            throws Exception
A unit test for JUnit

Throws:
Exception

testLongRangeQuery

public void testLongRangeQuery()
                        throws Exception
A unit test for JUnit

Throws:
Exception

testLightSimpleQuery

public void testLightSimpleQuery()
                          throws Exception
test query using a light simple search string

Throws:
Exception

testNewProtocolQuery

public void testNewProtocolQuery()
                          throws Exception
test query using a light simple search string twice with a new protocol

Throws:
Exception

testOrderClause

public void testOrderClause()
                     throws Exception
A unit test for JUnit

Throws:
Exception

testPhraseSearch

public void testPhraseSearch()
                      throws Exception
A unit test for JUnit

Throws:
Exception

testOperationRemoveChild

public void testOperationRemoveChild()
                              throws Exception
A Test of the operation RemoveChild()

Overrides:
testOperationRemoveChild in class CatalogTestBase
Throws:
Exception

testOperationEditChildConcurrent

public void testOperationEditChildConcurrent()
                                      throws Exception
A Test of the operations AddChildAt() and RemoveChildAt() concurrently

Throws:
Exception

testTimeout

public void testTimeout()
                 throws Exception
Throws:
Exception

testOperationRemoveChildAt

public void testOperationRemoveChildAt()
                                throws Exception
A unit test for JUnit

Overrides:
testOperationRemoveChildAt in class CatalogTestBase
Throws:
Exception

testChildrenOfDifferentType

public void testChildrenOfDifferentType()
                                 throws Exception
Test support for children of different types

Throws:
Exception

testRangeQueryNotStopword

public void testRangeQueryNotStopword()
                               throws Exception
Test that 'British' is not a stop word in a fulltext query

Throws:
Exception

testRangeQueryCubes

public void testRangeQueryCubes()
                         throws Exception
Test that RangeQuery gets Cubes even though only their study is explicitly entered as a child of the catalog

Throws:
Exception

testSQLCrash

public void testSQLCrash()
                  throws Exception
test a special query which used to crash MySQL

Throws:
Exception

testRangeQueryPartialDate

public void testRangeQueryPartialDate()
                               throws Exception
test queries using partial date formats

Throws:
Exception

testRangeQueryWithWildcard1

public void testRangeQueryWithWildcard1()
                                 throws Exception
test query using a wildcard field list

Throws:
Exception

testRangeQueryWithWildcard2

public void testRangeQueryWithWildcard2()
                                 throws Exception
test query using a wildcard field list

Throws:
Exception

testRangeQueryWithWildcard3

public void testRangeQueryWithWildcard3()
                                 throws Exception
test query using a wildcard field list

Throws:
Exception

testRangeQueryWithWildcard

public void testRangeQueryWithWildcard()
                                throws Exception
test query using a wildcard phrase

Throws:
Exception

testRangeQueryUTF8

public void testRangeQueryUTF8()
                        throws Exception
test query using a utf search string

Throws:
Exception

testComplexRangeQuery

public void testComplexRangeQuery()
                           throws Exception
Throws:
Exception

testHomeOperationEJBQL

public void testHomeOperationEJBQL()
                            throws Exception
Throws:
Exception

testHomeOperationEJBQLINClause

public void testHomeOperationEJBQLINClause()
                                    throws Exception
Throws:
Exception

testHomeOperationCreate

public void testHomeOperationCreate()
                             throws Exception
Description copied from class: CatalogTestBase
A Test of the Home operation create(String id)

Home method

Create a catalog

Overrides:
testHomeOperationCreate in class CatalogTestBase
Throws:
Exception

testOperationRemove

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

Remove the catalog with all the links to it

Overrides:
testOperationRemove in class CatalogTestBase
Throws:
Exception

testImportUTF8

public void testImportUTF8()
                    throws Exception
Throws:
Exception

checkPathsTo

public void checkPathsTo(String path,
                         Catalog from,
                         RDFObject to)
                  throws Exception
Throws:
Exception

testOperationPathsTo

public void testOperationPathsTo()
                          throws Exception
Description copied from class: CatalogTestBase
A Test of the operation PathsTo(RDFObject to)

Return a list of paths that lead from the catalog to the 'to' object. A path is a sequence of property traversals. For example .children[2].children[3] is a path that leads from the catalog to the third child of the second catalog's subcatalog.

Overrides:
testOperationPathsTo in class CatalogTestBase
Throws:
Exception

testAttributeCreationDate

public void testAttributeCreationDate()
                               throws Exception
A test on CreationDate

Overrides:
testAttributeCreationDate in class CatalogTestBase
Throws:
Exception

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved