コード例 #1
0
 private void AddFile(FilePath file)
 {
     foreach (KeyValuePair <FilePath, TestNNStorageRetentionManager.TestCaseDescription.FakeRoot
                            > entry in this.dirRoots)
     {
         if (TestNNStorageRetentionManager.FileToPath(file).StartsWith(TestNNStorageRetentionManager
                                                                       .FileToPath(entry.Key)))
         {
             entry.Value.files.AddItem(file);
         }
     }
 }
コード例 #2
0
            /// <exception cref="System.IO.IOException"/>
            internal virtual NNStorage MockStorage()
            {
                IList <Storage.StorageDirectory> sds = Lists.NewArrayList();

                foreach (TestNNStorageRetentionManager.TestCaseDescription.FakeRoot root in this.
                         dirRoots.Values)
                {
                    sds.AddItem(root.MockStorageDir());
                }
                return(TestNNStorageRetentionManager.MockStorageForDirs(Sharpen.Collections.ToArray
                                                                            (sds, new Storage.StorageDirectory[0])));
            }
コード例 #3
0
 internal TestCaseDescription(TestNNStorageRetentionManager _enclosing)
 {
     this._enclosing = _enclosing;
 }
コード例 #4
0
 internal virtual Storage.StorageDirectory MockStorageDir()
 {
     return(FSImageTestUtil.MockStorageDirectory(this.type, false, Sharpen.Collections.ToArray
                                                     (TestNNStorageRetentionManager.FilesToPaths(this.files), new string[0])));
 }