gluu
公開メンバ関数 | 静的公開メンバ関数 | 静的公開変数類 | 全メンバ一覧
org.gluu.oxtrust.action.test.BaseTest クラスabstract
org.gluu.oxtrust.action.test.BaseTest の継承関係図
Inheritance graph
org.gluu.oxtrust.action.test.BaseTest 連携図
Collaboration graph

公開メンバ関数

void showTitle (String title)
 
void showResponse (String title, Response response)
 
void initTestSuite (ITestContext context) throws FileNotFoundException, IOException
 

静的公開メンバ関数

static void showResponse (String title, Response response, Object entity)
 
static void fails (Throwable e)
 
static void output (String p_msg)
 
static Archive<?> createDeployment ()
 

静的公開変数類

static FileConfiguration testData
 

詳解

著者
Yuriy Movchan Date: 10.10.2011

関数詳解

◆ createDeployment()

static Archive<?> org.gluu.oxtrust.action.test.ConfigurableTest.createDeployment ( )
inlinestaticinherited
41  {
42  return Deployments.createDeployment();
43  }

◆ fails()

static void org.gluu.oxtrust.action.test.BaseTest.fails ( Throwable  e)
inlinestatic
49  {
50  Assert.fail(e.getMessage(), e);
51  }

◆ initTestSuite()

void org.gluu.oxtrust.action.test.ConfigurableTest.initTestSuite ( ITestContext  context) throws FileNotFoundException, IOException
inlineinherited
46  {
47  Reporter.log("Invoked init test suite method", true);
48 
49  String propertiesFile = context.getCurrentXmlTest().getParameter("propertiesFile");
50  if (StringHelper.isEmpty(propertiesFile)) {
51  propertiesFile = "target/test-classes/testng.properties";
52  }
53 
54  // Load test parameters
55  FileInputStream conf = new FileInputStream(propertiesFile);
56  Properties prop;
57  try {
58  prop = new Properties();
59  prop.load(conf);
60  } finally {
61  IOUtils.closeQuietly(conf);
62  }
63 
64  Map<String, String> parameters = new HashMap<String, String>();
65  for (Entry<Object, Object> entry : prop.entrySet()) {
66  Object key = entry.getKey();
67  Object value = entry.getValue();
68 
69  if (StringHelper.isEmptyString(key) || StringHelper.isEmptyString(value)) {
70  continue;
71  }
72  parameters.put(key.toString(), value.toString());
73  }
74 
75  // Override test parameters
76  context.getSuite().getXmlSuite().setParameters(parameters);
77  }

◆ output()

static void org.gluu.oxtrust.action.test.BaseTest.output ( String  p_msg)
inlinestatic
53  {
54  System.out.println(p_msg);
55  }

◆ showResponse() [1/2]

void org.gluu.oxtrust.action.test.BaseTest.showResponse ( String  title,
Response  response 
)
inline
29  {
30  showResponse(title, response, null);
31  }
void showResponse(String title, Response response)
Definition: BaseTest.java:29

◆ showResponse() [2/2]

static void org.gluu.oxtrust.action.test.BaseTest.showResponse ( String  title,
Response  response,
Object  entity 
)
inlinestatic
33  {
34  System.out.println(" ");
35  System.out.println("RESPONSE FOR: " + title);
36  System.out.println(response.getStatus());
37  for (Entry<String, List<Object>> headers : response.getHeaders().entrySet()) {
38  String headerName = headers.getKey();
39  System.out.println(headerName + ": " + headers.getValue());
40  }
41 
42  if (entity != null) {
43  System.out.println(entity.toString().replace("\\n", "\n"));
44  }
45  System.out.println(" ");
46  System.out.println("Status message: " + response.getStatus());
47  }

◆ showTitle()

void org.gluu.oxtrust.action.test.BaseTest.showTitle ( String  title)
inline
21  {
22  title = "TEST: " + title;
23 
24  System.out.println("#######################################################");
25  System.out.println(title);
26  System.out.println("#######################################################");
27  }

メンバ詳解

◆ testData

FileConfiguration org.gluu.oxtrust.action.test.ConfigurableTest.testData
staticinherited

このクラス詳解は次のファイルから抽出されました: