JUnit5 execution condition that checks whether a connection to public Internet is available.
First, you add this to your pom.xml
:
<dependency>
<groupId>com.yegor256</groupId>
<artifactId>jping</artifactId>
<version>0.0.0</version>
</dependency>
Then, you use it like this:
import com.yegor256.WeAreOnline;
@ExtendWith(WeAreOnline.class)
final class MyTest {
// Your test methods
}
Fork repository, make changes, send us a pull request.
We will review your changes and apply them to the master
branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:
$ mvn clean install -Pqulice
You will need Maven 3.3+ and Java 8+.