コード例 #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));
        }