public void NoFileAddThenRead() { Directory.CreateDirectory(Path.GetDirectoryName(FullPath)); File.Delete(FullPath); var deleted = new DeletedDefaultAc(FullPath); deleted.Add("N567S"); Assert.IsTrue(deleted.DeletedRegistration().SequenceEqual("N567S")); }
public void AddThenRead() { Directory.CreateDirectory(Path.GetDirectoryName(FullPath)); File.WriteAllText(FullPath, text); var deleted = new DeletedDefaultAc(FullPath); deleted.Add("N567S"); Assert.IsTrue(deleted.DeletedRegistration().SequenceEqual("A-BCDE", "N331D", "N567S")); }
private void AddToDeletedDefaultAc(string path, string reg) { if (Paths.PathsAreSame(Path.GetDirectoryName(path), ConfigLoader.DefaultFolderPath)) { var deleted = new DeletedDefaultAc(); var succeed = deleted.Add(reg); if (!succeed) { ParentControl.ShowError(deleted.ErrorMessage); } } }