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)); }
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)); }
public void FindAll() { DatabaseFixtures dbFixtures = new DatabaseFixtures(); dbFixtures.CreateAndCommitOrganizationalStructureWithTwoTenants(ClientTransaction.CreateRootTransaction()); var groupTypes = GroupType.FindAll(); Assert.That(groupTypes.Count(), Is.EqualTo(2)); }