mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-13 22:00:32 +05:30
Merge pull request #545 from XiangRongLin/comment_reset
Add comment explaining YoutubeParsingHelper.resetClientVersionAndKey
This commit is contained in:
commit
64f6b0478f
@ -358,9 +358,19 @@ public class YoutubeParsingHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Only use in tests.
|
||||
* <p>
|
||||
* <b>Only use in tests.</b>
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Quick-and-dirty solution to reset global state in between test classes.
|
||||
* </p>
|
||||
* <p>
|
||||
* This is needed for the mocks because in order to reach that state a network request has to
|
||||
* be made. If the global state is not reset and the RecordingDownloader is used,
|
||||
* then only the first test class has that request recorded. Meaning running the other
|
||||
* tests with mocks will fail, because the mock is missing.
|
||||
* </p>
|
||||
*/
|
||||
public static void resetClientVersionAndKey() {
|
||||
clientVersion = null;
|
||||
|
Loading…
Reference in New Issue
Block a user