use crate::rubase::BaseEntity;
use crate::rubase::rutils::jsonutils;
use crate::rucfg;
use crate::rudi::difactroy::rumulti;
use crate::rudomain::rudb::dbdao::userdao;
use crate::rudomain::rudb::dbsingle;
use crate::rulog;
use crate::rupage::generaldb;
#[test]
fn test_01_rusingle() {
let rs = dbsingle::find_bean_dbsingle().unwrap();
let ret = rs.execute();
rulog::info(ret.as_str());
let ret2 = rs.execute2();
rulog::info2("rets2:", ret2.as_str());
}
#[test]
fn test_04_rumulti() {
let rs = rumulti::find_bean_rumulti().unwrap();
let ret = rs.execute();
rulog::info(ret.as_str());
}
#[test]
fn test_05_rumulti() {
let cfg = rucfg::find_bean_ruconfig().unwrap().read();
rulog::info2("Rumulti execute 123", cfg.to_json().as_str());
}
#[test]
fn test_06_find_bean_usersdao() {
let rs = userdao::find_bean_userdao().unwrap();
let ret = rs.execute();
rulog::info(ret.as_str());
}
#[test]
fn test_07_find_bean_generaldb() {
let rs = generaldb::find_bean_generaldb().unwrap();
let ret = rs.execute();
rulog::info(ret.as_str());
}
#[test]
fn test_08_find_bean_usersdao() {
let mut v = vec![1, 2, 3];
v = v
.iter()
.filter_map(|&x| if x > 2 { Some(x) } else { None })
.collect();
rulog::info2("v:", jsonutils::struct2json(&v).unwrap().as_str());
}