AbstractRequiredApprovalConfigTest: Improve readability of 2 tests

1. testGetFromGlobalPluginConfig:
This method in the base class verified that "Code-Review+2" was
configured, but this configuration was done in the child classes via an
annotation. Due to this just looking at the
testGetFromGlobalPluginConfig() method it's unclear how the assertions
can work. To understand the assertions one must look at the calling
code. This is bad. Inline the method to improve the test readability,
even if it means that a small amount of code is being duplicated. After
doing this we can now use a more realistic label for the
getFromGlobalPluginConfig() test in OverrideApprovalConfigTest.

2. testCannotGetFromGlobalPluginConfigIfConfigIsInvalid:
Again the assertion only makes sense if you know the calling code.
Provide the invalid value as input, so that the assertion become more
readable.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I22a639cb878787fff8134ec4f3fcf397d21a1a20
3 files changed
tree: 8ae7c73b2249741a53d40d529c6fcd49a9182baa
  1. java/
  2. javatests/
  3. proto/
  4. resources/
  5. test/
  6. ui/
  7. .eslintrc.json
  8. .gitignore
  9. .gitreview
  10. bower.json
  11. BUILD
  12. LICENSE
  13. package-lock.json
  14. package.json
  15. README.md
README.md

Gerrit Code Review code-owners plugin

This plugin provides support for defining code owners for files in a repository.

If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.

Also see resources/Documentation/about.md

IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md