[sqlunit] *** Running SQLUnit file: p_cc.xml [sqlunit] Getting connection(DEFAULT) [sqlunit] Setting up test... [sqlunit] Running test[1]: PASSING NULL (109ms) [sqlunit] Running test[2]: VALID CARD NUMBER (4992739871) (109ms) [sqlunit] Assertion "outparams-equal" failed (6(NUMERIC) != 1(NUMERIC) at outparams[0]) [sqlunit] *** expected: [sqlunit] [sqlunit] 6 [sqlunit] [sqlunit] *** but got: [sqlunit] [sqlunit] 1 [sqlunit] [sqlunit] [sqlunit] Running test[3]: VALID CARD NUMBER (4012888888881881) (0ms) [sqlunit] Running test[4]: VALID CARD NUMBER (4111111111111111) (0ms) [sqlunit] Running test[5]: VALID CARD NUMBER (4222222222222) (0ms) [sqlunit] Assertion "outparams-equal" failed (2(NUMERIC) != 0(NUMERIC) at outparams[0]) [sqlunit] *** expected: [sqlunit] [sqlunit] 2 [sqlunit] [sqlunit] *** but got: [sqlunit] [sqlunit] 0 [sqlunit] [sqlunit] [sqlunit] Running test[6]: RANDOM NUMBER (5498975) (0ms) [sqlunit] Tearing down test... [sqlunit] sqlunit-ant: SQLUnit Tests Failed: In file: p_cc.xml, tests: 6, failures: 2, errors = 0 [sqlunit] SQLUnit Tests Failed: In file: p_cc.xml, tests: 6, failures: 2, errors = 0 我能发现这些问题,并修复它,同时在几秒内运行这些测试。这看起来是不是非常酷? 这次的测试帮助我意识到如果我传一串都是奇数的字符串,它将给提示给我错误的结果。例如,如果你的 Visa 卡,他是典型的十六位长的数字,并且最后一位数字是对所有数字的验证。你以除开校验数以外最右边的数字开始,并且往回数。这是有将数字放入上面的 PL/SQL 整数表格的趋势。 我将在以后的测试中指出更多创建的不正确格式的信用卡号,我仅仅想把这个作为 SQLUnit 的一个示例程序。 尝试。使用。使得我了解它的原理。也许我们能再幸运地遇到一些 Java 程序员将这个项目重新运行起来。
有用的词
anticipat 预支信用证certain 必然
propagated 繁殖 增殖
regression 衰退 回归
harness 工具 马具
semi-production 半生产
cleansed 弄干净 清洗
viable alternative 可行的替代品
reacquaint 重新认识
Barnacles 攀附之物
transposition 调换 变换
adjacent 相邻的 临近的
impetus 势头 动力