Package com.sun.javatest.interview
Class TestsInterview
- java.lang.Object
-
- com.sun.interview.Interview
-
- com.sun.javatest.interview.TestsInterview
-
- All Implemented Interfaces:
Parameters.MutableTestsParameters
,Parameters.TestsParameters
public class TestsInterview extends Interview implements Parameters.MutableTestsParameters
This interview collects the "initial files" parameter. It is normally used as one of a series of sub-interviews that collect the parameter information for a test run.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TestsInterview.TreeOrFileChoiceQuestion
Represents Tests Selection Choice Question.-
Nested classes/interfaces inherited from class com.sun.interview.Interview
Interview.BadHelpFault, Interview.Fault, Interview.HelpNotFoundFault, Interview.NotOnPathFault, Interview.Observer
-
-
Field Summary
Fields Modifier and Type Field Description protected Question
cachedTestsError
protected Question
qEnd
protected FileQuestion
qTestFile
protected TreeQuestion
qTestTree
protected TestsInterview.TreeOrFileChoiceQuestion
qTreeOrFile
-
Fields inherited from class com.sun.interview.Interview
EXPORT_IGNORE_ALL_EXCEPTIONS, EXPORT_IGNORE_NO_EXCEPTIONS, EXPORT_IGNORE_RUNTIME_EXCEPTIONS, EXTERNAL_PREF, helpSetFactory, INTERVIEW, LOCALE, MARKERS, MARKERS_PREF, QUESTION, SEMANTIC_MAX_VERSION, SEMANTIC_PRE_32, SEMANTIC_VERSION_32, SEMANTIC_VERSION_43, SEMANTIC_VERSION_50, TEMPLATE_PREF
-
Fields inherited from interface com.sun.javatest.Parameters.MutableTestsParameters
ALL_TESTS, SPECIFIED_TESTS
-
-
Constructor Summary
Constructors Constructor Description TestsInterview(InterviewParameters parent)
Create an interview.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TestsInterview.TreeOrFileChoiceQuestion
createTreeOrFileChoiceQuestion(Interview interview, java.lang.String tag)
creation of {#link TreeOrFileChoiceQuestion} is extracted into separate class to enable 'hooks' and return {#link TreeOrFileChoiceQuestion} sub classvoid
dispose()
java.lang.String[]
getSpecifiedTests()
Get the set of specified tests to be used as the set of tests to be run when the mode is set to SPECIFIED_TESTS.java.lang.String[]
getTests()
Get the initial files from the interview.protected java.lang.String[]
getTests(java.io.File file)
int
getTestsMode()
Get the current mode for how the tests are specified.void
setSpecifiedTests(java.lang.String[] tests)
Set the specified tests to be be run when the mode is set to SPECIFIED_TESTS.void
setTests(java.lang.String[] tests)
Specify the tests to be executed.void
setTestsMode(int mode)
Set the current mode for how the tests are specified.-
Methods inherited from class com.sun.interview.Interview
addObserver, callInterview, clear, clearMarkedResponses, containsObserver, createChecklist, createChecklistItem, createChecklistItem, createChecklistItem, export, getAllQuestions, getCurrentQuestion, getDefaultImage, getExportIgnoreExceptionPolicy, getExternalProperties, getFirstQuestion, getHelpSet, getInterview, getInterviewSemantics, getParent, getPath, getPathToCurrent, getPropertyKeys, getQuestions, getRawPath, getResourceBundle, getResourceString, getResourceString, getRoot, getTag, getTitle, hasNext, hasValidNext, isChecklistEmpty, isChecksumValid, isEdited, isFinishable, isFirst, isInterviewFinishable, isLast, isRoot, isStarted, iteratePath, iteratePathToCurrent, last, load, load, next, pathContains, pathContains, prev, propagateTemplateForAll, readLocale, removeAllMarkers, removeMarkers, removeObserver, reset, retrieveProperty, retrieveTemplateKeys, retrieveTemplateProperty, save, setBaseTag, setCurrentQuestion, setDefaultImage, setEdited, setExportIgnoreExceptionPolicy, setFirstQuestion, setHelpSet, setHelpSet, setHelpSet, setInterviewSemantics, setResourceBundle, setResourceBundle, setTitle, storeProperty, storeTemplateProperties, storeTemplateProperty, updatePath, updatePath, verifyPathContains, writeLocale
-
-
-
-
Field Detail
-
qTreeOrFile
protected TestsInterview.TreeOrFileChoiceQuestion qTreeOrFile
-
qTestFile
protected FileQuestion qTestFile
-
qTestTree
protected TreeQuestion qTestTree
-
cachedTestsError
protected Question cachedTestsError
-
qEnd
protected Question qEnd
-
-
Constructor Detail
-
TestsInterview
public TestsInterview(InterviewParameters parent) throws Interview.Fault
Create an interview.- Parameters:
parent
- The parent interview of which this is a child.- Throws:
Interview.Fault
- if there is a problem while creating the interview.
-
-
Method Detail
-
dispose
public void dispose()
-
getTests
public java.lang.String[] getTests()
Get the initial files from the interview.- Specified by:
getTests
in interfaceParameters.TestsParameters
- Returns:
- a list of initial files to be read, to determine the tests to be selected
- See Also:
setTests(java.lang.String[])
-
setTests
public void setTests(java.lang.String[] tests)
Description copied from interface:Parameters.MutableTestsParameters
Specify the tests to be executed.- Specified by:
setTests
in interfaceParameters.MutableTestsParameters
- Parameters:
tests
- If null, set the tests mode to ALL_TESTS; if not null, set the tests mode to SPECIFIED_TESTS, and set the specified tests.- See Also:
Parameters.TestsParameters.getTests()
-
getTestsMode
public int getTestsMode()
Description copied from interface:Parameters.MutableTestsParameters
Get the current mode for how the tests are specified.- Specified by:
getTestsMode
in interfaceParameters.MutableTestsParameters
- Returns:
- ALL_TESTS if all tests are to be run, irrespective of the selected tests, or SPECIFIED_TESTS if a set of specified tests are to be run.
- See Also:
Parameters.MutableTestsParameters.setTestsMode(int)
,Parameters.MutableTestsParameters.ALL_TESTS
,Parameters.MutableTestsParameters.SPECIFIED_TESTS
-
setTestsMode
public void setTestsMode(int mode)
Description copied from interface:Parameters.MutableTestsParameters
Set the current mode for how the tests are specified.- Specified by:
setTestsMode
in interfaceParameters.MutableTestsParameters
- Parameters:
mode
- use ALL_TESTS if all tests are to be run, irrespective of the selected tests, or SPECIFIED_TESTS if a set of specified tests are to be run.- See Also:
Parameters.MutableTestsParameters.getTestsMode()
,Parameters.MutableTestsParameters.ALL_TESTS
,Parameters.MutableTestsParameters.SPECIFIED_TESTS
-
getSpecifiedTests
public java.lang.String[] getSpecifiedTests()
Description copied from interface:Parameters.MutableTestsParameters
Get the set of specified tests to be used as the set of tests to be run when the mode is set to SPECIFIED_TESTS. When the mode is set to ALL_TESTS, the specified tests are remembered, but not used, until the mode is set back to SPECIFIED_TESTS.- Specified by:
getSpecifiedTests
in interfaceParameters.MutableTestsParameters
- Returns:
- an array of specified tests to be used as the set of tests to be run when the mode is set to SPECIFIED_TESTS.
- See Also:
Parameters.MutableTestsParameters.setSpecifiedTests(java.lang.String[])
,Parameters.TestsParameters.getTests()
-
setSpecifiedTests
public void setSpecifiedTests(java.lang.String[] tests)
Description copied from interface:Parameters.MutableTestsParameters
Set the specified tests to be be run when the mode is set to SPECIFIED_TESTS. When the mode is set to ALL_TESTS, these tests are remembered, but not used, until the mode is set back to SPECIFIED_TESTS.- Specified by:
setSpecifiedTests
in interfaceParameters.MutableTestsParameters
- Parameters:
tests
- an array of paths identifying the tests to be run- See Also:
Parameters.MutableTestsParameters.getSpecifiedTests()
,Parameters.TestsParameters.getTests()
-
createTreeOrFileChoiceQuestion
protected TestsInterview.TreeOrFileChoiceQuestion createTreeOrFileChoiceQuestion(Interview interview, java.lang.String tag)
creation of {#link TreeOrFileChoiceQuestion} is extracted into separate class to enable 'hooks' and return {#link TreeOrFileChoiceQuestion} sub class- Parameters:
interview
-tag
-- Returns:
- Instance of TreeOrFileChoiceQuestion
-
getTests
protected java.lang.String[] getTests(java.io.File file)
-
-