public void WeShouldNotBeResolvingTheRecycleBin()
 {
     var root = new MockFolderMediaLocation();
     var location = new MockFolderMediaLocation();
     location.Parent = root;
     location.Path = @"c:\$ReCycle.bin";
     Assert.IsNull(Kernel.Instance.GetItem(location));
 }
Example #2
0
 public void AddParent(RowInfo info, int depth)
 {
     while (depth > 0)
     {
         depth--;
         location = (MockFolderMediaLocation)location.Parent;
     }
     AddSibling(info);
 }
        public void ShouldNotResolve()
        {
            var root = new MockFolderMediaLocation();
            var location = new MockFolderMediaLocation();
            location.Parent = root;
            location.Path = @"c:\A series\Season 08\metadata";

            Assert.IsFalse(location.IsSeriesFolder());

            Assert.IsNull(Kernel.Instance.GetItem(location));
        }
Example #4
0
            public void AddSibling(RowInfo info)
            {
                MockMediaLocation newLocation;

                if (info.IsFolder)
                {
                    newLocation = new MockFolderMediaLocation();
                }
                else
                {
                    newLocation = new MockMediaLocation();
                }
                if (location.Path.Length > 0)
                {
                    newLocation.Path = location.Path + "\\" + info.Path;
                }
                else
                {
                    newLocation.Path = info.Path;
                }
                newLocation.Parent = this.location;
                location.Children.Add(newLocation);
            }
 public void AddSibling(RowInfo info)
 {
     MockMediaLocation newLocation;
     if (info.IsFolder) {
         newLocation = new MockFolderMediaLocation();
     } else {
         newLocation = new MockMediaLocation();
     }
     if (location.Path.Length > 0) {
         newLocation.Path = location.Path + "\\" + info.Path;
     } else {
         newLocation.Path = info.Path;
     }
     newLocation.Parent = this.location;
     location.Children.Add(newLocation);
 }
 public void AddParent(RowInfo info,int depth)
 {
     while (depth > 0) {
         depth--;
         location = (MockFolderMediaLocation)location.Parent;
     }
     AddSibling(info);
 }
 public void AddChild(RowInfo info)
 {
     location = (MockFolderMediaLocation)location.Children.Last();
     AddSibling(info);
 }
Example #8
0
 public void AddChild(RowInfo info)
 {
     location = (MockFolderMediaLocation)location.Children.Last();
     AddSibling(info);
 }