public void UpdateStructureFile() { if (!TestHelper.GetDlcPath(out string dlcPath)) { return; } var ope = new UoeDatabaseOperator(dlcPath); var tgtDb = GetDb("updatest"); ope.Create(tgtDb); Assert.IsTrue(tgtDb.Exists()); File.Delete(tgtDb.StructureFileFullPath); ope.UpdateStructureFile(tgtDb, false, false); Assert.IsTrue(File.ReadAllText(tgtDb.StructureFileFullPath).Contains(Path.Combine(tgtDb.DirectoryPath, "updatest.b1"))); File.Delete(tgtDb.StructureFileFullPath); ope.UpdateStructureFile(tgtDb, false, true); Assert.IsFalse(File.ReadAllText(tgtDb.StructureFileFullPath).Contains(Path.Combine(tgtDb.DirectoryPath, "updatest.b1"))); Assert.IsTrue(File.ReadAllText(tgtDb.StructureFileFullPath).Contains(tgtDb.DirectoryPath)); File.Delete(tgtDb.StructureFileFullPath); ope.UpdateStructureFile(tgtDb, true, false); Assert.IsFalse(File.ReadAllText(tgtDb.StructureFileFullPath).Contains(Path.Combine(tgtDb.DirectoryPath, "updatest.b1"))); Assert.IsFalse(File.ReadAllText(tgtDb.StructureFileFullPath).Contains(tgtDb.DirectoryPath)); Assert.IsTrue(File.ReadAllText(tgtDb.StructureFileFullPath).Contains("updatest.b1")); File.Delete(tgtDb.StructureFileFullPath); ope.UpdateStructureFile(tgtDb, true, true); Assert.IsFalse(File.ReadAllText(tgtDb.StructureFileFullPath).Contains(Path.Combine(tgtDb.DirectoryPath, "updatest.b1"))); Assert.IsFalse(File.ReadAllText(tgtDb.StructureFileFullPath).Contains(tgtDb.DirectoryPath)); Assert.IsFalse(File.ReadAllText(tgtDb.StructureFileFullPath).Contains("updatest.b1")); Assert.IsTrue(File.ReadAllText(tgtDb.StructureFileFullPath).Contains(".")); }