Refactor cloud_policy_client_unittest
* Delete default constructors in mock callback observers because writing them explicitly doesn’t change anything. * Make `MockDeviceManagementService service_` a strict mock so we don’t need to have EXPECT_CALL().Times(0) in many test. * Change some `EXPECT_CALL(..., Func(_))` into `EXPECT_CALL(..., Func)` where checking arguments is not useful. * Remove some arguments from Expect* functions where they were unused. * Extract creation of policy_response into a standalone function to create it only when necessary and decrease implicit dependencies. * Reformat the file. Bug: 1150887 Test: CloudPolicyClientTest* Change-Id: I3c150a59161a6272d37f19234520a8ac9cb850ea Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2550032 Commit-Queue: Michael Ershov <miersh@google.com> Reviewed-by:Pavol Marko <pmarko@chromium.org> Cr-Commit-Position: refs/heads/master@{#844120}
Showing
This diff is collapsed.
Please register or sign in to comment