Beispiel #1
0
        public async Task AppRoleBE_UpdateRoleID()
        {
            string  rName = _uniqueKeys.GetKey("Role");
            AppRole ar    = new AppRole(rName);

            Assert.True(await _appRoleAuthEngine.SaveRole(ar));

            // Now read a Role ID for it.
            string roleID = await _appRoleAuthEngine.ReadRoleID(ar.Name);

            // Update the role ID
            Assert.True(await _appRoleAuthEngine.UpdateAppRoleID(ar.Name, "newDomain"));
            string roleIDNew = await _appRoleAuthEngine.ReadRoleID(ar.Name);

            Assert.AreEqual("newDomain", roleIDNew);
        }
Beispiel #2
0
        /// <summary>
        /// This particular test was running consistently 15x slower than any other test.  ~250ms
        /// </summary>
        /// <returns></returns>
        public async Task AppRoleBE_UpdateRoleID()
        {
            string  rName = _uniqueKeys.GetKey("Role");
            AppRole ar    = new AppRole(rName);
            bool    rc    = await _appRoleAuthEngine.SaveRole(ar);

            // Now read a Role ID for it.
            string roleID = await _appRoleAuthEngine.ReadRoleID(ar.Name);

            // Update the role ID
            rc = await _appRoleAuthEngine.UpdateAppRoleID(ar.Name, "newDomain");

            string roleIDNew = await _appRoleAuthEngine.ReadRoleID(ar.Name);

            Assert.AreEqual("newDomain", roleIDNew);
            Console.WriteLine("AppRoleBE_UpdateRoleID Finished OK!");
        }