Fix typo and reword some explanations
This commit is contained in:
parent
adf9d7d10f
commit
e13e237392
|
@ -9,7 +9,7 @@ import java.lang.annotation.Target;
|
|||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Marker annotation to skip test if it not run with mocks.
|
||||
* Marker annotation to skip test in certain cases.
|
||||
*
|
||||
* {@link MockOnlyRule}
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@ import javax.annotation.Nonnull;
|
|||
public @interface MockOnly {
|
||||
|
||||
/**
|
||||
* Explanation why this test shold only be run with mocks and not against real websites
|
||||
* Explanation why this test should be skipped
|
||||
*/
|
||||
@Nonnull String reason();
|
||||
}
|
|
@ -9,19 +9,21 @@ import org.schabi.newpipe.downloader.DownloaderType;
|
|||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the system variable "downloader" is set to "REAL" and skips the tests if it is.
|
||||
* Otherwise execute the test.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Use it by creating a public variable of this inside the test class and annotate it with
|
||||
* {@link org.junit.Rule}. Then annotate the tests to be skipped with {@link MockOnly}
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Allows skipping unreliable or time sensitive tests in CI pipeline.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Use it by creating a public variable of this inside the test class and annotate it with
|
||||
* {@link org.junit.Rule}. Then annotate the specific tests to be skipped with {@link MockOnly}
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* It works by checking if the system variable "downloader" is set to "REAL" and skips the tests if it is.
|
||||
* Otherwise it executes the test.
|
||||
* </p>
|
||||
|
||||
*/
|
||||
public class MockOnlyRule implements TestRule {
|
||||
|
||||
|
@ -42,7 +44,6 @@ public class MockOnlyRule implements TestRule {
|
|||
+ annotation.reason(), isMockDownloader);
|
||||
}
|
||||
|
||||
|
||||
base.evaluate();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue