1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Refactor: Pull more classes into baselib

This commit is contained in:
gnosygnu
2021-12-19 16:19:19 -05:00
parent 48559edffe
commit 0e80d7ef6d
7999 changed files with 1375876 additions and 1365947 deletions

View File

@@ -1,10 +1,10 @@
package gplx.dbs.qrys;
import gplx.Byte_;
import gplx.DateAdp_;
import gplx.Decimal_adp_;
import gplx.core.tests.Gftest;
import gplx.objects.lists.GfoListBase;
import gplx.frameworks.tests.GfoTstr;
import gplx.types.basics.utls.ByteUtl;
import gplx.types.commons.GfoDateUtl;
import gplx.types.commons.GfoDecimalUtl;
import gplx.types.commons.lists.GfoListBase;
import org.junit.Test;
public class Db_val_typeTest {
@@ -12,18 +12,18 @@ public class Db_val_typeTest {
TestToSqlStr
("ABC true 1 2 3 4.0 5 6 XYZ"
,"ABC ? ? ? ? ? ? ? XYZ"
, true, Byte_.By_int(1), 2, (long)3, (float)4, (double)5, Decimal_adp_.int_(6)
, true, ByteUtl.ByInt(1), 2, (long)3, (float)4, (double)5, GfoDecimalUtl.NewByInt(6)
);
}
@Test public void Strings() {
TestToSqlStr
("ABC 'abc' 'a\\'\"c' 'xyz' 'x\\'\"z' '2021-01-02 03:04:05.006' XYZ"
,"ABC ? ? ? ? ? XYZ"
, "abc", "a'\"c", "xyz", "x'\"z", DateAdp_.new_(2021, 1, 2, 3, 4, 5, 6)
, "abc", "a'\"c", "xyz", "x'\"z", GfoDateUtl.New(2021, 1, 2, 3, 4, 5, 6)
);
}
private void TestToSqlStr(String expd, String sql, Object... paramArray) {
String actl = Db_val_type.ToSqlStr(sql, new GfoListBase<>().AddMany(paramArray));
Gftest.Eq__str(expd, actl);
GfoTstr.Eq(expd, actl);
}
}