JUnit
-
Core Java
JUnit: Testing Exceptions with Java 8 and AssertJ 3.0.0
AssertJ 3.0.0 release for Java 8 makes testing exceptions much easier than before. In one of my previous blog post…
Read More » -
Enterprise Java
Automated testing of REST-services
Despite I’m a Java and Scala developer I still passioned a lot in testing of software. If to be more…
Read More » -
Core Java
Nifty JUnit : Using Rule on Method and Class level
As shown in a the post Nifty JUnit : Working with temporary files, it is possible to use @Rule in…
Read More » -
Java核心
单元测试Junit入门(PDF下载)
编者按:在Java Code Geeks,我们已经提供了大量JUnit的教程,例如JUnit入门示例,使用JUnit的断言和注释例子,JUnit的注释示例等。然而,我们倾向收集所有的JUnit特性在一个详细的指南以方便读者。我们希望你喜欢它! 目录 1.单元测试的介绍 1.1. 什么是单元测试? 1.2. 测试覆盖 1.3. 在Java中的单元测试 2. JUnit的介绍 2.1. 使用Eclipse JUnit的简单示例 2.2. JUnit的注释 2.3. JUnit断言…
Read More » -
Core Java
Using junit for something else
junit != unit test Junit is the Java unit testing framework. We use it for unit testing usually, but many…
Read More » -
Core Java
Testing System.in and System.out with system-rules
Writing unit tests is an integral part of software development. One problem you have to solve when your class under…
Read More » -
Core Java
Separating Integration Tests from Unit Tests Using Maven Failsafe & JUnit @Category
Why Unit Tests Should Run Separately From Integration Tests TDD at the Unit Testing level is fairly straight-forward, since classes in unit…
Read More » -
Core Java
Given When Then in Java
tl;dr you can use labels to clarify a given-when-then style of testing. What is given-when-then? given-when-then is a commonly used…
Read More » -
Core Java
Testing with files and directories in JUnit with @Rule
Testing with Files and directories in JUnit is easy thanks to TemporaryFolder @Rule. In JUnit rules (@Rule) can be used…
Read More »