eBook: Mockito Made Clear (DRM EPUB)
 
電子書格式: DRM EPUB
作者: Ken Kousen 
分類: Web programming  
書城編號: 26010419


售價: $156.00

購買後立即進貨, 約需 1-4 天

 
 
製造商: Pragmatic Bookshelf
出版日期: 2023/01/24
頁數: 88
ISBN: 9798888650134

商品簡介
Mockito is the most popular framework in the Java world for automating unit testing with dependencies. Learn the Mockito API and how and when to use stubs, mocks, and spies. On a deeper level, discover why the framework does what it does and how it can simplify unit testing in Java. Using Mockito, you'll be able to isolate the code you want to test from the behavior or state of external dependencies without coding details of the dependency. You'll gain insights into the Mockito API, save time when unit testing, and have confidence in your Java programs.If you've only ever run a few JUnit tests or injected stubs into classes to return preset values, it's time to level up your Java toolbox. Dependencies on other classes and external resources can obscure issues and make bugs hard to detect. You need to test classes in isolation to truly pinpoint your problems. And while you could write dummy classes to replace dependencies yourself, Mockito automates the process and helps you fix your code faster.Start with the Mockito API to generate fake classes for dependencies, configure how each should respond when their methods are called, and verify that the class under test interacts with dependencies the way you'd expect. Next, build unit tests with the Mockito framework and feel confident not just that methods are called, but that they are called the correct number of times and in the correct order. Along the way, follow clear test examples based on JUnit 5 to create stubs, mocks, and spies and find the source of any problems lurking in Java classes.Save time, write better code, and have more confidence in your Java programs with Mockito.What You Need:In this book, we use Mockito 4, the latest version of the Mockito framework, but the concepts and the code works on versions 2 and 3. The tests are based on JUnit 5 (known as Jupiter). There are some differences in JUnit 4, but none of those affect Mockito directly. The underlying Java version is 11, but the provided tests in the GitHub repository will work successfully for any version of Java above that (including the current Long Term Support version, 17).
Ken Kousen 作者作品表

eBook: Mockito Made Clear (DRM PDF)

eBook: Mockito Made Clear (DRM EPUB)

eBook: Help Your Boss Help You (DRM PDF)

eBook: Help Your Boss Help You (DRM EPUB)

Kotlin Cookbook (Paperback)

eBook: Kotlin Cookbook: A Problem-Focused Approach (DRM PDF)

eBook: Kotlin Cookbook: A Problem-Focused Approach (DRM EPUB)

現代 Java|輕鬆解決 Java 8 與 9 的難題

Modern Java Recipes (Paperback)

eBook: Modern Java Recipes: Simple Solutions to Difficult Problems in Java 8 and 9 (DRM PDF)

eBook: Modern Java Recipes: Simple Solutions to Difficult Problems in Java 8 and 9 (DRM EPUB)

Gradle Recipes for Android (Paperback)

eBook: Gradle Recipes for Android: Master the New Build System for Android (DRM PDF)

eBook: Gradle Recipes for Android: Master the New Build System for Android (DRM EPUB)

* 以上資料僅供參考之用, 香港書城並不保證以上資料的準確性及完整性。
* 如送貨地址在香港以外, 當書籍/產品入口時, 顧客須自行繳付入口關稅和其他入口銷售稅項。

 

 

 

  我的賬戶 |  購物車 |  出版社 |  團購優惠
加入供應商 |  廣告刊登 |  公司簡介 |  條款及細則

香港書城 版權所有 私隱政策聲明

顯示模式: 電腦版 (改為: 手機版)