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)); }
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)); }
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); }