Esempio n. 1
0
        public void Search()
        {
            var expected = GroupType.FindAll().ToArray();

            Assert.That(expected, Is.Not.Empty);

            var actual = _searchService.Search(null, _property, CreateSecurityManagerSearchArguments(null));

            Assert.That(actual, Is.EqualTo(expected));
        }
Esempio n. 2
0
        public void Search_WithDisplayNameConstraint_FindNameContainingPrefix()
        {
            var expected = GroupType.FindAll().Where(g => g.Name.Contains("groupType")).ToArray();

            Assert.That(expected.Length, Is.GreaterThan(1));

            var actual = _searchService.Search(null, _property, CreateSecurityManagerSearchArguments("groupType"));

            Assert.That(actual, Is.EquivalentTo(expected));
        }
Esempio n. 3
0
        public void FindAll()
        {
            DatabaseFixtures dbFixtures = new DatabaseFixtures();

            dbFixtures.CreateAndCommitOrganizationalStructureWithTwoTenants(ClientTransaction.CreateRootTransaction());

            var groupTypes = GroupType.FindAll();

            Assert.That(groupTypes.Count(), Is.EqualTo(2));
        }