|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
nesstar.test.NesstarTestCase
public class NesstarTestCase
Root cl ass for all Nesstar Test classes. Contains many utility methods to make tests more simple.
Each test class should call in its setUp() method the appropriate setup method e.g. dependsOn("studySetup");
| Field Summary | |
|---|---|
int |
ALL
Constant Field Variable |
static CatalogHome |
CATALOG_HOME
A static reference to CatalogHome, initialised by catalogSetup |
static Cube |
CUBE_CUBE
A static reference to Cube "no.uib.nsd.ddi.LungekreftCube", initialised by cubeSetup |
static Datafile |
DATAFILE_2568_F1
A static reference to Datafile "uk.ac.data-archive.ddi.2568_F1", initialised by studySetup |
static Datafile |
DATAFILE_4176_F1
A static reference to Datafile "uk.ac.data-archive.ddi.4176_F1", initialised by studySetup |
static Datafile |
DATAFILE_4213_F1
A static reference to Datafile "uk.ac.data-archive.ddi.4213_F1", initialised by studySetup |
static Datafile |
DATAFILE_44871_F1
A static reference to Datafile "uk.ac.data-archive.ddi.44871_F1", initialised by studySetup |
static Datafile |
DATAFILE_Cube_C1
A static reference to Datafile "no.uib.nsd.ddi.LungekreftCube_C1", initialised by studySetup |
static Datafile |
DATAFILE_Mergetest_F2
A static reference to Datafile "com.nesstar.ddi.MergeTest_F2", initialised by studySetup |
static Datafile |
DATAFILE_UnpopulatedElementsTest_F1
A static reference to Datafile "com.nesstar.ddi.UnpopulatedElementsTest_F1", initialised by studySetup |
EMWindow |
emWindow
a static reference to a Mozilla WebClient frame |
static VariableHome |
HC_VAR_HOME
A static reference to the VariableHome |
static String |
ID_2568
Constant Field Variable |
static String |
ID_2981
Constant Field Variable |
static String |
ID_3690
Constant Field Variable |
static String |
ID_4176
Constant Field Variable |
static String |
ID_4213
Constant Field Variable |
static String |
ID_4396
Constant Field Variable |
static String |
ID_44871
Constant Field Variable |
static String |
ID_4638
Constant Field Variable |
static String |
ID_CAMEROON
Constant Field Variable |
static String |
ID_CIRCULATORY
Constant Field Variable |
static String |
ID_CUBE
Constant Field Variable |
static String |
ID_HIERARCHY
Constant Field Variable |
static String |
ID_LANDET
Constant Field Variable |
static String |
ID_MERGE
Constant Field Variable |
static String |
ID_NOGROUPS
Constant Field Variable |
static String |
ID_NSD50
Constant Field Variable |
static String |
ID_PUBLISH
Constant Field Variable |
static String |
ID_UPElements
Constant Field Variable |
static String |
LICENSE
A static reference to the Nesstar License. |
static String |
localIP
Constant Field Variable |
static String |
NESSTAR2_SERVER_URL
|
static String |
NESSTAR2_URL
Constant Field Variable |
int |
NONE
Constant Field Variable |
static Catalog |
ROOT_CATALOG
A static reference to the (first) root catalog, initialised by basicSetup |
static Section |
SECTION_MERGE_VG10
|
static Section |
SECTION_MERGE_VG7
|
static Section |
SECTION_MERGE_VG8
|
static Server |
SERVER
|
int |
SOME
Constant Field Variable |
static StatFormat |
SPSS_FORMAT
|
static NSDStatEngine |
STAT_ENGINE
|
static StatementHome |
STATEMENT_HOME
a static reference to a STATEMENT_HOME |
static Statement |
STATEMENT1
a static reference to a Statement |
static Study3 |
STUDY_2568
A static reference to Study "uk.ac.data-archive.ddi.2568", initialised by studySetup |
static Study3 |
STUDY_2981
A static reference to Study "uk.ac.data-archive.ddi.2981", initialised by studySetup |
static Study3 |
STUDY_4176
A static reference to Study "uk.ac.data-archive.ddi.4176", initialised by studySetup |
static Study3 |
STUDY_4213
A static reference to Study "uk.ac.data-archive.ddi.4213", initialised by studySetup |
static Study3 |
STUDY_44871
A static reference to Study "uk.ac.data-archive.ddi.44871", initialised by studySetup |
static Study3 |
STUDY_CAMEROON
A static reference to Study "HH-CMR-ECAM-2001", initialised by studySetup |
static Study3 |
STUDY_CIRCULATORY
A static reference to Study "uk.org.erpho.circulatory", initialised by studySetup |
static Study3 |
STUDY_CUBE
A static reference to Study "no.uib.nsd.ddi.LungekreftCube", initialised by studySetup |
static Study3 |
STUDY_HIERARCHY
A static reference to Study "com.nesstar.ddi.HierarchyTest", initialised by studySetup |
static StudyHome |
STUDY_HOME
a static reference to the StudyHome |
static Study3 |
STUDY_LANDET
A static reference to Study "no.uib.nsd.ddi.LANDET97", initialised by studySetup |
static Study3 |
STUDY_MERGE
A static reference to Study "com.nesstar.ddi.MergeTest", initialised by studySetup |
static Study3 |
STUDY_NOGROUPS
A static reference to Study "com.nesstar.ddi.nogroups", initialised by studySetup |
static Study3 |
STUDY_NSD50
A static reference to Study "no.uib.nsd.ddi.NSD0050", initialised by studySetup |
static Study3 |
STUDY_UPElements
A static reference to Study "com.nesstar.ddi.UnpopulatedElementsTest", initialised by studySetup |
static Study3 |
STUDY2_2568
A static reference to Study "uk.ac.data-archive.ddi.2568", initialised by studySetup |
static Study3 |
STUDY2_4638
A static reference to Study "uk.ac.data-archive.ddi.4638", initialised by studySetup |
static Study3 |
STUDY2_UPElements
A static reference to Study "com.nesstar.ddi.UnpopulatedElementsTest", initialised by studySetup |
static Protocol |
TEST_PROTOCOL
Basic setup for testing: setup the protocol get the server object login as administrator |
static VariableHome |
VAR_HOME
a static reference to the VariableHome |
static Variable |
VARIABLE_2568_V1
A static reference to Variable "uk.ac.data-archive.ddi.2568_V1", initialised by studySetup |
static Variable |
VARIABLE_2568_V13
A static reference to Variable "uk.ac.data-archive.ddi.2568_V13", initialised by studySetup |
static Variable |
VARIABLE_2568_V16
A static reference to Variable "uk.ac.data-archive.ddi.2568_V16", initialised by studySetup |
static Variable |
VARIABLE_2568_V17
A static reference to Variable "uk.ac.data-archive.ddi.2568_V17", initialised by studySetup |
static Variable |
VARIABLE_2568_V18
A static reference to Variable "uk.ac.data-archive.ddi.2568_V18", initialised by studySetup |
static Variable |
VARIABLE_2568_V3
A static reference to Variable "uk.ac.data-archive.ddi.2568_V3", initialised by studySetup |
static Variable |
VARIABLE_2568_V354
|
static Variable |
VARIABLE_2568_V77
A static reference to Variable "uk.ac.data-archive.ddi.2568_V77", initialised by studySetup |
static Variable |
VARIABLE_44871_V1
A static reference to Variable "uk.ac.data-archive.ddi.44871_V1", initialised by studySetup |
static Variable |
VARIABLE_CAMEROON_V238
A static reference to Variable "HH-CMR-ECAM-2001_V238", initialised by studySetup |
static Variable |
VARIABLE_CAMEROON_V355
A static reference to Variable "HH-CMR-ECAM-2001_V355", initialised by studySetup |
static Variable |
VARIABLE_LANDET_V1
A static reference to Variable "no.uib.nsd.ddi.LANDET97_V1", initialised by studySetup |
static Variable |
VARIABLE_LANDET_V2
A static reference to Variable "no.uib.nsd.ddi.LANDET97_V2", initialised by studySetup |
static Variable |
VARIABLE_MERGE_V22
A static reference to Variable "com.nesstar.ddi.MergeTest_V22", initialised by studySetup |
static Variable |
VARIABLE_MERGE_V23
A static reference to Variable "com.nesstar.ddi.MergeTest_V23", initialised by studySetup |
static Variable |
VARIABLE_MERGE_V26
A static reference to Variable "com.nesstar.ddi.MergeTest_V26", initialised by studySetup |
static Variable |
VARIABLE_MERGE_V41
A static reference to Variable "com.nesstar.ddi.MergeTest_V41", initialised by studySetup |
static String |
VID_2568_V1
Constant Field Variable |
static String |
VID_2568_V13
Constant Field Variable |
static String |
VID_2568_V16
Constant Field Variable |
static String |
VID_2568_V17
Constant Field Variable |
static String |
VID_2568_V18
Constant Field Variable |
static String |
VID_2568_V3
Constant Field Variable |
static String |
VID_2568_V354
|
static String |
VID_2568_V77
Constant Field Variable |
static String |
VID_44871_V1
Constant Field Variable |
static String |
VID_CAMEROON_V238
Constant Field Variable |
static String |
VID_CAMEROON_V355
Constant Field Variable |
static String |
VID_LANDET_V1
Constant Field Variable |
static String |
VID_LANDET_V2
Constant Field Variable |
static String |
VID_MERGE_V22
Constant Field Variable |
static String |
VID_MERGE_V23
Constant Field Variable |
static String |
VID_MERGE_V26
Constant Field Variable |
static String |
VID_MERGE_V41
Constant Field Variable |
static String |
WebDataURL
Constant Field Variable |
| Constructor Summary | |
|---|---|
NesstarTestCase(String testName)
|
|
| Method Summary | |
|---|---|
static void |
addAllTests(junit.framework.TestSuite suite)
This method adds all tests to the testsuite |
static void |
addAllTests(junit.framework.TestSuite suite,
String pkg)
This method adds packages of tests to a classpath |
static boolean |
addDatafile(Study study,
String studyID,
String fileID)
Adds a datafile to a study |
void |
addPath(StringBuffer path,
String prop,
List list,
Object obj)
|
static void |
adminLogin()
|
void |
assertBinary(MIMEObject mime)
Assert that the passed MIMEObject is of binary type. |
void |
assertContains(String text,
String toFind)
Asserts that the toFind String was found within the text String. |
void |
assertContains(String message,
String text,
String toFind)
Asserts that the toFind String was found within the text String. |
void |
assertDoesNotContain(String text,
String notToFind)
Asserts that the toFind String was NOT found within the text String. |
void |
assertDoesNotContain(String message,
String text,
String notToFind)
Asserts that the toFind String was NOT found within the text String. |
void |
assertDuration(String msg,
long expectedDuration,
long actualDuration)
Asserts that the actual duration is less than or equal to the expected duration, and fails if not. |
void |
assertEqualIgnoreOrder(List lista,
List listb)
assert the contents of a List are the same, regardless of order |
static void |
assertEquals(Object[] a1,
Object[] a2)
Asserts that the two arrays have the same length and contents |
static void |
assertMatches(String[] patterns,
String[] actuals)
Asserts that the 'patterns' match the corresponding elements of the 'actual' results |
static void |
assertMatches(String pattern,
String actual)
Asserts that the 'pattern' match the 'actual' result |
void |
assertNoAccess(Bookmark op)
Assert that the operation returns a No Access Exception |
void |
assertNoAccess(String url)
Assert that the URL returns a No Access Exception |
void |
assertNoAccess(String message,
String url)
Assert that the URL returns a No Access Exception message String is a failure message |
void |
assertNotEquals(int first,
int second)
Asserts that two ints are not equal |
void |
assertNotEquals(String message,
int first,
int second)
Asserts that two ints are not equal, and show the specified failure message |
static void |
assertObjDoesNotExists(RDFObj object)
|
static void |
assertObjDoesNotExists(String objURL)
Asserts that the object with the given URL doesn't exists |
static void |
assertObjExists(RDFObj object)
|
static void |
assertObjExists(String objURL)
Asserts that the object with the given URL exists |
void |
assertWebAuthorisationRequired(String relativeURL)
Assert that the URL returns a Web Authorisation Required request |
void |
assertWebAuthorisationRequired(String msg,
String relativeURL)
Assert that the URL returns a Web Authorisation Required request |
static void |
basicSetup()
|
static void |
cannotRun(String reason)
Produce a warning or error if a test cannot be executed for the indicated reason. |
static void |
catalogSetup()
Basic setup for Catalogs testing load and setup the test catalogs |
static void |
checkIllegalArgument(nesstar.util.FallibleFunction f,
Object argument,
String argumentName)
|
void |
checkPaths(RDFObject from,
RDFObject to,
String paths,
int numPaths)
|
void |
checkPathsTo(String expectedPaths,
String paths,
RDFObject from,
RDFObject to)
|
void |
checkPathsTo(String expectedPaths,
String paths,
RDFObject from,
RDFObject to,
int numPaths)
|
static void |
checkPerformance(Worker worker,
int minUnitsPerSec,
boolean throwError)
Execute the indicated worker and throw an exception or a warning if the worker executed less than minUnitPerSec |
static void |
compareWithFile(File in,
File out)
Compare contents of file 'in' with contents of file 'out' |
void |
compareWithReferenceFile(String filename,
Hashtable files)
|
static void |
compareWithTestFile(String filename,
String contents)
Compare 'contents' with the contents of the indicated testfile. |
static void |
compareWithTestFile(String filename,
String contents,
int index)
Compare 'contents' with the contents of the indicated testfile. |
Variable |
createDerivedVariable(Study3 study,
String name,
String label,
String comment,
String expression)
|
Variable |
createDerivedVariable(Study3 study,
String name,
String label,
String comment,
String expression,
boolean checkExists)
|
Variable |
createDerivedVariableUnprotected(Study3 study,
String name,
String label,
String comment,
String expression)
|
static void |
cubeSetup()
|
String |
cvsAbstractName(String name)
|
static void |
cvsClientSetup()
this sets up the CVS Client object ready to do operations |
boolean |
cvsCompare(String filename,
String old_rev)
This will compare an old revision of a file with the newest one (will check with the cvs server which is the newest one) |
boolean |
cvsCompare(String filename,
String old_rev,
String new_rev)
This will compare different revisions of one file. |
void |
cvsFailIfDifferent(String filename,
String old_rev)
This will compare an old revision of a file with the newest one If any differences occur, the test will fail |
void |
cvsFailIfDifferent(String filename,
String old_rev,
String new_rev)
This will compare different revisions of one file. |
String |
cvsFileRevision(String filename,
boolean debug)
returns the current revision number of a file |
Hashtable |
cvsFileRevisions(Vector v,
boolean debug)
iterates a vector of filenames, checks each file's revision in CVS and adds to a hashtable (with filename turned into cvs abstract name) |
String |
cvsRootDir()
this returns the current local location of the 'faster' directory (i.e. |
static void |
dependsOn(String setupMethodName)
|
static void |
dependsOn(String setupMethodName,
String className)
Make sure that the passed setup method is executed once. |
static boolean |
equalToFile(File in,
File out)
returns whether two files are equal |
static boolean |
equalToTestFile(String filename,
String contents)
returns whether two test files are equal |
static boolean |
equalToTestFile(String filename,
String contents,
int index)
returns whether two test files are equal |
static List |
executeRangeQuery(Object target,
String query,
int startHit,
int maxHits,
boolean wantPaths)
if user doesn't specify the expected size, this uses the maxHits as the expected size |
static List |
executeRangeQuery(Object target,
String query,
int startHit,
int maxHits,
boolean wantPaths,
int size)
a rangequery method to test the speed of results based on the number of results, specifying that hits come back at a speed of at least 3 hits per second without paths, and at least 2 hits per second with paths |
static List |
executeRangeQuery(Object target,
String query,
int startHit,
int maxHits,
boolean wantPaths,
int size,
int minQueryHitsPerSec,
int minQueryPathHitsPerSec)
a rangequery method to test the speed of results based on the number of results, including whether they also return the full paths to those objects |
void |
executeRangeQueryAdditivity(Object target,
String query)
RangeQueryAdditivity tests the ability to add the results of a range query together. |
static void |
expectFalse(String msg,
boolean condition)
Print warning if condition is true |
static void |
expectTrue(String msg,
boolean condition)
Print warning if condition is false |
static void |
extractZipFile(File zip)
|
static void |
factsheetSetup()
sets up some Health Canada Objects |
int |
findPosition(List list,
Object obj)
|
static void |
flirtWithTestFile(String filename,
String contents)
flirts 'contents' with the contents of the indicated testfile. |
String |
getBrowserPage(String url)
|
String |
getBrowserPage(URL url)
|
static Catalog |
getCatalog(String key)
retrieves a Catalog given its id |
static CategoryStatistic |
getCategoryStatistic(String key)
retrieves a CategoryStatistic object given its id |
CategoryStatistic |
getCategoryStatisticFromVariable(Variable s,
String id)
retrieves a CategoryStatistic from a Variable |
static Concept |
getConcept(String key)
retrieves a Concept object given its id |
String |
getCurrentBrowserPage(String shortURL)
|
File |
getCvsPropertiesFile()
gets the cvs properties file |
static Datafile |
getDatafile(String key)
retrieves a Datafile given its id |
static File |
getDDITestFile(String shortID)
|
static String |
getDDITestFileContents(String shortID)
|
Variable |
getDerivedVariableByName(Study3 study,
String name)
|
static Dimension |
getDimension(String key)
retrieves a Dimension object given its id |
Dimension |
getDimensionFromCube(Cube s,
String id)
gets a Dimension from a Cube, given an ID |
static EGMSResource |
getEGMSResource(String key)
retrieves an EGMSResource given its id |
static EGMSResource2Ex |
getEGMSResource2(String key)
|
static Event |
getEvent(String key)
retrieves an Event given its id |
Collection |
getExisting(Collection objects)
retrieves a Collection of objects which are assured to exist |
static File |
getFailedDir()
|
static File |
getFailedFile(String filename)
|
Vector |
getFilenames(String dir,
String endswith)
a method to search a directory (and nested directories) for files which match the endswith parameter, and add their names to a vector |
static File |
getFilteredTestFile(String filename)
|
static GeographicalUnit |
getGeographicalUnit(String key)
retrieves a GeographicalUnit given its id |
static File |
getLocalFile(String property,
String filename)
returns a file whose path is located as a property in a properties files, and whose filename is given |
static int |
getMaxConcurrentOps(String report)
extracts from the server report the number of concurrent operations on the server |
static Measure |
getMeasure(String key)
retrieves a Measure object given its id |
static int |
getNumberCompletedOps(String report)
extracts from the server report the number of completed operations on the server |
static int |
getNumberHTTPConnections(String report)
extracts from the server report the number of open HTTPConnections on the server |
static int |
getNumberStartedOps(String report)
extracts from the server report the number of started operations on the server |
static RDFObject |
getObj(String shortURL)
reloads the specified object on the server. |
Collection |
getObjectsFrom(String objURL,
int maxHits)
Methods to get objects that are parts of other objects |
static String |
getObjURL(String shortURL)
returns the full URL of an object on the default server |
static Organisation |
getOrganisation(String key)
retrieves a Organisation given its id |
String |
getPage(String url)
|
String |
getPage(URL url)
|
Collection |
getPartsOf(RDFObject obj)
checks that an RDFObject is made up of no parts |
Collection |
getPartsOf(RDFObject obj,
Hashtable visited,
int maxHits)
checks that an RDFObject is made up of the correct number of parts (generally, use the getPartsOf with the two parameter signature) |
Collection |
getPartsOf(RDFObject obj,
int maxHits)
checks that an RDFObject is made up of the correct number of parts |
static Person |
getPerson(String key)
retrieves a Person given its id |
String |
getRawPage(String url)
|
static String |
getRDF(NetDB db,
Vector roots)
|
static String |
getReport()
returns the report from the default server |
static File |
getResultDir()
|
static File |
getResultFile(String filename)
|
static String |
getSecureObjURL(String shortURL)
returns the full URL of a secure object on the default server |
static String |
getSecureServerURL()
returns the URL of the secure default server |
static File |
getServerDataDir()
gets the server data directory |
static File |
getServerDatafile(String filename)
gets a datafile from the server |
static String |
getServerIP()
gets the server ip address |
String |
getServerLog()
gets the servers logfile |
static String |
getServerName()
gets the server name |
static String |
getServerObjURL()
returns the URL of the default server |
String |
getServerPage(String relativeURL)
|
URL |
getServerPageURL(String relativeURL)
|
static String |
getServerPassword()
gets the server administrators password |
static int |
getServerPort()
gets the server port |
static int |
getServerSecurePort()
gets the server secure port |
static String |
getServerURL()
returns the URL of the default server |
static String |
getServerUsername()
gets the server administrators username |
static Collection |
getStatementsOn(String id)
returns objects from the statement table |
static Collection |
getStatementsOn(String sid,
String oid)
|
Table |
getTableFromStudy(Study s,
String id)
gets a Table from a Study, given an ID |
static Term |
getTerm(String key)
retrieves a Term object given its id |
static File |
getTestDir()
|
static File |
getTestFile(String filename)
|
static File |
getTestFile(String filename,
String ext)
|
static Variable |
getVariable(String key)
retrieves a Variable given its id |
Variable |
getVariableFromStudy(Study s,
String id)
Retrieves a variable from a study |
static void |
getWebFile(URL url,
File target)
|
static File |
getZipFile(File file,
String entryName,
String zipName)
generate a zip file in the test directory with the name and the contents provided |
static boolean |
hasWebData(String id)
Return true if id is in the WebDataList array |
static void |
HCSetup()
sets up some Health Canada Objects |
static boolean |
isLocalServer()
evaluates whether the server is local to the testsuite |
static boolean |
isNTService()
|
static boolean |
isOnline()
deduces whether the test program is running on a machine that is connected to the Internet. |
static boolean |
isQuickie()
evaluates whether this is a 'quick' test: a test that skips unessential checks for performance sake. |
static boolean |
isReleaseTest()
|
static boolean |
isWaitForSQLServerIndexer()
|
static Cube |
loadCube(Study study,
String cubeID)
Make sure that the cube data files are loaded in the target server |
static Study |
loadDDI(String id)
Make sure that the given study is loaded in the target server Example: Study d2981 = addStudy(studyHome,ID_2981,NAME_2981); |
Hashtable |
loadHashFromFile(String filename)
load the contents of a file, separate into lines and add to a hashtable (as key/value pairs for lines containing an equals, or key/"" pairs for normal lines) |
static Study |
loadStudy(String id)
Make sure that the given study and its datafiles are loaded in the target server Example: Study d2981 = addStudy(studyHome, "uk.ac.data-archive.ddi.2981"); |
static Study3 |
loadStudy3(String id)
|
static Variable |
loadVariable(String id)
Get the given variable with specified id |
static void |
msg(Object msg)
Print message to standard output |
static void |
msg(String prefix,
Object msg)
Print message to standard output |
static boolean |
noDirectAccess()
Use at the beginning of direct tests (tests that require access to the server directory) as if (noDirectAccess()) return; |
boolean |
objExists(String shortURL)
checks if an object exists on the default server |
int |
objsExists(String[] shortURLs)
establishes how many of the objects (whose short Urls are in the String array) exist |
void |
openEMWindow(String title,
String startURL)
opens a Mozilla Webclient window |
void |
performRangeQuery(Catalog target,
String query,
int from,
int maxHits,
boolean paths,
int expectedHits,
long expectedDuration)
a method to perform a rangequery, and check that it returned the correct number of results, within an acceptable timeframe |
static void |
querySetup()
sets up Queries |
static String |
read(String name)
reads in a files and returns a string of the content |
void |
rebootServer()
Reboot server and reapply basic setup |
void |
rebootServer(int repetition)
Reboot server |
static RDFObject |
reloadObj(String shortURL)
reloads the specified object on the server (checks the net for the object) |
void |
removeAllVars(Study3 subject)
|
static String |
removeCreationDate(String result)
|
void |
removeProperties(RDFObject subject,
URL property)
Delete all property values |
static String |
removeServerURL(String result)
Remove server dependent URL from result |
static boolean |
repeatCheck(Class cls,
String methodName,
int times,
int interval)
Call repeatedly a method with signature 'static boolean methodName()' waiting 'interval' milliseconds between calls until the method returns true or the method has been called 'times' times. |
static boolean |
saveToTestFile(String filename,
String contents)
simply saves test files |
static void |
setNTService(boolean b)
|
static void |
setQuickie(boolean b)
|
static void |
setReleaseTest(boolean b)
|
static void |
setWaitForSQLServerIndexer(boolean b)
|
static void |
statementSetup()
sets up Statements |
static void |
studyCleanup()
Basic setup for Studies testing Make sure that the server does not contain these test studies. |
static void |
studySetup()
Basic setup for Studies testing Make sure that the server contains the test studies. |
static void |
tableSetup()
sets up some Health Canada Objects |
static String |
toMsg(Collection objects)
returns a more readable representation of a collection |
String |
toString(List list)
|
void |
untested(String feature)
Mark a test as 'untested' (no proper test has been provided). |
static List |
updateChildren(Catalog catalog)
returns a list of children from a catalog, and does a reload on them |
static void |
variableSetup()
Basic setup for Variables testing |
static void |
waitForSQLServerIndexer()
|
void |
waitServer(boolean upOrDown)
waits for the server to go up or go down. |
static void |
warn(String msg)
Print a warning. |
static void |
webclientSetup()
A method to setup Webclient for Mozilla. |
static void |
write(String content,
File file)
writes a string to a file |
static void |
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 |
| Field Detail |
|---|
public static final String localIP
public static final String WebDataURL
public static final String NESSTAR2_URL
public static final String NESSTAR2_SERVER_URL
public static StatementHome STATEMENT_HOME
public static Statement STATEMENT1
public static Server SERVER
public static NSDStatEngine STAT_ENGINE
public static StatFormat SPSS_FORMAT
public static StudyHome STUDY_HOME
public static VariableHome VAR_HOME
public static Study3 STUDY_NOGROUPS
public static final String ID_NOGROUPS
public static Study3 STUDY_UPElements
public static Study3 STUDY2_UPElements
public static final String ID_UPElements
public static Study3 STUDY_CAMEROON
public static final String ID_CAMEROON
public static Study3 STUDY_HIERARCHY
public static final String ID_HIERARCHY
public static Study3 STUDY_MERGE
public static final String ID_MERGE
public static Study3 STUDY_2568
public static Study3 STUDY2_2568
public static Study3 STUDY2_4638
public static final String ID_2568
public static Study3 STUDY_2981
public static final String ID_2981
public static Study3 STUDY_44871
public static final String ID_44871
public static final String ID_3690
public static final String ID_4396
public static Study3 STUDY_CIRCULATORY
public static final String ID_CIRCULATORY
public static Study3 STUDY_4213
public static final String ID_4213
public static Study3 STUDY_4176
public static final String ID_4176
public static Study3 STUDY_NSD50
public static final String ID_NSD50
public static Study3 STUDY_LANDET
public static final String ID_LANDET
public static Study3 STUDY_CUBE
public static Cube CUBE_CUBE
public static final String ID_CUBE
public static final String ID_4638
public static final String ID_PUBLISH
public static Datafile DATAFILE_4176_F1
public static Datafile DATAFILE_4213_F1
public static Datafile DATAFILE_2568_F1
public static Datafile DATAFILE_44871_F1
public static Datafile DATAFILE_Mergetest_F2
public static Datafile DATAFILE_UnpopulatedElementsTest_F1
public static Datafile DATAFILE_Cube_C1
public static Variable VARIABLE_2568_V354
public static final String VID_2568_V354
public static Variable VARIABLE_2568_V1
public static final String VID_2568_V1
public static Variable VARIABLE_2568_V3
public static final String VID_2568_V3
public static Variable VARIABLE_2568_V13
public static final String VID_2568_V13
public static Variable VARIABLE_2568_V16
public static final String VID_2568_V16
public static Variable VARIABLE_2568_V17
public static final String VID_2568_V17
public static Variable VARIABLE_2568_V18
public static final String VID_2568_V18
public static Variable VARIABLE_2568_V77
public static final String VID_2568_V77
public static Variable VARIABLE_CAMEROON_V238
public static final String VID_CAMEROON_V238
public static Variable VARIABLE_CAMEROON_V355
public static final String VID_CAMEROON_V355
public static Variable VARIABLE_MERGE_V22
public static final String VID_MERGE_V22
public static Variable VARIABLE_MERGE_V23
public static final String VID_MERGE_V23
public static Variable VARIABLE_MERGE_V26
public static final String VID_MERGE_V26
public static Variable VARIABLE_MERGE_V41
public static final String VID_MERGE_V41
public static Variable VARIABLE_44871_V1
public static final String VID_44871_V1
public static Variable VARIABLE_LANDET_V1
public static final String VID_LANDET_V1
public static Variable VARIABLE_LANDET_V2
public static final String VID_LANDET_V2
public static Section SECTION_MERGE_VG10
public static Section SECTION_MERGE_VG8
public static Section SECTION_MERGE_VG7
public static CatalogHome CATALOG_HOME
public static Catalog ROOT_CATALOG
public static VariableHome HC_VAR_HOME
public static final String LICENSE
public final int ALL
public final int SOME
public final int NONE
public EMWindow emWindow
public static Protocol TEST_PROTOCOL
| Constructor Detail |
|---|
public NesstarTestCase(String testName)
| Method Detail |
|---|
public static void addAllTests(junit.framework.TestSuite suite,
String pkg)
suite - the testsuite to add the tests tothe - packages to include. i.e. "nesstar.api" , "" (all packages)public static void addAllTests(junit.framework.TestSuite suite)
suite - the testsuite to add the tests to
public static void assertObjExists(String objURL)
throws Exception
objURL - the URL of the object
Exception
public static void assertObjExists(RDFObj object)
throws Exception
Exception
public static void assertObjDoesNotExists(String objURL)
throws Exception
objURL - the URL of the object
Exception
public static void assertObjDoesNotExists(RDFObj object)
throws Exception
Exception
public void assertDuration(String msg,
long expectedDuration,
long actualDuration)
msg - the failure message to show (if a failure occurs)expectedDuration - a time measurementactualDuration - a time measurement
public static void assertEquals(Object[] a1,
Object[] a2)
public static void assertMatches(String pattern,
String actual)
public static void assertMatches(String[] patterns,
String[] actuals)
public void assertNotEquals(int first,
int second)
public void assertNotEquals(String message,
int first,
int second)
public void assertContains(String message,
String text,
String toFind)
message - the error message to display if the test failstext - the text to checktoFind - what should be found in the text
public void assertContains(String text,
String toFind)
text - the text to checktoFind - what should be found in the text
public void assertDoesNotContain(String message,
String text,
String notToFind)
message - the error message to display if the test failstext - the text to checknotToFind - what should NOT be found in the text
public void assertDoesNotContain(String text,
String notToFind)
text - the text to checknotToFind - what should NOT be found in the text
public void assertNoAccess(String message,
String url)
throws Exception
message - the error message to display if the test failsurl - the url to check
Exception
public void assertNoAccess(String url)
throws Exception
url - the url to check
Exception
public void assertNoAccess(Bookmark op)
throws Exception
op - the operation (a Bookmark) to check
Exception
public void assertWebAuthorisationRequired(String msg,
String relativeURL)
throws Exception
msg - the error message to displayrelativeUrl - the url to check
Exception
public void assertWebAuthorisationRequired(String relativeURL)
throws Exception
relativeUrl - the url to check
Exception
public void assertBinary(MIMEObject mime)
throws Exception
mime - the MIMEObject to check
Exception
public void assertEqualIgnoreOrder(List lista,
List listb)
throws Exception
Exception
public static void expectTrue(String msg,
boolean condition)
condition - the condition to checkmsg - the message to display
public static void expectFalse(String msg,
boolean condition)
condition - the condition to checkmsg - the message to display
public static void checkIllegalArgument(nesstar.util.FallibleFunction f,
Object argument,
String argumentName)
public static boolean isLocalServer()
public static boolean isOnline()
public static boolean noDirectAccess()
public Vector getFilenames(String dir,
String endswith)
dir - the directory to look in (within CVS)endswith - filenames to match against
public static File getLocalFile(String property,
String filename)
the - name of the property that contains the directory
public static File getServerDataDir()
public static File getServerDatafile(String filename)
filename, - e.g. "no.uib.nsd.ddi.NSD0050.xml"
public String getServerLog()
throws Exception
Exception
public File getCvsPropertiesFile()
throws Exception
Exceptionpublic static String getServerName()
public static String getServerIP()
public static int getServerPort()
public static int getServerSecurePort()
public static String getServerUsername()
public static String getServerPassword()
public String getRawPage(String url)
throws Exception
url - the url of the textual resource to read-in
Exception
public String getPage(URL url)
throws Exception
url - the url of the textual resource to read-in
Exception
public String getPage(String url)
throws Exception
url - the url of the textual resource to read-in
Exception
public URL getServerPageURL(String relativeURL)
throws Exception
relativeURL - an url relative to the current server, e.g. of the textual resource to read-in
Exception
public String getServerPage(String relativeURL)
throws Exception
relativeURL - an url relative to the current server, e.g. of the textual resource to read-in
Exception
public String getBrowserPage(String url)
throws Exception
url - the url of the object
Exception
public String getBrowserPage(URL url)
throws Exception
url - the url of the object
Exception
public String getCurrentBrowserPage(String shortURL)
throws Exception
shortURL - the short url of the object
Exceptionpublic static boolean isQuickie()
public static void setQuickie(boolean b)
public static boolean isReleaseTest()
public static void setReleaseTest(boolean b)
public static boolean isWaitForSQLServerIndexer()
public static void setWaitForSQLServerIndexer(boolean b)
public static boolean isNTService()
public static void setNTService(boolean b)
public static void dependsOn(String setupMethodName)
throws Exception
setupMethodName - the method name to execute (if not already executed)
Exception
public static void dependsOn(String setupMethodName,
String className)
throws Exception
setupMethodName - the name of the setup method to execute, e.g. "basicSetup"
Exception
public static void adminLogin()
throws Exception
Exception
public static void basicSetup()
throws Exception
Exception
public static void studyCleanup()
throws Exception
Exception
public static void studySetup()
throws Exception
Exception
public static void variableSetup()
throws Exception
Exception
public static void catalogSetup()
throws Exception
Exception
public static void cubeSetup()
throws Exception
Exception
public static void tableSetup()
throws Exception
Exception
public static void factsheetSetup()
throws Exception
Exception
public static void HCSetup()
throws Exception
Exception
public static void statementSetup()
throws Exception
Exception
public static void querySetup()
throws Exception
Exception
public static String getRDF(NetDB db,
Vector roots)
throws Exception
root - the root of the object graph
Exception
public static void xthesaurusSetup()
throws Exception
Exception
public static void webclientSetup()
throws Exception
Exception
public void openEMWindow(String title,
String startURL)
throws Exception
title - the title to set in the windowstartURL - the URL to send the Mozilla window to
Exception
public static void cvsClientSetup()
throws Exception
Exception
public boolean cvsCompare(String filename,
String old_rev,
String new_rev)
throws Exception
filename - the name of the file to compare i.e. "faster\\ejbserver\\build.xml"old_rev - the older revision number i.e. "1.6"new_rev - the newer revision number i.e. "1.7"
Exception
public boolean cvsCompare(String filename,
String old_rev)
throws Exception
filename - the name of the file to compare i.e. "faster\\ejbserver\\build.xml"old_rev - the older revision number i.e. "1.6"
Exception
public void cvsFailIfDifferent(String filename,
String old_rev,
String new_rev)
throws Exception
filename - the name of the file to compare i.e. "faster\\ejbserver\\build.xml"old_rev - the older revision number i.e. "1.6"new_rev - the newer revision number i.e. "1.7"
Exception
public void cvsFailIfDifferent(String filename,
String old_rev)
throws Exception
filename - the name of the file to compare i.e. "faster\\ejbserver\\build.xml"old_rev - the older revision number i.e. "1.6"
Exception
public String cvsFileRevision(String filename,
boolean debug)
throws Exception
filename - the name of the file i.e. "faster\\ejbserver\\build.xml"debug - print debug information
Exception
public Hashtable cvsFileRevisions(Vector v,
boolean debug)
throws Exception
v - a vector of files to get revisions for i.e. "faster\\ejbserver\\build.xml"debug - print debug information
Exceptionpublic static void waitForSQLServerIndexer()
public String cvsRootDir()
public static File getTestFile(String filename)
throws Exception
filename - the filename of the file relative to the test data directory
Exception
public static File getTestFile(String filename,
String ext)
throws Exception
filename - the name of the file relative to the test data directoryextension - the extension of the file
Exception
public static File getFilteredTestFile(String filename)
throws Exception
filename - the filename of the file relative to the test data directory
Exception
public static File getZipFile(File file,
String entryName,
String zipName)
throws Exception
file - the file whose content is to be zippedentryName - the name of the file in the zip filezipName - the name of the zip file generated
Exception
public static void extractZipFile(File zip)
throws Exception
zip - the compressed file to extact from (usually in the test data directory)
Note: files ending with the extension ".zip" are automatically extracted and assumed to contain the target file name.
Exception
public static void getWebFile(URL url,
File target)
throws Exception
url - the http address of the file to copy from (usually WebDataURL)target - the target file to write to (usually in the test data directory)
Exception - Warning: this may take some time for large files and low bandwidths!
Note: urls ending with the extension ".zip" are automatically extracted and assumed to contain the target file name.
public static File getTestDir()
throws Exception
filename - the filename of the file relative to the 'test' directory
Exception
public static File getResultFile(String filename)
throws Exception
filename - the filename of the file relative to the 'test' directory
Exception
public static File getResultDir()
throws Exception
Exception
public static File getFailedFile(String filename)
throws Exception
filename - the filename of the file relative to the 'test' directory
Exception
public static File getFailedDir()
throws Exception
Exception
public static File getDDITestFile(String shortID)
throws Exception
shortID - the shortID of the DDI file, the name of the DDI file without the ".xml" suffix, e.g. "2981"
Exception
public static String getDDITestFileContents(String shortID)
throws Exception
shortID - the shortID of the DDI file, the name of the DDI file without the ".xml" suffix, e.g. "2981"
Exception
public static void compareWithTestFile(String filename,
String contents)
throws Exception
filename - the filename of the test file in the 'test' directorycontents - the contents to compare @throw Exception if the compare failed
Exception
public static void compareWithTestFile(String filename,
String contents,
int index)
throws Exception
filename - the filename of the test file in the 'test' directorycontents - the contents to compare @throw Exception if the compare failed
Exception
public static boolean equalToTestFile(String filename,
String contents)
throws Exception
filename - contents -
Exception
public static boolean equalToTestFile(String filename,
String contents,
int index)
throws Exception
filename - contents -
Exception
public static void flirtWithTestFile(String filename,
String contents)
throws Exception
filename - the filename of the test file in the 'test' directorycontents - the contents to flirt
Exception
public static boolean saveToTestFile(String filename,
String contents)
throws Exception
filename - contents -
Exception
public static void compareWithFile(File in,
File out)
throws Exception
in - out -
Exception
public static boolean equalToFile(File in,
File out)
throws Exception
in - out -
Exceptionpublic String cvsAbstractName(String name)
public void compareWithReferenceFile(String filename,
Hashtable files)
throws Exception
Exception
public Hashtable loadHashFromFile(String filename)
throws Exception
filename - the name of the file to load, and turn into a hashtable
Exception
public Collection getObjectsFrom(String objURL,
int maxHits)
objURL - the object to reloadmaxHits -
Exception
public Collection getPartsOf(RDFObject obj)
throws Exception
obj - the object whose parts are to be found
Exception
public Collection getPartsOf(RDFObject obj,
int maxHits)
throws Exception
obj - the object whose parts are to be foundmaxHits - the maximum number of subparts to be expanded for each object, if < 0 all parts are retrieved
Exception
public Collection getPartsOf(RDFObject obj,
Hashtable visited,
int maxHits)
throws Exception
obj - the RDFObject containing the parts to be foundvisited - a Hashtable of objects already notedmaxHits - the maximum number of hits expected
Exceptionpublic boolean objExists(String shortURL)
shortURL - the short URL of the object to check
public int objsExists(String[] shortURLs)
shortURLs - a string array of shortURLs of objects
public Collection getExisting(Collection objects)
objects - the objects to test for existence
public static void checkPerformance(Worker worker,
int minUnitsPerSec,
boolean throwError)
throws Exception
worker - the worker object which performed some operationsminUnitPerSec - minimum number of units per secondthrowError - if true an error will be thrown, otherwise a warning
Exception
public static String getReport()
throws Exception
Exception
public static int getNumberHTTPConnections(String report)
throws Exception
report - the server report
Exception
public static int getNumberStartedOps(String report)
throws Exception
report - the server report
Exception
public static int getNumberCompletedOps(String report)
throws Exception
report - the server report
Exception
public static int getMaxConcurrentOps(String report)
throws Exception
report - the server report
Exception
public static List updateChildren(Catalog catalog)
throws Exception
catalog - the catalog to return children from
Exception
public static Collection getStatementsOn(String id)
throws Exception
id - the id of the objects to return from the statement table @returns Collection
Exception
public static Collection getStatementsOn(String sid,
String oid)
throws Exception
Exception
public static Variable loadVariable(String id)
throws Exception
id - the unique ID of the variable, e.g. "uk.ac.data-archive.ddi.2567_V1"
Exception - if variable is not found
public static Study loadDDI(String id)
throws Exception
id - the unique ID of the study, e.g. "uk.ac.data-archive.ddi.4213"
Exception
public static Study loadStudy(String id)
throws Exception
id - the unique ID of the study, e.g. "uk.ac.data-archive.ddi.4213"
Exception
public static Study3 loadStudy3(String id)
throws Exception
Exception
public static Cube loadCube(Study study,
String cubeID)
throws Exception
study - the study that the cube belongs tocubeID - the short name of the cube data file to load without extension, e.g. "nsdkube_C1"
Exceptionpublic static boolean hasWebData(String id)
id - of the object
public static boolean addDatafile(Study study,
String studyID,
String fileID)
throws Exception
study - the studystudyID - the shortID of the study, e.g. "2981"fileID - the ID of the file, e.g. "F2"
Exception
public Variable createDerivedVariable(Study3 study,
String name,
String label,
String comment,
String expression)
throws Exception
Exception
public Variable createDerivedVariableUnprotected(Study3 study,
String name,
String label,
String comment,
String expression)
throws Exception
Exception
public Variable createDerivedVariable(Study3 study,
String name,
String label,
String comment,
String expression,
boolean checkExists)
throws Exception
Exception
public Variable getDerivedVariableByName(Study3 study,
String name)
throws Exception
Exceptionpublic static String getServerURL()
public static String getSecureServerURL()
public static String getObjURL(String shortURL)
shortURL - the last part of the object URL, e.g. "fStudy/uk.ac.data-archive.ddi.2981"
public static String getSecureObjURL(String shortURL)
shortURL - the last part of the object URL, e.g. "fStudy/uk.ac.data-archive.ddi.2981"
public static String getServerObjURL()
public static RDFObject getObj(String shortURL)
throws Exception
shortURL - the last part of the object URL, e.g. "fStudy/uk.ac.data-archive.ddi.2981"
Exception
public static RDFObject reloadObj(String shortURL)
throws Exception
shortURL - the last part of the object URL, e.g. "fStudy/uk.ac.data-archive.ddi.2981"
Exception
public static Catalog getCatalog(String key)
throws Exception
key - the id of the Catalog @returns Catalog
Exception
public static Datafile getDatafile(String key)
throws Exception
key - the id of the Datafile @returns Datafile
Exception
public static Variable getVariable(String key)
throws Exception
key - the id of the variable @returns Variable
Exception
public static EGMSResource getEGMSResource(String key)
throws Exception
key - the id of the EGMSResource @returns EGMSResource
Exception
public static EGMSResource2Ex getEGMSResource2(String key)
throws Exception
Exception
public static Event getEvent(String key)
throws Exception
key - the id of the Event @returns Event
Exception
public static Organisation getOrganisation(String key)
throws Exception
key - the id of the Organisation @returns Organisation
Exception
public static GeographicalUnit getGeographicalUnit(String key)
throws Exception
key - the id of the GeographicalUnit @returns GeographicalUnit
Exception
public static Person getPerson(String key)
throws Exception
key - the id of the Person @returns Person
Exception
public static CategoryStatistic getCategoryStatistic(String key)
throws Exception
key - the id of the category statistic @returns CategoryStatistic
Exception
public static Term getTerm(String key)
throws Exception
key - the id of the term @returns Term
Exception
public static Concept getConcept(String key)
throws Exception
key - the id of the concept @returns Concept
Exception
public static Dimension getDimension(String key)
throws Exception
key - the id of the dimension @returns Dimension
Exception
public static Measure getMeasure(String key)
throws Exception
key - the id of the measure @returns Measure
Exception
public Variable getVariableFromStudy(Study s,
String id)
throws Exception
s - the Study holding the variableid - the id of the Variable to return (i.e. V1, V3)
Exception
public CategoryStatistic getCategoryStatisticFromVariable(Variable s,
String id)
throws Exception
s - the Variable holding the CategoryStatisticid - the id of the CategoryStatistic to return (i.e.
http://155.245.254.45:8080/obj/fCategoryStatistic/uk.ac.data-archive.ddi.4213_4)
Exception
| the category statistic can be retrieved directly knowing its URL |
public Table getTableFromStudy(Study s,
String id)
throws Exception
s - the Study holding the Tableid - the id of the Table to return (i.e. ?)
Exception
public Dimension getDimensionFromCube(Cube s,
String id)
throws Exception
s - the Cube containing the Dimensionid - the id of the dimension to find
Exception
public static List executeRangeQuery(Object target,
String query,
int startHit,
int maxHits,
boolean wantPaths,
int size)
throws Exception
target - the catalog/study to perform the range query onquery - the query to executestartHit - the result position number to start frommaxHits - the number of results to returnwantPaths - return the full object pathssize - the correct number of results to return
Exception
public static List executeRangeQuery(Object target,
String query,
int startHit,
int maxHits,
boolean wantPaths,
int size,
int minQueryHitsPerSec,
int minQueryPathHitsPerSec)
throws Exception
target - the catalog/study to perform the range query onquery - the query to executestartHit - the result position number to start frommaxHits - the number of results to returnwantPaths - return the full object pathssize - the correct number of results to returnminQueryHitsPerSec - a minimum threshold of hits to return per secondminQueryPathHitsPerSec - a minimum threshold of hits to return per second (including paths)
Exception
public static List executeRangeQuery(Object target,
String query,
int startHit,
int maxHits,
boolean wantPaths)
throws Exception
target - the catalog/study to perform the range query onquery - the query to executestartHit - the result position number to start frommaxHits - the number of results to returnwantPaths - return the full object paths
Exception
public void executeRangeQueryAdditivity(Object target,
String query)
throws Exception
target - the catalog/study to perform the range query onquery - the query to execute
Exception
public void performRangeQuery(Catalog target,
String query,
int from,
int maxHits,
boolean paths,
int expectedHits,
long expectedDuration)
throws Exception
target - the catalog on which to perform the queryquery - the query to performfrom - the hit number to return from (in the total results)(0 for all)maxHits - the maximum number of hits to returnpaths - return full path of hits?expectedHits - expected number of resultsexpectedDuration - expected time to do query
Exception
public void removeAllVars(Study3 subject)
throws Exception
Exception
public void removeProperties(RDFObject subject,
URL property)
throws Exception
subject - property -
Exception
public String toString(List list)
throws Exception
Exception
public int findPosition(List list,
Object obj)
throws Exception
Exception
public void addPath(StringBuffer path,
String prop,
List list,
Object obj)
throws Exception
Exception
public void checkPaths(RDFObject from,
RDFObject to,
String paths,
int numPaths)
throws Exception
from - the origin of the pathsto - the destination of the pathspath - the results of a PathsTo operationnumPaths - the expected number of paths
Exception - if the paths number is incorrect or the paths do not lead from the origin to the destination
public void checkPathsTo(String expectedPaths,
String paths,
RDFObject from,
RDFObject to,
int numPaths)
throws Exception
Exception
public void checkPathsTo(String expectedPaths,
String paths,
RDFObject from,
RDFObject to)
throws Exception
Exception
public static boolean repeatCheck(Class cls,
String methodName,
int times,
int interval)
throws Exception
cls - the class where the method is definedmethodName - the name of the methodtimes - the maximum number of times that the check should be repeatedinterval - the interval between checks
Exception
public void waitServer(boolean upOrDown)
throws Exception
upOrDown - true if it has to wait for the server to go up, false if it has to wait for the server to go down
Exception
public static String read(String name)
throws Exception
name - file name
Exception
public static void write(String content,
File file)
throws Exception
content - the data to output to the filefile - the file to write to
Exception
public void rebootServer()
throws Exception
Exception
public void rebootServer(int repetition)
throws Exception
repetition: - the number of time it have to wait for a server to go up and down (if the server has being
rebooted for a policy change, it will restart twice)
Exception
public static void msg(String prefix,
Object msg)
prefix - a string to prefix to the messagemsg - an object on which a toString will be calledpublic static void msg(Object msg)
msg - an object on which a toString will be calledpublic static void warn(String msg)
msg - a string to print with WARN as prefixpublic static void cannotRun(String reason)
reason - the reason why the test cannot be executed
public void untested(String feature)
throws Exception
feature - the name of the feature (method or attribute that is untested)
Exceptionpublic static String toMsg(Collection objects)
objects - a collection of objects
public static String removeServerURL(String result)
throws Exception
result - a string to be edited
Exception
public static String removeCreationDate(String result)
throws Exception
Exception
|
Nesstar SDK | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||