A reliable and comprehensive test suite for your applications isn’t a luxury anymore—it’s a requirement. This course is the second in a series of "Testing in Go" programs that teach you how to test your Go applications to make sure what you ship works the first time. This course focuses specifically on using interfaces and mocks to make your code more testable by injecting dependencies.
- Explore Go's interfaces as they relate to testing
- Understand how to make your code more testable by injecting dependencies
- Discover how to use Go's interfaces for dependency injection
- Create mocks of your external dependencies and use them to make your unit tests more self-contained
- Learn how to keep your code testable by organizing your packages by dependency
Brian Ketelsen is the founder of the Gopher Academy, the parent group that manages GopherCon, the Go programming language conference. A prolific open source enthusiast, he has contributed to many of Go's largest projects, including Docker, Kubernetes, etcd, SkyDNS, Kong, Go-Kit, and Goa. Brian holds a bachelor’s degree in computer science from American InterContinental University.
- Title: Using Interfaces and Mocks in Go
- Release date: July 2017
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491992005
You might also like
Head First Design Patterns, 2nd Edition
You know you don’t want to reinvent the wheel, so you look to design patterns—the lessons …
Advanced Solutions in Go - Testing and Distributed Systems
Bridge the gap between basic understanding of Go and use of its advanced features About This …
Get Programming with Go
Summary Get Programming with Go introduces you to the powerful Go language without confusing jargon or …
Go in Action Video Edition
"A concise and comprehensive guide to exploring, learning, and using Go." From the Foreword by Steve …