Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        public void GetChildrenThrowsExceptionIfMappedObjectDoesNotContainsId()
        {
            var storage = new MetaDataStorage(this.engine, this.matcher);

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

            storage.GetChildren(null);
        }
Ejemplo n.º 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")));
        }
Ejemplo n.º 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>()));
        }
Ejemplo n.º 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));
        }