问题标签 [white-box]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
testing - 未找到限定符的定义:使用 Koin 测试创建模块时,如何解决 Kotlin 反射不可用?
我正在尝试使用 Koin 创建一个简单的白盒测试。在设置限定符以将模拟作为参数传递给实例(或假设我想要做的)后,我收到一条错误消息:
org.koin.core.error.NoBeanDefFoundException:没有找到 qualifier='null' & class='class com.imagebucket.main.repository.GalleryRepositoryImpl 的定义(Kotlin 反射不可用)'
测试
视图模型
我也尝试了与Robolectric
runner 类似的方法,但是在Application
文件中创建模块后,我的模拟将不会被调用verify(repository).delete("")
。
我怎样才能设法解决这个问题并继续这个简单的测试?
android - Presenter 方法和回调的圈复杂度计算
每个人。我需要帮助来确定有关此测试方法的圈复杂度。
如果它只是一个简单/简单的 Java 类,则很容易测试和确定基本路径。但是,在上面的测试方法中,我想不出如何计算它的圈复杂度。以及确定谓词节点。
感谢你的帮助。