-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
https://coderfengyun.github.io/2021/06/15/test-series.testing-state-vs-testing-interactions/
单元测试主要有两种方式来验证待验证代码是否正常工作:通过测试状态和通过测试调用。二者有什么分别呢? 测试状态意味着只去验证待测代码返回的结果是否正确12345678public void testSortNumbers() { NumberSorter numberSorter = new NumberSorter(quicksort, bubbleSort); // Verify