Exemplo n.º 1
0
        private void CreateQaUser()
        {
            var user = Builder <UrdmsUser> .CreateNew().With(o => o.CurtinId = QaId).Build();

            UserIs.AuthenticatedAs(_autoSubstitute, QaId, new[] { ApplicationRole.QaApprover.GetDescription() });
            _lookup.GetUser(Arg.Is(QaId)).Returns(user);
        }
        private void CreateUser(string userId)
        {
            var user = Builder <UrdmsUser> .CreateNew().With(o => o.CurtinId = userId).Build();

            UserIs.AuthenticatedAs(_autoSubstitute, userId, new[] { "Administrators" });
            _lookup.GetUser(Arg.Is(userId)).Returns(user);
        }
Exemplo n.º 3
0
        private void CreateUser(string userId, string role = null)
        {
            var user = Builder <UrdmsUser> .CreateNew().With(o => o.CurtinId = userId).Build();

            if (!string.IsNullOrEmpty(role))
            {
                UserIs.AuthenticatedAs(_autoSubstitute, userId, new[] { role });
            }
            _lookup.GetUser(Arg.Is(userId)).Returns(user);
        }