nesstar.api
Class DatasetTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by nesstar.test.NesstarTestCase
              extended by nesstar.api.DatasetTestBase
                  extended by nesstar.api.DatasetTest
All Implemented Interfaces:
junit.framework.Test

public class DatasetTest
extends DatasetTestBase

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

Created:
06 August 2002

Field Summary
 
Fields inherited from class nesstar.api.DatasetTestBase
__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
DatasetTest(String testName)
          Constructor for the DatasetTest object
 
Method Summary
static void checkDownloadResult(String testfile, URL result)
          Check that the result of the subset is correct
 void checkRemoveDataset(Study study, String studyFile, int partsLevel)
          Check that a dataset/study is correctly removed
static void checkStatOpResult(String testfile, String result)
          Check that the result of the tabulation is correct
static void main(String[] args)
          The main program for the DatasetTest class
static junit.framework.Test suite()
          Return the suite of all tests of this class
 void testAttributeAbstractText()
          Attributes Tests *
 void testAttributeAccessConditions()
          A unit test for JUnit
 void testAttributeAccessStatus()
          A unit test for JUnit
 void testAttributeCollMode()
          A unit test for JUnit
 void testAttributeComment()
          A test on Comment
 void testAttributeCreationDate()
          A test on CreationDate
 void testAttributeCubeHasData()
          A unit test for hasData if cube
 void testAttributeDataKind()
          A unit test for JUnit
 void testAttributeDistributionDate()
          A unit test for JUnit
 void testAttributeDistributor()
          A unit test for JUnit
 void testAttributeGeographicalCover()
          A unit test for JUnit
 void testAttributeGeographicalUnit()
          A unit test for JUnit
 void testAttributeHasData()
          A unit test for JUnit
 void testAttributeLabel()
          A test on Label
 void testAttributeSampling()
          A unit test for JUnit
 void testAttributeSource()
          A unit test for JUnit
 void testAttributeSubcat()
          A unit test for JUnit
 void testAttributeTimeMeth()
          A unit test for JUnit
 void testAttributeTimePeriod()
          A unit test for JUnit
 void testAttributeTitle()
          A unit test for JUnit
 void testOperationAddDataFile()
          A Test of the operation AddDataFile() Upload one of the datafiles of this dataset.
 void testOperationBreakdown()
          A Test of the operation Breakdown() Breakdown.
 void testOperationDatalist()
          A Test of the operation Datalist() Calculate Datalist statistics.
 void testOperationDelete()
          A Test of the operation Delete()
 void testOperationDescriptive()
          A Test of the operation Descriptive() Calculate descriptive statistics.
 void testOperationFindDDIVariables()
          A Test of the operation FindDDIVariables() Get a list of the IDs of the DDI variables that contain the specified keyword.
 void testOperationFrequency()
          A Test of the operation Frequency() Frequencies.
 void testOperationGetDDI()
          A Test of the operation GetDDI() Get the full DDI metadata for this dataset.
 void testOperationGetDDISkeleton()
          A Test of the operation GetDDISkeleton() Get a possibly incomplete DDI document.
 void testOperationGetDDIVariable()
          A Test of the operation GetDDIVariable() Get the full XML code of the variable.
 void testOperationGFrequency()
          A Test of the operation GFrequency() Gfrequencies (?).
 void testOperationMultipleRegression()
          A Test of the operation MultipleRegression() MultipleRegression.
 void testOperationSubset()
          Test full download.
 void testOperationTabulation()
          A Test of the operation Tabulation() A cross tabulation on this dataset.
 void testOperationTabulationUnsupportedFormat()
          A Test of the operation Tabulation() in unsupported NESSTAR format A cross tabulation on this dataset.
 void testOperationXBreak()
          A Test of the operation XBreak() A crossbreak on this dataset.
 void testSubsetException()
           
 
Methods inherited from class nesstar.api.DatasetTestBase
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

DatasetTest

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

Parameters:
testName -
Throws:
Exception
Method Detail

main

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

testAttributeAbstractText

public void testAttributeAbstractText()
                               throws Exception
Attributes Tests *

Overrides:
testAttributeAbstractText in class DatasetTestBase
Throws:
Exception

testAttributeAccessConditions

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

Overrides:
testAttributeAccessConditions in class DatasetTestBase
Throws:
Exception

testAttributeAccessStatus

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

Overrides:
testAttributeAccessStatus in class DatasetTestBase
Throws:
Exception

testAttributeCollMode

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

Overrides:
testAttributeCollMode in class DatasetTestBase
Throws:
Exception

testAttributeDataKind

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

Overrides:
testAttributeDataKind in class DatasetTestBase
Throws:
Exception

testAttributeDistributionDate

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

Overrides:
testAttributeDistributionDate in class DatasetTestBase
Throws:
Exception

testAttributeDistributor

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

Overrides:
testAttributeDistributor in class DatasetTestBase
Throws:
Exception

testAttributeGeographicalCover

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

Overrides:
testAttributeGeographicalCover in class DatasetTestBase
Throws:
Exception

testAttributeGeographicalUnit

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

Overrides:
testAttributeGeographicalUnit in class DatasetTestBase
Throws:
Exception

testAttributeHasData

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

Overrides:
testAttributeHasData in class DatasetTestBase
Throws:
Exception

testAttributeCubeHasData

public void testAttributeCubeHasData()
                              throws Exception
A unit test for hasData if cube

Throws:
Exception

testAttributeSampling

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

Overrides:
testAttributeSampling in class DatasetTestBase
Throws:
Exception

testAttributeSource

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

Overrides:
testAttributeSource in class DatasetTestBase
Throws:
Exception

testAttributeSubcat

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

Overrides:
testAttributeSubcat in class DatasetTestBase
Throws:
Exception

testAttributeTimeMeth

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

Overrides:
testAttributeTimeMeth in class DatasetTestBase
Throws:
Exception

testAttributeTimePeriod

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

Overrides:
testAttributeTimePeriod in class DatasetTestBase
Throws:
Exception

testAttributeTitle

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

Overrides:
testAttributeTitle in class DatasetTestBase
Throws:
Exception

testAttributeLabel

public void testAttributeLabel()
                        throws Exception
A test on Label

Overrides:
testAttributeLabel in class DatasetTestBase
Throws:
Exception

testAttributeComment

public void testAttributeComment()
                          throws Exception
A test on Comment

Overrides:
testAttributeComment in class DatasetTestBase
Throws:
Exception

testOperationAddDataFile

public void testOperationAddDataFile()
                              throws Exception
A Test of the operation AddDataFile() Upload one of the datafiles of this dataset.

There can be one or more datafiles associated with each dataset.

Each datafile has an unique ID indicated in the ID attribute of the fileDscr/fileName element.

The datafile should be in NSDSTAT format and it's actually composed by three separate files with suffixes: dkm, ind and nsf.

Overrides:
testOperationAddDataFile in class DatasetTestBase
Throws:
Exception

testOperationDelete

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

Overrides:
testOperationDelete in class DatasetTestBase
Throws:
Exception

checkRemoveDataset

public void checkRemoveDataset(Study study,
                               String studyFile,
                               int partsLevel)
                        throws Exception
Check that a dataset/study is correctly removed

Parameters:
study -
studyFile -
partsLevel -
Throws:
Exception

checkStatOpResult

public static void checkStatOpResult(String testfile,
                                     String result)
                              throws Exception
Check that the result of the tabulation is correct

Parameters:
testfile - the name of the testfile to save/compare the result to/with, e.g. "2568_tabulation1.txt"
result - the result of the operation
Throws:
Exception

checkDownloadResult

public static void checkDownloadResult(String testfile,
                                       URL result)
                                throws Exception
Check that the result of the subset is correct

Parameters:
testfile - the name of the testfile to save/compare the result to/with, e.g. "2568_tabulation1.txt"
result - the result of the operation
Throws:
Exception

testOperationSubset

public void testOperationSubset()
                         throws Exception
Test full download.

Overrides:
testOperationSubset in class DatasetTestBase
Throws:
Exception

testOperationDescriptive

public void testOperationDescriptive()
                              throws Exception
A Test of the operation Descriptive() Calculate descriptive statistics.

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Overrides:
testOperationDescriptive in class DatasetTestBase
Throws:
Exception

testOperationDatalist

public void testOperationDatalist()
                           throws Exception
A Test of the operation Datalist() Calculate Datalist statistics.

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Overrides:
testOperationDatalist in class DatasetTestBase
Throws:
Exception

testOperationFrequency

public void testOperationFrequency()
                            throws Exception
A Test of the operation Frequency() Frequencies.

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Overrides:
testOperationFrequency in class DatasetTestBase
Throws:
Exception

testOperationGFrequency

public void testOperationGFrequency()
                             throws Exception
A Test of the operation GFrequency() Gfrequencies (?).

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Overrides:
testOperationGFrequency in class DatasetTestBase
Throws:
Exception

testOperationBreakdown

public void testOperationBreakdown()
                            throws Exception
A Test of the operation Breakdown() Breakdown.

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Overrides:
testOperationBreakdown in class DatasetTestBase
Throws:
Exception

testOperationMultipleRegression

public void testOperationMultipleRegression()
                                     throws Exception
A Test of the operation MultipleRegression() MultipleRegression.

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Overrides:
testOperationMultipleRegression in class DatasetTestBase
Throws:
Exception

testOperationTabulation

public void testOperationTabulation()
                             throws Exception
A Test of the operation Tabulation() A cross tabulation on this dataset.

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Overrides:
testOperationTabulation in class DatasetTestBase
Throws:
Exception

testOperationXBreak

public void testOperationXBreak()
                         throws Exception
A Test of the operation XBreak() A crossbreak on this dataset.

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Overrides:
testOperationXBreak in class DatasetTestBase
Throws:
Exception

testOperationTabulationUnsupportedFormat

public void testOperationTabulationUnsupportedFormat()
                                              throws Exception
A Test of the operation Tabulation() in unsupported NESSTAR format A cross tabulation on this dataset.

Returns the result of the operation in a proprietary NSDSTAT format. Note: the old NESSTAR format is no longer supported, we use XML only now, in 'mergeVariables' placeholder.

Throws:
Exception

testOperationFindDDIVariables

public void testOperationFindDDIVariables()
                                   throws Exception
A Test of the operation FindDDIVariables() Get a list of the IDs of the DDI variables that contain the specified keyword.
For example: 11 12 13

Overrides:
testOperationFindDDIVariables in class DatasetTestBase
Throws:
Exception

testOperationGetDDIVariable

public void testOperationGetDDIVariable()
                                 throws Exception
A Test of the operation GetDDIVariable() Get the full XML code of the variable.

Overrides:
testOperationGetDDIVariable in class DatasetTestBase
Throws:
Exception

testOperationGetDDI

public void testOperationGetDDI()
                         throws Exception
A Test of the operation GetDDI() Get the full DDI metadata for this dataset.

Overrides:
testOperationGetDDI in class DatasetTestBase
Throws:
Exception

testOperationGetDDISkeleton

public void testOperationGetDDISkeleton()
                                 throws Exception
A Test of the operation GetDDISkeleton() Get a possibly incomplete DDI document.

Some or all of the variable elements might have been reduced to their skeleton form.

Overrides:
testOperationGetDDISkeleton in class DatasetTestBase
Throws:
Exception

testSubsetException

public void testSubsetException()
                         throws Exception
Throws:
Exception

testAttributeCreationDate

public void testAttributeCreationDate()
                               throws Exception
A test on CreationDate

Overrides:
testAttributeCreationDate in class DatasetTestBase
Throws:
Exception

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved