public void Search_WithDisplayNameConstraint_DontMatchOtherValue() { var expected = AbstractRoleDefinition.FindAll().AsEnumerable().ToArray(); Assert.That(expected.Length, Is.EqualTo(2)); var actual = _searchService.Search(null, _property, CreateSecurityManagerSearchArguments("QualityManager")); Assert.That(actual.Length, Is.EqualTo(1)); }
public void Search() { var expected = AbstractRoleDefinition.FindAll().ToArray(); Assert.That(expected, Is.Not.Empty); IBusinessObject[] actual = _searchService.Search(null, _property, CreateSecurityManagerSearchArguments(null)); Assert.That(actual, Is.EqualTo(expected)); }
public void Search_WithDisplayNameConstraint_FindDisplayNameCaseInsensitive() { var expected = AbstractRoleDefinition.FindAll().AsEnumerable().Where(r => r.DisplayName.Contains("QualityManager")).ToArray(); Assert.That(expected.Length, Is.EqualTo(1)); var actual = _searchService.Search(null, _property, CreateSecurityManagerSearchArguments("qualitymanager")); Assert.That(actual, Is.EquivalentTo(expected)); }
public void FindAll_TwoFound() { var result = AbstractRoleDefinition.FindAll(); Assert.That(result.Count, Is.EqualTo(2)); for (int i = 0; i < result.Count; i++) { AbstractRoleDefinition abstractRole = result[i]; Assert.AreEqual(i, abstractRole.Index, "Wrong Index."); } }
public void FindAll_EmptyResult () { DomainObjectCollection result = AbstractRoleDefinition.FindAll(); Assert.That (result.Count, Is.EqualTo (0)); }