Exemplo n.º 1
0
        public void FindAllUsersTest()
        {
            var userFinder = new AclExpanderUserFinder();
            var users      = userFinder.FindUsers();

            Assert.That(users.Count, Is.EqualTo(7));
        }
Exemplo n.º 2
0
        public void UserNameFilterTest()
        {
            const string userName   = "******";
            var          userFinder = new AclExpanderUserFinder(null, null, userName);

            var users = userFinder.FindUsers();

            Assert.That(users.Count, Is.EqualTo(1));
            Assert.That(users[0].UserName, Is.EqualTo(userName));
        }
Exemplo n.º 3
0
        public void FirstNameFilterTest()
        {
            const string firstName  = "test";
            var          userFinder = new AclExpanderUserFinder(firstName, null, null);

            var users = userFinder.FindUsers();

            Assert.That(users.Count, Is.EqualTo(1));
            Assert.That(users[0].FirstName, Is.EqualTo(firstName));
        }
Exemplo n.º 4
0
        public void LastNameFilterTest()
        {
            const string lastName   = "user2";
            var          userFinder = new AclExpanderUserFinder(null, lastName, null);

            var users = userFinder.FindUsers();

            Assert.That(users.Count, Is.EqualTo(2));
            Assert.That(users[0].LastName, Is.EqualTo(lastName));
            Assert.That(users[1].LastName, Is.EqualTo(lastName));
        }
Exemplo n.º 5
0
        public void AllNamesFilterTest()
        {
            const string firstName  = "User";
            const string lastName   = "Tenant 2";
            const string userName   = "******";
            var          userFinder = new AclExpanderUserFinder(firstName, lastName, userName);

            var users = userFinder.FindUsers();

            Assert.That(users.Count, Is.EqualTo(1));
            Assert.That(users[0].FirstName, Is.EqualTo(firstName));
            Assert.That(users[0].LastName, Is.EqualTo(lastName));
            Assert.That(users[0].UserName, Is.EqualTo(userName));
        }