cost 121 ms
如何在 DUnitX 和 Spring4D 1.2.2 中使用 var 参数模拟方法调用 - How can I mock a method call with var parameter in DUnitX and Spring4D 1.2.2

如何模拟接口方法调用,如procedure foo( var i_: integer ) 。 测试方法局部变量作为 var 参数传递,因此测试必须使用 Arg.IsAny(测试不访问它)。 结果值与 var 参数的 out 值不同,因为被测试的方法在返回结果之前对其进行了一些处理。 注释的When测 ...

如何测试可能的 memory 泄漏在测试 object (DUnitX, Spring4D 1.2.2) 破坏后引起的引用 - How to test possible memory leaks caused by references after the destruction of the tested object (DUnitX, Spring4D 1.2.2)

TMyClass包含两个引用。 对IList<integer>的引用和对IMyInterface的引用。 IList<integer>的 mocking 不是必需的。 该框架可能经过良好测试,行为可预测,因此我可以将其视为数据 object。 但是IMyInterface ...

DUNIT X,传递大量字符串 - DUNIT X , pass large number of strings

我需要将大量字符串值传递给测试程序,字符串参数作为逗号文本字符串列表传输,代码如下所示 如果我的字符串列表超过 255 个字符,我会收到以下错误 将许多字符串传递给测试用例的优雅方法是什么? 我也不满意在测试用例定义中编写大字符串列表,看起来很丑。 ...

使用spring.Nullable与DUnitX时出现内存问题 - Memory issues when using spring.Nullable with DUnitX

最近在我公司,我们尝试使用DUnitX来测试我们编写的类。 由于这些类反映了数据库中的实体,因此所有字段都必须接受空值以及特定类型(例如Integer或字符串)。 由于spring4d已经有我们尝试使用的那些: 当执行此代码时,我们将First chance exception ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM