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

公開メンバ関数

void testIsMemberOrOwner (final String groupDn, final String ownerDn, final String nonMemberDn) throws Exception
 
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
 

非公開変数類

IGroupService groupService
 

詳解

Test class for GroupService

著者
Yuriy Movchan Date: 02/06/2014

関数詳解

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

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

◆ testIsMemberOrOwner()

void org.gluu.oxtrust.service.test.GroupServiceTest.testIsMemberOrOwner ( final String  groupDn,
final String  ownerDn,
final String  nonMemberDn 
) throws Exception
inline
32  {
33  boolean isMemberOrOwner = groupService.isMemberOrOwner(groupDn, ownerDn);
34  assertTrue(isMemberOrOwner, String.format("Failed to confirm group '%s' owner '%s'", groupDn, ownerDn));
35 
36  boolean isMemberOrOwnerWrong = groupService.isMemberOrOwner(groupDn, nonMemberDn);
37  assertFalse(isMemberOrOwnerWrong, "Wrong person recognised as group member");
38  }
IGroupService groupService
Definition: GroupServiceTest.java:27
abstract boolean isMemberOrOwner(String groupDN, String personDN)

メンバ詳解

◆ groupService

IGroupService org.gluu.oxtrust.service.test.GroupServiceTest.groupService
private

◆ testData

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

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