public void TruncateLog() { if (!TestHelper.GetDlcPath(out string dlcPath)) { return; } var ope = new UoeDatabaseOperator(dlcPath); var db = GetDb("trunclog"); ope.Create(db); Assert.IsTrue(db.Exists()); ope.TruncateLog(db); try { ope.Start(db); var oldSize = new FileInfo(Path.Combine(TestFolder, "trunclog.lg")).Length; ope.TruncateLog(db); var newSize = new FileInfo(Path.Combine(TestFolder, "trunclog.lg")).Length; Assert.AreNotEqual(oldSize, newSize); var cs = ope.GetDatabaseConnection(db); Assert.IsFalse(cs.SingleUser); Assert.IsTrue(string.IsNullOrEmpty(cs.Service)); } finally { ope.Kill(db); } }