示例#1
0
        public void GetChildrenReturnsEmptyListIfNoChildrenAreAvailable()
        {
            var storage = new MetaDataStorage(this.engine, this.matcher);
            var folder  = new MappedObject("name", "id", MappedObjectType.Folder, null, null);

            storage.SaveMappedObject(folder);

            Assert.That(storage.GetChildren(folder).Count == 0);
        }
示例#2
0
        public void GetChildrenThrowsExceptionIfMappedObjectDoesNotContainsId()
        {
            var storage = new MetaDataStorage(this.engine, this.matcher);

            storage.GetChildren(Mock.Of <IMappedObject>());
        }
示例#3
0
        public void GetChildrenThrowsExceptionOnNullArgument()
        {
            var storage = new MetaDataStorage(this.engine, this.matcher);

            storage.GetChildren(null);
        }
示例#4
0
        public void GetChildrenOfNonExistingParentMustThrowException()
        {
            var storage = new MetaDataStorage(this.engine, this.matcher);

            Assert.Throws <EntryNotFoundException>(() => storage.GetChildren(Mock.Of <IMappedObject>(o => o.RemoteObjectId == "DOESNOTEXIST")));
        }
示例#5
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>()));
        }
示例#6
0
        public void GetChildrenThrowsExceptionOnNullArgument([Values(true, false)] bool withValidation)
        {
            var storage = new MetaDataStorage(this.engine, this.matcher, withValidation);

            Assert.Throws <ArgumentNullException>(() => storage.GetChildren(null));
        }