One of the most important concepts to build a software with quality is the automated tests. Going deep into the automated tests, one of its most explored branches is the unit tests. This article will show an overview about unit tests and then a practical “JUnit and Mockito handbook”, presenting their most useful features and […]
Tag: junit
Mocking the current date-time (properly) with Java
It’s not unusual to face situations where we need to capture the current system’s date-time in order to calculate some future date, make validations and so on. The problem generally appears as soon as we need to check whether some calculated date was correctly generated or not. When we directly use the instruction “new Date()” […]
Git hooks pre-commit para projetos Java e Ruby
Hooks, que podem ser traduzidos como “ganchos”, são pequenos scripts que podem ser adicionados dentro do diretório “.git/hooks/”, existente em todo projeto que utilize o Git como ferramenta de controle de versão, para efetuar ações disparadas por alguns eventos, como pre-commit, post-commit etc (para conhecer todos os eventos visite o Git Community Book). Quando executamos […]