JUnit
-
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 » -
Core Java
Unit Testing exercise with FizzBuzz and JUnitParams
I sometimes use FizzBuzz to demonstrate the basics of unit testing to newbies. Although FizzBuzz is really simple problem, it…
Read More » -
Core Java
JUnit Tutorial for Unit Testing – The ULTIMATE Guide (PDF Download)
EDITORIAL NOTE: We have provided plenty of JUnit tutorials here at Java Code Geeks, like JUnit Getting Started Example, JUnit…
Read More » -
Core Java
Lightweight Integration Tests for Eclipse Extensions
Recently I introduced a little helper for Eclipse extension point evaluation. The auxiliary strives to reduce boilerplate code for common…
Read More »