Definition at line 21 of file UserManagementTests.cs.
void Deveel.Data.Security.UserManagementTests.AdminChangesUserPassword |
( |
| ) |
|
|
inline |
void Deveel.Data.Security.UserManagementTests.Authenticate_Fail |
( |
| ) |
|
|
inline |
void Deveel.Data.Security.UserManagementTests.Authenticate_Success |
( |
| ) |
|
|
inline |
Definition at line 49 of file UserManagementTests.cs.
52 Assert.DoesNotThrow(() => user =
Database.Authenticate(
"tester",
"123456789"));
53 Assert.IsNotNull(user);
54 Assert.AreEqual(
"tester", user.Name);
override ISession Deveel.Data.Security.UserManagementTests.CreateAdminSession |
( |
IDatabase |
database | ) |
|
|
inlineprotectedvirtual |
Reimplemented from Deveel.Data.ContextBasedTest.
Definition at line 22 of file UserManagementTests.cs.
23 var testName = TestContext.CurrentContext.Test.Name;
24 if (testName !=
"CreateUser") {
25 using (var session = base.CreateAdminSession(database)) {
26 using (var query = session.CreateQuery()) {
27 query.CreateUser(
"tester",
"123456789");
32 return base.CreateAdminSession(database);
void Deveel.Data.Security.UserManagementTests.CreateExistingUser |
( |
| ) |
|
|
inline |
Definition at line 66 of file UserManagementTests.cs.
68 Assert.DoesNotThrow(() => exists =
Query.UserExists(
"tester"));
69 Assert.IsTrue(exists);
71 Assert.Throws<SecurityException>(() =>
Query.CreateUser(
"tester",
"123456789"));
void Deveel.Data.Security.UserManagementTests.CreateUser |
( |
| ) |
|
|
inline |
Definition at line 36 of file UserManagementTests.cs.
38 Assert.DoesNotThrow(() => user =
Query.CreateUser(
"tester",
"123456"));
39 Assert.IsNotNull(user);
41 Assert.AreEqual(
"tester", user.Name);
44 Assert.DoesNotThrow(() => exists =
Query.UserExists(
"tester"));
45 Assert.IsTrue(exists);
void Deveel.Data.Security.UserManagementTests.DropUser |
( |
| ) |
|
|
inline |
Definition at line 75 of file UserManagementTests.cs.
76 Assert.DoesNotThrow(() =>
Query.DeleteUser(
"tester"));
79 Assert.DoesNotThrow(() =>
Query.UserExists(
"tester"));
80 Assert.IsFalse(exists);
void Deveel.Data.Security.UserManagementTests.LockUser |
( |
| ) |
|
|
inline |
void Deveel.Data.Security.UserManagementTests.SetUserGroups |
( |
| ) |
|
|
inline |
Definition at line 89 of file UserManagementTests.cs.
90 Assert.DoesNotThrow(() =>
Query.AddUserToGroup(
"tester",
"test_group"));
91 Assert.DoesNotThrow(() =>
Query.AddUserToGroup(
"tester", SystemGroups.UserManagerGroup));
94 Assert.DoesNotThrow(() => user =
Query.GetUser(
"tester"));
95 Assert.IsNotNull(user);
97 string[] userGroups = null;
98 Assert.DoesNotThrow(() => userGroups =
Query.GetGroupsUserBelongsTo(user.Name));
99 Assert.IsNotNull(userGroups);
100 Assert.Contains(
"test_group", userGroups);
101 Assert.Contains(SystemGroups.UserManagerGroup, userGroups);
103 Assert.IsTrue(
Query.UserBelongsToGroup(
"tester",
"test_group"));
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-nunit/Deveel.Data.Security/UserManagementTests.cs