use crate::rubase::BaseEntity;
use crate::rubase::rutils::fileutils;
use crate::rucfg;
use crate::rudi::difactroy::rumulti::rumulti_init;
use crate::rudi::difactroy::{difactroy, rusingle};
use crate::rudi::ditemplate::parse_template;
use crate::rulog::rulog;
#[test]
fn test_01_f_commit() {
let ret = fileutils::read_file("./commit.bat");
rulog::info(ret.unwrap().as_str());
}
#[test]
fn test_02_f_cfg_test() {
let ret = fileutils::read_file("./tests/cfg_test.rs");
rulog::info(ret.unwrap().as_str());
}
#[test]
fn test_03_f_factroy() {
let ret = fileutils::read_file("./src/rudi/difactroy/difactroy.rs");
rulog::info(ret.unwrap().as_str());
}
#[test]
fn test_04_f_factroy() {
let cfg = rucfg::find_bean_ru_config().unwrap();
println!("{}", cfg.config.lock().unwrap().software.logLevel);
}
#[test]
fn test_05_f_factroy() {
let template = parse_template::ParseTemplate::parse_template("hello world");
rulog::info(template.as_str());
}
#[test]
fn test_06_rusingle() {
let rs = rusingle::find_bean_rusingle().unwrap();
let ret = rs.execute();
crate::rulog::info(ret.as_str());
}
#[test]
fn test_07_rumulti() {
let rs = rumulti_init::find_bean_rumulti().unwrap();
let ret = rs.execute();
crate::rulog::info(ret.as_str());
}
#[test]
fn test_08_factroy() {
let ret = fileutils::read_file("./src/rudi/difactroy/dbisingle/dbisingle");
rulog::info(ret.unwrap().as_str());
}
fn test_09_build_single_file_name() {
let pt = parse_template::find_bean_pt().unwrap();
let template = pt.build_single_file_name("RuSingle");
rulog::info(template.as_str());
}
#[test]
fn test_10_build_single_name() {
let pt = parse_template::find_bean_pt().unwrap();
let template = pt.build_single_name("RuSingle");
rulog::info(template.as_str());
}
#[test]
fn test_11_list_all_files_rs() {
let files = fileutils::list_all_files_rs("./src");
for file in files {
rulog::info2("file:", file.as_str());
}
}
#[test]
fn test_12_parse_all_files() {
let mut diFacty = difactroy::DiFactroy::new();
diFacty.notShowExist = true;
let struInfos = diFacty.parse_all_files("./src");
for stru in struInfos {
if diFacty.notShowExist && stru.existIniFile {
continue;
}
rulog::info2("struct file:===", stru.to_json().as_str());
}
}