Skip to content

Commit

Permalink
[Test] Add a dedicate helper class for randomizing Authentication (#8…
Browse files Browse the repository at this point in the history
…5590)

The Authentication class has many internal logics about what values can
or cannot be combined together. It is not straightforward to always get
the logic right when trying to create such an object for tests. This
could lead to spurious failures or incomplete test coverage.

This PR adds a helper class for creating such an object with necessary
configurabililty. The relevant methods in AuthenticationTests now
delegate to the new class to avoid having to touch too many files in one
PR. The ultimate goal is to have it used in every place where an
Authentication object is needed for test to replace any calls to
constructors or mocking.
  • Loading branch information
ywangd committed Apr 13, 2022
1 parent cfafca7 commit df5cb3d
Show file tree
Hide file tree
Showing 2 changed files with 542 additions and 132 deletions.
Loading

0 comments on commit df5cb3d

Please sign in to comment.