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

公開メンバ関数

void testSearchPersons (final String pattern) throws Exception
 
void testGetPersonByUid (final String personUid) 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
 

非公開変数類

IPersonService personService
 

詳解

Test class for PersonService

著者
Yuriy Movchan Date: 10.14.2010

関数詳解

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

◆ testGetPersonByUid()

void org.gluu.oxtrust.service.test.PersonServiceTest.testGetPersonByUid ( final String  personUid) throws Exception
inline
50  {
51  GluuCustomPerson person = personService.getPersonByUid(personUid);
52 
53  assertNotNull(person, "Failed to find person");
54  assertEquals(person.getUid(), personUid);
55  }
abstract GluuCustomPerson getPersonByUid(String uid)
IPersonService personService
Definition: PersonServiceTest.java:32

◆ testSearchPersons()

void org.gluu.oxtrust.service.test.PersonServiceTest.testSearchPersons ( final String  pattern) throws Exception
inline

Test search persons by pattern

例外
Exception
41  {
42  List<GluuCustomPerson> persons = personService.searchPersons(pattern, OxTrustConstants.searchPersonsSizeLimit);
43 
44  assertNotNull(persons, "Failed to find persons");
45  assertTrue(persons.size() > 0, "Failed to find persons");
46  }
abstract List< GluuCustomPerson > searchPersons(String pattern, int sizeLimit)
IPersonService personService
Definition: PersonServiceTest.java:32

メンバ詳解

◆ personService

IPersonService org.gluu.oxtrust.service.test.PersonServiceTest.personService
private

◆ testData

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

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