Skip to content

Dependency Injection and Mock-based Testing (in-person and virtual)

Photo of Jesse Lang
Hosted By
Jesse L. and Andre B.
Dependency Injection and Mock-based Testing (in-person and virtual)

Details

We are excited to meet in-person once again at SPS Tower! Real people and real pizza, what a combo! We want to continue to make our meetups virtually accessible and engaging for those who wish to attend remotely. For those attending remotely, grab a snack and a beverage, and we'll take the first 30 minutes for open discussion with food and drink, then we'll start the presentation. Please reference "Public Safety Guidelines" below the agenda for details on attending in-person.

Located at SPS Tower. 333 S 7th St, Minneapolis, MN 55402
From street level, go up the escalator and take the elevator bank to the 8th floor.

The elevators are restricted at 6p. An SPS employee will be near the elevator to provide access to the 8th floor until 6:15p. If you arrive after that, please text 612-568-8380 and someone will come down to let you in. Thanks for your patience.

Join us for Dependency Injection and Mock-based Testing, presented by Raj Auradkar, Project Architect at Ameriprise Financial!

Loose coupling of software components is crucial for a well designed software architecture. Unit-testing is also enabled when components are separated into separate concerns. However, loose coupling presents a challenge for discovery of components. How does a component discover and use a dependent component? Hard-wiring this dependency inhibits the ability to unit-test a component. Dependency Injection is a pattern that helps address this challenge. However, to write effective unit tests, we need to ensure that the dependent component code is not invoked. If it is invoked, it is no longer a unit-test. Mocking out the dependency and setting expected behavior on them will ensure proper unit-testing.

We will talk about a library called 'fuse' that implements Dependency Injection and wires the component graph. 'fuse' also comes with a package called 'mock' that generates mocks to be used in unit-testing.

Agenda

  • 6pm - 6:30pm: Networking, food & drink, and announcements
  • 6:30pm - 7:30pm: Dependency Injection and Mock-based Testing - Raj Auradkar
  • 7:30pm - 8:00pm - Open Discussion

Interested in sharing at an upcoming meetup? We'd love to hear what you have to share! Contact the meetup organizers to get the ball rolling!

Public Safety Guidelines

Please reference current CDC guidelines for public gatherings and health self-assessments before attending in-person. We strongly encourage in-person attendees to be vaccinated but we will not require proof of vaccination. Similarly, we suggest in-person attendees wear a mask indoors. Our main concern is to protect everyone and maintain the safety of our office. If you have any questions or concerns with our recommendations, don’t hesitate to contact us. We also provide a virtual option, via Zoom, for those uncomfortable attending in-person.

https://www.meetup.com/golangmn/members/?op=leaders

If anyone has any problems or questions, feel free to text or call:

  • Jesse Lang - 612-568-8380
  • Andre Burgaud - 612-220-5687

Additional Resources

For Go specific events, announcements, training, and jobs in Minneapolis, check out this document (http://bit.ly/minneapolis-golang)!

Slack Channel for Gophers - gophers.slack.com (http://gophers.slack.com/)
To get added, fill out the invite form here:
http://invite.slack.golangbridge.org/

Join the local channel: https://gophers.slack.com/messages/minneapolis/

Go Forum - forum.golangbridge.org (http://forum.golangbridge.org/)

GoBridge (https://twitter.com/golangbridge) is dedicated to building bridges that educate underrepresented communities to teach technical skills and foster diversity in Go.

Special Offers

Get 50% off most ebooks + videos and 40% off most print books from @oreillymedia by using code PCBW http://oreil.ly/1gETXNy

Go OSS Help Wanted Projects (https://github.com/corylanou/oss-helpwanted) - Check out this repo if you want to contribute to open source Go projects. Most projects are labeled for easy/medium/hard issues as well.

How to run a Go Meetup (https://github.com/corylanou/go-meetup) - This is a great resource on how to run a Go meetup and resources to help you run your meetup.

Announcement Reminders:

• Thank You!
• Where are the bathrooms
• Host Announcements
• Job Openings / Hiring Announcements
• Events / Training
• Announce next meetup

Photo of GoMN group
GoMN
See more events