public class TestEnvContext
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TestEnvContext.Fault
This exception is to report problems using
TestEnvContext objects. |
Constructor and Description |
---|
TestEnvContext(java.io.File[] files)
Create a context from a set of environment (.jte) files.
|
TestEnvContext(java.util.Map[] tables,
java.lang.String[] tableNames)
Create a context from a specified set of named tables.
|
TestEnvContext(java.util.Map table,
java.lang.String tableName)
Create a context from a named table.
|
Modifier and Type | Method and Description |
---|---|
TestEnvironment |
getEnv(java.lang.String name)
Get a environment from this set of environments.
|
java.lang.String[] |
getEnvMenuNames()
Get an array containing all the names of environments that should
appear in a menu of valid environment names.
|
java.lang.String[] |
getEnvNames()
Get an array containing all the names of environments in this set of
environments.
|
boolean |
isValidEnv(java.lang.String name)
Check if a name matches the name of one of the environments in this
set of environments.
|
public TestEnvContext(java.io.File[] files) throws TestEnvContext.Fault
files
- The environment files to readTestEnvContext.Fault
- if an error is found while reading the filespublic TestEnvContext(java.util.Map[] tables, java.lang.String[] tableNames)
tables
- An array of tables giving the properties to be readtableNames
- An array of names, one for each table in the tables array,
that will be used to identify the source of the properties in any
environments that are createdpublic TestEnvContext(java.util.Map table, java.lang.String tableName)
table
- A table giving the properties to be readtableName
- The name that will be used to identify the source
of the properties in any environments that are created.public TestEnvironment getEnv(java.lang.String name) throws TestEnvironment.Fault
name
- the name of the desired environmentTestEnvironment.Fault
- if there is a problem creating
the specified environmentpublic boolean isValidEnv(java.lang.String name)
name
- the name to checkpublic java.lang.String[] getEnvNames()
public java.lang.String[] getEnvMenuNames()
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.