Oreilly - Using Interfaces and Mocks in Go
by Brian Ketelsen | Released July 2017 | ISBN: 9781491992005
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 testingUnderstand how to make your code more testable by injecting dependenciesDiscover how to use Go's interfaces for dependency injectionCreate mocks of your external dependencies and use them to make your unit tests more self-containedLearn how to keep your code testable by organizing your packages by dependencyBrian 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. Show and hide more
- Introduction to Using Mocks and Interfaces 00:03:19
- Dependency Injection 00:02:28
- Using Interfaces for Dependency Injection 00:03:03
- Creating Mocks of Your Dependencies 00:03:44
- Package Organization 00:03:49
Show and hide more
TO MAC USERS: If RAR password doesn't work, use this archive program:
RAR Expander 0.8.5 Beta 4 and extract password protected files without error.
TO WIN USERS: If RAR password doesn't work, use this archive program:
Latest Winrar and extract password protected files without error.