Self-testing code explained
Self-testing code is software that incorporates built-in tests (see test-first development).[1] [2]
In Java, to execute a unit test from the command line, a class can have methods like the following.// Executing main
runs the unit test. public static void main(String[] args)
static void test To invoke a full system test, a class can incorporate a method call.public static void main(String[] args) In addition, Java has some Jupiter API libraries for self-testing code. assert can be used in various ways such as assert equals, which checks if the given variable is equal to the value given.@Testvoid checkplayer
See also
Notes and References
- Web site: Self-testing infrastructure-as-code . 2022-12-05 . OpenCredo . en-US.
- Web site: Self Testing Code . 2022-12-05 . martinfowler.com.