GetChildren() public method

Gets the children of the given parent object.
public GetChildren ( IMappedObject parent ) : List
parent IMappedObject /// Parent of the children. ///
return List
コード例 #1
0
        public void GetChildrenReturnsEmptyListIfNoChildrenAreAvailable([Values(true, false)]bool withValidation) {
            var storage = new MetaDataStorage(this.engine, this.matcher, withValidation);
            var folder = new MappedObject("name", "id", MappedObjectType.Folder, null, null);
            storage.SaveMappedObject(folder);

            Assert.That(storage.GetChildren(folder).Count == 0);
        }
コード例 #2
0
 public void GetChildrenThrowsExceptionOnNullArgument([Values(true, false)]bool withValidation) {
     var storage = new MetaDataStorage(this.engine, this.matcher, withValidation);
     Assert.Throws<ArgumentNullException>(() => storage.GetChildren(null));
 }
コード例 #3
0
 public void GetChildrenThrowsExceptionIfMappedObjectDoesNotContainsId([Values(true, false)]bool withValidation) {
     var storage = new MetaDataStorage(this.engine, this.matcher, withValidation);
     Assert.Throws<ArgumentException>(() => storage.GetChildren(Mock.Of<IMappedObject>()));
 }
コード例 #4
0
 public void GetChildrenOfNonExistingParentMustThrowException([Values(true, false)]bool withValidation) {
     var storage = new MetaDataStorage(this.engine, this.matcher, withValidation);
     Assert.Throws<EntryNotFoundException>(() => storage.GetChildren(Mock.Of<IMappedObject>(o => o.RemoteObjectId == "DOESNOTEXIST")));
 }