gluu
公開メンバ関数 | 静的公開メンバ関数 | 非公開メンバ関数 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.gluu.oxtrust.api.uma.UmaScopeTest クラス
org.gluu.oxtrust.api.uma.UmaScopeTest 連携図
Collaboration graph

公開メンバ関数

void setup ()
 
void getAllUmaScopesTest ()
 
void searchScopesTest ()
 
void addUmaScopeTest ()
 
void updateUmaScopeTest ()
 
void getUmaScopeByInumTest ()
 
void deleteUmaScopeTest ()
 

静的公開メンバ関数

static void testConnection ()
 

非公開メンバ関数

UmaScopeDescription generateNewUmaScope ()
 

非公開変数類

UmaScopeRepository scopeRepository
 
String inum
 
String searchPattern = "scim"
 
UmaScopeDescription scope
 

静的非公開変数類

static boolean canRunOtherTest = false
 

詳解

関数詳解

◆ addUmaScopeTest()

void org.gluu.oxtrust.api.uma.UmaScopeTest.addUmaScopeTest ( )
inline
74  {
75  Assume.assumeTrue(canRunOtherTest);
76  System.out.println("==================");
77  System.out.println("Add new uma scope");
78  System.out.println("==================");
79 
81 
82  Assert.assertNotNull(scope);
83  Assert.assertNotNull(scope.getInum());
84  System.out.println("*******************");
85  System.out.println("Done");
86  }
UmaScopeDescription generateNewUmaScope()
Definition: UmaScopeTest.java:138
UmaScopeRepository scopeRepository
Definition: UmaScopeTest.java:16
String getInum()
Definition: UmaScopeDescription.java:75
UmaScopeDescription createUmaScope(UmaScopeDescription scope)
Definition: UmaScopeRepository.java:51
static boolean canRunOtherTest
Definition: UmaScopeTest.java:20
UmaScopeDescription scope
Definition: UmaScopeTest.java:19

◆ deleteUmaScopeTest()

void org.gluu.oxtrust.api.uma.UmaScopeTest.deleteUmaScopeTest ( )
inline
126  {
127  Assume.assumeTrue(canRunOtherTest);
129  inum = scope.getInum();
130 
132 
133  Assert.assertNull(scopeRepository.getUmaScopeByInum(inum));
134  System.out.println("*******************");
135  System.out.println("Done");
136  }
UmaScopeDescription generateNewUmaScope()
Definition: UmaScopeTest.java:138
UmaScopeDescription getUmaScopeByInum(String inum)
Definition: UmaScopeRepository.java:41
UmaScopeRepository scopeRepository
Definition: UmaScopeTest.java:16
String getInum()
Definition: UmaScopeDescription.java:75
UmaScopeDescription createUmaScope(UmaScopeDescription scope)
Definition: UmaScopeRepository.java:51
static boolean canRunOtherTest
Definition: UmaScopeTest.java:20
String inum
Definition: UmaScopeTest.java:17
void deleteUmaScope(String inum)
Definition: UmaScopeRepository.java:35
UmaScopeDescription scope
Definition: UmaScopeTest.java:19

◆ generateNewUmaScope()

UmaScopeDescription org.gluu.oxtrust.api.uma.UmaScopeTest.generateNewUmaScope ( )
inlineprivate
138  {
139  int next1 = new Random().nextInt(100);
140  int next2 = new Random().nextInt(50);
141  String name = "UmaScope" + next1 + next2;
142  UmaScopeDescription scope = new UmaScopeDescription();
143  scope.setDisplayName(name);
144  scope.setDescription(name + " " + name);
145  scope.setId("https://gluu.gasmyr.com/identity/scim");
146  return scope;
147  }
UmaScopeDescription scope
Definition: UmaScopeTest.java:19

◆ getAllUmaScopesTest()

void org.gluu.oxtrust.api.uma.UmaScopeTest.getAllUmaScopesTest ( )
inline
44  {
45  Assume.assumeTrue(canRunOtherTest);
46  System.out.println("==================");
47  System.out.println("List uma scopes");
48  System.out.println("==================");
49 
50  List<UmaScopeDescription> scopes = scopeRepository.getAllUmaScopes();
51 
52  Assert.assertNotNull(scopes);
53  Assert.assertTrue(!scopes.isEmpty());
54  System.out.println("*******************");
55  System.out.println("Done");
56  }
List< UmaScopeDescription > getAllUmaScopes()
Definition: UmaScopeRepository.java:23
UmaScopeRepository scopeRepository
Definition: UmaScopeTest.java:16
static boolean canRunOtherTest
Definition: UmaScopeTest.java:20

◆ getUmaScopeByInumTest()

void org.gluu.oxtrust.api.uma.UmaScopeTest.getUmaScopeByInumTest ( )
inline
109  {
110  Assume.assumeTrue(canRunOtherTest);
111  System.out.println("==================");
112  System.out.println("Get uma scope by inum");
113  System.out.println("==================");
115  inum = scope.getInum();
116 
118 
119  Assert.assertNotNull(scope);
120  Assert.assertEquals(inum, scope.getInum());
121  System.out.println("*******************");
122  System.out.println("Done");
123  }
UmaScopeDescription generateNewUmaScope()
Definition: UmaScopeTest.java:138
UmaScopeDescription getUmaScopeByInum(String inum)
Definition: UmaScopeRepository.java:41
UmaScopeRepository scopeRepository
Definition: UmaScopeTest.java:16
String getInum()
Definition: UmaScopeDescription.java:75
UmaScopeDescription createUmaScope(UmaScopeDescription scope)
Definition: UmaScopeRepository.java:51
static boolean canRunOtherTest
Definition: UmaScopeTest.java:20
String inum
Definition: UmaScopeTest.java:17
UmaScopeDescription scope
Definition: UmaScopeTest.java:19

◆ searchScopesTest()

void org.gluu.oxtrust.api.uma.UmaScopeTest.searchScopesTest ( )
inline
59  {
60  Assume.assumeTrue(canRunOtherTest);
61  System.out.println("==================");
62  System.out.println("Search uma scopes");
63  System.out.println("==================");
64 
65  List<UmaScopeDescription> scopesFound = scopeRepository.searchUmaScopes(searchPattern, 10);
66 
67  Assert.assertNotNull(scopesFound);
68  Assert.assertTrue(!scopesFound.isEmpty());
69  System.out.println("*******************");
70  System.out.println("Done");
71  }
List< UmaScopeDescription > searchUmaScopes(String searchPattern, int size)
Definition: UmaScopeRepository.java:29
UmaScopeRepository scopeRepository
Definition: UmaScopeTest.java:16
static boolean canRunOtherTest
Definition: UmaScopeTest.java:20
String searchPattern
Definition: UmaScopeTest.java:18

◆ setup()

void org.gluu.oxtrust.api.uma.UmaScopeTest.setup ( )
inline
38  {
39  Assume.assumeTrue(canRunOtherTest);
40  scopeRepository = new UmaScopeRepository();
41  }
UmaScopeRepository scopeRepository
Definition: UmaScopeTest.java:16
static boolean canRunOtherTest
Definition: UmaScopeTest.java:20

◆ testConnection()

static void org.gluu.oxtrust.api.uma.UmaScopeTest.testConnection ( )
inlinestatic
23  {
24  try {
25  PeopleRepository peopleRepositoryImpl = new PeopleRepository();
26  peopleRepositoryImpl.searchPersons("user");
27  canRunOtherTest = true;
28  } catch (Exception e) {
29  System.out.println("***********************");
30  System.out.println("ERROR OCCURS: POSSIBLE CAUSES");
31  System.out.println("1. MAKE SURE THE HOSTNAME DEFINE IN CONFIGURATION FILE IS RESOLVABLE");
32  System.out.println("2. MAKE SURE THE CERTS FILE ARE IMPORTED IN JAVA KEY STORE");
33  System.out.println("***********************");
34  }
35  }
static boolean canRunOtherTest
Definition: UmaScopeTest.java:20

◆ updateUmaScopeTest()

void org.gluu.oxtrust.api.uma.UmaScopeTest.updateUmaScopeTest ( )
inline
89  {
90  Assume.assumeTrue(canRunOtherTest);
91  System.out.println("==================");
92  System.out.println("Update new uma scope");
93  System.out.println("==================");
95  inum = scope.getInum();
96  String displayName = "UpdatedDisplayName";
97  scope.setDisplayName(displayName);
98 
100 
101  Assert.assertNotNull(scope);
102  Assert.assertEquals(inum, scope.getInum());
103  Assert.assertEquals(displayName, scope.getDisplayName());
104  System.out.println("*******************");
105  System.out.println("Done");
106  }
void setDisplayName(String p_displayName)
Definition: UmaScopeDescription.java:87
UmaScopeDescription generateNewUmaScope()
Definition: UmaScopeTest.java:138
UmaScopeRepository scopeRepository
Definition: UmaScopeTest.java:16
String getInum()
Definition: UmaScopeDescription.java:75
UmaScopeDescription updateScope(UmaScopeDescription scope)
Definition: UmaScopeRepository.java:57
UmaScopeDescription createUmaScope(UmaScopeDescription scope)
Definition: UmaScopeRepository.java:51
String getDisplayName()
Definition: UmaScopeDescription.java:83
static boolean canRunOtherTest
Definition: UmaScopeTest.java:20
String inum
Definition: UmaScopeTest.java:17
UmaScopeDescription scope
Definition: UmaScopeTest.java:19

メンバ詳解

◆ canRunOtherTest

boolean org.gluu.oxtrust.api.uma.UmaScopeTest.canRunOtherTest = false
staticprivate

◆ inum

String org.gluu.oxtrust.api.uma.UmaScopeTest.inum
private

◆ scope

UmaScopeDescription org.gluu.oxtrust.api.uma.UmaScopeTest.scope
private

◆ scopeRepository

UmaScopeRepository org.gluu.oxtrust.api.uma.UmaScopeTest.scopeRepository
private

◆ searchPattern

String org.gluu.oxtrust.api.uma.UmaScopeTest.searchPattern = "scim"
private

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