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

公開メンバ関数

void loadAttributes1 (@Optional @ArquillianResteasyResource("restv1") final WebTarget webTarget)
 
void loadAttributes2 (@Optional @ArquillianResteasyResource("restv1") final ResteasyWebTarget webTarget)
 
void loadAttributes3 (@Optional @ArquillianResteasyResource("restv1") final AttributeProxy attributeProxy)
 
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
 

非公開変数類

URI url
 

詳解

著者
Yuriy Movchan
Yuriy Movchan Date: 07/12/2018

関数詳解

◆ 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)
inlinestaticinherited
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  }

◆ loadAttributes1()

void org.gluu.oxtrust.api.attributes.test.AttributeWebResourceTest.loadAttributes1 ( @Optional @ArquillianResteasyResource("restv1") final WebTarget  webTarget)
inline

Get all attributes via WebTarget

48  {
49 
50  Invocation.Builder builder= webTarget.path("/api/attributes").request(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON);
51  List<GluuAttributeApi> allAttributes = builder.get(List.class);
52 
53  assertNotNull(allAttributes, "Failed to get all attributes");
54  assertTrue(allAttributes.size() > 0, "List with all attributes should be not empty");
55  }

◆ loadAttributes2()

void org.gluu.oxtrust.api.attributes.test.AttributeWebResourceTest.loadAttributes2 ( @Optional @ArquillianResteasyResource("restv1") final ResteasyWebTarget  webTarget)
inline

Get all attributes via ResteasyWebTarget

64  {
65  AttributeProxy attributeProxy = webTarget.proxy(AttributeProxy.class);
66  List<GluuAttributeApi> allAttributes = attributeProxy.getAllAttributes();
67 
68  assertNotNull(allAttributes, "Failed to get all attributes");
69  assertTrue(allAttributes.size() > 0, "List with all attributes should be not empty");
70  }

◆ loadAttributes3()

void org.gluu.oxtrust.api.attributes.test.AttributeWebResourceTest.loadAttributes3 ( @Optional @ArquillianResteasyResource("restv1") final AttributeProxy  attributeProxy)
inline

Get all attributes via Proxy

79  {
80  List<GluuAttributeApi> allAttributes = attributeProxy.getAllAttributes();
81 
82  assertNotNull(allAttributes, "Failed to get all attributes");
83  assertTrue(allAttributes.size() > 0, "List with all attributes should be not empty");
84  }

◆ output()

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

◆ showResponse() [1/2]

void org.gluu.oxtrust.action.test.BaseTest.showResponse ( String  title,
Response  response 
)
inlineinherited
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 
)
inlinestaticinherited
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)
inlineinherited
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

◆ url

URI org.gluu.oxtrust.api.attributes.test.AttributeWebResourceTest.url
private

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