Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock mix pl tests #482

Merged
merged 17 commits into from
Jan 15, 2021
Merged

Mock mix pl tests #482

merged 17 commits into from
Jan 15, 2021

Commits on Jan 10, 2021

  1. Configuration menu
    Copy the full SHA
    4dad3d6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1bcb9c7 View commit details
    Browse the repository at this point in the history
  3. Add additional downloader implementations

    RecordingDownloader relies on the real downloader and saves the request/response pair into a json file.
    MockDownloader uses json files from above and mocks responses for specific requests.
    XiangRongLin committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    7c40fb8 View commit details
    Browse the repository at this point in the history
  4. Add DownloaderFactory to return a specific downloader based on 2 vari…

    …ables.
    
    If the system property 'downloader' is set that use that specific downloader. This is used from gradle by appending `-Ddownloader=ABCD to the command.
    ABCD is one of DownloaderType.
    The other variable is the static property `DEFAULT_DOWNLOADER` in DownloaderFactory, which can be easily changed as needed inside the IDE according to development needs`.
    
    Normal workflow would be to first use the recording downloader and afterwards only use mocks, if the requests are always staying the same.
    XiangRongLin committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    e6e8e39 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    285c26e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f8aa989 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f447a7a View commit details
    Browse the repository at this point in the history
  8. Add method to allow resetting youtube client version and key

    This is needed so that a request is made for each test class when running multiple at once. This way RecordingDownloader records all necessary requests.
    This works as long as tests are run sequentially and not in parallel.
    XiangRongLin committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    35e2997 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    255c726 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f91916c View commit details
    Browse the repository at this point in the history
  11. Prefix mock file from RecordingDownloader with "generated_mock_"

    Only read those files in MockDownloader
    XiangRongLin committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    1ea6c6c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e82cb1e View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2021

  1. Configuration menu
    Copy the full SHA
    63c237d View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2021

  1. Configuration menu
    Copy the full SHA
    3455f0f View commit details
    Browse the repository at this point in the history
  2. Use @link for downloader

    XiangRongLin committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    4af50c6 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2021

  1. Configuration menu
    Copy the full SHA
    6ca7123 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2021

  1. Regenerate mock files

    XiangRongLin committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    4f81d9d View commit details
    Browse the repository at this point in the history