public void TestCreateDirectory()
 {
     if (_pm.DirectoryExists("newdir"))
     {
         _pm.DeleteDirectory("newdir");
     }
     Assert.IsFalse(_pm.DirectoryExists("newdir"));
     _pm.CreateDirectory("newdir");
     Assert.IsTrue(_pm.DirectoryExists("newdir"));
 }
Ejemplo n.º 2
0
 private void EnsureEmptyDirectory(IPersistenceManager pm, string dirName)
 {
     if (pm.DirectoryExists(dirName))
     {
         pm.DeleteDirectory(dirName);
     }
     Thread.Sleep(10);
     pm.CreateDirectory(dirName);
 }
Ejemplo n.º 3
0
        public void TestCreateAndDeleteDirectory()
        {
            string dirName = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), "CreateDirectory_" + DateTime.Now.Ticks);

            Assert.False(_pm.DirectoryExists(dirName), "Directory exists before it is created");
            _pm.CreateDirectory(dirName);
            Assert.True(_pm.DirectoryExists(dirName), "Directory does not exist after creation");
            _pm.DeleteDirectory(dirName);
            Assert.False(_pm.DirectoryExists(dirName), "Directory exists after deletion");
        }
Ejemplo n.º 4
0
        public void TestCreateAndDeleteDirectory()
        {
            string dirName = Path.Combine(TestConfiguration.StoreLocation, "CreateDirectory_" + DateTime.Now.Ticks);

            Assert.False(_pm.DirectoryExists(dirName), "Directory exists before it is created");
            _pm.CreateDirectory(dirName);
            Assert.True(_pm.DirectoryExists(dirName), "Directory does not exist after creation");
            _pm.DeleteDirectory(dirName);
            Assert.False(_pm.DirectoryExists(dirName), "Directory exists after deletion");
        }
 public void DeleteStore(string storeLocation)
 {
     if (_persistenceManager.DirectoryExists(storeLocation))
     {
         _persistenceManager.DeleteDirectory(storeLocation);
     }
     else
     {
         throw new StoreManagerException(storeLocation, "Store does not exist");
     }
 }
 public void DeleteStore(string storeLocation)
 {
     // var serverCore = ServerCoreManager.GetServerCore(Configuration.StoreLocation);
     // serverCore.ShutdownStore(storeLocation.Substring(Configuration.StoreLocation.Length + 1), true);
     if (_persistenceManager.DirectoryExists(storeLocation))
     {
         _persistenceManager.DeleteDirectory(storeLocation);
     }
     else
     {
         throw new StoreManagerException(storeLocation, "Store does not exist");
     }
 }
Ejemplo n.º 7
0
 private void EnsureEmptyDirectory(IPersistenceManager pm, string dirName)
 {
     if (pm.DirectoryExists(dirName))
     {
         pm.DeleteDirectory(dirName);
     }
     Thread.Sleep(10);
     pm.CreateDirectory(dirName);
 }