Documents

9781783983605_Mockito_Essentials_Sample_Chapter

Description
Chapter No.1 Exploring Test Doubles A practical guide to get you up and running with unit testing using Mockito
Categories
Published
of 33
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
    Mockito Essentials Sujoy Acharya Chapter No. 1 Exploring Test Doubles   In this package, you will find: The author’s biography A preview chapter from the book, Chapter no.1 Exploring Test Doubles A synopsis of the book’s content Information on where to buy this book  About the Author Sujoy Acharya  works as a software architect with Siemens Technology and Services Pvt. Ltd. (STS). He grew up in a joint family and pursued his graduation in the field of Computer Science and Engineering. His hobbies are watching movies and sitcoms,  playing outdoor sports, and reading books. Sujoy likes to research on upcoming technologies. His major contributions are in the field of Java, J2EE, SOA, Ajax, GWT, and Spring Framework. Sujoy has authored two books, Test-Driven Development with Mockito and  Mastering Unit Testing Using Mockito and JUnit  , both by Packt Publishing. Sujoy designs and develops healthcare software products. He has over 11 years of industrial experience and has architected and implemented large-scale enterprise solutions.  I'd especially like to thank my wife, Sunanda, for pushing me to man up and finish the book, for her patience, and for her endless support for the many hours she spent reviewing my draft and providing valuable inputs. I would also like to thank my mother and my late father for their support,  blessings, and encouragement. To my 20-month-old kid, Abhigyan: I am sorry, I couldn't be around you as much as we all wanted and had to get you away from the laptop many times. I love you very much.  Mockito Essentials We can acquire knowledge in different ways. On one side is theory, and on the other side is the application of theory. Both are important and both make us better. Theoretical knowledge can provide us with a deep understanding of the concept through the experiences of others, but a practical application can give us a deep understanding through the reality of life and the act of doing. I was looking for a Mockito framework guide that could teach me the practical application of the framework, but I didn't find any book or article. Then, I decided to start writing a book that can focus on both the theoretical aspect and the practical application, so that readers can get a deep understanding of the concepts through the act of doing. This book is an advanced-level guide that will help software developers to get complete expertise in unit testing using Mockito as the mocking framework. The focus of the book is to provide readers with comprehensive details on how effectively Mockito can be used for mocking external dependencies in Java application, web application, legacy code, GWT, and SOA. Armed with the knowledge of advanced JUnit concepts and mocking framework essentials, you will be pleasantly surprised at how quickly and easily you can write high-quality, clean, readable, testable, maintainable, and extensible code. What This Book Covers Chapter 1, Exploring Test Doubles,  covers the concept of automated unit tests, talks about the characteristics of a good unit test, and explores the test's doubles. It provides examples of dummy objects, fake objects, stubs, mock objects, and spies. Chapter 2, Socializing with Mockito,  focuses on getting the reader quickly started with the Mockito overview, unit test qualities, and the significance of Mockito in unit testing. It also explains and provides examples of stubbing, answering, throwing exceptions, argument matchers, and method call verification. The Mockito architecture is also uncovered. Chapter 3, Accelerating Mockito,  illustrates advanced Mockito framework topics, such as working with void methods, throwing exceptions from void methods, writing callbacks for void methods, returning values using doReturn, void method chaining, calling srcinal methods, Mockito annotations, verifying arguments using an argument captor, verifying an invocation order, spying objects using spy, changing default Mockito settings, resetting mock objects, inline stubbing, and mock details.

1TOAUTOCJ

Jul 23, 2017

Growth Chart

Jul 23, 2017
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks