Commit 362ca06a authored by Michael Ershov's avatar Michael Ershov Committed by Chromium LUCI CQ

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: default avatarPavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844120}
parent d80e414e
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment