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