GetLocalPath() public method

Gets the local path. Return null if not exists.
public GetLocalPath ( IMappedObject mappedObject ) : string
mappedObject IMappedObject /// Mapped object. Must not be null. ///
return string
        public void GetLocalPathOfNonExistingEntryReturnsNull([Values(true, false)]bool withValidation) {
            var matcher = new Mock<IPathMatcher>();
            matcher.Setup(m => m.LocalTargetRootPath).Returns(Path.GetTempPath());
            var storage = new MetaDataStorage(this.engine, matcher.Object, withValidation);
            string id = "nonExistingId";
            var rootFolder = new MappedObject("name", "otherId", MappedObjectType.Folder, null, null);
            var otherFolder = new MappedObject("name", id, MappedObjectType.Folder, "otherId", null);
            storage.SaveMappedObject(rootFolder);

            Assert.That(storage.GetLocalPath(otherFolder), Is.Null);
        }
 public void GetLocalPathThrowsExceptionOnNonExistingIdInObject([Values(true, false)]bool withValidation) {
     var storage = new MetaDataStorage(this.engine, this.matcher, withValidation);
     Assert.Throws<ArgumentException>(() => storage.GetLocalPath(Mock.Of<IMappedObject>()));
 }
        public void GetLocalPath([Values(true, false)]bool withValidation) {
            var matcher = new Mock<IPathMatcher>();
            matcher.Setup(m => m.LocalTargetRootPath).Returns(Path.GetTempPath());
            var storage = new MetaDataStorage(this.engine, matcher.Object, withValidation);
            string id = "remoteId";
            var rootFolder = new MappedObject("name", id, MappedObjectType.Folder, null, null);
            storage.SaveMappedObject(rootFolder);

            string path = storage.GetLocalPath(rootFolder);

            Assert.That(path, Is.EqualTo(Path.Combine(Path.GetTempPath(), "name")));
        }
 public void GetLocalPathThrowsExceptionOnNullArgument([Values(true, false)]bool withValidation) {
     var storage = new MetaDataStorage(this.engine, this.matcher, withValidation);
     Assert.Throws<ArgumentNullException>(() => storage.GetLocalPath(null));
 }