public void Test_load_ttl(int ns_id, String ttl_str, Xowd_page_itm expd) { Xowe_wiki wiki = bldr_fxt.Wiki(); Xow_ns ns = wiki.Ns_mgr().Ids_get_or_null(ns_id); byte[] ttl_bry = Bry_.new_a7(ttl_str); wiki.Db_mgr_as_sql().Load_mgr().Load_by_ttl(actl, ns, ttl_bry); Tfds.Eq(expd.Id(), actl.Id()); Tfds.Eq_date(expd.Modified_on(), actl.Modified_on()); Tfds.Eq(expd.Redirected(), actl.Redirected()); Tfds.Eq(expd.Text_len(), actl.Text_len()); }
public void Test_category_v2(String ctg_name_str, int... expd) { Xowe_wiki wiki = bldr_fxt.Wiki(); byte[] ctg_name_bry = Bry_.new_a7(ctg_name_str); Xoctg_data_ctg ctg = new Xoctg_data_ctg(ctg_name_bry); wiki.Db_mgr_as_sql().Load_mgr().Load_ctg_v2(ctg, ctg_name_bry); Tfds.Eq_ary(expd, Xto_int_ary(ctg)); }
public void Test_search(String search_word_str, int... expd) { Xowe_wiki wiki = bldr_fxt.Wiki(); List_adp rv = List_adp_.new_(); byte[] search_word_bry = Bry_.new_a7(search_word_str); wiki.Db_mgr_as_sql().Load_mgr().Load_search(Cancelable_.Never, rv, search_word_bry, 100); Tfds.Eq_ary(expd, Xto_int_ary(rv)); }
public void Init_page_insert(Int_obj_ref page_id_next, int ns_id, String[] ttls) { Xowe_wiki wiki = this.Wiki(); int len = ttls.length; DateAdp modified_on = Tfds.Now_time0_add_min(0); Xowd_page_tbl tbl_page = wiki.Db_mgr_as_sql().Core_data_mgr().Tbl__page(); tbl_page.Insert_bgn(); for (int i = 0; i < len; i++) { String ttl = ttls[i]; int page_id = page_id_next.Val(); tbl_page.Insert_cmd_by_batch( page_id, ns_id, Bry_.new_u8(ttl), false, modified_on, 0, page_id, 0, 0); page_id_next.Val_add(1); } tbl_page.Insert_end(); }
public void Test_file(String url, String expd) { String actl = Io_mgr.I.LoadFilStr(url); Tfds.Eq_str_lines(expd, actl); }
public void Test_load_page(int ns_id, int page_id, String expd) { Xowe_wiki wiki = bldr_fxt.Wiki(); Xow_ns ns = wiki.Ns_mgr().Ids_get_or_null(ns_id); wiki.Db_mgr_as_sql().Load_mgr().Load_page(actl.Id_(page_id), ns, false); Tfds.Eq(expd, String_.new_a7(actl.Text())); }