Commit 1fe84051 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Remove PrimaryAccountMutatorTest test fixture

The fixture made code more convoluted as the default test environment
had to be created in the constructor (as the tests expected it) and
then recreated afterwards for the ClearPrimaryAccount tests.

Instead not using the fixture make the tests more straight-forward
as the objects used by each individual tests are explicitly created.
This adds some boilerplate, but logic of RunClearPrimaryAccountTest
is now clear (previously you had to check in the test what the value
of the account consistency method was, while now it is expliclty
passed to the method).

This follow the recommendation from the following tips of the week
https://abseil.io/tips/122 that recommends avoiding fixtures.

Bug: none
Change-Id: Ia8af245f7b1a3bdeddb7a09fb9baa54a371b8512
Reviewed-on: https://chromium-review.googlesource.com/c/1363199
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Reviewed-by: default avatarMario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#615501}
parent 2545cc42
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