public void AddAndRemoveFile() { const string fileA = "fileA.txt"; var fs = File.Create(workingDirectoryForSVNTests + "\\" + fileA, 10); fs.Close(); vcc.Status(StatusLevel.Local, DetailLevel.Normal); var status = vcc.GetAssetStatus(fileA); Assert.IsTrue(status.assetPath.Compose() == fileA, "AssetPath mismatch: " + status.assetPath.Compose() + "!=" + fileA); Assert.IsTrue(status.fileStatus == VCFileStatus.Unversioned, "Unversioned"); vcc.Add(new[] { fileA }); vcc.Status(StatusLevel.Local, DetailLevel.Normal); status = vcc.GetAssetStatus(fileA); Assert.IsTrue(status.fileStatus == VCFileStatus.Added, "Added"); vcc.Commit(new[] { fileA }, "AddFile Test 1/2"); vcc.Status(StatusLevel.Local, DetailLevel.Normal); status = vcc.GetAssetStatus(fileA); Assert.IsTrue(status.fileStatus == VCFileStatus.Normal, "Normal"); var basePath = vcc.GetBasePath(fileA); Assert.That(File.Exists(basePath), Is.True, "Base path exist: " + basePath); vcc.Delete(new[] { fileA }, OperationMode.Normal); vcc.Status(StatusLevel.Local, DetailLevel.Normal); status = vcc.GetAssetStatus(fileA); Assert.IsTrue(status.fileStatus == VCFileStatus.Deleted, "Deleted"); vcc.Commit(new[] { fileA }, "AddFile Test 2/2"); vcc.Status(StatusLevel.Local, DetailLevel.Normal); status = vcc.GetAssetStatus(fileA); Assert.That(status.Reflected, Is.False, "fileA is not present in repo"); Assert.IsTrue(!File.Exists(workingDirectoryForSVNTests + "\\" + fileA), "File removed again"); }
public virtual bool Add(IEnumerable <string> assets, bool _bEmptyDepth = false) { return(vcc.Add(assets, _bEmptyDepth)); }
public bool Add(IEnumerable <string> assets, bool _bEmptyDepth = false) { return(HandleExceptions(() => vcc.Add(assets, _bEmptyDepth))); }
public bool Add(IEnumerable <string> assets) { return(HandleExceptions(() => vcc.Add(assets))); }
public virtual bool Add(IEnumerable <string> assets) { return(vcc.Add(assets)); }